Disappearing sound?
December 14, 2011 —
BarryK
Bigpup posted to this blog about "disappearing" sound in Lucid 528+ and Slacko 5.3.1, when booting off a USB Flash drive:
http://bkhome.org/archive/blog2/201112/slacko-531.html
Report of disappearing sound in Slacko:
http://www.murga-linux.com/puppy/viewtopic.php?p=588564#588564
Reports in Lucid start here:
http://www.murga-linux.com/puppy/viewtopic.php?t=70855&start=585
Bigpup has suggested that it might be a problem with 'snapmergepuppy', the script that handles saves from RAM to the save-file on the Flash drive.
If so, then the problem would apply to Wary and Racy also. So, I installed Racy 5.2.2 to a 1GB USB Flash pen drive, and I have been using it for awhile. Trying all sorts of things, installing packages, clicking 'save' button on the desktop, powering-off, rebooting. Have restarted about a dozen times so far, sound continues to work flawlessly.
Running on my Acer Aspire 5742G laptop.
Some points to note:
1. Alsa Wizard: I did not have to run this.
2. Shutdown without saving. ???
Regarding point 2, sylvander reported (http://www.murga-linux.com/puppy/viewtopic.php?t=70855&start=600):
Opened and closed retrovol...[OK]
Browsed some web pages...[OK]
Manually saved the session...[OK]
Rebooted, and chose to not save the session [already saved]...[OK]
Once back into the desktop, the speaker icon was GONE! Sad
The thing is, booting from USB, save session, reboot, how is it possible to then choose not to save session? Does Lucid have some extra tool/facility to shutdown without saving the session from RAM to save-file?
If so, this is not a standard Woof feature, and I suggest that you guys look into that.
Note, the Puppy Event manager does have a save-interval value, if changed to 0 then won't save periodically, but will still save at shutdown.
There was a problem with "disappearing" sound some time ago, which I fixed. Essentially, it involved deleting /dev/snd at shutdown, I think that is done in /etc/rc.d/rc.shutdown. If Lucid (and/or Slacko) has any other shutdown mechanism that does not perform that operation, that would be the cause of the problem.
rc.shutdown also does some other correct shutdown of sound drivers.
Comments
/dev/sndUsername: BarryK
I just checked, my memory wasn't quite right. I did experiment with deleting /dev/snd in rc.shutdown, but ended up doing it in rc.sysinit. Whatever, you need to check that /dev/snd is getting deleted, and /dev/mixer: [i]rm -f /dev/mixer 2>/dev/null #110113 make sure removed, see test in /etc/init.d/10alsa. rm -f /dev/snd/* #110304 after a reboot, some of these may be wrong.[/i]
whiteout and /dev
Username: shinobar
"[i]Barry> There was a problem with "disappearing" sound some time ago, which I fixed. Essentially, it involved deleting /dev/snd at shutdown, I think that is done in /etc/rc.d/rc.shutdown. If Lucid (and/or Slacko) has any other shutdown mechanism that does not perform that operation, that would be the cause of the problem. [/i] Right. sylvander is using special rc.shutdown which does not delete /dev/snd. That is why you cannot reproduce the trouble. But the issue is not only sounds. I have never had sound trouble as sylvander had. But i have got a similar trouble with my usb printer, /dev/usb/lp0 coexists with whitout. I think we need to reconsider treating whole the /dev entries. I think the snapmergepuppy should be revised treating whiteout and /dev entries. And also i think many of the /dev entries should be removed from the main sfs.
no save and sound issue
Username: shinobar
"[i]sjinobar> Right. sylvander is using special rc.shutdown which does not delete /dev/snd. That is why you cannot reproduce the trouble. [/i] The problem is not there because /dev/snd is not deleted at shutdown even with the standard rc.shutdown. I am not sure how to reproduce the sound and my usb printer problem, but i suspect the snapmergepuppy(and main sfs) in treating /dev and whiteout.
re sound
Username: 01micko
"Slacko does run a non standard rc.sysinit however, every time I upgrade woof I do a diff to make sure it is inline with the current version, as I do with all non standard scripts in Slacko. The only change I made in rc.sysinit is for jemimah's Frisbee, evolution of Pwireless2. The sound loss report bigpup refers to is the first of it's kind in any of the Slacko threads going way back to the pre-alphas (May 2011 was the first pre-alpha). The user "aikidave" (re report) has reported back today and he has tried another stick and reports success so far. I did suggest to him that perhaps there was some filesystem corruption. he says he will report back again later.
Devices and USB
Username: mavrothal
"XOpup is running exclusively from a USB stick or an SDcard and straggled for some time with sound and devices in general. One issue was the handling of devices and their whiteouts in snapmergepuppy. The second was the fact that the XOs and _some_ laptops out there cut power to the USB during suspend that can really messup the layered file system. The third is the reliability of the USB sticks particularly when VFAT formatted. The solution for the first (after trying not to save the devices) was to eliminate devices from the main sfs all together, and trust the kernel-udev to do the job in every boot. Udev-hotplug has mature a lot since 2-3 years ago and shipping puppy with the full udev with extras (needed for device generation) could solve many related issues. I think the "kernel knows best" when comes to hardware and devices and maybe we should trust it. The solution for the second was to add merge step before suspend though if you leave devices out of merging, it is not necessary. There is no solution for the third other than getting a new USB stick and formatting as ext2/3. But you can easily see that problem happening because the kernel spits either inode errors or even i/o errors that unfortunately fsck will not fix. My 2c from a "USB-only" puppy.
whiteouts
Username: mavrothal
"On the whiteouts issue and file system check/repair in general, I think that an auchk step could/should be added whenever fsck is called. I tried to entertained this idea but auchk is pretty hard (for me) to automate unless you modify the auchk script itself. The developer might be willing to help on that. As for the automation I know there are much better "scripters" arround ;)
Re /dev and whiteouts
Username: BarryK
"Ok, I'll take a fresh look at it. Maybe not immediately, or will do rather slowly, as I'm getting into Christmas-mode now.
/dev in main sfs
Username: shinobar
"[i]mavrothal> The solution for the first (after trying not to save the devices) was to eliminate devices from the main sfs all together, and trust the kernel-udev to do the job in every boot.[/i] Karl pointed out that Puppies need some of entries under /dev. http://www.murga-linux.com/puppy/viewtopic.php?t=73438&start=6 I tested FULL install and found that at least /dev/tty* is needed. Some more nodes may be needed but i guess not so many. Anyway, merry Christmas to you all!
needed dev
Username: mavrothal
"[i]I tested FULL install and found that at least /dev/tty* is needed.[/i] Was/is the full udev with extras (from a binary compatible distro) present? The only thing I find is needed is the /dev/pts and /dev/shm folders so puppy can do the fsck at boot time.
udev kernel
Username: mavrothal
"Let me just clarify though that XOpup is not using the standard puppy kernel configuration and has DEVTMPFS/DEVTMPFS_MOUNT enabled. Without it dynamic device configuration will not work.
/dev and PUPSTATE
Username: maddaemon
"about the disappearing of the sound (I/O error when launching retrovol) booting from ram and deleting all the /dev in the lupusave file make it work again. So I'm gonna take a look at the rc.sysinit. About not saving session, when i want to make some foolish things with my puppy and see how it works, I just edit /etc/rc.d/PUPSTATE and i change the first line PUPMODE=10 for example (an odd number). But i got a special pupsave file for this.
correct major minors for alsa in /dev
Username: K Godt
"My two cents : udev does create the needed nodes for alsa in /dev directly , never in /dev/snd ( puppy4 + puppy5 ) . i have made many adjustments to my init.d/alsa and on is : [code]###<KRG> D=`find /sys -type d -name "*sound*"` POOL='' for i in $D ; do ##echo $i ; DEV=`find $i -type f -name "dev" -exec echo -n {}@ ; -exec cat {} ; | tr ':' '@' -exec echo ; ` ; POOL="$POOL $DEV" ; done POOL=`echo $POOL | rev` for i in $POOL ; do NODE=`echo $i | cut -f 3 -d '@'` NODE=`echo $NODE | rev` NODE=`basename $(dirname $(echo $NODE) )` MAJ=`echo $i | cut -f 2 -d '@'` MAJ=`echo $MAJ | rev` Min=`echo $i | cut -f 1 -d '@'` Min=`echo $Min| rev` echo "$NODE" "$MAJ" "$Min" rm /dev/$NODE ###KRG 2>/dev/null or -f mknod /dev/$NODE c $MAJ $Min rm /dev/snd/$NODE ###KRG 2>/dev/null or -f mknod /dev/snd/$NODE c $MAJ $Min done ###</KRG>[/code] The code gets the correct maj,min numbers from sys and creates the correct nodes in /dev and /dev/snd . No problems so far .
Sound problems
Username: Tony
"Sound have always been a problem for me with Puppy as long as I can remember. Currently Running Asus M4A78LT-M LE AMD 760G Socket AM3 3GHz quad core with Integrated ATI Radeon 3000 2 Gb RAM but had the same problems with anIntel Atom board. On starting Puppy I only get the master volume. On my system I have to get master front, PCM and Front up high to get sound which a newbie might have a problem with. The sound levels initially are so low the sound is lost in amp noise. Thanks.
Sound crash
Username: Dewbie
"[i]Essentially, it involved deleting /dev/snd at shutdown, I think that is done in /etc/rc.d/rc.shutdown[/i] I lose sound after rebooting with 4.3.1 / 4.1.2 / 3.0.1. On the other hand, with 2.14x and Wary 5.1.1, no problems. Tried above fix with 4.3.1; could not find [i]/dev/snd[/i] file when I opened (as text) [i]/etc/rc.d/rc.shutdown[/i]. Deleted the whole rc.shutdown file and replaced it with Wary's; still no success. A while back, I started a thread about it here. Rerwin stepped in and tried a few things, but so far everything's still in limbo: http://www.murga-linux.com/puppy/viewtopic.php?search_id=1232760400&t=71010
Re /dev/snd
Username: BarryK
"Dewbie, Read my earlier post, /dev/snd is deleted in /etc/rc.d/rc.sysinit.
Re:
Username: Dewbie
"Thanks, Barry...was up way past bedtime, and it showed.:doh: Went back to 4.3.1 to check [i]/etc/rc.d/rc.sysinit[/i]; reviewed it twice. Couldn't find either [i]/dev/snd[/i] or [i]/dev/mixer[/i]. Oh well...any time I hear about sound-loss issues, it's always worth a look.
Re /dev/snd in rc.sysinit
Username: maddaemon
"OK I added the two lines of Barry in my rc.sysinit (line 590) just before starting services : [code]#test for sound rm -f /dev/mixer 2>/dev/null #110113 make sure removed, see test in /etc/init.d/10alsa. rm -f /dev/snd/* #110304 after a reboot, some of these may be wrong. /etc/rc.d/rc.services & #run scripts in /etc/rc.d/init.d echo -e "\033[62G\033[1;33m[backgrounded]\033[0;39m" >/dev/console #column 62, yellow.[/code] It seems to work.
Ooops
Username: maddaemon
"that was too easy... It doesn't work "aplay: main:660: audio open error: No such file or directory" I guess It was not the right place for this two lines to be inserted... In french Turn serval times yoour toungue in your mouth before talking
Lost Sound
Username: ETP
"[b]maddaemon[/b] I am not sure which puppy you are using but this post and script may help. - backup first! http://www.murga-linux.com/puppy/viewtopic.php?p=589935#589935
Re:
Username: Dewbie
"[b]maddaemon wrote:[/b] [i]I am not sure which puppy you are using[/i] If you're addressing me, that would be 4.3.1 and 4.1.2. (I've also tried 3.0.1--same problem--but have since deleted it.) As stated above, with 4.3.1 I couldn't find [i]/dev/snd[/i] or [i]/dev/mixer[/i] in [i]/etc/rc.d/rc.sysinit[/i], so there might be a different cause of sound loss (versus 5.x series). Either way, thanks for the link. Apparently, rerwin has something in the works.
LostSound
Username: maddaemon
"Thank you ETP, I am using 5.2.8. 003 iso on USB stick. I haven't seen there was new things about it, as I read the entire post once but was only checking first page thereafter. PS: I apologies for my English. I love puppy (this is how I first met Linux) and I love the way this project goes.
Progress has been made
Username: playdayz
"Shinobar's fixes to snapmergepuppy and 10alsa are implemented in Lucid 5.2.8.004, which is the current ISO. This appears to be working for Sylvander who was instrumental in the testing. rerwin has posted a patch that goes into further depth. shinobar's post -> http://www.murga-linux.com/puppy/viewtopic.php?p=587750#587750 rerwin's patch -> http://www.murga-linux.com/puppy/viewtopic.php?p=590768#590768 Lucid 5.2.8.004 -> http://www.murga-linux.com/puppy/viewtopic.php?t=70855
Tags: puppy