Skip to content

Releases

MiControl v0.2.22

Choose a tag to compare

@Freitas-MA Freitas-MA released this 14 Nov 19:42
Immutable release. Only release title and notes can be modified.

[0.2.22] - 2026-11-14

Fixed

  • The performance-mode switch no longer reports success when the EC refuses the profile. Live measurement on this firmware: Turbo (2) latches in QFAN, but LongBattery (11) is refused and QFAN keeps its previous value while the old code returned success: true and the UI showed "not nameable (raw 0)". set_performance_mode now reads QFAN back after the write: an unlatched value returns success: false with the requested/actual pair, and LongBattery falls back to the Smart profile (10) — the adaptive battery curve this EC does accept — reported as hq_wmi+smart_fallback.

MiControl v0.2.21

Choose a tag to compare

@Freitas-MA Freitas-MA released this 14 Nov 17:07
Immutable release. Only release title and notes can be modified.

[0.2.21] - 2026-11-14

Highlights

  • New identity. Grayscale-only brand (hairline-friendly): new app/tray icons, in-app mark, brand sheet in docs/brand/.
  • Hairline theme. Full UI migration to the gray-scale + pastel token system (24 tabs), 96 SVG icons replace every emoji, accessible InfoHints on non-obvious controls, touchpad help accordion for Edge Slide.
  • Overview is a real system summary. Hardware (CPU/GPU/NPU via ComputeAccelerator/RAM/disk/display), live temperatures with source badges, full battery block (health, capacity, voltage, limit state), system state and shortcuts — one 1 ms snapshot (get_overview_snapshot).
  • Startup manager. Every Windows startup entry (HKCU/HKLM Run, Startup folders, scheduled logon tasks) with real enable/disable via StartupApproved; machine-level toggles through the signed elevated bridge. MiControl's own switch moved to Settings.
  • Color management, fixed for Windows 11. SetICMProfileW/GetICMProfileW are no longer exported by mscms on current builds — profile loading now uses AssociateColorProfileWithDeviceW + WcsGetDefaultColorProfile. Panel detected by EDID, curated ICC catalog with size/acsp/SHA-256 validation, install via the elevated bridge; the Xiaomi D65P3 profile loads for real.
  • Charging protection actually works. The limit is applied with the firmware's own channel (WMAA FUN2=0x1000, level codes) and a supervisor holds the 78–80% band, re-applying on resume and AC-plug (the EC drops the setting across power transitions). Above the band the UI says so honestly; this firmware has no discharge channel.
  • Performance modes tell the truth. The active EC mode is read from the EC (QFAN, SmartAdaptive = raw 9) instead of echoing the registry; mode writes are verified before/after and fall back to the SSDB channel that latches.
  • Fan with the lid closed is explained. A lid listener (Windows power broadcast) logs [lid] CLOSED/OPEN with a thermal snapshot; the fan follows the EC's clamshell table by design and the UI now says so.
  • Edge Slide usable. Cursor is pinned during the gesture (ClipCursor), pre-roll 8 mm, band 16%/28% adjustable via HKCU\Software\MiControl\Touchpad, one haptic tick per step.
  • Stability. Blocking recv_timeout inside async removed (no more runtime starvation), watchdog waits for port 4000 before relaunching, battery WMI circuit breaker, log noise cut by ~95 % on the noisiest paths, installer shell deploy v2 with a per-step log and a network-free bootstrap self-heal.
  • Signing. The setup shell is Authenticode-signed (self-signed certificate; SmartScreen will still warn until a CA certificate is installed — the pipeline is ready for one) and the updater payload is minisign-signed.

