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?

  • In theory, alsactl restore should be run automatically, but it appears you did not deactive PulseAudio completely. – CL. Oct 22 '14 at 12:06
  • Something in it. Previously, I completely removed pulseaudio and did not have this problem. Now I do not want to do that, because there are too many dependencies. But I care very to use alsa instead of pulse... – rafaku Oct 23 '14 at 9:46
  • If Ubuntu assumes that PA is always used, it will never bother to call alsactl restore in the first place. – CL. Oct 23 '14 at 10:23
  • It's a shame that Canonical does not give tips on how to painlessly use ALSA instead of PA by default. I think that by this a lot of people simply purge the pulseaudio for "bitperfect" output. – rafaku Oct 28 '14 at 9:29

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)" )

  • Yes, sudo alsactl store 1 or default sudo alsactl store gives me same and correct result. I think that editing the startup file is reasonable way. I tried edit rc.local without success. I'm not sure if this file is not accessible only for system start - reboot does not mute the output, logout only. And relogin didn't restore alsamixer settings (unmuting). Edit etc\profile file is a good way perhaps? – rafaku Oct 23 '14 at 9:34
  • Ok , my previous answer was out of subject, i edited it. – laugeo Oct 23 '14 at 11:25
  • 1
    amixer fit my needs, great suggestion. BTW. I discovered that XBMC (what I use with ALSA) gives ALSA sink option for Ubuntu and other "PulseAudio" distributions now. – rafaku Oct 28 '14 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.