No HDMI audio output, but speaker-test works

I think I exhausted all the forums posts around this, tried many things but nothing worked. Basically my problem is that there’s no audio from my TV when connected through HDMI, I can make the TV to make sound with the speaker-test -c2 -Dhdmi:CARD=PCH,DEV=0 command.

Things I’ve tried:

  • Run sudo dnf swap wireplumber pipewire-media-session and reboot.
  • Restart pipewire and related services with systemctl.
  • Make sure with pavucontrol and alsamixer that nothing is muted.
  • Of course, select the correct output device in GNOME Control Center.
  • Try different apps: Firefox, Chrome and mpv.

One thing, audio worked months ago with an ASUS monitor, now I’m trying on a different, kind of crappy, Philips TV. I was thinking it could be a TV problem, but being able to output actual sound with speaker-test defeats that theory.

One thing that changed in my setup recently is that I created a second user (through GNOME Control Center), could this have messed up something since pipewire uses per-user services?

This is a fairly standard and compatible Lenovo ThinkPad X1 Carbon with an Intel 7th gen CPU.

Mentioning the additional user brings to mind that the audio settings are also “per-user”.
Have you tried going into the gnome control panel with the user having the problem and selecting different options for output? On mine, with a TV as a monitor, I see 3 different choices for hdmi audio output.

Of course, I tried to switch between every output device with both users using G-C-C. The volume bar shows there’s sound being outputted but the TV remains silent.

Try install this Quick Settings Tweaker - After install you can manage default audio output.
https://extensions.gnome.org/extension/5446/quick-settings-tweaker/

I could do that from GNOME Control Center, how this is different?

No one say that this solution if different - is quicker.