2

I have a blue tooth speaker that connects by default as Headset Unit (HSP/HFP). How can I make it connect by default High Fidelity Playback (A2DP Sink)?

I have two users defined on my machine and somehow for one of the users it remembers the connection setting A2DP. But for the other user it doesn't. I'm using Ubuntu 20.04.4 LTS

Edit: The answer suggested in the comment, http://askubuntu.com/a/1388140/32664, works but only until restart. Afterwards the problem persists. I noticed that if I am doing a manual pulseaudio -k && sudo systemctl restart bluetooth then the problem goes away...

wi2ard
  • 81
  • 8

2 Answers2

0

Open up the audio.conf file (this should be the path: /etc/bluetooth/main.conf) while signed as the other user (the one which is not remembered) and see if the option AutoConnect=true is commented out or not (if it's not there add it). If it is, remove the # in front of it, exit and save the file, restart bluetooth with the following command: sudo service bluetooth restart and try again. Hope this helps!

  • It didn't work. I couldn't find an audio.conf but from what I read this was replaced by main.conf on the same path so I added there the line you gave me as it was absent altogether. Did the restart of bluetooth but my device reconnected as headphone quality :/ – wi2ard Aug 01 '22 at 09:31
  • My bad, I'll edit this in my answer. About the quality; are your drivers up to date? – Uncle Woods Aug 01 '22 at 09:43
  • Thanks. It seems to work with the answer pointed out by @richbl in the comment. If the drivers get autoupdated then they are up to date – wi2ard Aug 01 '22 at 09:57
  • did not work for me – ForeverLearning Dec 12 '22 at 15:01
0

I had the same problem and the solution from here worked for me:

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 (did not work for me, I just rebooted):

sudo pulseaudio -k # Restarts pulseaudio
sudo restart --system bluetooth # Restarts BT
karel
  • 114,770