How to set default audio devices on XFCE?

Hi, I’m running Manjaro XFCE and want to set default audio devices. I use a bluetooth WH-1000XM3 headset that’s often connecting and disconnecting and a set of speakers. I’d like the bluetooth headphones to be the default output device when they’re connected, and the “Starship/Matisse HD Audio Controller Analog Stereo” to be in use when they’re not.
The current behaviour is that I have to manually change to the WH1000XM3 channel and when they disconnect, the system defaults to the next alphabetically highest channel “USB Advanced Audio Device Analog Stereo”.
Is there somewhere I can change the configuration for the defaults I’d like?

There is GUI package pasystray to view or change the default sink for audio playback

or use this command:

pacmd list-sinks | grep -A1 index 

The default sink is marked with an asterisk

To change the default sink, use the name of another sink output from the list with this command
(do not include the chevron brackets ‘<’ ‘>’)

pacmd set-default-sink NAME

Hi, running the terminal command showed I had the correct sink set as default
* index: 2 name: <alsa_output.pci-0000_0d_00.4.analog-stereo>
This was also verified by installing and checking with pasystray, but The behaviour persists that when removing the WH1000XM3, the system starts using the sink below.
alsa_output.usb-C-Media_Electronics_Inc._USB_Advanced_Audio_Device-00.analog-stereo
Am I just misunderstanding what the expected behaviour of default sink is or should be?

The default sink is the first device Pulseaudio will try to use for audio playback. If the default sink is not available, Pulseaudio would then use a fallback sink

But if a user moved an audio stream in Pulseaudio controls to another output sink, the user preference would take priority over default sink.

There is also a pulseaudio module that can re-direct audio from default sink
module-switch-on-port-available
This module will switch audio to Bluetooth headset when it is detected, but will also switch to the USB device when it is plugged in

if you do not want audio switching to the USB device, I suggest using pasystray to find module-switch-on-port-available; then right-click on it and select ‘unload’

This is only a temporary change to check if Pulseaudio behaves more in line your needs
The module can be permanently disabled from loading in Pulseaudio configuration file /etc/pulse/default.pa

1 Like