1. Home
  2. Docs
  3. Hardware and Network
  4. Bluetooth
  5. Get bluetooth auto-connected with A2DP

Get bluetooth auto-connected with A2DP

by joekamprad

This is tested under Gnome-shell [3.22.3] with:

BlueZ : 5.47-1

gnome-bluetooth: 3.20.1

pulseaudio-bluetooth/pulseaudio: 11.1-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:

power on
agent on
scan on
pair XX:XX:XX:XX:XX:XX < your headphones "ID"
connect XX:XX:XX:XX:XX:XX
scan off

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 that’s built-in with your headphone, for HIFI Headphone choose High Fidelity Playback A2DP.

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
Was this article helpful to you? Yes 2 No

How can we help?