You are not logged in.

#1 2025-05-04 04:00:27

UwU25
Member
Registered: 2025-05-04
Posts: 2

Audio not switching to Headphones or Speakers Automatically

On connecting my headphones I have to change the configuration in pavucontrol manually to use them and same goes for speakers, how to make them switch automatically?

Offline

#2 2025-05-04 15:48:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,156

Re: Audio not switching to Headphones or Speakers Automatically

Are those distinct sound cards rather than a port based detection logic? If they're distinct sound cards the easiest would be a pipewire-pulse.conf override that loads module-switch-on-connect e.g.

pulse.cmd = [
    { cmd = "load-module" args = "module-always-sink" flags = [ ]
        condition = [ { pulse.cmd.always-sink = !false } ] }
    { cmd = "load-module" args = "module-device-manager" flags = [ ]
        condition = [ { pulse.cmd.device-manager = !false } ] }
    { cmd = "load-module" args = "module-device-restore" flags = [ ]
        condition = [ { pulse.cmd.device-restore = !false } ] }
    { cmd = "load-module" args = "module-stream-restore" flags = [ ]
        condition = [ { pulse.cmd.stream-restore = !false } ] }
    { cmd = "load-module" args = "module-switch-on-connect" }
    #{ cmd = "load-module" args = "module-gsettings" flags = [ nofail ] }
]

in a override file at /etc/pipewire/pipewire-pulse.conf.d/20-switchOnConnect.conf

Offline

Board footer

Powered by FluxBB