Ubuntu – Using ALSA instead Pulseaudio and “logout” issue (14.04.1)


I have a usb dac and I would like to use ALSA instead of Pulseaudio.

First, I stopped the pulseaudio permanently:

echo autospawn=no > ~/.pulse/client.conf
pulseaudio -k

Alsamixer gets cannot open mixer: No such file or directory error. Creating basic .asoundrc file with my default "hardware output" device solved this issue.
Unmuting IEC958 (SPDIF), sound is working properly now.

But there is big issue for me.
Output is muted after logout (rebooting does not cause this problem). Login back doesn't restoring settings from alsamixer asound.state file – IEC958 (SPDIF) is muted

Only running sudo alsactl restore restore this settings properly. Adding user to audio group did not help.

Should I prepare alsactl restore script for logging or something other I missing?

Best Answer

If sound is muted at alsa level (as shown using alsamixer), you can unmute editing or creating .profile file in your home, and adding these commands in it:
they will be executed when session start:

#!/bin/bash amixer set Digital unmute amixer set Master unmute amixer set Headphone unmute

Look the faders name in alsamixer and replace if necessary (may be "Digital" becomes "IEC958 (SPDIF)" )

Related Question