Infosec Scribbles

March 25, 2018

Bluetooth on Linux: Getting QC35 to work

This is a continuation to my series of migrating to Linux posts.

If you try to pair Bose QC35 with an Ubuntu 16.04 LTS box, you will notice that it always pairs in headset mode, acts as if a call has just started and then disconnects. If you try to manually select A2DP Sink in sound settings, it will fail without any warning message displayed. Next time you open sound settings you will find that i has reset itself to HSP/HFP. Time to check journalctl output and find out that something isn’t right.

Below are the steps I managed to compile based on numerous other blog posts and AskUbuntu questions that didn’t work on their own, but worked in this combination.

Step 1: Install Blueman

By default, Ubuntu GNOME comes with gnome-bluetooth, which is a rather useless front-end. Since you’re here, you should be capable of using blueman, a package that provides a much more feature-complete interface.

Step 2: Disable BTLE

Sad as it is, QC35 just won’t pair properly with Ubuntu over BTLE. You can force it to use BR/EDR by editing /etc/bluetooth/main.conf. Search for a line that reads

ControllerMode = dual

and replace dual with bredr.

Step 3: Disable Headset mode

Edit /etc/bluetooth/audio.conf. You will most likely have to create the file. Populate it with:

load-module module-switch-on-connect

Step 4: Edit PulseAudio configuration

Edit /etc/pulse/ Search for a line that reads

load-module module-bluetooth-discover

and comment it out by prefixing it with #.

The next change will get overwritten on PulseAudio package upgrades and I haven’t found a way to make it persistent yet. If your headphones stop working two months down the line, this will be the culprit - just re-apply the step.

Edit /usr/bin/start-pulseaudio-x11. Search for the last line that reads fi. Add a line before it:

    /usr/bin/pactl load-module module-bluetooth-discover

Restart the system for it to be applied.

Step 5: Pair the device using Blueman

Run blueman. Hit Search if your QC35 is not showing up. Select your headphone, hit Setup, select Audio Sink and proceed with the wizard. Once done, select it again and hit the yellow star button.

Step 6: Select the audio sink in Sound Settings

Open up Sound Settings. Select your headphones and you should see A2DP Sink showing up as the profile.

At this point you should have a working setup.