No HDMI-audio after kernel 4.15.-0.50

Bug #1834771 reported by Jouni Vartiainen
62
This bug affects 12 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I've got no HDMI-audio. Latest kernel with working HDMI-audio is 4.15.-0.50. In pavucontrol HDMI-audio shows unplugged. And also internal audio shows unplugged, but it still works. I'm on linux mint 18.3.
---
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: jouni 1859 F.... pulseaudio
 /dev/snd/controlC1: jouni 1859 F.... pulseaudio
CurrentDesktop: X-Cinnamon
DistroRelease: Linux 18.3
HibernationDevice: RESUME=UUID=9e8d7bf3-dc5f-4c72-b875-6dbe81a36c36
InstallationDate: Installed on 2017-01-28 (883 days ago)
InstallationMedia: Linux Mint 18.1 "Serena" - Release amd64 20161213
IwConfig:
 lo no wireless extensions.

 enp3s0 no wireless extensions.
MachineType: Gigabyte Technology Co., Ltd. To be filled by O.E.M.
Package: linux (not installed)
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-54-generic root=UUID=f167a2b0-3b30-4a5a-907f-6b97c95b7a91 ro quiet iommu=soft splash vt.handoff=7
ProcVersionSignature: Ubuntu 4.15.0-54.58~16.04.1-generic 4.15.18
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-54-generic N/A
 linux-backports-modules-4.15.0-54-generic N/A
 linux-firmware 1.157.21
RfKill:

Tags: sylvia
Uname: Linux 4.15.0-54-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo video
_MarkForUpload: True
dmi.bios.date: 02/26/2016
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: FC
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: 970A-UD3P
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrFC:bd02/26/2016:svnGigabyteTechnologyCo.,Ltd.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnGigabyteTechnologyCo.,Ltd.:rn970A-UD3P:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: To be filled by O.E.M.
dmi.product.version: To be filled by O.E.M.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1834771

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Hui Wang (hui.wang) wrote :

need your log, please collect them according to #1.

Revision history for this message
Jouni Vartiainen (jovartia) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected sylvia
description: updated
Revision history for this message
Jouni Vartiainen (jovartia) wrote : CRDA.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : Lspci.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : Lsusb.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : ProcEnviron.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : ProcModules.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : PulseList.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : UdevDb.txt

apport information

Revision history for this message
Jouni Vartiainen (jovartia) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Hui Wang (hui.wang) wrote :

It is a AMD platform.

Before the kernel 4.15.0-50, how did the hdmi audio work? when you plug a hdmi monitor with audio capability, the hdmi audio changed to plugged in the pavucontrol? With the current kernel, after plug a hdmi monitor, the hdmi audio still keep unplugged in the pavucontrol?

Revision history for this message
Jouni Vartiainen (jovartia) wrote :

Yes, you are correct. But to be precise with kernel 4.15.0-50 HDMI-audio is working and with newer kernels it is not.

Revision history for this message
Hui Wang (hui.wang) wrote :

So could you change the kernel back to 4.15.0-50, and after plugging the hdmi monitor and the hdmi audio is plugged, please run $cat /proc/asound/card1/eld*, and upload the output to launchpad.

thx.

Revision history for this message
Jouni Vartiainen (jovartia) wrote :

Here is the out of cat /proc/asound/card1/eld*

Revision history for this message
Hui Wang (hui.wang) wrote :

According to #19, the 4.15.0-50 can work that is because the driver doesn't check the ELD status, that is not correct. The hdmi audio is valid/plugged only if both monitor_present and eld_valid are true, but that is the log from 4.15.0-50:
 monitor_present 1
 eld_valid 0

We did introduce a new patch to check ELD from the 4.15.0-51, because of this patch, the hdmi audio will not be regarded as plugged since eld_valid is 0.

The root cause of this problem is the graphic driver amdgpu, so could you please test the latest mainline kernel if it can make both monitor_present and eld_valid true.

https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2-rc6/

Revision history for this message
Jouni Vartiainen (jovartia) wrote :

I have never installed kernels manually. I have only used update manager (on Linux Mint) to install kernels. Installing kernels manually sounds a bit too risky for me.

Revision history for this message
Hui Wang (hui.wang) wrote :

Maybe you could install ubuntu 5.0 kernel by apt command:

apt-cache search linux-image* | less
find the ubuntu 5.0 kernel, then install this kernel by sudo apt-get install $kernel_name $kernel_module_extra_name.

reboot

Revision history for this message
Jouni Vartiainen (jovartia) wrote :

I tried the apt method, but I didn't find 5.0 kernels there. Perhaps because Linux Mint 18.3 is based on ubuntu 16.04. And newer kernels are not supported. I could try the tool called UKUU for changing kernels, but I am not sure is it wise to use newer kernels not supported by my distro ? Perhaps I just keep using 14.5.-0.50 kernel when ever I need HDMI-audio.

Revision history for this message
Gary Altenberg (garyio) wrote :

I started to experience this same issue with Ubuntu 16.04. I performed an apt upgrade and after rebooting I did not have any sound from my HDMI port.

