Warning: If you use kmix, make sure to configure it to not restore sound levels at startup. This will conflict with the configuration detailed below.
- Run alsactl -f /var/lib/alsa/asound.state store once to create /var/lib/alsa/asound.state.
# alsactl -f /var/lib/alsa/asound.state store[/code]
- Edit /etc/rc.conf and add "alsa" to the list of daemons to start on boot-up. This will store the mixer settings on every shutdown and restore them when you boot.
- If the mixer settings are not loaded on boot-up, add the following line to /etc/rc.local:
# alsactl -f /var/lib/alsa/asound.state restore[/code]
- These methods still may not work, or you may prefer to have audio settings for individual users. In this case, run alsactl store -f ~/.asoundrc as a normal user. This will save and restore volume settings on a per user basis. To automate this process, add the respective commands to ~/.bash_login and ~/.bash_logout, or the correct locations for the shell of your choice.