I’ve been using Ubunutu on and off for many years. I recently got back into programming and decided to install Ubunutu 16.04 LTS on a couple of laptops. When I’m playing a game or watching a lecture, I like to use my headphones. I have a pair of Bose SoundLink Around-Ear Bluetooth Headphones that I’ve connected to multiple Android and Windows devices without any issues. When it comes to connecting Bose headphones in Ubuntu 16.04, however, it is a constant hassle.
I’ve developed a couple of techniques for dealing with some of the connection issues I’ve encountered. None of these things could be considered fixes, since they don’t really address the actual problem. This is more the equivalent of kicking it a couple of times.
Before moving on… these “techniques” are for use after all other troubleshooting has failed. I recommend starting with the post Enabling full Bluetooth support in Linux Lite. While not specific to Ubuntu or these particular Bose headphones, it does a good job of compiling the various fixes scattered around the web. If you’re lucky, these steps will provide a permanent fix. If not, read on.
Update 6/7/2017: I reinstalled Ubuntu the other day, which wiped out all the various fixes that I tried in the link above. When I connected my headphones, I decided just to try using the techniques I’ve outlined below, and it worked just as well as it did after I had done all of those fixes. So, I think it is worth just trying it this way.
Various errors and issues connecting Bose headphones in Ubuntu 16.04
When connecting my Bose headphones to Bluetooth in Ubunutu 16.04, I’ve encountered several issues:
- Device fails to pair
- Device pairs but fails to connect
- Device pairs and connects but headset does not recognize connection
- Device pairs and connects, headset indicates the connection, but no audio comes trough headset
I have a few tricks I use to get past these issues. These are things I have to do almost every time I connect my headset. If the connection times out due to lack of use, I often have to repeat some or all of the steps again to get it to reconnect. I will lay out this information below.
If you are having these issues, I am assuming you’ve already been through the troubleshooting in the article linked above and, as such, have Blueman installed. If not, please install Blueman.
If you don’t already have Blueman installed, please paste the command below into Terminal.
sudo apt-get update && sudo apt-get install blueman pavucontrol pulseaudio-module-bluetooth -y
Device fails to pair
Often, when I initially try to connect my headphones, I get the error that the device could not be added. If I launch blueman-applet or blueman-manager from the terminal, I am able to see that the error being returned is an authentication failed error.
When viewing the output from the connection attempt in terminal, the error appears as below:
ERROR:dbus.connection:Exception in handler for D-Bus signal: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message self._handler(*args, **kwargs) File "/usr/lib/python3/dist-packages/blueman/bluez/PropertiesBlueZInterface.py", line 55, in wrapper handler(name, value, **kwargs) File "/usr/lib/python3/dist-packages/blueman/plugins/applet/GameControllerWakelock.py", line 36, in on_device_property_changed klass = Device(path).get_properties()["Class"] & 0x1fff KeyError: 'Class' Authentication Failed
I’ve search all over the internet looking for a possible cause and solution for this error, but so far I have found none. The only thing that works for me is to keep trying to connect until it finally connects. (I did say this was more like kicking it than fixing it.)
What I have found expedites this process is switching back and forth between different connection methods. I switch between the Blueman applet and the Blueman manager.
Connecting using the Blueman Applet
- Click the Bluetooth icon on the taskbar. There may be two, as the default Bluetooth applet may also be there. The Blueman applet appears as below.
- Click “Setup New Device” and follow the prompts.
- If it connects and you are given the option, select “Audio Sink” and cross your fingers. If it fails to pair, try Blueman manager next.
Connecting using Blueman Manager
- Either launch Blueman Manager from the terminal (blueman-manager) or go to the Dash and search blueman.
- If your headphones don’t appear on the list, click the “Search” button.
- Once your headphones are on the list, right click and click “Setup” on the popup menu.
- As with the applet, follow the promps and select “Audio Sink” if you get the option.
- If the headphones fail to connect, switch to the applet.
I find that if I continue to switch between these two connection methods, the headphones will usually connect around the third or fourth attempt. You can also use bluetoothctl as an alternate method, but I find it’s not as effective.
Device pairs but fails to connect
Getting the headset to pair is only half (well, more like a quarter) of the issue. In some cases, after the headset pairs, it might give an error saying that it failed to connect. In other cases, it says that it was added successfully, but you are never prompted to select the audio profile and the headset never recognizes the connection.
When this happens, if you remove the device from Blueman Manager and try to set it up again, you’ll just get the same behavior over and over again. Switching between the manager and the applet won’t fix this one, either. In this case, we need a do over. That means restart Blueman and the Bluetooth service and start from the beginning.
killall blueman-applet killall blueman-manager sudo service bluetooth restart
You can then restart blueman applet and manager. Launch blueman-applet from the terminal.
Launch Blueman Manager either from another terminal or by searching for it in the Dash
At this point, it may start refusing to pair again. Just keep working through the steps on the “Fails to pair” section until it finally connects and lets you choose the audio profile.
If it pairs and you are still experiencing the same behavior, kill the processes and restart the service again. Keep doing it until it works.
Device pairs and connects, but headphones fails to recognize the connection
Once the headphones are connected, you should get a promp from the headphones themselves confirming the connection. Sometimes Blueman tells you the headphones are paired and connected, but you never get the confirmation from the headphones. When this happens, open the Blueman Manager and right click on the headphones in the list. Normally where it says “Audio Profile” there should be a submenu that lets you choose between AudioSink and HSP/HFP. In this case, however, the submenu is not there. The label is there, but if you mouse over it there is no submenu.
You may be tempted to remove the device and try setting it up again. This MAY work, but it is also just as likely to take you back to the beginning when it wouldn’t pair at all. Instead, I’ve found a little trick that works most of the time.
- In Blueman Manager, right click on the headphones and select “Disconnect.”
2. Right click on the device again and click on “Serial Port.” Blueman will attempt to connect and will briefly show the connection icons and then give an error. This is fine.
3. Once Blueman shows the error from the Serial Port connection, right click again and click on “Audio Sink.”
Once it connects, the headphones should acknowledge the connection and then the submenu will be available under the audio profile. If this doesn’t happen, try repeating the steps a few times. It should show up eventually. Removing the device and starting over should be a last resort.
Device pairs and connects, headphones indicate the connection, but no audio comes trough headphones
Okay, so Blueman shows you are connected, your headphones acknowledge the connection, but you still don’t have audio, what gives? There are two causes for this: one is a weird bug and one is a settings issue.
First, start with the easy one. Go to System > Hardware > Sound and make sure your headphones are highlighted on the list.
If your headphones are highlighted in the sound settings and all the audio is turned up but you still don’t have sound, try this test:
- In the sound settings for the headphones, click “Test Speakers.”
- Click one of the test buttons on the dialogue that pops up.
If everything is setup correctly, the speaker icon on the dialogue should turn blue and you should hear an audio test. Sometimes, however, when you click the test button nothing happens at all. This is a bug. I have no idea where the bug is or what causes it, but I find it comes up about 25 – 30% of the time when I am connecting. Another test for this bug is to visit YouTube and try to watch a random video. When this bug is occurring the videos won’t even play.
The solution for this is actually the same as the solution for the issue where the audio profile doesn’t appear. In Blueman Manager, disconnect the headphones, attempt to connect to the Serial Port, once it errors, connect to Audio Sink.
If your Bluetooth connection is being especially stubborn, try doing the Serial Port trick, but connect to “Headset” initially. Once that profile is connected, switch to the Audio Sink profile. If you get an error when trying to switch to the Audio Sink, disconnect again, connect to Serial Port again, and then connect to Audio Sink or Headset again. Just keep doing it until it works.
Bluetooth support in Linux is horrible. It just has to be said. If you are having Bluetooth issues, you’ve probably already figured that out. There are hundreds of posts on blogs and help sites about issues connecting to Bluetooth. If you are encountering Bluetooth connection issues and none of the other guides have fixed it, I hope one of my tricks works for you.