Make audio switch automatically to a headset or dock when you plug it in
Symptom
Plugging in a USB headset, a dock, or connecting a Bluetooth speaker does nothing. Audio keeps coming out of the built-in speakers until you manually change the default. A common Omarchy report: "autoconnected bluetooth speaker doesn't play audio... i open the bluetooth menu, disconnect, connect again, audio works."
Cause
PipeWire's PulseAudio shim does not load module-switch-on-connect by default, unlike stock PulseAudio. Without it, a newly appearing sink never becomes the default, and already-running streams are never moved to it.
Fix
Create the drop-in (user scope shown, with /etc/pipewire/... for system-wide):
mkdir -p ~/.config/pipewire/pipewire-pulse.conf.d
# ~/.config/pipewire/pipewire-pulse.conf.d/switch-on-connect.conf
pulse.cmd = [
{ cmd = "load-module" args = "module-switch-on-connect" }
]
Restart the shim:
systemctl --user restart pipewire-pulse.service
As a one-shot fallback for a device that is already connected:
pactl list short sinks
pactl set-default-sink <sink-name>
pactl list short sink-inputs
pactl move-sink-input <input-id> <sink-name>
Verify
pactl list short modules | grep switch-on-connect returns a line, and unplugging/replugging a USB headset moves the * in wpctl status automatically.