You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I've also been experiencing the same issue. Bluetooth keyboard and mouse frequently won't re-connect to my laptop after walking away with the laptop for a while. No sleep/suspend involved. I've been debugging this with Claude for a while now.
Manually running systemctl restart bluetooth seems to generally work to get the devices to connect again.
While it happens frequently I can't reproduce it on command.
I hope we can re-open this issue so we can work towards an solution.
Since there is no "hook" for me to run this restart bluetooth automatically it's quite frustrating. Generally I walk around with my bluetooth headset, so which stays connected. So running restart bluetooth periodically also isn't an option.
System
OS: elementary OS 8.1 (Ubuntu 24.04.3 LTS base)
Kernel: 6.16.12-061612-generic
BlueZ: bluetoothctl 5.72
Hardware: Framework 13, AMD Ryzen AI 9 HX 370
Adapter: Intel AX210 (combo Wi-Fi/BT), USB ID 8087:0032, driver btusb + btintel
Bonded Bluetooth LE HID devices (a Logitech MX Master 3S mouse and MX Keys keyboard, both address type random) intermittently fail to auto-reconnect after the adapter should be reachable again — both after real suspend/resume (s2idle) and, separately, after the laptop is simply carried out of range and back with no suspend involved at all.
Caveat: I can't yet say whether classic/audio reconnection is equally affected. My headset travels with the laptop and stays continuously connected during these episodes (it never actually needs to reconnect), so its "staying connected" isn't evidence that classic reconnection is immune to this — I just don't have a test case for it yet. I plan to deliberately disconnect an audio device during a stuck-discovery episode to check.
Key observation: Discovering: yes stuck with no owner
During a live failure, the controller reported discovery as active with nothing legitimately running it:
(keyboard/mice both bonded+trusted, both Connected: no; the one connected device here never disconnected in the first place, see caveat above)
I suspected elementary's Bluetooth panel indicator (io.elementary.bluetooth, a D-Bus client that does its own StartDiscovery) had leaked a discovery session, but confirmed it wasn't even running at the time:
$ pgrep -af io.elementary.bluetooth
(no output)
Discovering stayed yes regardless — ruling out a lingering client and pointing at internal adapter/daemon state rather than a reference-counting leak from a specific app. bluetoothctl scan off from a fresh session also had no effect (it can only release a session it started itself).
Minimal reproducible fix
A plain daemon restart — no kernel module reload, no USB re-enumeration — clears it immediately:
$ sudo systemctl restart bluetooth
$ echo -e 'show\nquit' | bluetoothctl | grep -i discovering
Discovering: no
Within seconds of that, moving the mouse / pressing a key reconnected both devices normally. This matches the mechanism described in this issue: if MGMT_OP_STOP_DISCOVERY fails, discovery_remove() runs but adapter->discovering never gets reset — so it's plausible the discovery session dies (client crash, timeout, whatever) without the stop completing cleanly, leaving the flag orphaned true indefinitely, which in turn appears to block BlueZ's own background reconnect-scan for bonded LE devices.
Related reports
hbldh/bleak#2022 — traces essentially the same mechanism from the client side: the kernel auto-stops LE scanning after ~10.24s, and if a StopDiscovery request lands in that window, bluetoothd relays the kernel's rejection as InProgress but has already dropped the client's discovery session — leaving internal state that makes the next StartDiscovery a no-op while Discovering stays true. Author states intent to send a BlueZ fix (stop_discovery_complete() treating MGMT_STATUS_REJECTED as already-stopped).
Happy to attempt to gather more (e.g. btmon capture of a live failure, SetDiscoveryFilter/StartDiscovery callers via a debug build) if that would help pin this down — let me know what would be useful.
Activity
github-actions commentedon May 14, 2025
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
fix: persistent adapter, continuous discovery, and deeper recovery ti…
fix: preemptive btmgmt reset after GATT to clear BlueZ zombie state (#80
fix(ble): purge BlueZ cache after failed GATT read (#80)
fix: reset D-Bus connection after idle scan cycles to flush listener …
peteruithoven commentedon Sep 5, 2026
I think I've also been experiencing the same issue. Bluetooth keyboard and mouse frequently won't re-connect to my laptop after walking away with the laptop for a while. No sleep/suspend involved. I've been debugging this with Claude for a while now.
Manually running
systemctl restart bluetoothseems to generally work to get the devices to connect again.While it happens frequently I can't reproduce it on command.
I hope we can re-open this issue so we can work towards an solution.
Since there is no "hook" for me to run this
restart bluetoothautomatically it's quite frustrating. Generally I walk around with my bluetooth headset, so which stays connected. So runningrestart bluetoothperiodically also isn't an option.System
6.16.12-061612-genericbluetoothctl5.728087:0032, driverbtusb+btintelintel/ibt-0041-0041.sfi, Firmware Version60-48.23, timestamp2023.48 buildtype 1 build 75324, SHA10x23bac558Symptom
Bonded Bluetooth LE HID devices (a Logitech MX Master 3S mouse and MX Keys keyboard, both address type
random) intermittently fail to auto-reconnect after the adapter should be reachable again — both after real suspend/resume (s2idle) and, separately, after the laptop is simply carried out of range and back with no suspend involved at all.Caveat: I can't yet say whether classic/audio reconnection is equally affected. My headset travels with the laptop and stays continuously connected during these episodes (it never actually needs to reconnect), so its "staying connected" isn't evidence that classic reconnection is immune to this — I just don't have a test case for it yet. I plan to deliberately disconnect an audio device during a stuck-discovery episode to check.
Key observation:
Discovering: yesstuck with no ownerDuring a live failure, the controller reported discovery as active with nothing legitimately running it:
(keyboard/mice both bonded+trusted, both
Connected: no; the one connected device here never disconnected in the first place, see caveat above)I suspected elementary's Bluetooth panel indicator (
io.elementary.bluetooth, a D-Bus client that does its ownStartDiscovery) had leaked a discovery session, but confirmed it wasn't even running at the time:Discoveringstayedyesregardless — ruling out a lingering client and pointing at internal adapter/daemon state rather than a reference-counting leak from a specific app.bluetoothctl scan offfrom a fresh session also had no effect (it can only release a session it started itself).Minimal reproducible fix
A plain daemon restart — no kernel module reload, no USB re-enumeration — clears it immediately:
Within seconds of that, moving the mouse / pressing a key reconnected both devices normally. This matches the mechanism described in this issue: if
MGMT_OP_STOP_DISCOVERYfails,discovery_remove()runs butadapter->discoveringnever gets reset — so it's plausible the discovery session dies (client crash, timeout, whatever) without the stop completing cleanly, leaving the flag orphanedtrueindefinitely, which in turn appears to block BlueZ's own background reconnect-scan for bonded LE devices.Related reports
InProgressbut has already dropped the client's discovery session — leaving internal state that makes the next StartDiscovery a no-op whileDiscoveringstays true. Author states intent to send a BlueZ fix (stop_discovery_complete()treatingMGMT_STATUS_REJECTEDas already-stopped).Happy to attempt to gather more (e.g.
btmoncapture of a live failure,SetDiscoveryFilter/StartDiscoverycallers via a debug build) if that would help pin this down — let me know what would be useful.feat(ui): show when BLE is down, and offer a way out of it
feat(ui): show when BLE is down, and offer a way out of it
backends/bluezdbus: recover from InProgress on StopDiscovery
adapter: Fix Discovering staying true after a rejected stop