Fix No Sound in Ubuntu as HDMI Enabled By Default

Sound problem is not new in Ubuntu. I have previously written on various ways to fix “no sound” issue in Ubuntu. But the sound issue I am going to discuss here is different than those mentioned in the other article.

So I installed Ubuntu, actually re-installed it. As always, I did all those things to do after a fresh install of Ubuntu and than I realized that the system had no sound. While investigating the issue I found one strange thing. I checked alsamixer and it was in a weird state:

alsamixer set by default to HDMI

As you can see, HDMI is set by default in alsamixer. Which means by default HDMI output has been selected instead of the built in speakers. This is why I get no sound from the built in speakers in my system.

Use the following command to check the state of alsamixer:

alsamixer

If alsamixer is set by default to HDMI or some other audio output, continue this article to see how can we fix it.

Fixing no sound in Ubuntu when HDMI is set as default

Now to force Ubuntu to use analog output instead of HDMI by default, we need a little information. Open a terminal and use the following command:

aplay -l

This will list the devices, card number etc. Note down the card and device number for analog output. For me the output was like this:

alsamixer sound device list

Once you have the required card and device number, make a new configuration file like this:

sudo gedit /etc/asound.conf

The above command will also open the file. Add the following lines to it, replacing with your card and device number of course:

defaults.pcm.card 1
defaults.pcm.device 0

Save the file and restart the computer. You should hear the sound now. Just to mention, this will work for all the Linux distributions such as Linux Mint, Elementary OS, Fedora, Arch Linux etc. As I said previously, this “no sound fix” only works with the case where HDMI is set by default. For other cases, you can read this article about fixing no sound issue in Ubuntu and Linux Mint.

Feel free to use the comment section to let me know if it worked or not or if you have some better trick to handle this such issue. Ciao :)

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.