chimeraos icon indicating copy to clipboard operation
chimeraos copied to clipboard

Set Pulseaudio to auto switch when headsets are connected via bluetooth

Open Samsagax opened this issue 4 years ago • 0 comments

Headsets that are connected successfully by the bluetooth configuration inside Steam Big Picture are not set as audio sink for Pulseaudio, so there are some additional steps to make it output anything. You need to change the audio settings each time in the Steam interface and event then it won't get applied until you start a game (because it's set for the next audio sink and not all present sinks). When the connection happens inside a game, this amounts to the annoyance of exiting the game, connect the device, then set audio output and then restart the game.

To fix all this there is a loadable module in PulseAudio. Just add this lines to the end of /etc/pulse/default.pa:

### Automatically switch to newly-connected devices
load-module module-switch-on-connect

Then if a Bluetooth device is connected that can output audio Pulseaudio tries to set it as the default sink for all audio outputs. Of course this makes it change all audio to the last connected device, but is the most common use-case.

Samsagax avatar Apr 11 '21 13:04 Samsagax