Is there any way to save alsamixer settings other than alsactl store?

I have the same problem on my pc:
It appears that effectively alsa restores SPDIF "unmuted" state during boot, but then pulseaudio mutes it when user session starts.
To verify that alsa restore is ok, just run sudo alsactl restore in a terminal and look if it unmute SPDIF.
To verify that pulseaudio is the problem , just run pulseaudio -k to relaunch pulseaudio : you should see that SPDIF is muted.

As I don't know how to set pulseaudio for not muting, this is a workaround inspired from there :

  • Try if this command unmutes SPDIF channel:
    amixer set IEC958 unmute
  • If yes, create .unmute hidden file :
    gedit .unmute
    paste 4 lines in it:

    #!/bin/bash
    sleep 10 
    /usr/bin/amixer set IEC958 unmute 
    exit
    

save and close.
Now, edit .profile file :
gedit .profile
add this line at the end:

bash .unmute &

save and close.

Now test reopening session or rebooting .

Note: in the above link from Mageia, they use /etc/rc.local to run alsactl restore at boot time , it is also ok. But using .profile and amixer, no need to "sudo" and it will unmute at every session start for your login.

Tags:

Alsa

Sound

Spdif