1

I'm using Ubuntu 20.04. My laptops are Lenovo Thinkpad E490 and Thinkpad x280.

I have my main speakers connected via bluetooth, and whenever I connect my headphones while the other speakers are connected it's connected in HSP mode leading to shitty audio quality. Although there is A2DP in the dropdown in the sound settings. However, selecting it doesn't change anything.

If I don't have my speakers connected and I connect the headphones, they are in A2DP mode. However, if I have the speakers connected while connecting the headphones and only disconnect the speakers then, it's the same situation as above with them being stuck in the HSP mode.

My goal would be to have them correctly set whenever they connect.

My current workaround: Disconnect the speakers then connect the headphones.

I've tried fiddling around with blueman, the pulse audio settings, and tried setting

MaxConnected=2

[A2DP] SBCSources=2

in /etc/bluetooth/main.conf to no avail. I've also tried what was suggested in related threads where the blueooth headphones defaulted to HSP mode, however, none of them connected two speakers at a time.

(I've always restarted the bluetooth service after I've tried seomething)

I'm happy for any help on this issue. Even if it's a bit hacky or just a script that disconnects the main speakers whenever I connect the headphones :)

mimre25
  • 21

1 Answers1

1

I managed to solve this problem.

I wrote a script, that monitors bluetooth connections and when the headset connect, I disconnect the speakers via the dbus.

Source

Check out this post to for the original script that I've adapted.

Further, if you run into the problem and want to debug it yourself, d-feet is an amazing tool available on most unix systems to see which interfaces are available via the dbus

mimre25
  • 21