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
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 override system-wide setting. If you have such a local file you will enter the above commands there.
If it still not works 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