From the ALSA wiki
|The FAQs have been reorganized. The new location of this question is FAQ#Every time I boot my computer all volumes are at zero and all channels are muted|
Every time I boot my computer all volumes are at zero and all channels are muted
Have a look at the alsactl page. Basically the problem is this: every time an ALSA driver is loaded all channels are muted and pulled down to zero by default for safety reasons. If the mixer was left in an undefined state there could be unexpected feedback problems, or worse, damage to your speakers and eardrums. What is the solution then?
ALSA provides a program called alsactl to restore driver and mixer settings. However, you normally don't have to deal with alsactl yourself. ALSA provides a script which can be called at startup and shutdown to do all this for you.
So check if this script is installed properly:
1. Check if the file /etc/init.d/alsasound exists. This should be there even when installing from source and especially when installing from a precompiled package. If not, ALSA may not be properly installed or your distribution may use a different name for the startup script.
2. Check if the following files, or your distribution specific name, exist and are symlinks to /etc/init.d/alsasound (Debian - /etc/init.d/alsa):
/etc/rc0.d/K15alsasound /etc/rc1.d/K15alsasound /etc/rc6.d/K15alsasound /etc/rcS.d/S59alsasound
3. If these files exist and it still doesn't work, reboot your machine and watch the boot messages carefully. If you see a line like this:
ALSA driver is already running.
In this case, check you're boot messages again. Some other boot-up script is pre-loading the ALSA drivers and thusly preventing the alsasound script to load the drivers and the mixer settings. A script known to do this is the hotplug startup script.
There's several ways to fix this. The easiest is to write a script with one line:
save it as 'alsasoundrestoremixer' in /etc/init.d/, make it executable:
chmod a+x /etc/init.d/alsasoundrestoremixer
and create a symlink to run this straight after alsasound:
ln -s /etc/init.d/alsasoundrestoremixer /etc/rcS.d/S59alsasoundrestoremixer
This forces the loading of the mixer settings every time the system is booted.
It still doesn't work!
Before you consult the mailing list, try this:
- Set your mixer
- Run 'alsactl store' (This command should save the mixer settings to /etc/asound.state).
- Change the mixer settings
- Run 'alsactl restore'
Did this work? If yes, then I suggest starting again at the top. If this didn't work, check if ALSA is installed properly. If you are using KDE, on startup KDE restores settings saved through the 'kmix' mixer. The state that had been stored by 'kmix' the last time it exited could be different in many cases from what was restored to by alsactl. This may even make custom settings through init scripts or '/etc/rc.local' useless. So you need to make sure to start kmix once and set the levels/switches to whatever is required and exit kmix correctly. Also, this would only happen if you check 'Enable the Sound System' under 'KDE Control Center -> Sound & Multimedia -> Sound System' and 'Restore Volumes on Login' in 'kmix -> Settings -> Configure Kmix...'.