Can I configure Fedora 35 to automatically switch audio output devices when headphones are plugged in/unplugged?

When I plug in headphones or unplug them, the audio output device remains the same until I change it via GNOME Settings. I would like the audio output device to automatically switch to “Headphones - Starship/Matisse HD Audio Controller” when headphones are plugged in and to “HDMI / DisplayPort 3 - Navi 10 HDMI Audio” when they are unplugged. Preferably, these new settings would work in a similar manner for other audio devices I may plug in or install.

Motherboard: ASRock B550 Phantom Gaming ITX/ax (BIOS version 2.10)
Graphics card (for Displayport audio output): Sapphire Radeon RX 5700 XT Nitro+

Hi @flavonol,

I think this is a bug introduced in Fedora 35. Audio output was switching automatically in F34. I have reported the bug here but there is no response yet.

My problem is that when I plug the HDMI cable, the Output Device does not switch automatically. The worse part is that if I unplug it I loose sound on my laptop and have to select the builtin speakers manually every time. You can see more detailed explanation here.

Can you confirm you have the same problem if you unplug your HDMI?


Can you confirm you have the same problem if you unplug your HDMI?

I can confirm that I have the same problem if I unplug my DisplayPort.

Do you think it would be helpful for me to comment on that bug report to describe my similar experience with headphones and DisplayPort audio?

I am pretty novice myself but I think it would be helpful. For example I was not able to reproduce the bug with a bluetooth device.

I am no longer experiencing this issue with pipewire 0.3.47. @stiky , can you confirm whether this is the case for you?

I switched back to F34 a while ago so I cannot say. Maybe I could try it again at some point.