Tiny Core Linux
Tiny Core Extensions => TCE Bugs => Topic started by: thane on March 01, 2016, 11:28:50 AM
-
I probably overlooked something obvious, but since I upgraded to TC 7.0 I keep having to unmute alsa when I reboot. I did the recommended steps of unmuting in alsamixer, sudo alsactl store, and adding usr/local/etc/alsa/asound.state to the backup, but when I reboot the volume/mute settings are back to default. Alsa works fine once I unmute. Should note I also have alsa-config and audacious loaded, so don't know if that's somehow a factor. This all worked in 6.x though.
I also tried adding /usr/local/etc/init.d/alsasound start to bootlocal.sh, but that froze my mouse and keyboard! Weird.
Thane
-
Hi thane
Don't you also need to use:
alsactl restoreafter you reboot?
-
Placing your desired audio settings into an ~/.X.d file works too:
amixer set Master 80% &
amixer set PCM 100% &
amixer set Master unmute &
amixer set PCM unmute &
conky &
xset s 300 &
-
.X.d only runs when X is started, and runs every time X is started.
This will not help with console apps.
Use bootlocal.sh.
-
Alsa has been broken as long as I can remember. Look at the scripts, you'll see that you need to add var/lib/alsa to /opt/.filetool.lst.
-
Alsa has not been broken for me as long as I can remember, and I do not include var/lib/alsa in .filetool.lst.
-
$ cat /usr/local/tce.installed/alsa
#!/bin/sh
[ -e /etc/udev/rules.d/90-alsa-restore.rules ] || sudo ln -s /usr/local/etc/udev/rules.d/90-alsa-restore.rules /etc/udev/rules.d/ > /dev/null 2>&1
udevadm control --reload-rules 2> /dev/null
udevadm trigger 2> /dev/null
[ -d /opt/alsa ] || mkdir /opt/alsa
if [ ! -d /var/lib/alsa ]; then
mkdir -p /var/lib/alsa
fi
if [ ! -e /usr/local/etc/asound.state ]; then
amixer set Master on 60
fi
Also:
Usage: alsactl <options> command
global options:
-h,--help this help
-d,--debug debug mode
-v,--version print version of this program
Available state options:
-f,--file # configuration file (default /var/lib/alsa/asound.state)
...
Notice where alsa is looking? The load script makes a lot of directories, but only one really matters.
Also see this link from a year ago: http://forum.tinycorelinux.net/index.php/topic,18061.msg109428.html#msg109428 (http://forum.tinycorelinux.net/index.php/topic,18061.msg109428.html#msg109428)
I don't have a problem with it not being a priority to fix because with everything else we have going on it's pretty minor, but don't deny it's a problem.
-
Why are you referencing a rpi forum post?
Are you running a raspberry PI?
-
I have some PI's and some x86 boxes. I've had the same problem on both. Having a common code base is helpful in many ways. In this case I hope it means it only needs to be fixed once. I see that the x86 extension is about a year newer than the PI so maybe some things have changed that haven't been migrated over to the PI yet. I also see that alsa version 1.1.0 has updated from 1.0.28 on x86:
$ alsactl --help
Usage: alsactl <options> command
...
Available state options:
-f,--file # configuration file (default /usr/local/etc/alsa/asound.state)
Anyway, what I have found is that I can reproduce thane's problem if I put alsa.tcz in onboot.lst. If I don't, and tce-load -i alsa in a terminal window after X starts, then the volumes are properly restored. This is a feature of udev rules versus mydata restore timing. Adding
/usr/local/sbin/alsactl restore to /opt/bootlocal.sh worked for me. The previous version didn't require this. Maybe we could document this change too?
-
Thanks for the replies.
Putting /usr/local/sbin/alsactl restore in /opt/bootlocal.sh (as andyj and Rich suggested) worked.
-
verified
* if alsa is loaded after boot settings are loaded OK
* if alsa is loaded onboot "sudo alsactl restore" is required
comment added to alsa info file