No sound on HDMI Ubuntu 20.04

21,741

Solution 1

After upgrading from Ubuntu 18.04 to 20.04, I noticed that pulseaudio would no longer detect HDMI audio output (plugged to an nVidia graphics card) when turning my TV on after I logged in. HDMI output is just not listed anymore in sound settings. This used to work in 18.04.

I found a workaround was to open a console and type the following command, after turning the TV on:

pulseaudio -k

Solution 2

I am using Mint 20.1 with Xfce, and this solved it for me:

  • Open the audio mixer (it's called pavucontrol here)
  • Switch to the Configuration tab (rightmost tab),
  • There is a dropdown for selecting the profile for the builtin audio device.
  • Here I could select a HDMI profile, just be careful to pick one that is not marked as not available.
  • After that, audio through HDMI worked just fine.

I realize this is not quite Ubuntu, but close enough that I thought something like this should be possible on Ubuntu also.

Solution 3

I see at least three possible reasons:

  1. your sound devices may be muted by default - run alsamixer and make sure all sound devices are unmuted. I assume you've done that since it's mentioned in one of the links you posted.
  2. You may have to set a default 'sink' for sound output. Here is one post that helped me in the past with Xfce. One thing you can try is play sound to designated output eg aplay -D plughw:0,1 /usr/share/sounds/alsa/Noise.wav - try all possible combinations based on the output of aplay -l eg 1,3 or 1,7 etc
  3. Linux kernel issue. On a recent installation of Arch Linux I found out that HDMI audio was not working due to a regression in the Linux kernel. The bug is documented here: Bug 207223 - linux-5.6.x breaks NVidia HDMI audio. The fix was either to revert to a kernel <= 5.6 (version 2020-04-01), or use an LTS Kernel (which I did) and that solved the issue for me. Check the output of uname -r to verify your kernel version.

Additional steps you can do:

  • You mentioned using a laptop, so I take that it that disabling the onboard sound card on your motherboard is not an option for you (presumably you will not always be using an external HDMI display). This may not solve your issue but would remove one unnecessary device on a desktop PC (it could be the default device at present).
  • Something else: since you have an NVIDIA device you can choose between the proprietary driver from Nvidia or the open-source version (nouveau) and there is also Optimus, that I am not familiar with. Verify which one you are using. If all attempts fail you could try the other driver. But from experience nouveau should be perfectly capable unless maybe you have very recent hardware that is not yet Linux-supported.

I also recommend the Arch Linux wiki: Advanced Linux Sound Architecture. It helped me a lot debug my sound issues back in the day.

Share:
21,741
Lucas
Author by

Lucas

Updated on September 18, 2022

Comments

  • Lucas
    Lucas over 1 year

    I just installed Ubuntu 20.04 on my laptop which is a bit outdated:

    • CPU: Intel Core i5 CPU M 480 @ 2.67GHz
    • RAM: 4GB
    • Video card: GeForce GT 420M
    • Audio: GF108 High Definition Audio Controller NVIDIA and Audio 5 Series/3400 Series Chipset High Definition Audio HD 500GB

    Overall the system is working fine, but I'm having a big issue with HDMI Audio. The display on HDMI works just perfectly, but the audio is not working at all.

    I tried lots of solutions here on Ask Ubuntu, but the problem remains. Some of the solutions I tried are located in the following links:

    HDMI sound not working after upgrading to 20.04

    Ubuntu 18.04: Audio doesn't work unless I switch between outputs

    does not detect my sound card HDMI

    Also I've downloaded Ubuntu 20.04 iso again and reinstalled the system, but it doesn't work.

    HDMI worked perfectly when I used Windows 10 before replacing it with Ubuntu.

    When I run aplay -l I have these results:

    Playback hardware Devices

    When I run lspci I have these results:

    Devices

    In the Settings -> Sound -> Output -> Output Device I have just two options to choose from:

    • Speakers-Built-in-Audio
    • Digital Output(S/PDIF)-Built-in-Audio

    On Pulseaudio > Configuration it shows: GF108 High Definition Audio Controller and Built-in Audio

    And in both of them all the options with HDMI are displayed with (unplugged)(unavailable).

    Finally, the sound just works in my laptop, if I connect HDMI cable it display correctly but the sound keeps on my laptop.

  • Lucas
    Lucas almost 4 years
    Anonymous, thanks for you attention I tried all of your steps one by one, but it still didn't work. I'll try to reinstall the system again but if it does not work, I'll look for other solution, maybe choosing another system or keep using it without the sound on HDMI.
  • Jack
    Jack about 3 years
    I am testing this and will report back on my results using Ubuntu 18.04
  • Jack
    Jack about 3 years
    Ok, this helps, yet doesn't completely solve the issue for me. If my machine goes to sleep, it still forgets about HDMI output. Once I open pavucontrol, HDMI is back.
  • Shiplu Mokaddim
    Shiplu Mokaddim almost 3 years
    pavucontrol saved me. I found the volume was not muted, but very low.
  • xinthose
    xinthose over 2 years
    I found the correct card,device that plays sound, now how do I make that my default sound output? I cannot select it in options.
  • Admin
    Admin about 2 years
    this works awesome on KDE but I have manually selected the output thank you!