10

My bluetooth headset (Plantronics Backbeat Go2) is connected just fine with my system, but there are several manual steps I have to take to make this work that I would very much like to have automated:

  1. After every reboot I have to run pactl load-module module-bluetooth-discover in the terminal to get the device to connect at all. I tried putting this in a shell script to run on start up, but no dice :(
  2. My headset connects automatically with no issues, but it always defaults to Telephony Duplex or even Off instead of A2DP; I've tried and failed with several different strategies to force A2DP :(
  3. Force the BT headset to be the default output device. Tried several strategies here, too... unfortunately every time I connect the headset the index from pacmd seems to change, so I can't force a default in the PA conf file set-default-sink that way. And using the listed name doesn't seem to work either - if the headset is not present, it switches to the speakers and doesn't switch back if the headset connects :(

Thanks for any advice you might have on resolving these issues!

6

This worked for me: https://sandalov.org/blog/2146/

Instructions copied here for posterity:

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/Create /etc/bluetooth/audio.conf to auto select A2DP profile (instead of HSP/HFP):

[General]
Disable=Headset # Add this

Apply changes:

pulseaudio -k # Restarts pulseaudio

# You may need to turn your bluetooth headphones off, then back on
  • 1
    Remark: The comment "add this" is important, since the line ".ifexists module-bluetooth-discover.so" already exists. I tried adding the entire four lines at the end at first and it didn't work. Only adding the one line at the right place works. – Fabian Röling Nov 13 '18 at 22:41
  • 1
    on Ubuntu Bionic I set AutoConnect=true rather than Disable=Headset – develCuy Jan 3 at 23:20
2

It is not only after a reboot but also after disconnecting and reconnecting a device capable of both, HSP, and A2DP profile that Bluez always connects it in HSP (headest) mode.

I can't in detail tell what is going on under the hood (Bluetooth has quite some quirks) but I suspect that we are connecting a new device as Headset rather than as an Audio or AudioSink device via dbus.

There appears to be no setting by which we can control this. I am not aware of any settings we can make to default a Bluetooth device to A2DP on connecting (but I cannot exclude that I missed a piece of documentation somewhere). This may be considered a bug.

At some time I wrote a script to establish Bluetooth connections using the Audio profile. This script was included in a little GUI Python application (bt-autoconnect on launchpad or through my ppa:takkat-nebuk/takkat) which amongst other tweaks does exactly this but it is more of a hack than a definite solution, and sadly it does not work with all adapters around but it will connect my Philips headset in A2DP mode first (even though sound settings still claim it was HFP but that's another issue).

  • Thanks for the input Takkat... I'm thinking I'm hooped, and it's going to be a manual process :( – Logos Feb 28 '15 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.