AprilNEA/OpenLogi · error

SmartShift toggle had no effect: still

Error message

SmartShift toggle had no effect: still {:?} after write

What it means

Raised by the SmartShift toggle diagnostic after it flips the SmartShift mode and reads the state back: the mode is identical to the pre-write value, so the toggle had no observable effect. The library throws it because a toggle that does not change state means the write silently failed or was rejected, and reporting success would be misleading.

Solutions

  1. Retry the toggle — a single lost HID++ write over a wireless link is common.
  2. Verify the HID route resolves to the same device used for the before-read.
  3. Check the device actually supports writable SmartShift mode (not just readable) via feature dispatch.
  4. Ensure no other process is immediately resetting the mode after the write.

Example fix

// before
if after.mode == before.mode {
    anyhow::bail!("SmartShift toggle had no effect: still {:?} after write", before.mode);
}
// after
if after.mode == before.mode {
    // one retry for flaky wireless writes
    openlogi_hid::toggle_smartshift(&route).await.context("retry toggle")?;
    let after = openlogi_hid::read_smartshift(&route).await?;
    if after.mode == before.mode {
        anyhow::bail!("SmartShift toggle had no effect: still {:?} after write", before.mode);
    }
}
Defensive patterns

Strategy: retry

Validate before calling

// Verify the device exposes a writable SmartShift mode feature before toggling
let caps = device_feature_caps(&route).await?;
if !caps.smartshift_mode_writable {
    anyhow::bail!("device does not support writable SmartShift mode");
}

Try / catch

for attempt in 0..2 {
    match run_smartshift_toggle_diag(&route).await {
        Err(e) if e.to_string().contains("had no effect") && attempt == 0 => continue,
        other => break other,
    }
}

Prevention

When it happens

Trigger: Running the SmartShift toggle diagnostic where `after.mode == before.mode` after the toggle write — the device ignored the mode set command, the write was lost on the wireless link, or the feature is not actually implemented by the device.

Common situations: Device that reports the SmartShift feature but ignores mode writes (partial firmware support); flaky Bolt/Unifying receiver link; wrong HID route (writing to a different device than the one read); mode already at the target and the toggle logic wrote the same value back.

Related errors


AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13). Data as JSON: /api/errors/067dab3960cbebc4. Report an issue: GitHub.

Appendix: source

Thrown at crates/openlogi-cli/src/cmd/diag/smartshift.rs:103

    );

    let new_mode = openlogi_hid::toggle_smartshift(&route)
        .await
        .context("toggle SmartShift")?;
    println!("  toggled to: {new_mode:?}");

    let after = openlogi_hid::get_smartshift_status(&route)
        .await
        .context("read SmartShift after toggle")?;
    println!(
        "  read-back: mode={:?} auto_disengage={} torque={}",
        after.mode,
        after.auto_disengage,
        after.tunable_torque.map_or(0, TunableTorque::into_inner)
    );

    if after.mode == before.mode {
        anyhow::bail!(
            "SmartShift toggle had no effect: still {:?} after write",
            before.mode
        );
    }

    if args.leave_flipped {
        println!("✓ SmartShift toggle OK (wheel left in {new_mode:?})");
        return Ok(());
    }

    println!("  restoring mode: {:?}", before.mode);
    openlogi_hid::toggle_smartshift(&route)
        .await
        .context("restore SmartShift")?;

    println!("✓ SmartShift round-trip OK");
    Ok(())
}

View on GitHub (pinned to e846e6f4b4)