I did some research and I think I figured out why my Ubuntu 16.04 machine would not output audio on an HDMI port. I believe this is the same issue the original poster was experiencing.

There was a patch added to the kernel on 20 May 2019:
https://<email address hidden>/

My understanding is that sometimes HDMI ports where reported as plugged in even though they were not. To fix this the patch added a line of code that takes into account the eld_valid value along with the monitor_present value located at /proc/asound/cardX/eld#N.M.

When I cat /proc/asound/card1/eld* I see monitor_present is 1 but eld_valid is 0 so this new line of code in hdmi_present_sense_via_verbs() will set jack->pin_sense to 0 instead of AC_PINSENSE_PRESENCE. That must cause the HDMI audio to appear unplugged.

I further tested this theory by booting kernel 4.15.0-50 and now my HDMI audio works. If I boot back to 4.15.0-54 the HDMI audio reports unplugged and I do not get any audio on the HDMI cable.

My understanding is that a video driver is responsible for setting eld_valid and my Radeon driver must not be doing that. So either the patch needs to be undone or the video drivers need to be patched. Otherwise we cannot use any kernels after 4.15.0-50.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please try this commit:
commit 855b5e01c0732d66c306cdd5215c3337e5311899
Author: Jaroslav Kysela <email address hidden>
Date: Thu Jun 13 15:09:01 2019 +0200

    ALSA: hda/hdmi - consider eld_valid also in sync_eld_via_acomp()

    In the commit 7f641e26a6df9269cb25dd7a4b0a91d6586ed441 (ALSA: hda/hdmi
    - Consider eld_valid when reporting jack event) the eld_valid check was
    added for the jack event reports. Do the same in sync_eld_via_acomp()
    function. Apparently, it is required for the NVIDIA proprietary driver
    (monitor presence reported first, but ELD is available later).

Let me know if you need a prebuilt kernel.

Revision history for this message
Hui Wang (hui.wang) wrote :

reply #24,

you could have a try with nvidia proprietary driver, probably it runs better than Radeon.

sudo apt install nvidia-$(latest_version)

Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :

I'm also affected by this bug under Linux Mint 19.2 and with Radeon RX 580 (amdgpu driver).
With all new Kernels from 5.0.0-16 on my HDMI monitor isn't recognized as "plugged in" and I don't have audio output. Pavucontrol shows all available HDMI imputs as "unplugged".

Going back to 5.0.0-15 Kernel fixes the issue for me but this cannot be a long term solution. Over the last months I searched a lot in different Ubuntu/Linux Mint forums and found many people having this exact issue. All of them with amd graphics.

Finally found the root of this problem: This faulty behavior seems to be introduced with this bugfix:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1827967

All Kernels from 5.0.0-16, 4.15.0-51 and 4.18.0-21 on are affected. In forums I found examples of all three Kernels.

reply #26:

As I (and probably also Gary Altenberg - #24) don't have any Nvidia chips along our amd graphics, I have no idea how the nvidia proprietary driver could help. ;-)

If I understand the bug description of https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1827967 correctly, the problem was that there were some unnecessary sound devices that could confuse users. In fact, the patch might have broken hdmi sound output for most amd graphics users by removing all of the entries.

Please fix that issue or if not possible revert the change! Having some unnecessary entries to chose from is better than having no sound at all. :-)

Here are two examples of affected user from forums (but you can find many more):
- https://forums.linuxmint.com/viewtopic.php?t=295685
- https://askubuntu.com/questions/1032811/ubuntu-18-04-no-hdmi-audio-with-amd-radeon-hd-7870/1150624#1150624
- ...

Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :

