How to enable HDMI audio output in WirePlumber on Fedora 41

Hello everyone,

I wanted to share how I solved an issue I encountered with HDMI audio output on Fedora 41 using WirePlumber and PipeWire. I was able to get HDMI audio working by following a few simple steps.

Here’s what I did:

1. Copy WirePlumber configuration to your user directory

First, I copied the system-wide WirePlumber configuration to my user directory. This allows me to customize the configuration:

cp -r /usr/share/wireplumber ~/.config/

2. Edit the alsa-vm.conf file

I then edited the alsa-vm.conf file to configure the HDMI output. This file is located in ~/.config/wireplumber/wireplumber.conf.d/.

I opened the file and modified it to look like this:

# ALSA node property overrides for HDMI output
monitor.alsa.rules = [
  {
    matches = [
      { node.name = "~alsa_output.*" }
    ]
    actions = {
      update-props = {
        audio.format = "S16LE"
        audio.channels = 2
        audio.position = "FR,FL"
      }
    }
  }
]

I found this solution in this Arch Linux forum thread, which was very helpful.

3. Restart WirePlumber and PipeWire

After editing the configuration, I restarted both WirePlumber and PipeWire to apply the changes:

systemctl --user restart wireplumber
systemctl --user restart pipewire

4. Switch output to HDMI in GNOME sound settings

Finally, I went to the GNOME sound settings and switched the audio output to HDMI. After that, the audio was routed to my TV correctly.

Important Notes:

  • You may need to restart PipeWire every time you plug in the TV to ensure it picks up the HDMI output correctly.

    You can do this by running:

    systemctl --user restart pipewire
    

I hope this helps anyone with a similar issue!

1 Like

thank you so much!! for some reason, I had to swap FR and FL in the audio.position line to have the proper R and L speaker orientation, but otherwise, this appears to work perfectly.

1 Like

It would probably be a better idea to only have changed files under ~/.config/wireplumber/

So just put the one file at ~/.config/wireplumber/wireplumber.conf.d/alsa-vm.conf

Leave the unchanged files as reference templates at /usr/share/wireplumber/… …

another benefit is that since you know only changed files (overrides) are under there, you know what you changed. Otherwise as you did it you’d have like 59 unchanged files and one edited (alsa-vm.conf) making it a maintanence problem