I’ve been trying to debug an issue with bluetooth on my machine for a couple weeks. At first I thought the problem was isolated to my standing desk, but I just got a new bluetooth mouse and am having the same issue.
I was able to initially trust → pair → connect with the mouse using bluetoothctl. It worked for ~5 minutes and then stopped responding. Now I am unable to even replicate that small success.
Listing the devices (I deleted all the known devices to start fresh, only the mouse is shown)
Device D3:10:22:61:9F:9C (random)
Name: LIFT FOR MAC
Connected: no
Attempting to connect to that MAC address
bluetoothctl connect D3:10:22:61:9F:9C
Attempting to connect to D3:10:22:61:9F:9C
Failed to connect: org.bluez.Error.Failed le-connection-abort-by-local
Googling that error has led me down a few paths related to pipewire / pulseaudio. I honestly can’t tell if those are red herrings, so I’m posting here to try and get a more educated pair of eyes on the issue.
Thanks so much for reading, I’m open to any and all suggestions
Edit: Here’s some info on the adapter
❯ btmgmt
[mgmt]# info
Index list with 1 item
hci0: Primary controller
addr 5C:F3:70:83:06:7D version 6 manufacturer 15 class 0x6c0104
supported settings: powered connectable fast-connectable discoverable bondable link-security ssp br/edr le advertising secure-conn debug-keys privacy configuration static-addr phy-configuration
current settings: powered bondable ssp br/edr le secure-conn
name Alfonso
short name
hci0: Configuration options
supported options: public-address
missing options:
Edit 2: Tried removing the device and reconnecting, no luck. I did see a different error though, “Failed to connect: org.bluez.Error.Failed le-connection-abort-by-local”
Agent registered
[bluetooth]# devices
Device D3:10:22:61:9F:9C LIFT FOR MAC
[bluetooth]# untrust D3:10:22:61:9F:9C
[CHG] Device D3:10:22:61:9F:9C Trusted: no
Changing D3:10:22:61:9F:9C untrust succeeded
[bluetooth]# disconnect D3:10:22:61:9F:9C
Attempting to disconnect from D3:10:22:61:9F:9C
Successful disconnected
[bluetooth]# cancel-pairing D3:10:22:61:9F:9C
Attempting to cancel pairing with D3:10:22:61:9F:9C
Failed to cancel pairing: org.bluez.Error.DoesNotExist
[bluetooth]# remove D3:10:22:61:9F:9C
[DEL] Device D3:10:22:61:9F:9C LIFT FOR MAC
Device has been removed
[bluetooth]# scan on
Discovery started
[CHG] Controller 5C:F3:70:83:06:7D Discovering: yes
[NEW] Device FF:CB:37:64:CF:95 FF-CB-37-64-CF-95
[NEW] Device D3:10:22:61:9F:9C LIFT FOR MAC
[bluetooth]# trust D3:10:22:61:9F:9C
[CHG] Device D3:10:22:61:9F:9C Trusted: yes
Changing D3:10:22:61:9F:9C trust succeeded
[bluetooth]# pair D3:10:22:61:9F:9C
Attempting to pair with D3:10:22:61:9F:9C
[CHG] Device D3:10:22:61:9F:9C Connected: yes
[CHG] Device D3:10:22:61:9F:9C Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled
[bluetooth]# connect D3:10:22:61:9F:9C
Attempting to connect to D3:10:22:61:9F:9C
[CHG] Device D3:10:22:61:9F:9C Connected: yes
Failed to connect: org.bluez.Error.Failed le-connection-abort-by-local
[CHG] Device D3:10:22:61:9F:9C Connected: no
[DEL] Device FF:CB:37:64:CF:95 FF-CB-37-64-CF-95
[NEW] Device FF:CB:37:64:CF:95 FF-CB-37-64-CF-95
[bluetooth]#
If that is not working you can try in the next run
agent NoInputNoOutput
With the agents the authentification method is set. Usually default-agent should work for a mouse. But with NoInputNoOutput it should be set to “just works”.
I was thinking you might want to try that because of this error:
The “Agent registered” message should be the result of a agent on command. Maybe that’s run automatically if it’s already printed there. If you don’t get this message you should also run
Interesting, that seems to have changed the behavior a bit. I removed the device, set the NoInputNoOutput agent, and reconnected. It looked for a moment like things were fine, but then I received a delayed AuthenticationCanceled message.
[bluetooth]# untrust D3:10:22:61:9F:9C
[CHG] Device D3:10:22:61:9F:9C Trusted: no
Changing D3:10:22:61:9F:9C untrust succeeded
[bluetooth]# remove D3:10:22:61:9F:9C
[DEL] Device D3:10:22:61:9F:9C LIFT FOR MAC
Device has been removed
[bluetooth]# agent off
Agent unregistered
[bluetooth]# agent NoInputNoOutput
Agent registered
[bluetooth]# trust D3:10:22:61:9F:9C
[CHG] Device D3:10:22:61:9F:9C Trusted: yes
Changing D3:10:22:61:9F:9C trust succeeded
[bluetooth]# pair D3:10:22:61:9F:9C
Attempting to pair with D3:10:22:61:9F:9C
[CHG] Device D3:10:22:61:9F:9C Connected: yes
[CHG] Device D3:10:22:61:9F:9C ServicesResolved: yes
[CHG] Device D3:10:22:61:9F:9C ServicesResolved: no
[CHG] Device D3:10:22:61:9F:9C Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled
[bluetooth]#
❯ bluetoothctl
Agent registered
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 5C:F3:70:83:06:7D Discoverable: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller 5C:F3:70:83:06:7D Discovering: yes
[NEW] Device D3:10:22:61:9F:9C LIFT FOR MAC
[bluetooth]# trust D3:10:22:61:9F:9C
[CHG] Device D3:10:22:61:9F:9C Trusted: yes
Changing D3:10:22:61:9F:9C trust succeeded
[bluetooth]# pair D3:10:22:61:9F:9C
Attempting to pair with D3:10:22:61:9F:9C
[CHG] Device D3:10:22:61:9F:9C Connected: yes
[CHG] Device D3:10:22:61:9F:9C ServicesResolved: yes
[CHG] Device D3:10:22:61:9F:9C ServicesResolved: no
[CHG] Device D3:10:22:61:9F:9C Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled
[bluetooth]#
One weird aspect of this and the previous attempt: there’s like 15-30 seconds delay between Connected: yes and Connected: no. i3 is actually displaying a Lift Connected notification at the start and then I see a Lift Disconnected notification after a bit. Interestingly, the light on the mouse never stops blinking (blinking indicates it’s looking for something to pair with).
It’s probably connecting to get the authentication done and somehow it fails.
You could try and click one of the mouse buttons in that phase. I think for some devices there exists something like a yes/no authentication. In that case you would have to try which button is yes and which one is no.
When you type agent in bluetoothctl and press tab double, I think it should show you which agents exist. Then you could try if maybe an other agent works.
Just tried removing the device, restarting the bluetooth service, and then connecting without trusting / pairing. The result was similar:
Discovery started
[CHG] Controller 5C:F3:70:83:06:7D Discovering: yes
[NEW] Device D3:10:22:61:9F:9C LIFT FOR MAC
[bluetooth]# connect D3:10:22:61:9F:9C
Attempting to connect to D3:10:22:61:9F:9C
[CHG] Device D3:10:22:61:9F:9C Connected: yes
Connection successful
[NEW] Device FF:CB:37:64:CF:95 FF-CB-37-64-CF-95
[CHG] Device D3:10:22:61:9F:9C ServicesResolved: yes
[CHG] Device D3:10:22:61:9F:9C ServicesResolved: no
[CHG] Device D3:10:22:61:9F:9C Connected: no
[DEL] Device FF:CB:37:64:CF:95 FF-CB-37-64-CF-95
[NEW] Device FF:CB:37:64:CF:95 FF-CB-37-64-CF-95
I had that same ~30 second delay before it realized it wasn’t connected. In that time, I tried clicking the mouse buttons. I clicked the left button and waited a bit, clicked it a few more times, but no luck. I then tried the right button, but same story.
Thank you both for helping! I’ll try some different agents next.
I just tried a few different agent options, but no difference.
I then tried switching the USB port my adapter is plugged into, and I was able to connect to the mouse
Hopefully everything is good and there was just some weirdness with the USB connection. I’ll keep using the mouse for a bit to see if it remains connected. I was able to connect to it for about 30 minutes initially, so hopefully this time doesn’t follow the same path. Fingers crossed
Sad news, for whatever reason the mouse disconnected again today and hasn’t been able to reconnect at all. Trying to debug, but it seems like there’s some sort of periodic issue going on with my machine
My bluetooth connector was working great for nearly 24h and then suddenly stopped. I was actively using a bluetooth mouse and keyboard when it stopped. I restarted my computer multiple times yesterday while testing, and my previous fix continued working. I’m not sure what suddenly caused the breakage today.
I tried checking dmesg for bluetooth messages and found something which might be useful
That’s a really good idea, I’ll have to ask around a bit.
I’m currently using this one, which I’ve had since 2017. I’m open to buying a new one as well if nobody around has one, do you have any recommendations?