correction: Pavucontrol shows all available HDMI OUTputs as "unplugged".
(and Gnome Sound Setting doesn't show any HDMI devices at all)

... and before someone suggests it: I don't think "All AMD users should wait for a maybe fixed Kernel 5.2." is not a proper solution for that problem. :-)

Revision history for this message
Hui Wang (hui.wang) wrote :

Could you please have try with the latest mainline kernel: https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3/

If that kernel doesn't work, let us have a try with replacing the current graphic driver amdgpu to the amdgpu-pro.

I will update a new comment to explain how to install amdgpu-pro if the kernel v5.3 is confirmed to not work.

Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :

Please excuse the delay.

I can confirm now, that Kernel 5.3.0-19 is also affected by this problem.

Thanks for your assistance but I don't see why switching to proprietary drivers should be the right solution for a regression introduced as a side effect of a bugfix. In your bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1827967 you rated the regression risk of the fix as "low" but now the forums are full of users who have no sound. I gave some English examples of that. Could also add a lot German forum threads dealing with this problem. Should all those people install amdgpu-pro to get their sound back?

As I already stated: Having no sound devices available at all is much worse than having some unnecessary jacks available in gnome-sound-settings.

Revision history for this message
Richard Muller (richy80) wrote :

Absolutely the same behavior here. Last working kernel is 5.0.0-15.
(5.3 is not working here as well)

I've been messing around with this annoying bug for months (using headphones because my display sound is gone) until someone pointed me to this bug report today. It is ridiculous to completely take the hdmi sound from all AMD users just because too much choice could confuse some people. For now I'll stay with 5.0.0-15 but please fix this issue soon!

By the way, I agree with my predecessor. I also don't want to use the proprietary driver. The free driver (with at that time flawlessly working hdmi sound) was the reason for buying AMD graphics.

Revision history for this message
Hui Wang (hui.wang) wrote :

The problem is in the graphic drivers like nouveau and radeon. The audio side needs to detect the monitor is plugged in as well as ELD data, then the hdmi audio could work.

Since we don't have ability to change the nouveau or radeon, I will think about adding a new patch that will take care of this bug as well as #1827967.

Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :

All affected users I found in forums so far reported that they have amdgpu in use.

I don't know if nouveau and radeon drivers have the same problem or not. So as you already wrote in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1834771/comments/20 the root problem seems to be that amdgpu (and maybe also other drivers) doesn't set the eld_valid flag to 1, when a monitor is connected.

I have absolutely no idea how to handle this - where to file a bug for such driver problems. But as long as we cannot assume that eld_valid is correctly set, you better should not rely on it.

I would very much appreciate such a new patch.

Revision history for this message
Hui Wang (hui.wang) wrote :

The audio maintainer provided a testing patch, I just built two kernels with this patch, one is 4.15 kernel, the other is 5.0 kernel.

Please install them or one of them, test the hdmi audio, no matter it fixes the issue or not, please upload the dmesg to the launchpad since I put some debugging message in those kernels.

Please test and feedback your testing result and upload the dmesg.

thx.

https://people.canonical.com/~hwang4/hdmiaudio-test/

install the linux-modules first, then linux-image, last please install the linux-module-extra.

Revision history for this message
Michael Selig (michael-selig) wrote :

I have just installed your test 5.0 kernel, and unfortunately it does not fix the problem. When I boot the 5.0.0-15 kernel, it works fine.

I am using an AMD/RADEON RS780 Gigabyte motherboard.

Revision history for this message
Michael Selig (michael-selig) wrote :

By the way, I also tried booting eoan (5.3 kernel) from a USB stick, and it has the same problem.

Revision history for this message
Michael Selig (michael-selig) wrote :
Revision history for this message
Hui Wang (hui.wang) wrote :

Thanks for your testing, we will investigate the log soon.

thx.

Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :
Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :
Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :
Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :
Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :
Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :
Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :

Same here. Still no sound with the testing kernels. :-/
For the sake of completeness I have also attached the dmesg output with some other current and old kernels. Only with 4.15.0-50 and 5.0.0-15 I have sound. I'm eagerly waiting for the solution to this problem.

Revision history for this message
Malem Benign (malembenign) wrote :

Hi, looks like I finally found the root of my problem - the same.

Got Ubuntu 16.04 and everything worked fine. Then after the updates HDMI disappears from the sound output, I checked with pavucontrol and it showed me that HDMI is unplugged.
Then I had clean install of 18.04 and now I don't even see HDMI as "unplugged" in pavucontrol, just no such device at all.

Laptop ASUS with ATI Radeon 3650.

Please fix this asap as looks like many people around the world use old laptops with Ubuntu as a video and audio source for TVs via HDMI.

Thanks in advance.

Revision history for this message
Richard Muller (richy80) wrote :

I've also installed the testing kernels but without success. No audio at all :(
@hui.wang: I saw some dmesg outputs being uploaded. Do you need more samples to fix this bug?

Can you please give us a status update on this? I'm dealing with this situation for months now and half of the PCs in our office are affected. Using such an old unpatched kernel for work is not an option. So me and my colleagues have to use headphones or external speakers along our speaker equipped monitors.

If quick help is not in sight, I vote for simply undoing the patch that triggered this terrible bug:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1827967

Please make our audio work again, @hui.wang!

Revision history for this message
Martin Bartlett (martin-j-bartlett) wrote :

I have the same issue on 16.04, but it appears my kernels are WAY behind what you guys have - 4.4.0-170-generic.

Anyway, for those who don't want to mess with kerls changes or blanket system updates yet, I found a feasible workaround that works for me:

https://gist.github.com/bassmanitram/495fd35b76083f0c4a79777b8ab470fd

Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :

Thank you, Martin, for providing this simple but clever and VERY effective workaround! I can confirm that it works.

I'd like to add, that you have to execute this script with 'bash fix_sound.sh'.
'sh fix_sound.sh' doesn't work because debian and ubuntu use dash as non-interactive shell and dash cannot handle that kind of assertion: <<<. Took me a while to realize what the problem was. ^^

Anyway. I'd like to see a real fix here. But in the meantime I can live with that script.

Revision history for this message
Michael Selig (michael-selig) wrote :

I can confirm that this script also works for me using an ATI/Radeon RS780 HDMI, after adjusting the GREP line appropriately. Thank you :-)

One other thing: in order to make it work reliably as a "Startup application", I had to change the "sleep 2" to "sleep 10". Presumably this is because the system is busy starting stuff just after login.

Revision history for this message
Richard Muller (richy80) wrote :

