Pulseaudio - Disable autoswitching to new devices(module-switch-on-connect)

Mash
  7 years ago
  1

You meight want to disable this module if you dont want to loose the focus on your primary I/O devices(the output device connected to the speakers for example)  at new made connections.
This module is triggered by USB devices and applications on their connection to the system, such as; audio capable game controller(PS4), USB mics, or audio applications that create new sinks on start.
 
Credits to nikgnomic for mentioning this change from Ubuntu18.04 towards -Mate. while this also  applies to Mint 19.
 

Just done upgrade to 18.04 and found Pulseaudio module that may be causing the problem

new in configuration file etc/pulse/default.pa for 18.04:

  ### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
.endif

Disable this module to stop usb device grabbing default when plugged in

sudo nano etc/pulse/default.pa

and comment out load-module command

 ### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
#.ifexists module-switch-on-connect.so
#load-module module-switch-on-connect
#.endif

Better option is copy etc/pulse/default.pa to home folder

cp /etc/pulse/default.pa ~/.config/pulse/default.pa

Pulseaudio user configuration in home overrides default configuration.
don’t need sudo to make changes.
If changes cause problems can delete home folder configuration and revert back to default easily