- Disable
hardware.pulseaudio.enable
, remove everything sound-related from yourboot.extraModprobeConfig
. Keep only thesound.enable = true
line. - Rebuild. Reboot.
- Check that no PulseAudio daemon is running.
- Remove/rename /etc/asound.conf and ~/.asoundrc, if any.
You’re now in the pristine state. You want to be in pristine state, 99.9% of ALSA problems come from misconfiguration by users and by PulseAudio (it changes asound.conf
to route sound from ALSA default PCM to itself). You don’t want that, you want pristine state.
If you are not in the pristine state don’t blame ALSA and the stuff below for not working. You have been warned.
- Run
aplay -l
. You should see at least two sound cards.
E.g. on my laptop:
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: AUDIO [USB AUDIO], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
- Write the following to /etc/asound.conf:
(assuming you want Intel HDA to be the default)
defaults.pcm.!card "PCH"
defaults.ctl.!card "PCH"
(or, assuming you want USB sound card to be the default)
defaults.pcm.!card "AUDIO"
defaults.ctl.!card "AUDIO"
(The string after “:” in the output of aplay -l
is the ID.)
- Check that /etc/asound.conf is readable by your normal user.
- Run
alsamixer
and unmute (“M” key) and set non-zero volume (up-down keys) for everything. - Check that sound works via pure ALSA with
speaker-test -c 2
,aplay
,mpv
, or whatever else (but be sure to check that the tool you check it with doesn’t try to start PulseAudio daemon,speaker-test
andaplay
won’t,mpv
might). - After and only after you checked that the pure ALSA output works, enable PulseAudio (if you still need it for some reason, hint: most likely, you don’t, software mixing works with ALSA out of the box for over a decade now).