This script also works for me. Like Michael I added a larger sleep duration and execute it as startup app. Will put this script on every of our office PCs. Thanks Martin for sharing this workaround. As already mentioned I'd very much appreciate a real fix coming in the near future.

Wish you all a nice year 2020!

Revision history for this message
Uriel Tunn (u2n) wrote :

Fresh install U18.04 on PC with AMD rs880 [radeon hd 4200], confirming exact same problems.

Over the years audio breaks, gets fixed, breaks again, and on it goes. Currently it's broken again and this bug remains unassigned! Dear devs, you know we love you. Please fix!

Revision history for this message
Uriel Tunn (u2n) wrote :

Generated a workaround that restores HDMI sound and posted here: https://askubuntu.com/a/1207919/165265

It uses bassmanitram's methods (credit given) but static hardware assignment values, and is packaged to be a little more user-friendly. Applied on three machines and using until this bug is fixed.

Revision history for this message
Hui Wang (hui.wang) wrote :

This is the thread about this bug from the alsa maillist: https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/158336.html

And this issue will be fixed if radeon, nouveau and amdgpu drivers support audio component. Now the amdgpu driver already supported audio component from kernel-5.4, so if your machine is driven by amdgpu driver (graphic card driver), you could test 5.4 kernel or ubuntu focal kernel (the kernel for 20.04). Please check amdgpu driver is in-tree driver instead of amdgpu-pro driver (proprietary driver).

For unload/reload the HD-audio driver mentioned that thread, I thought it should be (but it failed when I ran alsa unload/force-unload)
localhost:~$ alsa --help
Usage: /sbin/alsa {unload|reload|force-unload|force-reload|suspend|resume}

If someone has any idea or any log, please reply to the thread alsa-devel/2019-November/158336.html

Revision history for this message
Rolando Gorgs (rolandogorgs) wrote :

Oh, please excuse me. (These many different drivers and kernels begin to confuse me. ;) )
I wanted to say that AMDGPU with kernel 5.3 is affected here.

Can you say when there will be a fixed AMDGPU/kernel version will be available for Ubuntu 18.04?

Thanks!

Revision history for this message
Lester Carballo Pérez (lestcape) wrote :
Download full text (5.5 KiB)

Same bug apparently and i have ubuntu focal kernel. In my case the next command this fix partially my problem, because my audio is set to null in sound, but i can listen it:
pacmd set-card-profile 0 output:hdmi-stereo

Note i have this problem for a long time, but with ubuntu focal is worse than ever. I can not find a good permanent solution.

Only in pavucontrol i can see my HDMI Audio and this is what i can see when i can lisent something:

Card: RS880 HDMI Audio [Radeon HD 4200 Series]
Profile: Digital Stereo (HDMI) Output (unplugged) (unavailable)
Internal Audio: off

