Fix No Sound (Dummy Output) Issue In Ubuntu With SND HDA Intel

Ubuntu Sound Settings

After setting up a new computer with Ubuntu 18.04, I noticed there's no sound coming out (from speakers, headphones or HDMI). Looking in the Sound settings (from Gnome Settings), I noticed there's only a Dummy Output as a sound output device.

The first thing I did was to look for solutions online, like this one, but none worked (though that solution may work for you so give it a try). Then I remembered that a while back I managed to fix the sound for my old desktop (which was upgraded to newer Ubuntu versions instead of a clean install), so I tried that solution and... it worked!

Here is what I did to get the sound to work in Ubuntu 18.04 - hopefully this will work for some of you as well.

I should also mention that my computer uses the snd_hda_intel kernel module (Realtek ALC892 codec). I'll explain how to check if you're running this as well, below (step 0).

I only had to use this fix in Ubuntu, but I assume it works in other Linux distributions too. At least, it should also solve similar issues in Linux Mint, elementary OS and probably Debian as well (but it should apply to many other Linux distributions though I can't test that).

Update for no sound after unplugging HDMI cable. In case you've plugged in an HDMI cable, then unplugged it and you're no longer getting any sound on your Ubuntu desktop, the solution is quite simple. Plug in the HDMI device back and you should be able to switch back to the integrated / external speakers, then you can unplug the HDMI cable again.

[Edit: March 2020] There's a kernel regression (in Linux 5.3.0-41 and probably newer versions running on Ubuntu 19.10) which causes a new "dummy output" issue on Ubuntu 19.10. I have updated this article with a fix for this issue - you can find it near the end of the article (titled #2 Fix PCI/internal sound card not detected (dummy output) with Ubuntu kernel 5.3.0-41 and newer in Ubuntu 19.10). Edit #2: This appears to also happen in Ubuntu 18.04, and possibly on Ubuntu 20.04.

[[Anoter edit]] The first fix you should try is to simply restart PulseAudio, using this command:

pulseaudio -k

This fixes the sound in many situations. E.g. if your headphones don't show up in the system sound settings.

#1 Fixing the no sound issue in Ubuntu (Dummy Output)

0. This no sound in Ubuntu fix works if your computer is using the snd_hda_intel kernel module. So before attempting to apply this fix, check out to see if the snd_hda_intel kernel module is in use. For this you can run:

lsmod | grep snd_hda_intel

Which should display at least one snd_hda_intel entry. Here's the output from my computer:

$ lsmod | grep snd_hda_intel
snd_hda_intel          40960  8
snd_hda_codec         126976  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core           81920  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_pcm                98304  4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
snd                    81920  27 snd_hda_intel,snd_hwdep,snd_seq,snd_hda_codec,snd_timer,snd_rawmidi,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_seq_device,snd_hda_codec_realtek,snd_pcm

You can also run:

lspci -nnk | grep -A2 Audio

Which should display the audio devices along with the kernel module / driver in use. This is the output from my system:

$ lspci -nnk | grep -A2 Audio
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 05)
Subsystem: Dell 6 Series/C200 Series Chipset Family High Definition Audio Controller [1028:04a7]
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel

1. If you do get snd_hda_intel in the output of the above commands, and you get no sound (and only a Dummy Output) in Ubuntu, here's what you can try to fix it. You need to add options snd-hda-intel model=generic at the end of the /etc/modprobe.d/alsa-base.conf file. Do not modify anything else in this file!

You can add options snd-hda-intel model=generic at the end of /etc/modprobe.d/alsa-base.conf by running this command:

echo "options snd-hda-intel model=generic" | sudo tee -a /etc/modprobe.d/alsa-base.conf

Only run this command once because it adds this line each time you run it! If you want to modify it, open /etc/modprobe.d/alsa-base.conf as root with a text editor.

2. After this, reboot your system. Hopefully your sound now works in Ubuntu and you no longer get only a Dummy Output device in System Settings > Sound.

If you continue to get no sound output and still only see the Dummy Output in System Settings, you can try to set the model to auto instead of generic, so edit the /etc/modprobe.d/alsa-base.conf file with a text editor (as root) and change that. You can find a list of other models you can try depending on your computer hardware here.

#2 Fix PCI/internal sound card not detected (dummy output) with Ubuntu kernel 5.3.0-41 and -42 in Ubuntu 19.10 / 18.04

There's a regression (thanks JustNiz for notifying me) in the 5.3.0-41 and -42 kernel that causes a new "dummy output" issue on Ubuntu 19.10 and 18.04. The explanations for this bug are available in this bug report, so I won't go into details, and I'll directly tell you how to fix it.

[[Edit] It appears this may also happen for some Ubuntu 20.04 users.

The solution for this "dummy output" regression is to:

1. Edit /etc/modprobe.d/alsa-base.conf as root and add options snd-hda-intel dmic_detect=0 at the end of this file. You can do this with a single command, by using (run this command only once):

echo "options snd-hda-intel dmic_detect=0" | sudo tee -a /etc/modprobe.d/alsa-base.conf

2. Edit /etc/modprobe.d/blacklist.conf as root and add blacklist snd_soc_skl at the end of the file. You can do this with a single command, by using (run this command only once):

echo "blacklist snd_soc_skl" | sudo tee -a /etc/modprobe.d/blacklist.conf

3. After making these changes, reboot your system.

The developers are working on fixing this. The fixed kernel version will probably be 5.3.0-43. When that happens, undo these changes.