AprilNEA/OpenLogi · error
DPI write failed: requested
Error message
DPI write failed: requested {target}, device reports {after} which is not in its supported list What it means
Round-trip verification failure in `openlogi diag dpi`: after the set_dpi write the device reports a DPI value that is neither the requested target nor any value in its own supported list. The write definitely took effect (read-back differs from the pre-write value) but landed on an off-list value, which is a firmware fault — unlike landing on another supported value, which the diagnostic tolerates with a 'device snapped' note. The CLI bails to flag the device as misbehaving.
Solutions
- Power-cycle or re-pair the device and re-run the diagnostic to see whether the snapped value lands on a supported step
- Try a different supported --target value; if every write produces off-list results, the device's DPI feature is misreporting its capabilities
- Capture the device model/firmware version from `openlogi list` and file it with the report — the advertised capability list disagrees with actual behavior
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/openlogi-cli/src/cmd/diag/dpi.rs:82 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13).
Data as JSON: /api/errors/ef0b897e5938f7e6.
Report an issue: GitHub.
Appendix: source
Thrown at crates/openlogi-cli/src/cmd/diag/dpi.rs:82
.context("write DPI")?;
let after = openlogi_hid::get_dpi(&route)
.await
.context("read DPI after write")?;
println!(" read-back DPI: {after}");
// `target` is always a device-reported value, so a mismatch means the
// device adjusted it — fine if it landed on another supported value, but a
// no-op write (`after == before`) or an off-list read-back is a real fault.
// (`target != before` is guaranteed by the early return above.)
if after == before {
anyhow::bail!("DPI write failed: requested {target}, device still reports {before}");
}
if after != target {
if info.capabilities.contains(after) {
println!(" note: device snapped {target} → {after}");
} else {
anyhow::bail!(
"DPI write failed: requested {target}, device reports {after} \
which is not in its supported list"
);
}
}
println!(" restoring DPI: {before}");
openlogi_hid::set_dpi(&route, before)
.await
.context("restore DPI")?;
println!("✓ DPI round-trip OK");
Ok(())
}
struct DpiSummaryDisplay<'a>(&'a DpiCapabilities);
impl fmt::Display for DpiSummaryDisplay<'_> {View on GitHub (pinned to e846e6f4b4)