How to fix losing sound bug

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

How to fix losing sound bug

#1 Post by 666philb »

there has been quite a few posts on the forum about puppy losing sound after a few boots, requiring alsawizard to be run again and again.

This fix worked for me in lucid puppy, and may work in other pups.

first off, when the sound is working, open /etc/modprobe.d/alsa.conf

Code: Select all

alias char-major-14-* soundcore
alias char-major-116-* snd
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
options sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.24.2 ---
alias snd-card-0 snd-cmipci
alias sound-slot-0 snd-cmipci
# --- END: Generated by ALSACONF, do not edit. ---
you should see your correct soundcard near the end

Code: Select all

alias snd-card-0 snd-cmipci
alias sound-slot-0 snd-cmipci
now look at /etc/modprobe.d/alsa.conf when the sound isn't working. In my case it showed the wrong driver loaded 'alias snd-card-0 snd-hda-intel'

now we know which driver is conflicting with our soundcard, so goto menu>>>system>>>boot manager configure bootup, click the 'blacklist a module' button, and blacklist the conflicting driver.

sound then worked for me every boot, but sometimes the volume icon in the taskbar wouldn't show. so to solve this i put a small script in /root/Startup

Code: Select all

#!/bin/sh
sleep 10
/root/Startup/retrovol_tray
and now i have both sound and the volume control every boot :)
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#2 Post by OscarTalks »

Hello 666philb,

Nice to see someone addressing this issue. It is more complicated if you are running 2 soundcards. I have one computer which uses snd-hda-intel for the mobo card and snd-cmipci for the pci card so I can't blacklist them. I use them both to route audio from different programs to different destinations. At boot-up the process of allocation of index numbers is random unless I manually edit (add lines to) a different file at /etc/modprobe.d/alsa-base.conf eg:-

Code: Select all

# Soundcard order at boot-up
options snd-hda-intel index=0
options snd-cmipci index=1
Not good for inexperienced users methinks.

I was hoping that someone who is good at coding could devise a method for these numbers to be got under control by writing some lines in that file via a script or something. I guess it would have to be capable of responding to hardware changes.

Maybe the Multiple Sound Card Wizard could be modified to do this?

On another machine even a dial-up modem is detected as a soundcard so more index numbers are introduced and juggled around at each boot-up. This disrupts the settings in retrovol too so the whole thing can become quite a problem. It may explain also why people who think they only have one soundcard experience this sometimes.
Oscar in England
Image

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#3 Post by darkcity »

666philb, nice work.

I've had the random sound card numbering problem too, wasn't sure how common it was. Will have a look at the script.
; -)

edit: as far as i know modem cards should be blacklist for alsa?
Last edited by darkcity on Mon 23 Jul 2012, 11:44, edited 1 time in total.

Dewbie

#4 Post by Dewbie »

Checked this with Puppy Linux 4.3.1.
(Post-reboot sound loss also occurs with 4.1.2, but not Wary or 2.14x.)

Location is different; it's in /etc/modprobe.conf

Code: Select all

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.20 ---
alias snd-card-0 snd-es18xx
alias sound-slot-0 snd-es18xx
# --- END: Generated by ALSACONF, do not edit. ---
Even though I lose sound after rebooting, none of the text changes.
It's exactly the same before and after.

Looks like this fix applies to other Puppies.
Thanks for posting.

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#5 Post by darkcity »

does sound start working after running Alsa Wizard? it might be worth checking if any files are changed in /etc/mobprobe.d

also /etc/asound.conf and /etc/asound.state

----

On lucid528 I had problems with network card sometimes being reconised and other times not. Could also be a load order problem.

Dewbie

#6 Post by Dewbie »

does sound start working after running Alsa Wizard?
Yes.
it might be worth checking if any files are changed in /etc/mobprobe.d
also /etc/asound.conf
4.3.1 doesn't have those.
and /etc/asound.state

OK, it has that one...here are the differences, before and after reboot:
(Audio is lost after reboot.)

Code: Select all

