site  contact  subhomenews

Show-stopper ALSA bug fixed

November 18, 2021 — BarryK

The guys testing Easy 3.1.10 reported after plugging in a USB sound adapter, after a reboot, there was no network connection. Discussion starts here:

https://forum.puppylinux.com/viewtopic.php?p=41790#p41790

I have a USB audio adapter "card", yes, I get the same bug.

I found out the cause. The scripts in /etc/init.d log stdout and stderr to /tmp/bootsysinit.log, and there I saw the /etc/init.d/10alsa was reporting a syntax error. That error had a flow-on effect, not quite sure how, but prevented the dbus-daemon from running.

I posted about fixes in 10alsa in blog post November 9:

https://bkhome.org/news/202111/audio-fix-at-bootup.html

The syntax error is the code here, line 39:

   if [ -d /sys/class/sound/card[0-9] ];then

...that only works if there is one card. If card0 and card1 exist, then that is a syntax error. I should have realised. Anyway, the code is now:

   if [ -d /sys/class/sound/card0 ];then

...assuming that the kernel will always assign the first card it finds as card0. The code has a "sleep 2" after detecting card0, in case there is a card1 that is a bit tardy to appear.

Rebooted, and have network functioning.    

Tags: easy