{"record":{"id":"47ba317475b8323f","repo":"AprilNEA/OpenLogi","slug":"wheel-reporting-target-is-not-native-after-write","errorCode":null,"errorMessage":"wheel reporting target is not native after write: {:?}","messagePattern":"wheel reporting target is not native after write: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/openlogi-cli/src/cmd/diag/wheel.rs","lineNumber":65,"sourceCode":"\n    let Some(requested) = args.resolution.map(ScrollResolution::from) else {\n        return Ok(());\n    };\n\n    let after = openlogi_hid::set_scroll_resolution(&route, requested)\n        .await\n        .context(\"set wheel resolution\")?;\n    print_mode(\"read-back\", after);\n\n    if after.resolution != requested {\n        anyhow::bail!(\n            \"wheel resolution write not applied: requested {}, device reports {}\",\n            resolution_label(requested),\n            resolution_label(after.resolution)\n        );\n    }\n    if after.target != ScrollReportingTarget::Native {\n        anyhow::bail!(\n            \"wheel reporting target is not native after write: {:?}\",\n            after.target\n        );\n    }\n    if after.inverted != before.inverted {\n        anyhow::bail!(\n            \"wheel inversion changed unexpectedly: was {}, now {}\",\n            before.inverted,\n            after.inverted\n        );\n    }\n\n    println!(\n        \"✓ wheel resolution set to {} (native reporting, inversion preserved)\",\n        resolution_label(requested)\n    );\n    Ok(())\n}","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/AprilNEA/OpenLogi/blob/e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8/crates/openlogi-cli/src/cmd/diag/wheel.rs#L47-L83","documentation":"Raised by the wheel diagnostic after writing scroll resolution: the read-back `after.target` is not `ScrollReportingTarget::Native`, meaning the device is not routing wheel reporting through the native (on-device HID++ ) target after the write. The diagnostic requires the write to leave the wheel in native reporting mode; anything else indicates the device switched reporting paths or the write disturbed the target setting.","triggerScenarios":"Running the wheel resolution diagnostic where `after.target != ScrollReportingTarget::Native` on read-back — the resolution write side-effected the reporting target, firmware switched to an alternate reporting path, or another driver/application changed the wheel mode concurrently.","commonSituations":"Concurrency with Logitech Options+ or another HID++ tool that owns wheel reporting; firmware that resets reporting target when resolution changes; HiRes/free-scroll mode toggles flipping the target away from native.","solutions":["Close competing HID++ tools (Logitech Options+, G-Hub) that may own wheel reporting, then re-run.","Explicitly set the reporting target back to Native and retry the diagnostic.","Re-run to determine whether the target flip is reproducible or a transient race.","Check firmware behavior for this model regarding reporting target on resolution writes."],"exampleFix":"// before\nif after.target != ScrollReportingTarget::Native {\n    anyhow::bail!(\"wheel reporting target is not native after write: {:?}\", after.target);\n}\n// after\nif after.target != ScrollReportingTarget::Native {\n    openlogi_hid::set_scroll_reporting_target(&route, ScrollReportingTarget::Native).await?;\n    anyhow::bail!(\"wheel reporting target is not native after write: {:?} (reset to native)\", after.target);\n}","handlingStrategy":"try-catch","validationCode":"// Ensure no other HID++ consumer owns the wheel before writing\nlet before = read_scroll_reporting(&route).await?;\nif before.target != ScrollReportingTarget::Native {\n    set_scroll_reporting_target(&route, ScrollReportingTarget::Native).await?;\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = run_wheel_diag(&route, requested).await {\n    if e.to_string().contains(\"target is not native\") {\n        // recover: force native target and re-read\n        let _ = set_scroll_reporting_target(&route, ScrollReportingTarget::Native).await;\n    }\n}","preventionTips":["Set the reporting target to Native explicitly before diagnostics.","Stop vendor software (Options+/G-Hub) that competes for wheel reporting.","Re-read state after every write and restore defaults on collateral change.","Treat free-scroll/HiRes toggles as potential target-flippers around writes."],"tags":["hardware","hidpp","wheel","reporting-target","unexpected-state-change"],"backgroundTag":"unexpected-device-state-change","analyzedSha":"e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8","analyzedAt":"2026-09-13T03:07:16.451Z","contentChangedAt":"2026-09-13T03:07:16.451Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}