How can I switch the sound to headphones automatically when I plug them in?

  • Kubuntu 24.04
  • Framework 16

I’ve just set up my shiny new Framework 16 with Kubuntu 24.04, but was slightly disconcerted to find it doesn’t switch to the headphones when I plug them in, unlike pretty much anything else I’ve ever used.

Is there a way to make KDE switch automatically? Or even to just assign a keyboard shortcut to toggle between the two?

I had a similar issue myself on Fedora, and I had to change the default audio device to the headphones to get it to work.

I don’t use KDE myself, but afaik there should be a way to set the default audio device in the audio widget in the system tray.

If you set the default device to your headphones (or if your using the audio expansion card, set that as the default), then you should have it change to your headphones when you plug them in.

Here’s an example picture I found (please correct me if this is not possible like this)
image

1 Like

Hi,

I am not sure this is particularly helpful, but my FW16 with Ubuntu 24.04 on it auto-switches from speakers to headphones when I plug them in. They are USB headphones.
So, I can tell you what you want is definitely possible because it works here, but I did not have to configure anything to get it to work, it did it automatically.

1 Like

On my Fedora 40 I also get autoswitching using bluetooth headphones. However I think you will fine that because your headphones are plugged in there is no way for the headphone module to inform the rest of the system that it now has headphones plugged in as it is an already plugged in USB device. I think you will need to manually switch them.

Ha! That works with the headphone adapter, too. I didn’t think of that…

Thanks!

Yes, even if all you are doing is plugging headphones into a jack via a USB sound device, it should be able to do “jack inserted detection”, and switch the sound to headphones if the jack is inserted.
99% of sound devices should support “jack inserted detection” so it should work.