The root problem: for some reason, on boot, Ubuntu 14.04 disables (mutes) the S/PDIF output on my sound card.
This question and its answers indicate that sudo alsactl store
will store the alsamixer settings once I've unmuted the S/PDIF output, but on boot, the S/PDIF output is muted again.
In /var/lib/alsa/asound.state
(pastebin) there is one PDIF entry, which I've set to "true" and saved; this has resulted in solving auto-mute for my "Phantom Jack" but there's no other entry for the "true" S/PDIF in asound.state that I can manually adjust.
There's also an empty /var/lib/alsa/asound.state.lock
file (11 bytes, blank in gedit) in the /alsa/
directory. Is this something I should be dealing with?
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 :
amixer set IEC958 unmute
If yes, create .unmute hidden file :
gedit .unmute
paste 4 lines in it:
save and close.
Now, edit
.profile
file :gedit .profile
add this line at the end:
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.I adapted @laugeo's answer to fix the problem with my headphones.
The problem was that the headphone was set to unmute but it was on 00 volume.
I wanted it to be 100, so I added this:
/usr/bin/amixer -c 0 set Headphone playback 100% unmute
And the
.unmute
script looks like:If you want to unmute and set volume to 100% just change the channel. For example for master channel:
When I run
sudo alsactl store
it gives me the following errorI needed to unmute the Master channel using
and it worked perfectly for currently selected sound card. But the Master channel was always muted again after boot, so I created a script named
unmute.sh
and setchmod 700
so that other users couldn't run it. I filled the script with the following content:and saved it to
~/.kde/Autostart
directory. If you have Kubuntu or other distro with KDE all scripts in that directory will be run on boot automatically.If you don't have KDE you can try to add the
amixer
command to~/.profile
file.This worked for me after trying everything else; in term -
open /etc/pulse/default.pa
hash out (add a #) to the beginning of the line reading module-device-restore
un-mute volume marked (M) use left / right keys to select, up down to adjust levels.
This worked for me; copied from here; Arch linux forum
Good luck - hope it works for you.