[Bug]: Unifying inventory probes retire a live channel and break gesture capture on Linux
- Dominant language
- Rust
- Stars
- 21k
- Forks
- 675
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 172
Description
### Pre-flight checklist
- [x] I searched [existing issues](https://github.com/AprilNEA/OpenLogi/issues?q=is%3Aissue) and this is not a duplicate.
- [x] I checked the latest release source (`master` at `411c9277`, v0.8.1); the affected paths are unchanged.
- [x] Logi Options+ is not running.
### Which part of OpenLogi?
GUI (desktop app)
### OpenLogi version
0.7.10 when reproduced; confirmed unchanged in `master` at `411c9277` (v0.8.1)
### Operating system
Linux
### OS version & architecture
Debian GNU/Linux 13.6 (trixie), x86_64, GNOME Wayland
### Device model
MX Master 2S + Logitech Unifying receiver (046d:c52b)
### How is the device connected?
Other: Logitech Unifying receiver
### Affected area(s)
- [x] Device discovery / detection
- [x] Button remapping
- [ ] DPI control
- [ ] SmartShift
- [ ] Per-application profiles
- [ ] Battery status
- [ ] Settings / configuration (TOML)
- [ ] Auto-update
- [ ] Menu bar / tray
- [ ] Other
### What happened?
Gesture capture initially arms and click/directional gesture bindings work. During a later inventory probe, the receiver still answers its pairing-count request, but `trigger_device_arrival` fails. The probe is classified as an unhealthy node even though the existing HID++ channel and capture session are still usable.
After two such probe failures, inventory retires the channel. Gesture capture then exits and repeatedly re-arms; while this is happening, the gesture button stops producing configured actions.
Expected behavior: a failed arrival-event replay after a successful receiver liveness read should retain the last complete inventory and channel. Capture should use the inventory-owned channel and stop promptly only when that exact channel is actually revoked.
### Steps to reproduce
1. Connect an MX Master 2S through a Logitech Unifying receiver on Linux.
2. Configure the gesture button with a Click action and directional gestures.
3. Start OpenLogi and verify that the log reports `control capture active` and the gestures work.
4. Leave the agent running through several inventory probe cycles.
5. Observe `node probe keeps failing - retiring its channel before reopen` followed by repeated `capture session ended unexpectedly, re-arming` warnings.
6. Trigger the gesture button and observe that configured actions no longer fire reliably.
### Diagnostics report
```markdown
- Agent starts normally and installs the OS input hook.
- MX Master 2S is detected in Unifying slot 2.
- Capture reports one gesture source and the gesture button works before channel retirement.
- The failure is reproducible on Debian GNOME Wayland and disappears when the live channel is retained.
```
### `openlogi list` output
```text
(inventory read from the running agent)
Unifying Receiver ([redacted], vid=046d pid=c52b)
|- slot 1 offline Unknown device (mouse, wpid=4082, battery=-)
`- slot 2 online Wireless Mouse MX Master 2S (mouse, wpid=4069, battery=50%)
model_ids=[b019,4069,0000] ext=00 serial=- unit_id=[redacted] transports=equad+btle
```
### Logs
```shell
INFO openlogi_device::session::gesture: control capture active index=2 gesture_sources=1 dpi_buttons=1 buttons=2 thumbwheel=false
WARN openlogi_device::inventory: node probe keeps failing - retiring its channel before reopen
WARN openlogi_device::inventory::ledger: node probe failures exhausted the replay grace - surfacing the live result failures=4
WARN openlogi_agent_core::watchers::gesture: capture session ended unexpectedly, re-arming key="receiver:[redacted]:slot:2"
```
### macOS permissions (if applicable)
Not applicable.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the inventory probe and replay-grace paths shown by openlogi_device::inventory and openlogi_device::inventory::ledger, then trace how openlogi_agent_core::watchers::gesture reacts to channel retirement. Reproduce the listed probe cycles on Linux and verify that a live channel and capture session remain usable after arrival-event replay failures, while capture stops only after that channel is actually revoked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100