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?