Yes, this question has been asked 6 or 7 million times already. But everybody has had a different cause for it, and therefore everybody has had a different solution to it. I am suffering from this issue, so I thought I would have a post where all the main causes (and solutions) are listed along with the troubleshooting steps. Of course, if anybody sees anything that I'm missing, please chime in.
First step, what's the machine.
user@machine:~$ sudo inxiCPU: 8-core AMD Ryzen 7 7735HS with Radeon Graphics (-MT MCP-)speed/min/max: 1700/1600/4828 MHz Kernel: 5.19.0-35-generic x86_64 Up: 9mMem: 2348.4/28818.8 MiB (8.1%) Storage: 476.94 GiB (2.7% used) Procs: 397Shell: Sudo inxi: 3.3.13user@machine:~$ sudo inxi -xAAudio: Device-1: AMD driver: snd_hda_intel v: kernel bus-ID: 74:00.1 Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor driver: snd_pci_acp6x v: kernel bus-ID: 74:00.5 Device-3: AMD Family 17h HD Audio driver: snd_hda_intel v: kernel bus-ID: 74:00.6 Sound Server-1: ALSA v: k5.19.0-35-generic running: yes Sound Server-2: PulseAudio v: 15.99.1 running: yes Sound Server-3: PipeWire v: 0.3.48 running: yesuser@machine:~$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 22.04.2 LTSRelease: 22.04Codename: jammy
Second, what's the behaviour. No audio over HDMI. Headphone jack works fine, Bluetooth audio works fine, no audio at all over HDMI (video signal is fine).
Third, what's been tried. The HDMI cable and speakers are known to be good. I hooked up an old laptop running 20.04, and the audio over HDMI is fine. There is a solution somewhere where somebody fixed this issue (on Windows) by getting a "4K HDMI cable", if that's even a thing, and that solved their issue. My HDMI cable says "High Speed Cable" on it, and nothing else. For someone else, what fixed it for them is to boot with the HDMI cable disconnected, and then reconnect it. Tried it, didn't help.
I looked under sound settings, HDMI is selected as an output. Sometimes I see a profile, but not for long, and that disappears, so I suspect it's a software thing (driver?), not a hardware thing. When I play sound, the sound meter moves, so the PC thinks it's outputting sound. I should probably look at the drivers (they say Intel HDA, this is an AMD APU, wtf?).
I also looked in Alsamixer to make sure nothing was muted (I've had this issue on other machines), everything was unmuted and I turned all the volumes to max.
UPDATE#1: tried deleting the pulse audio profile and rebooting, no change.
UPDATE#2: Gnome Alsamixer isn't a thing in 22.04, 18.04 is the latest release that has it.
UPDATE#3: Playing a test sound to a specific hardware output didn't result in sound over HDMI. I did get sound through the headphone jack when expected though.
UPDATE#4: Found a post that claims audio over HDMI is broken for my current kernel and that I need to downgrade.
Things to look into (with links to posts):
create a sink (I don't even know what a sink is, but I can look into it, instructions look simple and clear enough)
install GNOME AlsaMixer (I don't know that this would make a difference from the cli alsamixer, could be an updated or forked version, worth trying)
removing pulseaudio profile (worth trying)
disabling the iGPU (as someone in that thread pointed out, this is mental, it's like closing your eyes so you can hear better)
Kernel incompatibility (instructions to downgrade are here)
I will edit this post with progress.