Howto save AlsaMixer settings?

Solution 1:

Execute:

sudo alsactl store

This should save alsamixer configurations to /etc/asound.state which gets loaded every startup.

Solution 2:

You could also save the mixer settings into a custom file with alsactl:

alsactl --file ~/.config/asound.state store

Reloading:

alsactl --file ~/.config/asound.state restore

Solution 3:

Seppo Erviälä's answer is right but not complete. As dma_k already noted, man alsactl clearly states at the end that,

/var/lib/alsa/asound.state (or whatever file you specify with the -f flag) is used to store current settings for your soundcards.

palacsinit appropriately noted that you can store config into your file with

alsactl --file ~/.config/asound.state store

and reload with

alsactl --file ~/.config/asound.state restore

This can be further improved with placing the second line, the restore command into a .desktop file.

You will need to run nano ~/.config/autostart/alsarestore.desktop, which will open nano text editor and create ~/.config/autostart/alsarestore.desktop file. Entries in ~/.config/autostart/ directory are used to autostart programs and services for specific user on startup/graphical login.

The contents of the .desktop file should be the following:

[Desktop Entry]
Type=Application
Terminal=false
Name=alsarestore
Exec=alsactl --file ~/.config/asound.state restore

Among other things, you could store your config in /etc/asound.state and symlink it to /var/lib/alsa/asound.state, but this one is more of a suggestion rather than tested solution