Ubuntu Bluetooth Troubleshooting Guide

March 9 2023 6:11am • Est. Read Time: 2 MIN

Bluetooth works on Ubuntu. However, sometimes it can need a little extra help.

- Bluetooth won't turn on in Settings.

sudo apt reinstall --purge bluez gnome-bluetooth


- If Bluetooth still won't work, try disabling tlp (if installed, then rebooting) - renable later if this isn't the issue: 

sudo systemctl disable tlp.service


Is the module loaded?

lsmod | grep bluetooth


Should show Bluetooth.

Is Bluetooth service actively running?

sudo systemctl status bluetooth


Should show Active/Running.

If everything above looks good, let's try reinstalling Bluetooth and removing saved devices.

sudo rm -r /var/lib/bluetooth/


then

sudo apt reinstall --purge bluez gnome-bluetooth


Bluetooth is still not working

Sometimes you may find that Bluetooth simply won't cooperate no matter what you try. These next step will show you how to get Bluetooth working from the command line. Believe it or not, it's easier than you might think.

Getting started

Start off with the following on Ubuntu.

- Open a terminal.

Type hciconfig.

You will now have something that looks like:


Note the BD address. This represents your internal Bluetooth transmitter in your Framework computer. We know the device is detected, we know it's "UP Running" which is great. So whatever was going wrong previously using the GNOME Bluetooth controls, are unaffected here. Let's paid a Bluetooth headset.

Type bluetoothctl


You'll notice two things here. 

- First off, you have controller listed that matches what we observed previously with hciconfig.

- We are now at a Bluetooth prompt at the terminal. 

- Now open a new terminal tab. Make sure Bluetooth isn't blocked and run:

sudo rfkill unblock all


- Close this terminal tab so only the bluetooth prompt remains open.

- Power on your headset and get it into pairing mode. 

- Back at the tab with our bluetooth prompt.

power on


- This will show Changing power on succeeded.

- Next we'll look for that headset.

scan on



Ah, there is my JBL headphones. Let's grab that hardware address starting with 52 and ending with 4C.

- The next steps is to pair the headphones.

pair Device ID



Note it will get noisy fast from this point on.

- You will be asked to confirm the passkey (this will be a wall of text), when promoted type yes. 

Note: You may not be prompted at all, it will depend on the device and may just automatically choose yes. For some devices, you may be asked to type in a pairing key or pin. This will depend on the device you're pairing with. Could be a pin of 1234 or 0000, could be something else depending on the Bluetooth device you're connecting with.


- Now we're paired and bonded...but we need to take a few most steps. First, let's grab that ID again.


devices



Copy that ID now again (mine begins in 52 and ends in D9).

trust ID


and then..


connect ID




This told your Bluetooth transmitter to trust this connection going forward, to avoid future prompts and setup. Then we connected it.



From now on, when you power on the Bluetooth headset and Bluetooth is turned on, your trusted device will simply connect.

Note: If you turn on your headset after rebooting the Framework and it's not connecting:

- Power off the headset.

- In a terminal, type

bluetoothctl


- At the Bluetooth prompt, type

power on


Under most circumstances, Bluetooth should be coming on when you reboot! If it is not, check if you have TLP installed and make sure Bluetooth is not set to start turned off.