Repository navigation
Description
Summary
Two Discord bug-report threads, different mice and browsers, same symptom: the tray battery reads fine at first and then shows Not updating and stays that way for the rest of the session — it only comes back after the web control panel is opened (or Bridge is restarted).
- pako — ATK F1 V2 Ultimate, Brave, Windows 11, Bridge v1.0.3, Hybrid mode on. Battery updates, then ~12 min after closing the panel the tooltip reads
Not updatingand never recovers, even while playing a game with the mouse in use. - NeonAssasin — Razer Viper V4 Wireless, Firefox, Windows 11, Bridge v1.0.3. "Reproduced the not updating, happens when the mouse goes to sleep"; it recovers once the web driver is opened. Same reporter also sees Bridge not reconnecting to the mouse/keyboard after a reboot, and says battery/config readback worked on Bridge 1.0.0 and 1.0.1.
Reported in #bug-report: https://discord.com/channels/1531814042421952644/1573916631401365634
Environment
| pako | NeonAssasin | |
|---|---|---|
| Mouse | ATK F1 V2 Ultimate | Razer Viper V4 Wireless |
| Browser | Brave 1.100.58 (Chromium 158.0.8127.42) | Firefox 160.0.1 (+ uBlock) |
| OS | Windows 11 | Windows 11 |
| Bridge | v1.0.3 (OpenMouse BETA v2.0.49a) |
v1.0.3 |
| Config | Hybrid mode on | Hybrid mode |
| Error message | none | none |
Not updating is the data path, not the tray
Not updating is not a UI glitch: it is drawn only when the newest stored reading for that mouse is older than BATTERY_STALE_AFTER (src/service.rs:118, 12 min = more than two missed 5-min polls), and tray_battery::tooltip renders it from battery.stale (src/tray_battery.rs:111-116). select() (src/tray_battery.rs:42-48) deliberately falls back to the first remembered battery when every entry is stale, so a stale mouse keeps showing its last known percentage.
So Not updating means: BridgeState.battery received no fresh reading for 12+ minutes. battery is only written by record_battery (src/service.rs:1423), from exactly two producers:
- Bridge's own poll —
start_battery_monitor→poll_batteries_once(src/service.rs:1542,:2003), every 5 min. - The panel pushing
PUT /v1/battery→record_panel_battery(src/service.rs:1393).
That matches the reports exactly: while the panel is closed only (1) can refresh the tray, and the tray visibly recovers the moment the panel opens because (2) fires with the panel's own WebHID reading.
Candidate fault points (not yet confirmed — see "Missing from report")
I cannot reproduce hardware-side here, so these are the code paths that can produce "the poll runs but nothing is ever recorded", in the order I would check them. Line numbers are from 0411721 (1.0.3).
1. The background poll has no resume/wake handler — only the panel session does
start_resume_watch() (src/hid.rs:1870) bumps RESUME_GENERATION on a wall-clock jump, and the only consumer is the panel HID session's loop, which calls handle_resume() to reopen its handles (src/hid.rs:1987-1998). The watch is started inside hid::serve() (src/hid.rs:1932) — i.e. only once a panel session exists.
Nothing equivalent exists for the background battery poll: it re-spawns the Node helper per read, but any platform-level HID state (DESCRIBED cache, platform enumeration) is not told the machine slept. Given "after leaving the PC for 30 minutes" (NeonAssasin) this is the first thing I would instrument. It also explains why 1.0.0/1.0.1 "worked": the resume plumbing and the registry-driven device description (#124) both changed in 1.0.2.
2. A single stuck poll disables battery updates for the life of the process
poll_batteries (src/service.rs:1995) is a one-shot guard around the whole poll:
if service.battery_polling.swap(true, Ordering::AcqRel) { return; }Both the 5-min timer (src/service.rs:1547-1550) and the device scanner's read trigger (src/service.rs:1594-1600, src/service.rs:2189 via resume_onboard) go through it. PollGuard clears the flag on return and on panic, but if a poll ever fails to return — spawn_blocking(drivers::detect_mice) or spawn_blocking(read_status) never completing — then every later poll early-returns forever, the scanner's continue (src/service.rs:1594) also stops updating previous, and nothing but a process restart or a PUT /v1/battery from the panel can ever refresh the tray again. That is exactly the reported "it just stops, for good".
The helper read is bounded (HELPER_TIMEOUT = 10 s, src/drivers/native_hid.rs:26, enforced in wait_with_timeout, :433-514), so a wedge would have to come from an unbounded hidapi call in the same poll: describe_devices/inspect_path opens paths and reads report descriptors without a timeout (src/hid.rs:1443-1458), and pulsar/lamzu native readers read feature reports directly. Worth a tracing::warn! when a poll exceeds N seconds, at minimum.
3. ActiveSessionGuard does not hold device_access() for the session
src/hid.rs:1905-1909:
fn new() -> Self {
let _access = crate::drivers::device_access();
ACTIVE_SESSIONS.fetch_add(1, Ordering::AcqRel);
Self
}_access is a local, so the lock is released as the constructor returns — before HidSession::new/open does any work. reconcile_automatic documents the opposite invariant ("The check runs under device_access, which a new session also takes, so no write can interleave with its traffic", src/drivers/mod.rs:355-366), and ensure_native_ownership (:289) depends on the counter being final before the open. As written, a native read_status can pass ensure_native_ownership() and then race a session's open_path on the same interfaces.
This is the most likely explanation for the log NeonAssasin pasted (see below): HID input readers dying with ReadFile: (0x00000005) Access is denied within milliseconds of the panel opening the same vendor interface.
4. A failed descriptor read is cached as a complete description
inspect_path silently falls back to enumeration-only collections with an empty ReportLayout when open_path/get_report_descriptor fails (src/hid.rs:1449-1458), while describe_group sets complete: open (src/hid.rs:1675) — open here means "a session wasn't running", not "the descriptor was read". The result is cached in DESCRIBED whenever may_open (src/hid.rs:1616-1624), so a descriptor read that failed because the mouse was asleep is remembered as fully described until the device's path set changes. Impact is probably limited (the helper's DescribedDeviceAdapter falls back to a 91-byte read when nothing is declared, native-hid/src/hid-device-adapter.mjs:400-410), but it is wrong data that outlives the failure.
Evidence from the reporters' logs
NeonAssasin's summary of the Bridge log while the mouse slept, then when the panel was opened:
While the mouse is asleep (UTC):
21:18:27.356— Bridge opens the Razer Viper V4 (1532:00e6), 10 paths, 0 failed.21:18:34.727— Bridge opens the second device (373b:1220, ATK vendor id), 6 paths.21:18:34.732–.733— native HID input readers for interfaces 0, 2 and 3 stop:ReadFile: (0x00000005) Access is denied(src/hid.rs:927-935).21:18:38.446— Bridge reopens the Razer;21:18:42.123— Bridge restarts (file logging re-initialised).
When the web driver is opened (UTC):
21:34:23.615— HID WebSocket session 2 connects.21:34:23.677— Bridge lists 57 vendors, 2 devices.21:34:23.810— Razer Viper V4 (1532:00e6) opens, 10 paths, 0 failed, 5 ms — and the tray reads normally from then on.
The 0x5 reader deaths are the panel-side session opening paths the background side still had open — i.e. finding 3 above. Note that this log is from the panel session, so it does not yet tell us what the 5-min background poll did in the same window; the failed reads are logged at debug only ("Could not read the mouse battery", src/service.rs:2063-2065), which the default log level hides.
Missing from report
- Bridge's own log covering the stale window for both reporters at
debuglevel (the folder Bridge's Open logs action opens —src/config.rs:355-361, i.e.logs/besideconfig.json, under%APPDATA%\OpenMouse\OpenMouse Bridge\on Windows), ideally with the mouse going to sleep and waking without the panel open. The decisive lines areCould not read the mouse battery/No native battery reader for this device/The battery reader stopped unexpectedly(src/service.rs:2060-2077) and whether they keep appearing every 5 minutes while the tray saysNot updating. - Whether the mouse is still listed as connected in the panel's Home view during the stale window (i.e. is this read failure or discovery failure).
- Whether the same thing happens with Hybrid mode off (isolates
resume_onboardfrom the plain timer). - NeonAssasin's "Bridge does not reconnect to the mouse/keyboard after reboot" is probably the same defect family but needs its own log; it is not reproducible on demand for them either.
Suggested next steps
- Add a poll liveness log at
info— start/end ofpoll_batteries_oncewith the device list and per-device outcome — so a wedged or failing poll is visible at default log level. - Make
battery_pollingself-healing: if the flag has been set longer than a poll could plausibly take (sayBATTERY_POLL_INTERVAL), clear it and log a warning, so one wedged read cannot disable the tray until restart. - Run the resume watch (and a
handle_resumeequivalent for platform enumeration) independently ofhid::serve(), so Bridge recovers from sleep/hibernate with no panel ever opened. - Hold
device_access()for the lifetime ofActiveSessionGuard(store the guard in the struct) instead of dropping it insidenew(). - Re-check
completeindescribe_groupto mean "descriptor parsed", and do not cache a description that fell back to enumeration-only.
Related: #79 (tray has no battery until the panel opens, same "only the panel can feed the tray" shape, different root cause), #122.
Reported by pako and NeonAssasin on Discord. Code references are from 0411721 (1.0.3).
Activity
snekxs commentedon Nov 23, 2026
Reporter supplied the two lines that close out panel session 2, ~66 s after it opened (same run as the summary above):
What this rules out:
ACTIVE_SESSIONSis not leaked. The session that opened the Razer at21:34:23.810completed its 167 commands, ranclosein 0 ms and disconnected 109 ms later — so the early return oncrate::hid::client_session_active()(src/service.rs:2016) is not what is starving the poll here, and the counter drops normally onserve()returning.What it leaves, and why the timing matters: the disconnect at
21:35:29is what triggersstart_mode_monitor→DeviceMode::Onboard→resume_onboard()(src/service.rs:1640-1647,:2169), which does two things at once on the same mouse:std::thread::spawn(move || apply_natively(&profile))(src/service.rs:2185) — takesDEVICE_ACCESS(src/drivers/mod.rs:322) for the whole apply.tokio::spawn(poll_batteries(...))(src/service.rs:2189) —read_statuswaits on the same mutex (src/drivers/mod.rs:424).So the first poll after the panel closes is issued while a profile apply is in progress on the same device, and
PollGuard/battery_polling(src/service.rs:1984-2001) turns any failure to return from that poll into a permanent stop.apply_profile's helper call is bounded (HELPER_TIMEOUT10 s), but the native paths it can take are not:pulsar::apply/delux::applywrite feature/output reports throughhidapiwith no timeout, anddetect_mice→describe_devices→api.open_path+get_report_descriptor(src/hid.rs:1449-1458) is likewise unbounded.So the timeline the reporters describe — reads fine, panel closes, then
Not updating12 min later and never again — is consistent with the very first post-disconnect poll wedging, not with a slow or lossy poll cadence.Still needed to confirm: the Bridge log between
21:35:29and the stale window (i.e. the 5-min polls that would have run at ~21:40,~21:45, ...). IfCould not read the mouse battery(src/service.rs:2063-2065, debug) appears on every tick, it is a repeated read failure; if those lines stop appearing after the disconnect, the poll task itself stopped and this is the wedge.fix(battery): admit one blocking worker per poll stage until it exits (…
snekxs commentedon Nov 24, 2026
Reporter reverted to 1.0.1 on the same hardware: the problem disappears. On 1.0.3, after closing the browser, the mouse itself is marked "last seen X mins ago" in Bridge; on 1.0.1 it stays there permanently.
That is a different failure than the one I described above — "last seen X mins ago" is
KnownDeviceState::Disconnected, i.e.detect_mice()stopped returning the mouse, not a failed read (known_device_state,src/service.rs:764-791). The mouse leaves Bridge's device list entirely, so the poll has nothing to read andlast_seenstops advancing.The regression window is discovery, and the poll code is identical
Diffed
v1.0.1(1dd01b7) againstv1.0.3(0411721):poll_batteries_once,poll_batteries,start_battery_monitor,start_device_scanner,resume_onboard,BATTERY_POLL_INTERVAL(5 min) andBATTERY_STALE_AFTER(12 min) are unchanged — the poll body is the same code, function for function.describe_devicesdoes not exist in 1.0.1'ssrc/hid.rsat all.drivers::detect_micewas rewritten in 1.0.2 by feat(native-hid): pick devices and drivers with OpenMouse's own registry #124 ("Pick devices and drivers with OpenMouse's own registry").1.0.1: enumeration only, nothing is opened
git show v1.0.1:src/drivers/mod.rs—detect_mice()walksapi.device_list(), maps the vendor id throughKNOWN_BRANDS/discovered_brand, and builds"<Brand>:<serial or vid:pid>". It never opens a device and never asks the Node helper. A sleeping, half-answering or driver-hostile mouse is therefore always listed, andread_statusfailures are separate and recoverable.1.0.3: the registry is authoritative, and unclaimed devices are dropped
detect_mice(src/drivers/mod.rs:155-172) now:registry::devices()— fetches the panel'sSUPPORTED_HID_FILTERSfrom the Node helper (registry.rs:71-101), opens every matching device to read its report descriptor (hid.rs:1585-1631), then asks the helper a second time to name each device (registry.rs:121-160).filter_map(|device| { let brand = brands.get(&device.key)?.clone(); ... })(registry.rs:110-118).detect_by_vendor()only whenregistry::devices()returnsNone— i.e. when the registry is unreachable. If the registry answers but does not claim a device, that device is dropped, and there is no vendor-table backfill except for Pulsar (src/drivers/mod.rs:160-170).So any device the helper's
supports()doesn't accept — or whose descriptor could not be read so its collections didn't match the filter — silently disappears from Bridge, while 1.0.1 would have listed it and simply failed the battery read.That is the "mouse marked last seen" symptom, and it is why the mouse is only ever read again while the panel is open (the panel reads it over WebHID and
PUT /v1/batteryfills the tray,src/service.rs:1393).What I need to tell which of the two gates drops it
Both gates run at
warn, so they are already in the reporter's current log — no debug level needed:Could not load the device registry; using Bridge's vendor list(registry.rs:96) — filters failed.Could not identify HID devices(registry.rs:151) — theidentifyround trip failed, which cachesFailedfor 60 s (RETRY_AFTER,registry.rs:32) and makesdetect_micefall back for that window.Could not describe HID devices(registry.rs:107,debug) — the describe pass failed outright.Plus, from Home: is the mouse absent (only "last seen") or shown as Asleep (
KnownDeviceState::Asleep)? Absent means discovery dropped it, which is the regression above; Asleep means discovery sees it and only the read fails, which is the earlier theory.Suggested fix
Make discovery additive rather than authoritative: after
mice_from_registry(devices), backfilldetect_by_vendor()for every device whosevid:pidis not already covered — not just Pulsar (src/drivers/mod.rs:160-170). A device discovered this way keeps itsread_statuspath (which already fails softly and is retried every 5 min), so the worst case returns to 1.0.1's "battery read fails" instead of "the mouse vanishes from Bridge". That keeps the registry's driver selection win from #124 without letting an unclaimed device take the mouse out of the list.fix(battery): keep the tray battery updating after the mouse sleeps (#…
fix(discovery): keep same-model mice with different serials apart (#134)
fix(discovery): list devices the registry does not claim by vendor id (…
snekxs commentedon Nov 26, 2026
v1.0.4ships two PRs that both reference this issue:detect_micenow backfillsdetect_by_vendor()for everyvid:pidthe registry did not list (src/drivers/mod.rs,backfill), so a mouse the registry does not claim can no longer vanish from Bridge. This targets the reporter-confirmed symptom (mouse marked "last seen X mins ago" on 1.0.3, never on 1.0.1).BATTERY_POLL_TIMEOUT(= the 5-min interval) abandons a poll that never finishes (run_one_poll,src/service.rs:2008-2030),device_accesswaits at most 30 s (DEVICE_ACCESS_WAIT) so a stuck apply cannot starve reads, the resume watch starts with the battery monitor instead of the first panel session, and a description is cached only when its descriptors were actually read.Both were merged without hardware testing (their PR bodies say so), so the reporters' check is the real verification.
What a positive result looks like
infoline:Battery poll finished recorded=N failed=M elapsed_ms=...— this is new in 1.0.4 and makes the previouslydebug-only failure path visible at default log level.Not updatingat 12 minutes.If it recurs, two log signatures decide it
Battery poll finished ... failed=1repeating every tick, tray still stale → the poll runs, the read is rejected. Then the per-deviceCould not read the mouse batteryline says whether it is asleep or busy.Battery poll finishedline at all, orThe battery poll did not finish in time and was abandoned(warn) → a native call is still hanging past 5 minutes (the PR notespulsar::apply,delux::applyand descriptor reads are still unbounded), which is a different fix.Leaving this open until the reporters confirm on 1.0.4.
snekxs commentedon Nov 26, 2026
Partial verification on
v1.0.4from NeonAssasin (Viper V4 Wireless, Windows 11):Not updatingsticking after the mouse sleeps, only the panel reviving it) is fixed for this reporter.mark_unanswered(src/service.rs:2194) set the flag, and a successful read clears it (:1497) while the scanner retries everyASLEEP_RECHECK= 60 s (:119,:1599). Unknown yet whether it clears once the mouse is moved, i.e. whether this is the expected "a sleeping dongle cannot be read at boot" case or a read that keeps failing.Waiting on: NeonAssasin on whether
Asleepclears on wake, and pako on 1.0.4. Not closing yet.snekxs commentedon Nov 26, 2026
Third reporter: default-level log of the stale window
New Discord report (kaiyuzi, 2026-11-26, Bridge v1.0.4 on Windows, device
0x1532:0x00C1) supplies the piece listed under "Missing from report": Bridge's own log across a stale window, at defaultinfolevel, with no panel session open.TTY-stripped
openmouse-bridge.2026-11-26.log, poll lines only:Observations that bear on the four candidate fault points above:
failed=2precisely in the windows where no panel session exists, andfailed=0on the first poll after a session opened1532:00c1— the background poll's reads succeed only while a panel session is holding the device, which is finding 3 (ActiveSessionGuarddroppingdevice_access()) and the "no resume/watch for the background poll" shape, not a sleepy mouse.recorded=0on every poll, including thefailed=0ones. Even when the read no longer fails, nothing reachesrecord_battery, so the poll completing cleanly is not the same as the poll producing a reading. That is upstream of the tray rendering and would keepBATTERY_STALE_AFTERtripped with the panel closed.infoalready on 1.0.4 (Battery poll finished recorded= N failed= N), so the suggestedinfo-level liveness log partly exists; the per-device reason (Could not read the mouse battery,No native battery reader for this device) is stilldebug-only and is what is needed to tell "read failed" from "no reader".elapsed_mson failing polls is 4.3–8.3 s, underHELPER_TIMEOUT(10 s), so these are completed failed reads rather than a wedged poll — the one-shotbattery_pollingguard is not yet the proximate cause in this report.Reporter has not stated the mouse model, so the Razer entry that
0x1532:0x00C1resolves to is unconfirmed.Thread: https://discord.com/channels/1531814042421952644/1575349965893402765
snekxs commentedon Nov 26, 2026
pako is still affected on
v1.0.4— ATK F1 V2 Ultimate, tooltip showsATK F1 Ultimate 2.0 - 55% · Not updatingin the tray after closing the panel, so #135 did not cover this case. NeonAssasin's Viper V4 is fixed by the same build, so the two reports were not one bug after all.Requested from pako, all at default log level (1.0.4 logs the poll at
info):Battery poll finished recorded=N failed=M elapsed_ms=...— does it keep appearing every 5 min, and with what counts?canonical_battery_identity(src/service.rs:2228) records a native read under the driver's reported name (ATK F1 Ultimate 2.0), while the backfill id isATK:<serial or vid:pid>. If both exist for one mouse,select()(src/tray_battery.rs:42-48) picks the first non-stale entry and the tray could be following the wrong row.snekxs commentedon Nov 26, 2026
pako's
v1.0.4log (2026-11-26, Windows,C:\Users\tyrell\...) settles the poll question but not the cause.What the log proves
Battery poll finishedlines, one every 5 min,04:07:31→04:47:19. fix(battery): keep the tray battery updating after the mouse sleeps #135 works as intended: no abandoned polls, no gaps.recorded=0 failed=1on all 10,elapsed_ms1486–2025. Sopoll_deviceshas exactly one device in its list and that device'sread_statusreturnsErrevery time (a real error, notWouldBlock: deferred reads are not counted as failures,src/service.rs:2161-2170).elapsed_ms=12994— the helper'sHELPER_TIMEOUTis 10 s (src/drivers/native_hid.rs:26), so the startup read ran into the helper timeout rather than failing fast. Every later poll fails in ~1.5 s.Access is deniedreader deaths are not the cause — all 452 are inside the three panel sessions (04:09:29–04:10:16,04:28:27–04:28:39,04:44:58–04:45:05) and stop when each session ends. No leaked handles, no readers running outside a session, nothing else logged in the stale window.hid-373b11d9-0968fd8c,vendor_id=0x373b product_id=0x11d9— ATK vendor id, 10 paths, 0 failed. Panellistreportsdevice_count=3.What is still unknown, and the one line that answers it
The error text is logged at
debugonly (Could not read the mouse battery,src/service.rs:2158-2162), and this log runs at the defaultopenmouse_bridge=info, so the cause is not in the file. WithRUST_LOG=openmouse_bridge=debugthe line carries the device id and the helper's own message, which for a status read isno ATK device answered. Tried: <each interface + driver class + its error>(native-hid/src/apply.mjs:155-159). That list names the failing interface, which is the missing piece.Hypotheses that fit the evidence so far
merge_detected_micedrops every discovered device whose brand a saved profile already covers (src/service.rs:2242-2258), and both devices in the panel are ATK (0x373b):Nano 68andATK F1 Ultimate 2.0. If the saved profile is the keyboard, the mouse is never polled at all, and the tray only ever shows what the panel last pushed.read_statusselects by brand, not by the id it was given (src/drivers/native_hid.rs:188-200,native-hid/src/brands.mjs:112-115), so the ATK keyboard sits in the same candidate bucket as the mouse.read_throughalready treats this as ambiguous (via=None).selectClienttolerates a failing candidate, but if no ATK candidate answers the helper exitsEXIT_FAILED, which fails the whole poll even if the mouse would have answered on its own.Ok(None)("No native battery reader for this device", debug, not counted). Sincefailed=1, at least one candidate errored on open/read rather than reporting a battery-less status.Requested from pako: one poll window with
RUST_LOG=openmouse_bridge=debugset (quit Bridge from the tray, then relaunch with the variable set), just long enough to capture oneCould not read the mouse batteryline. Also, from Home: which device the saved Default profile belongs to —Nano 68orATK F1 Ultimate 2.0.snekxs commentedon Nov 26, 2026
Correction to my previous comment:
Nano 68is a Madlions keyboard, not an ATK device (reporter). So the two rows in Home are not the same brand, there is no brand-level collision inmerge_detected_mice, and the single device in the poll list is the ATK mouse itself. Hypotheses 1 and 2 from the previous comment are retracted — the poll is reading the right device and that read is what fails.Second log from the same reporter (
04:52:19,04:58:51,04:58:56,05:03:51) adds two facts:Bridge file logging initializedappears at ~04:58 and the polls still come backrecorded=0 failed=1(2097 ms, 1430 ms, 1586 ms).info— nodebuglines at all, so theRUST_LOGvariable did not reach the process (the app was launched from the Start menu rather than from the shell that had it set). Still looking for that one line.The asymmetry that matters now
While Bridge's native read fails 100% of the time, the panel reads the same mouse fine over WebHID: Home shows
ATK F1 Ultimate 2.0 · 55% · 1600 DPI · 2000 Hz. Percent can come fromPUT /v1/battery, but DPI and polling rate can only come from aMouseStatusread (record_batterykeeps them from a previous native status read,src/service.rs:1443-1448) — and the panel's own session opened the device cleanly (hid-373b11d9-0968fd8c,0x373b:0x11d9, 10 paths, 0 failed).So the driver and the protocol are fine; what differs is who opens the device: Chrome/WebHID and
hidapiin-process (session) both succeed, while the request that fails is the one that goes through the Node helper (native_hid::read_status→apply.mjs→node-hid). That points at the helper's view of the device — either the described-device list it is handed (described_devicesfromdescribe_devices, thenregistry::devices_for) ornode-hidfailing to open paths that Chrome can open.Diagnostic that needs no log level
The release bundles the helper next to the executable (
<exe dir>\native-hid\src\apply.mjs) with its own Node runtime (<exe dir>\native-hid\node\node.exe, seenative-hid/README.md"Bundling for distribution"). Quitting Bridge and running it by hand prints the failing interfaces directly:node-hidfine, so the fault is in the described-device/registry path Bridge passes it.[native-hid] no ATK device answered. Tried: …on stderr =node-hidcannot open the interfaces at all, which would put this in the same family as theReadFile: Access is deniedreader deaths in the earlier log.Asked the reporter for that output.
snekxs commentedon Nov 26, 2026
Third data point, different brand: NeonAssasin's
v1.0.4panel right after boot showsRazer Viper V4 Pro — Asleep · 73%while the same mouse reads fine from the panel. His report: "the bridge doesn't initiate until you open the web driver."That matches pako's ATK F1 V2 Ultimate exactly — a remembered percentage that never refreshes, the mouse shown as asleep/not updating, and the panel's own WebHID read being the only thing that works. Two brands, two mice, one 1.0.4 build.
What the two have in common, and what it narrows to:
drivers::read_statusroutes them to the Node helper (src/drivers/mod.rs:426-437,native-hid/src/brands.mjs:102-115). Pulsar and the Delux/Lamzu family are the only ones with an in-process Rust reader.describe_devices→registry::devices_for(brand)→apply.mjs→node-hid.RS7 Air) shows plainConnectedwith no percentage, so it is not a working control — it just has no native reader at all. That rules out "one device works, so polling is fine at boot".So the surviving hypothesis is the one pako's diagnostic tests: the Node helper cannot open/read the device after a fresh boot, while Chrome/WebHID (panel) and the in-process
hidapipath can. Either the described-device list Bridge hands the helper is wrong on a cold boot, ornode-hidis opening paths thathidapiand Chrome open successfully.Asked NeonAssasin for the same manual helper run as pako, with
{"brand":"Razer","action":"status"}, before opening the panel and with the browser closed. SameTried:list would confirm it is one helper-level fault across brands rather than something ATK-specific.snekxs commentedon Nov 26, 2026
Confirmed for both reporters: it never comes back on its own.
Asleep · 73%for the whole session.recorded=0 failed=1over 40 minutes, then the same in a second run after a restart — 14 in total, never a success.That closes the boot-timing hypothesis. Bridge retries an asleep mouse every 60 s (
ASLEEP_RECHECK,src/service.rs:119) and polls every 5 min, so a transient boot-time failure would have recovered within minutes. Two brands, two mice, one build, no recovery — the read is failing permanently, not slowly.Where this leaves the diagnosis
Both failing brands are helper-only (Razer, ATK —
src/drivers/mod.rs:426-437), both wireless, both read throughdescribe_devices→registry::devices_for(brand)→apply.mjs→node-hid. Chrome/WebHID and the in-processhidapisession both open the same hardware successfully.The manual helper run already requested will distinguish the last two candidates, because
apply.mjswords them differently (native-hid/src/apply.mjs:151-160):no ATK device answered. No matching HID interface was found.→ the described device's collections did not satisfy anysupports()check, soregistryPairsproduced zero candidates. That is a fault in whatdescribe_devicesproduced (src/hid.rs:1585-1631) — most likely a descriptor read that failed, leaving enumeration-only collections, and the run ofenumerate → describe → identifythat decides the brand.no ATK device answered. Tried: <interface>: <error>→ a driver class was constructed andnode-hidfailed to open or read the paths, which is a process-level HID access difference between node-hid and Chrome/hidapi.Suggestion for the next report
The reason this took three rounds of logs is that the failure is logged at
debug(src/service.rs:2158) while Bridge shipsinfo. Logging a failed read atwarnonce per device perBATTERY_POLL_INTERVAL— with the helper's first stderr line attached — would make every future report of this shape self-diagnosing. Happy to draft that if it is wanted.snekxs commentedon Nov 27, 2026
The Viper V4 Pro case is structural, and I can prove it from the code
For NeonAssasin's
Razer Viper V4 Pro(0x1532:0x00e6), Bridge can never claim the device in the registry path. Chain:Bridge never reads a Razer report descriptor.
describe_groupsetslet read_descriptor = open && primary.vendor_id() != RAZER_VENDOR_ID;(src/hid.rs:1669). The path is deliberate — the feature-report handling has Razer-specific fallbacks (RAZER_FEATURE_BUFFER_LEN,src/hid.rs:1075,:1095) — but the consequence is that for any Razer deviceDescribedPath.feature_reportsand each collection'sfeatureReportsare empty.The V4 Pro's class test needs exactly that data.
RazerViperV4ProHidClient.isSupportedrequires a single collection that carries the control report:(
mouse-protocol@v0.60.0:src/drivers/razer/viper-v4-pro-hid.ts, and its own test asserts that a collection withfeatureReports: []must be rejected.) Under Bridge that is always false — twice over:featureReportsis empty, and Bridge's device is the whole 10-path group, not one collection.The generic Razer client cannot claim it either, by design:
0x00e5/0x00e6are deliberately absent fromRAZER_PRODUCTS— "which have their own drivers in this folder. Listing them here would give two drivers the same device." (mouse-protocol@v0.60.0:src/razer/devices.ts:43-45).RazerHidClient.isSupportedtherefore returns false atRAZER_PRODUCTS.get(productId)being undefined.So
registry::identifyreturnsbrand: nullfor the Viper,registry::devices()drops it, and then:Razer:<tail>) — which is why it appears in Home at all, with the remembered 73%;devices_for("Razer")finds no registry-claimed Razer device, so it falls back to every claimed device withmatch_status_brand: true(src/drivers/registry.rs:175-193);brand: "Razer", andapply.mjsexitsEXIT_FAILED—no Razer device answered. Tried: … reports itself as …(native-hid/src/apply.mjs:151-160);Why 1.0.1 worked: the helper then enumerated devices itself and constructed each brand class without any
supports()gate (brands.mjs+candidateDevices), soRazerViperV4ProHidClientwas tried blindly and answered. The registry path added in #124 put a WebHID-shapedsupports()in front of it, and Bridge's Razer descriptions do not carry the data that check reads.Why the panel works: Chrome hands the driver the real parsed descriptor, so
supports()passes there.Fix options
devices_for, distinguish "the registry claims no device for this brand" from "this brand is filed under another name". Today both collapse intomatch_status_brand: trueover every device. The first case should send nodevices, letting the helper fall back tobrands.mjs/candidateDevicesby vendor id — restoring exactly the 1.0.1 behaviour for devices the registry cannot describe.registryPairsfall back to blind class probing for a brand whose devices exist but whosesupports()rejects all of them.pako's ATK is not yet explained by the same chain
ATK descriptors are read (vendor is not Razer), and
AtkHidClient.isSupportedonly needs a0xff02:0x02collection at any depth, so the claim should succeed and the failure is later — at open or read. That still needs the helper'sTried:line, ordump_live_buson the maintainer side:which writes what Bridge describes for the live bus (
src/drivers/registry.rs:218-230) — the direct way to see whether the ATK mouse'scollectionscarry0xff02:0x02and whether itspathsare the ones node-hid will open.