Fixed

  • Fan Control showed "0 RPM" and a 50 % gauge at the same time (audit P2-1). get_fan_info reported speed_rpm = 0 (no tachometer: Win32_Fan.DesiredSpeed is empty and every EC RAM read is denied, even as SYSTEM) while speed_percent fell back to the stored FixedSpeed = 50, so the card contradicted itself and the Performance tab said "no WMI sensor" about the same fan. RPM and percentage are now Option/null: absent means unavailable, never zero, and the gauge is only drawn when a real RPM reading exists. The requested percentage travels separately (requested_speed_percent) and drives the slider, not the gauge.
  • set_fan_mode no longer claims fan control it does not have (audit P2-2). It returned Ok(()) unconditionally — including when IGCL enumerated no fans and the EC refused the write — and the UI toasted "Fan mode set". It now returns FanModeResult { applied, method, rpm_control, warning }: Fixed Speed reports that on this platform it applies an EC fan-profile band (Quiet/Balanced/Performance) instead of pinning RPM, and Off reports that it maps to SuperQuiet and the fan keeps running. The hardware writes are unchanged.
  • The ACPI ambient zone could be shown as the CPU temperature (audit P2-8). TZ00 reads ~27.9 °C while the ESIF CPU hotspot reads ~57 °C; get_elevated_thermal_readings and get_fan_info both took the first ACPI zone and called it the CPU. Zones now carry a role (TZ00 = ambient) and the CPU fallback skips them, so a failed ESIF read reports cpu_temp_celsius: null / temp_source: unavailable instead of the room temperature. TZ00 is surfaced only as ambient_temp_celsius, and the GPU no longer inherits it either.
  • Audio effects always showed as "off" (audit P1). set_mic_noise_canceling, set_speaker_noise_canceling and set_voice_focus were dispatched through the elevated bridge, so their HKEY_CURRENT_USER writes landed in the SYSTEM profile hive (HKU\S-1-5-18) while get_audio_effects read the signed-in user's hive. The setters now run in-process; the values older builds stranded are migrated once into HKCU (an explicit user value always wins, so turning a toggle off can never be resurrected). The invented HKCU\...\CurrentVersion\AudioControls\NoiseSuppression write is gone.
  • Audio-effects toggles no longer claim to change audio. They are labelled as saved preferences (applies_to_audio: false) and the card copy was rewritten in all four locales. PKEY_AudioEndpoint_Disable_SysFx disables every DSP on the endpoint (beamforming, AGC, Realtek/Dolby sAPO), and there is no public per-effect Win32 control, so no fake system write is performed.
  • Voice Clarity detection was always false — it checked HKLM\...\AudioControls, a key that does not exist. It now probes the OS build (≥ 22621) plus the presence of a ComputeAccelerator device instance and reports a reason (detected / no-npu / os-unsupported / unknown-os).
  • "Set as Default" was unreachable — useHardware defined setDefaultAudioDevice but never returned it (the name only appeared in the memo dependency list), and audio.tsx never passed onSetDefaultDevice, so every playback row rendered disabled. The hook now exposes it, the card wires it, the device list re-enumerates after the switch (the ✓ follows the device Windows actually selected), and failures surface as a retryable toast.
  • The mic OSD lied on consumer mute keys. Usage 0x00E2 is output mute and no longer produces a microphone OSD; 0x00CF/0x0169 read the capture endpoint's real mute state, flip it, and display the state the endpoint reports back. The WMI Fn+F4 path also displays the read-back state instead of trusting the driver's reported value, and the OSD no longer keeps its own toggle boolean.

MiControl v0.2.20

Choose a tag to compare

@Freitas-MA Freitas-MA released this 25 Oct 21:40
Immutable release. Only release title and notes can be modified.

[0.2.20] - 2026-10-25

