Bluetooth earphones have to be paired after every reboot

I’m having a problem with my new Bluetooth earphones (HONOR CHOICE Open-Ear Earbuds). I can pair them to my Ubuntu 24.10 PC (it’s a desktop computer with a Bluetooth dongle), after which they work just fine, until I reboot the computer (or restart the bluetooth service), at which point it can’t connect. This didn’t happen with my previous Bluetooth headphones, which worked on Ubuntu just fine.

The only way I can connect the earphones after a reboot is by going through what looks like another pairing process: after some tinkering (turning the earphones or the dongle off and on, trying to connect repeatedly) Ubuntu asks me to confirm a 6-digit code, and after I click “Confirm”, the earphones work again. (The 6-digit code thing is strange by itself, by the way: previous headphones didn’t require one, and there is no way that the earphones can display a code, anyway, so I’m not actually comparing that code with anything.)

After this procedure, the LinkKey in /var/lib/bluetooth/XX:XX:XX:XX:XX:XX/XX:XX:XX:XX:XX:XX/info changes; also, the Bluetooth Manager program that I installed (blueman package) shows the same code in a notification labelled ”Bluetooth Pairing Request”. This makes me reasonably sure that this is, in fact, another pairing that happens.

This problem is specific to Ubuntu: it doesn’t happen on a Windows 11 installation on the same machine, which has no trouble reconnecting after a reboot. (Note that this is not the issue with having to synchronise the link key between two different OSes in case of dual boot: here I’m pairing the earphones with Ubuntu, and then rebooting into Ubuntu again, not touching Windows at all. I’m only mentioning Windows to narrow the issue down to Ubuntu, rather than the earphones or the PC hardware.)

If I try to connect to the earphones via the command line, it produces the following error message (I redacted the device’s address):

$ bluetoothctl connect XX:XX:XX:XX:XX:XX
Attempting to connect to XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
Failed to connect: org.bluez.Error.Failed br-connection-unknown

I have also discovered the btmon tool, which appears to dump the full trace of Bluetooth messages exchanged between the computer and the devices it interacts with.

In the trace of a failed connection attempt, I found the following exchange:

> HCI Event: Link Key Request (0x17) plen 6                                                                                                                                                                          #55 [hci0] 13.039915
        Address: XX:XX:XX:XX:XX:XX (Tiinlab Corporation)
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6                                                                                                                                                  #56 [hci0] 13.039939
        Address: XX:XX:XX:XX:XX:XX (Tiinlab Corporation)

Here’s the corresponding part of the trace of a successful connection attempt (after a pairing and before a restart):

> HCI Event: Link Key Request (0x17) plen 6                                                                                                                                  #34 [hci0] 13.524821
        Address: XX:XX:XX:XX:XX:XX (Tiinlab Corporation)
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22                                                                                                                  #35 [hci0] 13.524834
        Address: XX:XX:XX:XX:XX:XX (Tiinlab Corporation)
        Link key[16]: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

It appears that Ubuntu does not remember that it has a link key for the device after the bluetooth service is restarted.

How can I fix this?

There must be something getting reset in the headphones because what you stated hasn’t happened to me outside of it being a Windows/Linux dual boot key issue. Since it is never an issue in Windows, the simple solution might be to copy that pairing key and use it in Ubuntu

You are on release 24.10, right? Maybe it would be better if you were on LTS 24.04.1.
Do you use blueman-applet? Blueman is a GTK+ Bluetooth manager.
One can configure bluetooth to start when system boots up. Does bluetooth start at bootup?
My budget ($20) bluetooth headphones connect as soon as it is turned on; however, I am still on LTS 22.04.5.

As a tester (Myself) I use all releases including point releases, right now on 25.04
Bluetooth is or can become problematic with incoming new, and dropped libs.

Blueman is an excellent Manager out of our choices to date, and I never have bluetooth enabled at startup. That said all my bluetooth devices just work when I call them to.

One thing I’ve found I’ve needed for stability is

apt list --installed | grep -e bluetooth -e libspa -e blueman

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

blueman/plucky,now 2.4.3-1 amd64 [installed]
bluetooth/plucky,now 5.79-1 all [installed]
libbluetooth3/plucky,now 5.79-1 amd64 [installed,automatic]
libspa-0.2-bluetooth/plucky,now 1.2.6-1build1 amd64 [installed]
libspa-0.2-modules/plucky,now 1.2.6-1build1 amd64 [installed,automatic]
libspandsp2t64/plucky,now 0.0.6+dfsg-2.1build1 amd64 [installed,automatic]
libspatialaudio0t64/plucky,now 0.3.0+git20180730+dfsg1-2.1build1 amd64 [installed,automatic]
pulseaudio-module-bluetooth/plucky,now 1:16.1+dfsg1-5.1ubuntu1 amd64 [installed,automatic]

Apparently, the correct place to look for help was the bluez GitHub repo :smiling_face:

I found issue 973, which describes my situation exactly. Apparently, this is due to a bug in bluez that was fixed in version 5.78, whereas Ubuntu 24.10 repositories contain version 5.77. After installing the latest version of that package compiled from source, the problem was fixed.

Do they know what version introduced this issue? I have Bluez 5.72 and haven’t noticed it

1 Like

They report it was version “bluez-5.76.” Like @Jeremy31 I’ve not seen this on my end