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

Unpair your headphone first. (with De Bluetooth-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:

Application is called pavucontrol

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 Audioprofile [A2DP]. 


It happens after updates or if you use dual-booting with Windows that Headset only connects HSB/HFP.

Sometimes it helps to simple disable and re-enable device.

If that does not help try to remove the disable device and reinitalize it.

And last if all of that do not work try rfkill:

sudo rfkill block bluetooth
sudo rfkill unblock bluetooth
sudo systemctl restart bluetooth

Follow us
Was this article helpful to you? Yes 3 No

How can we help?