Fixed

  • Kernel-handle leak (~11 handles/min → 188,715 handles / 2.5 GB commit after 218 h) — root-caused and fixed. Every elevated round-trip that failed early (WriteFile timeout, ? on an error path) skipped the manual CloseHandle calls at the end of pipe_request, leaking the pipe handle AND the overlapped event. The same pattern existed in five more call sites (read_ecram_via_pipe, send_pipe_request, read_exact_timeout, the bridge's handle_client, and the face pipe server). All seven sites now own their handles through RAII guards (util/win_handle.rs), so every early return closes automatically. See memory-leak-audit.md for the full forensic trail.
  • Residual handle leak (~15 handles/min) — two more sources eliminated (S68/S69). After the RAII fixes the app still grew ~15-16 handles/min. Live handle64 tracing showed the growth was Thread handles + COM artifacts (Theme*, __ComCatalogCache__): (1) tokio::task::spawn_blocking pool threads expire after ~10 s idle and are re-created on every poll burst — each new thread re-initializes COM and the thread create/exit cycle retains handles; (2) get_battery_info() spawned a fresh WMI query thread every 15 s. Fixes: a fixed 4-thread pool (util/fixed_pool.rs) whose threads NEVER exit now serves all blocking hardware queries (129 call sites + every direct spawn_blocking migrated), and the battery query runs on a single persistent worker thread. Measured on hardware: handle growth went from ~15/min to 0/min (deltas 0, 0 over 3×120 s samples).
  • Bridge service crash (TLS destructor 0xc0000005) — fixed. The bridge dispatched each pipe command on a fresh short-lived thread; on thread exit the Rust std Windows TLS destructor path crashed the SYSTEM service (9,718 WER events observed). Dispatch now runs on a FIXED 2-thread pool whose threads never exit, so the buggy teardown path never runs.
  • Elevated helper crash-loop — fixed. The --elevated helper exited through normal COM teardown, which crashed after the WMI work (WER crash-loop). It now exits via TerminateProcess, bypassing the broken teardown entirely.
  • Touchpad sliders were no-ops — HID protocol corrected (issue #106, protocol verified on hardware by @Oksion). The vendor touchpad channel (BLTP7853) requires: checksum = XOR of bytes [3..31] + 1 (covers phase flag, len, cmd and payload); phase flag 0x00 on the write frame and 0x01 on the commit frame; a commit frame (cmd 0x01, payload [cmd, 0x100-cmd]) ~120 ms after each write — without it the firmware ignores the write; 0x5D High = (104, 128); 0x59 payload is one LE short. Unit tests assert the exact bytes of the hardware-verified example frames.
  • OS Turbo "does absolutely nothing" — fixed. The flag-on snapshot could be missing (stale state after driver/registry changes), making every toggle a silent no-op. The toggle now auto-repairs by taking a fresh snapshot when the stored one is missing, and the throttle target list was expanded (16 targets) so more background services are actually throttled.
  • Bridge stuck on an old binary after updates — hot-upgrade added. When the installed micontrol_bridge.exe is older than a newer binary in %LOCALAPPDATA%, the service now stops, copies the new binary over itself, and restarts — no more manual service reinstalls after an update.
  • Face service vanishing from SCM — self-reinstall. ensure_face_service reinstalls the service when the SCM entry disappears (rate-limited to 10 min).
  • NSIS bundle now ships the setup shell — closes the migration gap where legacy installs never received the decoupled-installer update path.
  • Tray popup regressions — theme media-query specificity ghosting, collapsed 171 px width, and DPI-stale geometry fixed (S63/S64).
  • Brightness no-op on null IGCL device and adaptive-brightness fighting the user after manual changes (120 s grace window) — fixed.
  • eCRAM pipe lost 3.5% of connections (single instance recreated every 500 ms) — fixed.
  • IoT recovery timeout, battery poll throttle, log rotation, touchpad timeout — S64 hardening batch.

Added

  • Handle-leak prevention system (S67), three layers:
    • OwnedHandle / OwnedEvent RAII guards (src-tauri/src/util/win_handle.rs) — the only sanctioned way to hold a raw kernel handle.
    • Static gate scripts/check-handle-leaks.mjs, wired into pnpm run health-check (handle-leaks step): fails the build when a function acquires a kernel handle (CreateFileW, CreateEventW, CreateNamedPipeW, OpenProcess, CreateToolhelp32Snapshot, …) without an RAII guard, an owning wrapper, or an explicit // leak-check: <reason> annotation. Polices all 32 acquisition sites in src-tauri.
    • Runtime monitor src-tauri/src/util/leak_monitor.rs: samples handle count + commit bytes every 60 s over a 15 min sliding window; sustained growth (≥3 handles/min or ≥2 MB/min) triggers a throttled WARN log and is exposed to the UI through the new get_leak_diagnostics Tauri command (handles, rates, thresholds, alert count). A future leak regression is caught in ~1 hour instead of 9 days.
  • Decoupled installer architecture (S65): a static ~2.5 MB setup shell (micontrol_setup.exe, hash-stable across releases) + a versioned, minisign-signed payload zip. Updates never kill/replace the shell, eliminating the NSIS self-kill/SCM-1072 race class. The updater downloads the payload zip, the SYSTEM bridge hands it to the installed shell, and the shell applies it. Legacy NSIS installs are bootstrapped onto the new path automatically.
  • Measured adaptive OS Turbo (S39): reversible EcoQoS state with identity-checked restore, deterministic windowed statistics with matched-workload evidence, a bounded allowlisted adaptive policy with cooldown and rollback, an anonymous bounded action log, and a truthful measured status panel (4 locales).
  • Unified release artifact contract (CI + local publisher) — the same payload/shell/latest.json contract is validated in CI and produced by scripts/publish-release.ps1.

MiControl v0.1.25

Choose a tag to compare

@Freitas-MA Freitas-MA released this 28 Aug 12:59
Immutable release. Only release title and notes can be modified.

[0.1.25] - 2026-08-28

Added

  • Smart brightness mode (mode: "smart"). A new mode selector next to the adaptive brightness toggle (📈 Formula / 🧠 Smart):
    • Every time you manually change the screen brightness (MiControl slider, OSD, hotkey, Windows slider, Fn key), MiControl records the ambient light (lux) and your chosen brightness level into a persistent learning model (%LOCALAPPDATA%\MiControl\smart_brightness.json).
    • The model buckets readings by ambient lux (10 lux bins) and computes the running mean, min/max and population std-dev per bucket (Welford's online algorithm — no memory growth). Once a bucket has ≥3 samples it becomes "mature".
    • In Smart mode the adaptive loop uses the learned mean brightness for the current lux instead of the fixed curve; buckets without enough data fall back to the formula. Optimizing with std-dev keeps the curve responsive as the user keeps adjusting.
    • New UI panel shows sample count + mature buckets and a "Reset learning" button.

Fixed

  • Copilot key remap finally works on Xiaomi Book Pro 14 2024 (raw F23 / VK 0x86). The board emits the bare F23 scan code (VK 0x86) for the Copilot key instead of synthesising the standard VK 0xC3, and the Windows Shell was swallowing plain F23 at the Win32 level — opening the "Copilot key" Settings page before any hook could see it. Now:
    • Scancode Map writes both known Copilot scan sources (0x6E/E0 and 0x86/00) → target, so the keyboard-class driver remap works no matter which source the firmware sends (takes effect after reboot; elevated validation updated to accept scan 0x86).
    • Plain F23 hotkey (RegisterHotKey id=105, VK 0x86, no modifiers) claims the raw F23 at the Win32 level before the Shell, with a detect-mode guard so probing the key in "Detect Key" never injects the remap target.
    • LL hook + dispatch now treat plain F23 as the Copilot binding (resolve_action matches 0x86 too), so RemapToKey, FocusMicontrol and other actions work on the raw F23 key.
  • Key remapper expanded targets. The remap target picker now offers Left Ctrl, Left Alt, Left Shift, Caps Lock and Escape in addition to the right-side keys / Delete / Help.

MiControl v0.1.24

Choose a tag to compare

@Freitas-MA Freitas-MA released this 27 Aug 19:23
Immutable release. Only release title and notes can be modified.

[0.1.24] - 2026-08-27

Fixed

  • App "volta travada" (frozen on relaunch) after a crash — root-caused. Live crash evidence (Event Name: BEX64, P4: ControlLib.dll_unloaded, micontrol.exe 0.1.23) confirms the fatal fault is an upstream WebView2/ETW race: ControlLib.dll (Intel graphics runtime) registers an ETW callback, is unloaded during browser-process teardown, and the ntdll ETW thread later executes the unloaded code → ACCESS_VIOLATION. MiControl code cannot prevent it, so the durable fix is watchdog self-healing:
    • The bridge watchdog no longer treats "a micontrol.exe process exists" as healthy. The app now writes a heartbeat file (%ProgramData%\MiControl\heartbeat, refreshed every 10 s) once its UI/WebView2 setup has completed. If a process is alive but its heartbeat is stale (>45 s), the watchdog force-kills the frozen process and relaunches a fresh one with a visible window (not --minimized), so the user immediately sees the UI is back instead of a dead tray icon. The force-restart is bounded (max 3 rapid resets) to avoid hammering a machine where another cause is in play.
    • The old behavior left a frozen zombie holding the Tauri single-instance mutex: any manual "Open" (or the relaunched instance) silently deferred to the dead UI — which is exactly the "não consigo abrir a UI" symptom. Killing the zombie first restores a healthy instance every time.
  • Adaptive brightness fighting the user after a crash (user freedom restored). Previously, when the user manually adjusted brightness, the adaptive loop could snap the backlight straight back to the program's computed value — and after a crash/relaunch it reverted the user's choice instantly because the loop's "last set" baseline was lost. Now:
    • Manual brightness changes (MiControl slider, OSD, hotkey, Windows slider, Fn key) arm a 120 s hands-off grace window during which the adaptive loop does not touch the backlight at all.
    • After a crash/relaunch (or first run), the loop seeds its baseline from the actual current brightness instead of assuming a stale one, so it never immediately overrides the user's value.
    • The offset-shift behavior (curve follows user preference) is preserved after the grace window expires.

MiControl v0.1.23 (beta tag workaround)

Choose a tag to compare

@Freitas-MA Freitas-MA released this 27 Aug 10:20
Immutable release. Only release title and notes can be modified.

[0.1.23] - 2026-08-27

Fixed

  • Hotkeys dead after a watchdog auto-relaunch. After an unexpected app death, the MiControlBridge watchdog relaunched micontrol.exe --minimized via WTSQueryUserToken + CreateProcessAsUserW with CREATE_NO_WINDOW and STARTF_USESHOWWINDOW|SW_HIDE. On a Tauri GUI app that combination left the new process in a half-initialized state — the process and a hidden window handle existed, but the Tauri setup never completed: no log output, no single-instance/hotkey registration, tray broken → the user experienced "keyboard shortcuts not responding" until a manual app restart. The watchdog relaunch now uses the default startup info and flags (same as launching from the Run key / Explorer — which works), leaving the --minimized argument to hide the window the same way autostart does.
  • Win+Shift+F23 (id=104) never registered — pre-existing and unrelated: the combination was already taken by another process in every start (Run-key init and manual start alike). The other hotkeys are unaffected.

MiControl v0.1.22

Choose a tag to compare

@Freitas-MA Freitas-MA released this 27 Aug 09:33
Immutable release. Only release title and notes can be modified.

[0.1.22] - 2026-08-27

Fixed

  • Installer still failing when SCM deletion takes longer than 15 s (3rd report). The v0.1.21 fix added remove_service_wait which polls sc query for up to 15 s — but a slow async SCM delete (stale service handles during upgrade) could exceed that, and the bridge treated the timeout as fatal, aborting the entire install even though the entry vanished seconds later. Now:
    • The SCM-removal wait is best-effort: on timeout it warns and continues — the sc create retry loop is the real wait mechanism (up to 30 attempts × 1 s = 30 s window for 1072/1073 transient).
    • Only 1072/1073 errors are retried; any other code (5 access denied, 87 invalid param) fails fast with a clear error instead of hanging ~30 s.
    • The NSIS installer now deletes the MiControlBridge entry and polls until confirmed gone (up to 20 s, IoTSvc pattern) before the Rust install runs, so sc create finds a clean SCM; the uninstaller does the same for idempotency.

MiControl v0.1.21

Choose a tag to compare

@Freitas-MA Freitas-MA released this 27 Aug 03:09
Immutable release. Only release title and notes can be modified.

[0.1.21] - 2026-08-27

Fixed

  • Installer failing with sc create ERROR 1072 ("marked for deletion") on upgrade. DeleteService in the SCM is asynchronous: the old service entry lingers until every handle closes (the new watchdog thread in the MiControlBridge service holds a handle, making the window longer). The old code waited a fixed 1.5 s before sc create, which raced the async delete → install aborted. The bridge's install now polls sc query until the entry is confirmed gone (up to 15 s) and retries sc create on transient 1072/1073. Uninstall also waits for the entry to disappear.
  • "Timeout: too many hardware operations…" errors persisting after a hang. A blocking hardware query whose WMI/vendor pipe never returns (post-sleep) kept its semaphore slot forever — 8 hung tasks exhausted all 8 slots permanently, so every subsequent hardware call (hotkeys, UI polls) failed with this message. The slot is now released as soon as the timeout fires (the task may keep running in the background, but no longer counts), and the cap was raised 8 → 64 so the parallel startup burst never trips it.

Changed

  • Installer messages now in English. All DetailPrint/Abort strings in installer-hooks.nsi were Portuguese; they are now English (driver install, ecram DriverStore deploy, scheduled task, MiControlBridge service, Face Unlock, post-install verification, uninstall).

MiControl v0.1.20

Choose a tag to compare

@Freitas-MA Freitas-MA released this 27 Aug 02:26
Immutable release. Only release title and notes can be modified.

[0.1.20] - 2026-08-27

Added

  • External watchdog — MiControl auto-restarts after unexpected death. The MiControlBridge SYSTEM service now hosts a watchdog thread that polls for micontrol.exe every 30 s and, after 4 consecutive misses (~2 min, leaving room for the WER restart), relaunches it --minimized into the active interactive session via WTSQueryUserToken + CreateProcessAsUserW. Two %ProgramData%\MiControl markers gate it: watchdog_enabled (mirrors the autostart preference) and watchdog_user_quit (written on intentional quit, removed at next app startup) — a manual quit stays closed until the user reopens the app.

Fixed

  • MiControl dying silently and never coming back. Root cause is an upstream WebView2/ETW race: ControlLib.dll unloads while its ETW provider callback stays registered; ntdll's ETW notification thread later executes the unloaded DLL → 0xc0000005 NX fault that kills the whole process with no Rust panic and no log flush (also present in 0.1.18 — not a MiControl regression). Two layers now restore the app automatically:
    • RegisterApplicationRestart fixed — it was passing a NULL command line (which removes the registration) plus RESTART_NO_CRASH|RESTART_NO_HANG (opting out of crash restarts); now registers --minimized with flags 0 so WER can restart the app on crash.
    • External watchdog (see Added) restores the app even when WER does not act.
  • --minimized now honored at startup — starts tray-only without flashing a window (used by autostart and watchdog relaunches; previously the window was briefly shown).

Changed

  • Ambient-light sensor: cached COM sensor stack. get_ambient_lux_com() no longer re-creates the ISensorManager and re-enumerates sensors every 2 s; the COM stack is cached per-thread (thread-local, wmi_cache pattern) and only invalidated on failure.

MiControl v0.1.19 (fixed installer)

Choose a tag to compare

@Freitas-MA Freitas-MA released this 26 Aug 13:15
Immutable release. Only release title and notes can be modified.

[0.1.19] - 2026-08-25

Security

  • CVE fixes across the dependency tree (pnpm + cargo). Frontend (pnpm audit): 0 known vulnerabilities (was 11) — patched nanoid, postcss, fast-uri, brace-expansion, js-yaml via overrides in pnpm-workspace.yaml; bumped vite/vitest. Overrides moved there because pnpm ≥ 11 no longer reads the pnpm.overrides field in package.json. Rust (cargo audit): fixed h2 (RUSTSEC-2026-0258), crossbeam-epoch (RUSTSEC-2026-0204), and removed quick-xml 0.39 (RUSTSEC-2026-0194/0195) by upgrading the Tauri ecosystem to 2.11.5 (tauri, tauri-utils, plist, tray-icon). Remaining advisories are Linux-target-only dependencies that do not compile on Windows.

Fixed

  • CI release build hang caused by humantime 2.3. Release codegen stalled indefinitely on the 2-vCPU GitHub runner right after compiling humantime — five CI runs timed out at the exact same crate across three different release profiles, and the stall reproduced deterministically. Bumping to humantime 2.4 fixed the hang: the local release build now completes in ~10 minutes and the CI build smoke test runs clean.
  • ESLint crash after dependency overrides. The brace-expansion CVE override resolved minimatch@3 (used by ESLint's @eslint/config-array) to v5, whose export shape broke ESLint (TypeError: expand is not a function). Pinned brace-expansion@<2 to 1.1.18 (same major line) so the legacy minimatch keeps its compatible API.
  • Hardware profile not recovered after system sleep. The app now re-probes and restores the hardware profile when the machine wakes from sleep instead of staying on the stale pre-sleep state.
  • Webcam LED blinking every 30 s while idle. The health supervisor's face check no longer opens the webcam just to probe availability; it relies on the service state and named pipe presence, leaving camera access to the UI path.
  • CI pipeline stabilized for release parity. Upgraded all GitHub Actions to the latest majors (Node 24 runtime), isolated the weekly warm-cache refresh into a standalone workflow (immune to push/PR concurrency cancellation), restored multithreaded release codegen (codegen-units = 8 + thin LTO), and aligned the local and remote build/test/check flow (same features, same -j 2 release build).