pacmd list-cards
2 card(s) available.
    index: 0
 name: <alsa_card.pci-0000_01_05.1>
 driver: <module-alsa-card.c>
 owner module: 7
 properties:
  alsa.card = "1"
  alsa.card_name = "HDA ATI HDMI"
  alsa.long_card_name = "HDA ATI HDMI at 0xfdafc000 irq 19"
  alsa.driver_name = "snd_hda_intel"
  device.bus_path = "pci-0000:01:05.1"
  sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:05.1/sound/card1"
  device.bus = "pci"
  device.vendor.id = "1002"
  device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
  device.product.id = "970f"
  device.product.name = "RS880 HDMI Audio [Radeon HD 4200 Series]"
  device.string = "1"
  device.description = "RS880 HDMI Audio [Radeon HD 4200 Series]"
  module-udev-detect.discovered = "1"
  device.icon_name = "audio-card-pci"
 profiles:
  output:hdmi-stereo: Digital Stereo (HDMI) Salida (priority 5900, available: no)
  output:hdmi-surround: Digital Surround 5.1 (HDMI) Salida (priority 800, available: no)
  output:hdmi-surround71: Digital Surround 7.1 (HDMI) Salida (priority 800, available: no)
  off: Apagado (priority 0, available: unknown)
 active profile: <output:hdmi-stereo>
 sinks:
  alsa_output.pci-0000_01_05.1.hdmi-stereo/#1: RS880 HDMI Audio [Radeon HD 4200 Series] Digital Stereo (HDMI)
 sources:
  alsa_output.pci-0000_01_05.1.hdmi-stereo.monitor/#1: Monitor of RS880 HDMI Audio [Radeon HD 4200 Series] Digital Stereo (HDMI)
 ports:
  hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
   properties:
    device.icon_name = "video-display"
    index: 1
 name: <alsa_card.pci-0000_00_14.2>
 driver: <module-alsa-card.c>
 owner module: 8
 properties:
  alsa.card = "0"
  alsa.card_name = "HDA ATI SB"
  alsa.long_card_name = "HDA ATI SB at 0xfe024000 irq 16"
  alsa.driver_name = "snd_hda_intel"
  device.bus_path = "pci-0000:00:14.2"
  sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card0"
  device.bus = "pci"
  device.vendor.id = "1002"
  device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
  device.product.id = "4383"
  device.product.name = "SBx00 Azalia (Intel HDA)"
  device.form_factor = "internal"
  device.string = "0"
  device.description = "Audio Interno"
  module-udev-detect.discovered = "1"
  device.icon_name = "audio-card-pci"
 profiles:
  input:analog-stereo: Estéreo analógico Entrada (priority 65, available: no)
  output:analog-stereo: Estéreo analógico Salida (priority 6500, available: no)
  output:analog-stereo+input:analog-stereo: Estéreo Analógico Dúplex (priority 6565, available: no)
  output:analog-surround-21: Análogico envolvente 2.1 Salida (priority 1300, avail...

Read more...

Revision history for this message
Peter Andreus (peter-andreus) wrote :

Happily installed kubuntu 20.04 to find out my sound is completely dead.
RS780 HDMI Audio [Radeon 3000/3100 / HD 3200/3300]

HDMI audio visible only in pavucontrol, although it shows unplugged.

kernel: 5.3.0-51-generic

Revision history for this message
Hui Wang (hui.wang) wrote :

@Peter,

Please take a look at https://askubuntu.com/questions/1032811/ubuntu-18-04-no-hdmi-audio-with-amd-radeon-hd-7870/1207919#1207919

Now the driver amdgpu and nouveau(dispnv50) support the audio_component, but the driver radeon doesn't support it yet. so please try the workaround in the askubuntu.com or please read #53

Revision history for this message
Gerry (ger-cal) wrote :

I have an Intel (Ironlake) CoreI5 & Integrated Graphics
I have no HDMI listed in Sound

This is happening on:
- Linux Mint
- LMDE
- Debian Buster
- Debian Sid

Everything is fine on:
kernel 4.18.15-041815-generic x86_64
Sound server ALSA version: k4.18.15-041815-generic

But anything later, even trying recent kernels does not fix this issue
kernel 5.6.0-0.bpo.2-amd64 x86_64
Sound server ALSA version:k5.6.0-0.bpo.2-amd64

Revision history for this message
Gerry (ger-cal) wrote :

I should add that under 4.18.15-041815, the command "aplay -l" returns

**********List of PLAYBACK Hardware Devices ******************
card 0: Intel [HDA Intel], device 0: 92HD81B1X5 Analog [92HD81B1X5 Analog]
Subdevices: 1/1
Subdevices #0: subdevice #0
card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevices #0: subdevice #0
card 0: Intel [HDA Intel], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevices #0: subdevice #0

and under 5.6.0-0.bpo.2, the command "aplay -l" returns

**********List of PLAYBACK Hardware Devices ******************
card 0: Intel [HDA Intel], device 0: 92HD81B1X5 Analog [92HD81B1X5 Analog]
Subdevices: 1/1
Subdevices #0: subdevice #0

that's all!!

Revision history for this message
Gerry (ger-cal) wrote :

I had a look at my /proc/asound/card0 folder, and there are big differences between the non-working 5.6 kernel and the working 4.18 kernel.

In Kernel 5.6, in the folder /proc/asound/card0
there are 2 only folders, and 3 files.

Folders:
pcm0c
pcm0p

Both folders refer to the analog, for example the info file in the second reads

card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: 92HD81B1X5 Analog
name: 92HD81B1X5 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

The three files are codec#0, codec#3, and id.
(see the codec#3 attached)

Revision history for this message
Gerry (ger-cal) wrote :

In kernel 4.18, there are 4 folders
pcm0c
pcm0p
pcm3p
pcm7p

the info file in the last folder pcm7p, reads
card: 0
device: 7
subdevice: 0
stream: PLAYBACK
id: HDMI 1
name: HDMI 1
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

and there are 5 files now
codec#0, codec#3, eld#3.0, eld#3.1 and id.
(see the codec#3 attached)

eld#3.0 just says
monitor_present 0
eld_valid 0

Attached is the eld#3.1 file

I tried copying the missing files/folders from the launch under 4.18 to the launch under 5.6 kernel but keep being told there is not enough room - which makes little sense, the files/folders are tiny, and I've plenty of space.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Does 4.15.0-113.114 fix the issue?

Revision history for this message
Gerry (ger-cal) wrote :

Yes, I should have updated this.
I tried about 6-7 kernels all between 4.15 and 4.18.19 (i think, or some high number like that), all of them worked across Ubuntu, Linux Mint, Fedora, and Debian, and I think it was Manjaro. 100% no audio issues.

But once i tried the 4.19 kernel (or higher, I tried about 8 kernels such as 4.19.0, 5.10, 5.2, 5.5, 5.5, 5.7, 5.8 etc), no luck across any distribution!

So something definitely changed in the audio settings in the move from the last kernel build in the 4.18 build and the 4.19 series and higher.

Revision history for this message
Lester Carballo Pérez (lestcape) wrote :

The issue continues for the Radeon users with the kernel 5.8.0-48... Please, can be disable the check of eld_valid for the Radeon users only? Apparently not one in the upstream is working on a real fix for this and it's to much time waiting for an upstream solution when there are an easy workaround in ubuntu. This honestly does not make sense, it is the idea that I am fine and that the wrong one need to fix it, while all the users suffer the problem unnecessarily. That's not fair.

Revision history for this message
Lester Carballo Pérez (lestcape) wrote :

Is easy to see that ELD was not intended for the Radeon driver and implement it by force will probably never happen as we can see here: https://lists.freedesktop.org/archives/dri-devel/2019-July/227423.html Please then, disable the check of eld_valid for the Radeon driver.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Have you tried latest mainline kernel?

Revision history for this message
Gerry (ger-cal) wrote :

Thinking it was something to do with my DVi-HDMI adapter cable
I went out and purchased a Display Port-HDMI adapter cable,
but it's the exact same thing - no hdmi recognised with newer kernel.

On LMDE, with two kernels installed.

If i boot up with the kernel 4.15.0-041500-generic everything is fine - no issues with either the DVI/HDMI or Display Port/HDMI adapter cable being recognised
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: 92HD81B1X5 Analog [92HD81B1X5 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

On the very same computer, boot up with any newer kernel, for example my second kernel is 5.10.0.0.bpo.4-amd64 the kernel does not pick up the adapter. All i get is:

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: 92HD81B1X5 Analog [92HD81B1X5 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Absolutely nothing else has changed - only the kernel. If i could build the current kernel but add in the sound module of 4.15.0-041500-generic i would, but there are no instructions on how to do that :-( Or can anyone point me to how it could be done? I don't mind building the kernel from source etc
Thanks

Revision history for this message
Uriel Tunn (u2n) wrote :

Have you tried the quick workaround linked at post 53?
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1834771/comments/53

Have to note that this bug disappeared on switching to Mint. (Too many bugs trying to get legacy interface using Ubuntu and gnome-panel, finally gave up and left the building.)

It seems this bug is triggered by an adverse interaction between certain components. (Read the foregoing for a list of suspects.) All the same hardware, just change distros and *poof*, problem gone.

Revision history for this message
Gerry (ger-cal) wrote :

Thanks Uriel Tunn, but that fix didn't work for me.

So, I followed your advice and tried an upgrande to another distro.
I tried...
-> Linux Mint 20.2 Uma (Kernel 5.11)
-> MX Linux 19.4.1
-> Manjaro xfce 21.0.7-210614 (Kernel 5.10)
-> Endeavour-2021.04.17 (Kernel 5.11)
-> Pop_OS_21.04_amd64
-> Fedora_Workstation_Live_x86_64_34-1.2
-> Ubuntu 21.04 desktop amd64 (Kernel 5.11)
-> Ubuntu 18.04 desktop amd64 (Kernel 5.4.0-42-generic)

None of the above work with a DVI/HDMI or Display Port/HDMI adapter.

HOWEVER, seeing as i had just installed Ubuntu 18.04, I started to install some kernels on that build

Sure as hell....
4.15.0-041500-generic - work perfectly, DVI/HDMI or Display Port/HDMI adapter listed as an options in Sound Settings
4.18.0-041800-generic - work perfectly, DVI/HDMI or Display Port/HDMI adapter listed as an options in Sound Settings
4.18.10-041810-generic - work perfectly, DVI/HDMI or Display Port/HDMI adapter listed as an options in Sound Settings
4.18.16-041816-generic - work perfectly, DVI/HDMI or Display Port/HDMI adapter listed as an options in Sound Settings
4.18.19-041819-generic - work perfectly, DVI/HDMI or Display Port/HDMI adapter listed as an options in Sound Settings

THEN
4.18.20-041820-generic - would not even boot with Ubuntu - had to use the recovery kernel option, and when i got into the main screen, i checked the sound settings, and sure as hell neither DVI/HMDI nor Display Port/HDMI were listed anymore!

Next I checked
4.19.0-041900-generic - while this didn't give any problems booting, when i got into the main screen, i checked the sound settings, neither DVI/HMDI nor Display Port/HDMI were listed anymore.

So, yes, whatever happened in 4.18.20-041820 has broke the sound for my HDMI adapters and never been fixed since.

Revision history for this message
Uriel Tunn (u2n) wrote (last edit ):

Hmm, I'm running bone stock LM 20.1 and the kernel is 5.4.0-80 (auto-updated a few days ago). In the last several months, the bug has been triggered a few times -- not often, only infrequently after resume from suspend. On reboot, everything works.

Hate to say I spent days working on a fix for this, and only managed to get a workaround going. So feeling your pain. But the workaround did function reliably. (Not sure why no joy with your setup.)

Choice of distro is very personal; a user should not be forced into one because hardware won't work with any other. ... Possibly consider a cheap video card?

EDIT
Near the bottom of my (lengthy) startup script I found '$HOME/bin/fixHDMIaudio &' so contrary to the above, the fix IS still in use.

EDIT2
To test whether the workaround is still actually fixing the problem (and if there is one), I commented it out and rebooted. Sure enough, no sound. Run manually, sound back.

EDIT 3
To check if any differences in 20.2, I did the upgrade. (It still uses k5.4.0-80.) Exact same results.

So the post 53 workaround IS still fixing the hardware-kernel-driver incompatibility bug, at least with my rig. Apologies for forgetting it was still in use; don't we all move on when an issue is resolved? (Still bugs the CRAP outa me this bug has been around for years -- probably just a few lines of code needed to totally resolve! But wait, I've moved on. Ha!)

Revision history for this message
Gerry (ger-cal) wrote :

Thanks for the feedback Uriel,
but on the Intel Graphics card, after i copy in that program from here (https://askubuntu.com/questions/1032811/ubuntu-18-04-no-hdmi-audio-with-amd-radeon-hd-7870/1207919#1207919) and then run $ $HOME/bin/fixHDMIaudio &
It says .....
[1] 1967

Then returns
"Sink alsa_output.hw__ does not exist.
No sink found by this name or index."

As you say, a cheap video card might be the solution in the long term :-)

It's frustrating, but at least i can continue to use LMDE 4 using the 4.18.19 kernel for the minute though

Revision history for this message
Uriel Tunn (u2n) wrote (last edit ):

The Internet is clogged with reports of this bug on AMD GPUs, but some w/ Intel/nVidia (which I haven't followed).

Is your info from post 61 still valid? (This would be for a current, unmodified update of any distro that uses pulse.)

It would be interesting to plug in a Mint live device and check output of 'aplay -l'. Two reasons for Mint; the team does a great job debugging and it seems to be the one you were running originally.

If same result, that means the kernel itself can't access the hardware. Some searching (more searching) will be needed in that case.

The workaround relies on alsa being able to access and control the audio hardware. If alsa can't enumerate the HDMI devices, there's no convenient way to manually circumvent the defaults (that don't work).

But if the HDMI ports *are* listed, the workaround should get HDMI audio playing. Note that it grabs 'HDMI 0', the first HDMI device listed. Just checked and found the AMD cards here all show one device for each port, but with Intel/nVidia, there's up to three shown for each. (!)

Someone may be able to shed some light on why this is but meanwhile, it appears that a different device number may be required (not the device number associated with HDMI 0).

So you could try, for example from post 61:

card=0
dev=7

Then paste inner part of script:

pulseaudio --kill
rm $HOME/.config/pulse/*
sleep 2
wait
pulseaudio --start
pacmd load-module module-alsa-sink device=hw:$card,$dev
pacmd set-default-sink alsa_output.hw_${card}_${dev}
pacmd set-sink-volume alsa_output.hw_${card}_${dev} 35000

Revision history for this message
lorn10 (kle) wrote :

Hi all!

Just for reference, - I can confirm this annoying issue also for Kernel 5.11.0-38-generic (Kubuntu 20.04 LTS). The used Radeon hardware is quite old, the sound is listed as "RV635 HDMI Audio [Radeon HD 3650/3730/3750]".

In my case the audio started to work after I installed "pavucontrol" and then I just selected the (inactive) Radeon HDMI profil under "Configuration". That was all.

The crazy thing is that the HDMI is still shown as "unplugged" but it works. And I really didn't have applied any of the above mentioned patches, - weird. ;-)

Revision history for this message
Lester Carballo Pérez (lestcape) wrote (last edit ):

@hui.wang: The problem continues with kernel 5.11.0-41-generic and the driver radeon, that doesn't support audio components yet. Is easy to see that ELD was not intended for the Radeon driver and implement it by force will probably never happen as we can see here: https://lists.freedesktop.org/archives/dri-devel/2019-July/227423.html Please, apply a patch at the Ubuntu level to disable the check of eld_valid for the Radeon driver, because is clear that this will never be fixed in the upstream!!!

Revision history for this message
Lester Carballo Pérez (lestcape) wrote :

Now with pipewire there are not a workaround anymore, is just fully broken and the issue continues unsolved in the upstream: https://gitlab.freedesktop.org/drm/amd/-/issues/1569

Revision history for this message
Uriel Tunn (u2n) wrote :

@lestcape, thanks for your upstream work toward a permanent fix. Excellent job there documenting the history of this bug. Since there was a bugless time, it seems that diffing the code from then with current would painlessly reveal the trigger. While it's there for the fixing, the trick seems to be in getting the right person (or people) to take a look.

Meanwhile, startup scripts on our local machines call the workaround on every boot and HDMI audio works. Sometimes it's broken on resume-from-suspend, then re-running the workaround script re-fixes it -- or not, depending on the current kernel, but it always works on reboot.

Revision history for this message
Gerry (ger-cal) wrote :

Apologies Uriel Tunn for not getting back to you on your message #74.
I must not have received the email notification at the time.

Anyway, i tried what you suggested and no luck...

e4310:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: 92HD81B1X5 Analog [92HD81B1X5 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
e4310:~$ card=0
e4310:~$ dev=7
e4310:~$ pulseaudio --kill
e4310:~$ sudo rm $HOME/.config/pulse/*
e4310:~$ sleep 2
e4310:~$ wait
e4310:~$ pulseaudio --start
e4310:~$ pacmd load-module module-alsa-sink device=hw:$card,$dev
e4310:~$ pacmd set-default-sink alsa_output.hw_${card}_${dev}
Sink alsa_output.hw_0_7 does not exist.
e4310:~$ pacmd set-sink-volume alsa_output.hw_${card}_${dev} 35000
No sink found by this name or index.

Tried with the latest Ubuntu 22.04 and Fedora 36 and same situation,
HDMI is not recognised for sound, but getting pictures is fine -> so nothing wrong with the HDMI cable to the monitor.
Thankfully I've just connected a set of external speakers using the 3.5mm jack and just accepted sound across hdmi will not work with kernel later than 4.15.

Revision history for this message
Uriel Tunn (u2n) wrote :

@Gerry, it's clear from your aplay list that the kernel doesn't see the HDMI audio hardware. Mine, for example, shows:

card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]

So it appears you need TWO workarounds; the second is ready to go but the requirement of the first is to make the kernel aware of your HDMI audio hardware.

Perhaps this bug encompasses both needs...or maybe just one...or the other...aaiiii! This is what makes sorting through all the relevant online info so difficult.

Revision history for this message
Gerry (ger-cal) wrote :

Thanks Uriel for all your advice,
but yes I think you're right, the kernel won't be fixed now for this issue,
I'm sure the kernel maintainers have long moved onto newer and better hardware.
That's life

Revision history for this message
Paul Dufresne (dufresnep) wrote :

I am investigating a similar (maybe the same) bug.

kernel 4.9.175 and prior works for my friend laptop.
kernel 4.9.180 or later does not work.

Details at:
https://forums.linuxmint.com/viewtopic.php?p=2244862#p2244862

Revision history for this message
Paul Dufresne (dufresnep) wrote :

How to test 4.9.175:
In a new directory copy:
https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.175/linux-headers-4.9.175-0409175_4.9.175-0409175.201905101647_all.deb
https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.175/linux-headers-4.9.175-0409175-generic_4.9.175-0409175.201905101647_amd64.deb
https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.175/linux-image-4.9.175-0409175-generic_4.9.175-0409175.201905101647_amd64.deb
Then cd in that directory, then "sudo apt install ./*.deb"

When rebooting you will have to go in Grub menu (Esc or shift), and then go in advanced options (or something like that) and choose the 175 version.

Revision history for this message
Gerry (ger-cal) wrote :

Hi Paul,
I'm hoping the Intel lads have sorted it for me - it was a kernel issue in my case
You can read more here - https://gitlab.freedesktop.org/drm/intel/-/issues/2751
I won't know for sure until i can download kernel 6.2 or 6.3

Revision history for this message
Lester Carballo Pérez (lestcape) wrote :

The problem continues and is worse now with pipewire in replace of pulseaudio in 22.10 as the workaround proposed here do not work anymore. Also there are not solution from the upstream (the AMD side) as can be see here: https://gitlab.freedesktop.org/drm/amd/-/issues/1569

Revision history for this message
Uriel Tunn (u2n) wrote :

The problem does seem to have (at least) two separate causes:

1) Failure (during installation and updates) to recognize the hardware and install the right kernel module(s)

2) Adverse interaction between OS components such that the kernel can see and use the hardware, but HDMI audio is initialized in a disabled state

The workaround (which I continue to auto-run at each boot, otherwise no HDMI audio!) only works if 1) is not present. (workaround ref: https://askubuntu.com/a/1207919)

The root cause of 1) might be something as simple as an incorrect hardware ID string; maybe just need a simple patch to fix. But in any case, users with hardware affected by 1) need a fix.

Revision history for this message
Paul Dufresne (dufresnep) wrote :

I suspect the same cause as the bug report I filled:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1993217
that is commit:
72cd3810e52c606595f9e1a2d442a4cc6e6a3551 is the first bad commit
commit 72cd3810e52c606595f9e1a2d442a4cc6e6a3551
Author: Hui Wang <email address hidden>
Date: Mon May 6 22:09:32 2019 +0800

    ALSA: hda/hdmi - Consider eld_valid when reporting jack event

Revision history for this message
Paul Dufresne (dufresnep) wrote :
Revision history for this message
Uriel Tunn (u2n) wrote (last edit ):

The fix is imminent. https://gitlab.freedesktop.org/agd5f/linux/-/commit/34d84636e5e09521d031863a01f9b9fb22ffa875

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1993217/comments/37

After proven by the community, I look forward to updating the workaround post as "No longer needed!"

Revision history for this message
Lester Carballo Pérez (lestcape) wrote :

The fix for Radeon users landed in the kernel 6.2. So, if you want to solved the problem you need to install this kernel or swap to Ubuntu 23.04 that already have the 6.2 kernel and will be released on April 20, 2023. The solution was thanks to Takashi Iwai who is an engineer at SUSE Linux. My most sincere thanks to him for all his work. Thanks also to Alex Deucher for they support, who is the AMDGPU maintainer.

More info about the solution of this problem:

1- https://gitlab.freedesktop.org/drm/amd/-/issues/1569#note_1601648

And another fix more to make the previously solution works better:

2- https://gitlab.freedesktop.org/drm/amd/-/issues/2236

To post a comment you must log in.