Fix Bluetooth HID connections in dual-mode BlueZ
ControllerMode=bredr made BlueZ 5.87 reject the LE-only HOGP profile, so discovered BLE keyboards and mice never created input devices. Use dual mode, power/LE preflight, LE bearer selection for HID-over-GATT devices, automatic pairing on Connect Device and a pkill-free daemon stop path. Add scripts/test-bluetooth-hid.py and check-rebuild guards, synchronize docs, and rebuild the 2720 image (09226459...).
This commit is contained in:
1 parent
ba2f25aa36
commit
20603893e7
9 files changed
+225
-11
No files matched your search
@@ -252,7 +252,7 @@ Ordered by expected impact, with measured evidence. Regression risks are stated.
|
||||
| **U2** | **Implement real suspend**: replace no-op `sxmo_autosuspend.sh`/`sxmo_suspend.sh`, set `AllowSuspend=yes`, remove the infinite `sxmo_not_suspendable` wakelock and `sxmo.nosuspend`, and use the existing timed wakelocks (`sxmo_modem.sh`, `sxmo_hook_postwake.sh`) once `CONFIG_PM_WAKELOCKS` exists. `sxmo_hook_block_suspend.sh` already lists the blockers. | Enables K1. `/sys/power/wake_lock` is absent today, so all current wakelocks are no-ops. | Resume latency; must not suspend during calls, SMS, ringtone, active SSH/VPN/tethering. |
|
||||
| **U3** | **`statusbar_periodics`**: `sxmo_run_aligned.sh 60 sxmo_hook_statusbar.sh periodics` is running and its guard passes. Replace `mmcli -m any -J`, `nmcli -t con show --active`, `nmcli ... device wifi list`, `rfkill list wifi`, `xsetroot -name` with D-Bus `PropertiesChanged` signals, or raise to ≥300 s and only `xsetroot` on change. | Removes a 60 s QMI/D-Bus/process burst and a full dwm bar redraw (SPI frame). | Statusbar icons lag up to the new interval. |
|
||||
| **U4** | **Battery udev path**: filter `85-bananarchy-battery.rules` to `KERNEL=="pm8916-bms-vm"`/`ENV{POWER_SUPPLY_NAME}`, drop the `(sleep 2; ... recheck)` fork, avoid `su` per event. | Measured 2 uevents/min; removes the `su`/`sleep` forks. Lower priority than previously stated. | Charging icon must still update instantly on plug/unplug (keep the charger event). |
|
||||
| **U5** | **Bluetooth (latent)**: set `AutoEnable=false`, finite `DiscoverableTimeout`/`PairableTimeout`, `ControllerMode=bredr`, and keep BT out of the default runlevel. | BT is already off (soft-blocked, daemon not running) — **no current saving today**; this prevents a future drain when a user enables BT. | BT must still auto-reconnect when explicitly enabled. |
|
||||
| **U5** | **Bluetooth (latent)**: set `AutoEnable=false`, finite `DiscoverableTimeout`/`PairableTimeout`, `ControllerMode=dual`, and keep BT out of the default runlevel. | BT is already off (soft-blocked, daemon not running) — **no current saving today**; this prevents a future drain when a user enables BT. | BT must still auto-reconnect when explicitly enabled; dual mode is required for LE HID profiles. |
|
||||
| **U6** | **chronyd**: remove from the default runlevel or set `minpoll 12 maxpoll 16`; rely on `rtcsync`/RTC (`osclock`, `swclock-offset-boot` are already in the boot runlevel). | Measured running with `pool pool.ntp.org iburst`, but after 43 h uptime it is at ~1024 s polls → **low priority**. Removes a daemon and occasional DNS/NTP Wi-Fi wakeups. | Clock drift without NTP. **Refined in section 16**: removing `iburst` broke the initial sync entirely, so `iburst` was restored and a network-up hook was added; the long steady-state polls are unchanged. |
|
||||
| **U7** | ~~Duplicate `wpa_supplicant` / respawn storm~~ | **Removed — see C1.** One stable `-u` instance; the `yesno` typo is harmless. Optionally fix the cosmetic typo. | None. |
|
||||
| **U8** | **NetworkManager**: add `[device] wifi.scan-interval=600` (no override exists today), `ipv6.method=ignore` for Wi-Fi profiles, keep `wifi.powersave=3` and `connectivity.enabled=false`. | Fewer roaming scans and IPv6 ND/MLD wakeups (measured IPv6 active on wlan0). | Roaming responsiveness; IPv6-only networks. |
|
||||
@@ -366,7 +366,7 @@ few places where the regression checks mandated by the analysis changed the impl
|
||||
| U2 | `bananarchy-suspend.sh` / `bananarchy-deep-standby.sh` / `sxmo_autosuspend.sh` / `sxmo_suspend.sh`, `AllowSuspend=yes`, doas rule, infinite wakelock removed, `sxmo.nosuspend` removed, `sxmo_hook_screenoff.sh` starts the grace timer, `sxmo_hook_unlock.sh`/`postwake.sh` cancel it. **Shipped disabled** via `/etc/bananarchy-no-deep-standby` until the new kernel has been boot-tested: a broken driver suspend callback must never leave a flashed phone unwakeable. `freeze` (s2idle, any-IRQ wake) is preferred; `mem` requires `/etc/bananarchy-allow-mem-suspend`. |
|
||||
| U3 | `statusbar_periodics` interval 60 -> 300 s; `sxmo_hook_statusbar.sh periodics` drops `mmcli`/`nmcli`/`rfkill` polls and only calls `xsetroot` when the status string changes. |
|
||||
| U4 | udev rule filtered to the two PM8916 supplies; `(sleep 2; ... recheck)` fork removed from `sxmo_hook_battery.sh`. |
|
||||
| U5 | `AutoEnable=false`, finite discoverable/pairable timeouts, `ControllerMode=bredr`, fewer reconnect attempts. BT was already off on the device, so this is a latent fix. |
|
||||
| U5 | `AutoEnable=false`, finite discoverable/pairable timeouts, `ControllerMode=dual`, fewer reconnect attempts. BT was already off on the device, so this is a latent fix. |
|
||||
| U6 | `etc/chrony/chrony.conf` uses `minpoll 12 maxpoll 16` with `iburst` restored; `bananarchy-time-sync.sh` refreshes the pool on network-up (section 16). |
|
||||
| U7 | Withdrawn (C1); the cosmetic `yesno` typo in `etc/init.d/wpa_supplicant` was fixed anyway. |
|
||||
| U8 | `[device] wifi.scan-interval=600` in `10-power.conf`; IPv6 disabled on new interfaces (K10). |
|
||||
|
||||
Reference in new issue
Block a user