This is tested under Gnome-shell [3.22.3] with:
BlueZ : 5.47-1
*Unpair your headphone first. (with Gnome-Settings or bluetoothctl)
To make your headphone auto connect each time you enable it, we need to enable the switch-on-connect module from Pulseaudio:
sudo nano /etc/pulse/default.pa
put these two lines to the end:
# automatically switch to newly-connected devices load-module module-switch-on-connect
Do you use gdm?
then do this:
Prevent systemd from starting Pulseaudio anyway with socket activation :
This two commands will do the trick:
sudo -ugdm mkdir -p /var/lib/gdm/.config/systemd/user sudo -ugdm ln -s /dev/null /var/lib/gdm/.config/systemd/user/pulseaudio.socket
You can also use the solution to address this problem with this:
pulseaudio-bluetooth-a2dp-gdm-fix [yay -S pulseaudio-bluetooth-a2dp-gdm-fix]
Continue for everyone:
Now it is time to connect and recognize your headphone:
bluetoothctl is the tool we use here from the terminal:
bluetoothctl power on agent on default-agent scan on pair XX:XX:XX:XX:XX:XX < your headphones "ID" trust XX:XX:XX:XX:XX:XX connect XX:XX:XX:XX:XX:XX scan off exit
Check if your headphone is listed under sound devices and is connected via A2DP profile:
If you’re menu only displays Headset Head Unit (HSP/HFP) then this means it also covers the additional microphone
As far as I can see it will take the last state for each new automatic connection.
And it is done!
To see if it works > reboot system if you do it right and for sure you are lucky to have chosen good hardware, or the right one working together 😉
Now, each time you power on your headphone, just system auto-connecting it with High Definition Audoprofile [A2DP].Follow us