There is pulseaudio module-switch-on-connect and module-switch-on-port-available that enable automatic switching of an audio device on connection. See with the following command if any of these modules is already loaded:
pactl list short modules
If not, then test if you can make automatic switching work by issuing one or both of the following commmands in a terminal:
pactl load-module module-switch-on-connect
pactl load-module module-switch-on-port-available
On success add one or both of the following lines to your /etc/pulse/default.pa
load-module module-switch-on-connect
load-module module-switch-on-port-available
This will then always load these modules on every login, resp. restart of the pulseaudio daemon.
Please note that local user settings in ~/.config/pulse/default.pa
will override the system-wide setting. If you have such a local file you will enter the above commands there.
If it still doesn't work, you may have conflicting settings in such a local default.pa
. It then may worth to (temporarily) rename this file, followed by a restart of the Pulseaudio server before trying above again:
mv ~/.config/pulse/default.pa ~/.config/pulse/default.pa.old
pulseaudio -k
Module load failed
? – Skippy le Grand Gourou Jul 21 '19 at 18:33Module load failed
too - Mint 19.3. I'll have a dig around. – Scaine Jul 29 '20 at 08:06pactl list short modules
). PA spits out an error if we try to load a module twice. – Takkat Jul 29 '20 at 19:16switch-on-port-available
- this one comes into action after the audio output port was changed. No idea which is involved in your case. – Takkat Aug 17 '20 at 16:14load-module module-switch-on-port-available
already specified in my /etc/pulse/default.pa. I also tried loading your version (which doesn't have the first use of "module" in its name), but SteamVR still creates the new output and I don't see any switching to it. This might be a SteamVR bug however, and I understand that this does work for some. Not to worry, it's not a big deal. – Scaine Sep 07 '20 at 17:25