Disappearing sound?

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/blog/?viewDetailed=02621

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.


Posted on 14 Dec 2011, 8:22


Comments:

Posted on 14 Dec 2011, 8:34 by BarryK
/dev/snd
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:

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.





Posted on 14 Dec 2011, 8:55 by shinobar
whiteout and /dev
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.

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.


Posted on 14 Dec 2011, 10:23 by shinobar
no save and sound issue
sjinobar> Right. sylvander is using special rc.shutdown which does not delete /dev/snd. That is why you cannot reproduce the trouble.

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.


Posted on 14 Dec 2011, 14:31 by 01micko
re sound
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.


Posted on 14 Dec 2011, 15:07 by mavrothal
Devices and USB
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.


Posted on 14 Dec 2011, 15:32 by mavrothal
whiteouts
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 ;)


Posted on 14 Dec 2011, 15:46 by BarryK
Re /dev and whiteouts
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.



Posted on 14 Dec 2011, 17:15 by shinobar
/dev in main sfs
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.

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!


Posted on 14 Dec 2011, 20:34 by mavrothal
needed dev
I tested FULL install and found that at least /dev/tty* is needed.

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.


Posted on 14 Dec 2011, 21:23 by mavrothal
udev kernel
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.


Posted on 14 Dec 2011, 21:42 by Ledster
shutdown
Might be worth having a word with Jemimah. I have been using her Fluppy 013 on an Acer Aspire One netbook (frugal install) for a year or so now with the save interval set to 0 and on shut down it gives a choice of save or not. I usually don't save and have had no problems. This netbook has the 16 gig solid state drive, so is probably equivalent to a usb drive.


Posted on 15 Dec 2011, 3:41 by maddaemon
/dev and PUPSTATE
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.


Posted on 15 Dec 2011, 11:07 by K Godt
correct major minors for alsa in /dev
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 :
###<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>

The code gets the correct maj,min numbers from sys and creates the correct nodes in /dev and /dev/snd . No problems so far .


Posted on 15 Dec 2011, 19:43 by Tony
Sound problems
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.


Posted on 15 Dec 2011, 24:57 by Dewbie
Sound crash
Essentially, it involved deleting /dev/snd at shutdown, I think that is done in /etc/rc.d/rc.shutdown

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 /dev/snd file when I opened (as text) /etc/rc.d/rc.shutdown.

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


Posted on 16 Dec 2011, 6:21 by BarryK
Re /dev/snd
Dewbie,
Read my earlier post, /dev/snd is deleted in /etc/rc.d/rc.sysinit.



Posted on 17 Dec 2011, 5:39 by Dewbie
Re:
Thanks, Barry...was up way past bedtime, and it showed.

Went back to 4.3.1 to check /etc/rc.d/rc.sysinit; reviewed it twice. Couldn't find either /dev/snd or /dev/mixer.

Oh well...any time I hear about sound-loss issues, it's always worth a look.


Posted on 18 Dec 2011, 20:42 by maddaemon
Re /dev/snd in rc.sysinit
OK I added the two lines of Barry in my rc.sysinit (line 590) just before starting services :
#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.

It seems to work.


Posted on 18 Dec 2011, 21:42 by maddaemon
Ooops
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


Posted on 19 Dec 2011, 2:12 by ETP
Lost Sound
maddaemon

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


Posted on 19 Dec 2011, 7:12 by Dewbie
Re:
maddaemon wrote:
I am not sure which puppy you are using

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 /dev/snd or /dev/mixer in /etc/rc.d/rc.sysinit, 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.



Posted on 19 Dec 2011, 17:35 by maddaemon
LostSound
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.


Posted on 21 Dec 2011, 6:41 by Dewbie
Re:
Oops (again!), never mind my last post.


Posted on 22 Dec 2011, 13:10 by playdayz
Progress has been made
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