Add to /etc/pulse/default.pa to automatically switch pulseaudio sink to Bluez:
.ifexists module-bluetooth-discover.so load-module module-bluetooth-discover load-module module-switch-on-connect # Add this .endif
Modify /etc/bluetooth/audio.conf to auto select A2DP profile (instead of HSP/HFP):
[General] Disable=Headset # Add this
Apply changes:
sudo pulseaudio -k # Restarts pulseaudio sudo restart --system bluetooth # Restarts BT
I’ve been having intermittent trouble with auto connecting. Regardless, this works great for auto connecting in A2DP. It’s much easier to just manually connect BT than to have to also open audio settings, switch adapter, switch from hsp to A2DP.
Is it possible to switch back to built in audio automatically on BT disconnect?
My headset just doesnt connect anymore without the headset service
Hello!
There is a minor mistake. The pulseaudio process is owned by the current user, so `sudo` must be omitted:
pulseaudio -k # no sudo
These instructions made it so that sound settings showed no output whatsoever. Before I had a choice between bluetooth device or headset- now nothing.
This is awesome!!! Can’t belive it worked. It’s kind of sad that this functionality isn’t built in as a “preference” of some kind in gnome/unity tho…
Also, in ubuntu 17.04 the bt configuration file is /etc/bluetooth/main.conf instead of /etc/bluetooth/audio.conf
Thank you for the hint! This worked with me.
Brilliant. This worked so well.
Thank you very much. works well on Ubuntu 20.04
Thank you, this works great! One small deviation I’ve found on Ubuntu 20.04 is that default.pa is actually under:
/var/lib/gdm3/.config/pulse/default.pa