control.1 {
		comment.access ‘read write’
		comment.type INTEGER
		comment.count 2
		comment.range ’0 - 63’
		iface MIXER
		name ‘Master Playback Volume’
		value.0 54
		value.1 54
(value.0 and value.1 both change to 48 after reboot.)

Code: Select all

control.11 {
		comment.access ‘read write’
		comment.type INTEGER
		comment.count 2
		comment.range ’0 - 15’
		iface MIXER
		name ‘PCM Playback Volume’
		value.0 0
		value.1 0
(value.0 and value.1 both change to 14 after reboot.)

Code: Select all

control.12 {
		comment.access ‘read write’
		comment.type INTEGER
		comment.count 2
		comment.range ’0 - 15’
		iface MIXER
		name ‘PCM Playback Volume’
		index 1
		value.0 8
		value.1 8
(value.0 and value.1 both change to 14 after reboot.)

Code: Select all

control.13 {
		comment.access ‘read write’
		comment.type INTEGER
		comment.count 2
		comment.range ’0 - 15’
		iface MIXER
		name ‘PCM Capture Volume’
		value.0 0
		value.1 0
(value.0 and value.1 both change to 14 after reboot.)

Code: Select all

control.22 {
		comment.access read
		comment.type INTEGER
		comment.count 2
		comment.range ’0 - 63’
		iface MIXER
		name ‘Hardware Master Playback Volume’
		value.0 54
		value.1 54
(value.0 and value.1 both change to 48 after reboot.)

All the other controls, etc. remain the same.
If I replace the corrupted asound.state file with a good copy, it doesn’t matter.
There's still no sound and ALSA must be re-run.

By the way, rerwin and I addressed this a while ago:
http://www.murga-linux.com/puppy/viewto ... 39&t=71010

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to fix losing sound bug

#7 Post by ETP »

Dewbie,
Like 666philb I also had sound problems with early versions of Luci/Lucid.
Attached is a copy of the script I developed to solve my problems. If you wish
to give it a try simply extract and run it.
Attachments
Fixsound2.tar.gz
(328 Bytes) Downloaded 492 times
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

Dewbie

#8 Post by Dewbie »

Hello ETP:

Thanks for posting!
I tried it with 4.3.1, but it doesn't work.

Even though Lucid and 4.x series both have audio-loss issues after rebooting, the causes are apparently different.

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#9 Post by darkcity »

@OscarTalks
I've written a script along the lines of what you talked about - making it soundcard order automatic, see-
http://murga-linux.com/puppy/viewtopic.php?t=79829

@Dewbie
Thanks for posting the info, I've found a bunch of other files that control the current sound state in /proc/asound/ does the modules file differ from sound working and sound not working?

By the way, rerwin and I addressed this a while ago:
http://www.murga-linux.com/puppy/viewto ... 39&t=71010
looked at the thread, what was the outcome?

:twisted:

Dewbie

#10 Post by Dewbie »

darkcity wrote:
Thanks for posting the info
And thank you. :)
I've found a bunch of other files that control the current sound state in /proc/asound/ does the modules file differ from sound working and sound not working?
Right now I'm in 4.1.2, although it has the same audio issues as 4.3.1 with this box.
It does not have a /proc/asound file.
Between 4.x and 5.x series, there are differences in the sound files.
looked at the thread, what was the outcome?

Basically unresolved.
Karl Godt came up with a solution, but it's far too advanced for me to understand. :?

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#11 Post by darkcity »

Okay, that thread is talking about a clash between two sound cards, or possibly a snd crd and a modem.

I occurs because different cards are loaded in differ orders at boot up.

Which Puppy are you wanting to use 4.1.2 or 4.3.1, does it have a alsa-base.conf file?

add this list if so-

# Soundcard order at boot-up
options snd-es18xx index=0

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#12 Post by OscarTalks »

@darkcity

Excellent work! I feel this is an important issue and looks like you have made a major breakthrough. I will do some testing on my various machines over the next day or two and report back.

My oldest machine is the most interesting case. That one has a USB soundcard as the second one. Looking at /proc/asound/modules in that I see that 4 modules are loaded:-

0 snd_intel8x0
1 snd_mpu401
2 snd_intel8x0m
3 snd_usb_audio

In this case index 2 is the dial-up modem, but I am not sure what snd_mpu401 is. Looks like something to do with MIDI, but if something like that were to grab index 0 at boot then even with no extra soundcards I'm sure my sound would be gone. This module does not show up at all as a card in the list in Multiple Sound Card Wizard so I get one random number missing and the others randomly juggled around. The script will hopefully lock these numbers down.

I am not sure what the best final implementation of something like this should be. Maybe a separate tool, built into Multiple Sound Card Wizard or built into Woof since it may be advantageous to run it on all Puppies regardless of additional soundcards?

If you are taking the order from the list in /proc/asound/modules then I suppose you need to be sure that they are arranged in a satisfactory order before writing the lines to /etc/modprobe.d/alsa-base.conf
Oscar in England
Image

Dewbie

#13 Post by Dewbie »

darkcity wrote:
Which Puppy are you wanting to use 4.1.2 or 4.3.1
I use both on a regular basis.
I also use Classic Pup 2.14xRC5 and Wary 5.1.1 / 5.1.4.1.; no audio problems with those.
does it have a alsa-base.conf file?

4.1.2 and 4.3.1...no.

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#14 Post by darkcity »

@Dewbie
continued discussion at-
http://www.murga-linux.com/puppy/viewtopic.php?p=642309

hopeful Karl can help.

@OScarTalks
continued on the thread for the script.
http://murga-linux.com/puppy/viewtopic.php?p=642315

@666philb, would be good if some people with the same problem tested your fix.

:twisted:

Post Reply