Repository navigation
WMF Control v1.4.0 - Watchdog & CPU Clock Control Edition
A stability and thermal-management release for Intel Macs running Boot Camp: a self-healing SMC worker, automatic CPU frequency control (thermal + per-app), a virtual "highest temperature" sensor, and a live numeric temperature icon in the Windows system tray.
🛡️ Auto-Recovery Watchdog & Panic-Safe Worker
- Sleep/Hibernate Recovery: A watchdog detects long gaps between polling cycles (sleep, hibernate, a suspended VM, or an SMC that stopped answering), re-initialises the connection and re-applies the fan modes automatically.
- Panic-Safe Ticks: Every worker tick runs inside a
catch_unwindguard. A panic in the SMC parsing or in the fan math rebuilds the context from scratch, re-applies the fan curves and keeps the fans under control instead of leaving them unmanaged. - Visible Errors: A failure to reopen the SMC is reported in the UI instead of silently freezing the readings.
⚙️ CPU Clock Control (Thermal & Per-App)
- Standard Windows API only: The processor maximum frequency (
PROCFREQMAX) is changed through the Windows Power Management API (powrprof.dll) — no kernel driver, no registry hacks, no anti-cheat triggers. - Dedicated Worker Thread: All power-scheme calls run off the UI and fan-control threads, so the interface can never block on the power API. The scheme GUID returned by the API is released with
LocalFree. - Thermal Frequency Scaling: The CPU ceiling ramps down smoothly as the hottest sensor climbs — unlimited boost below the start threshold, linear interpolation down to the floor frequency between start and floor (defaults: 78 °C → 90 °C → 2400 MHz).
- Per-App Frequency Profiles: Assign a frequency cap to any executable (
game.exe → 2500 MHz,Photoshop.exe → unlimited). The foreground window is tracked viaGetForegroundWindow+GetWindowThreadProcessId; presets for Games, Browsers and Creative Apps are included. - Combined Limits: The per-app and thermal limits are merged — the lower one always wins.
- Safe Restore: The previous value is captured before the first change and restored on exit (window close, tray Quit, Ctrl+C, or a new instance taking over). A small state file remembers that a limit was applied, so a limit left behind by a crash is removed automatically on the next start — the CPU never stays capped.
- Demo Mode Safe:
--demonever touches the real power plan.
🌡️ Virtual "Highest Temp Overall" Sensor (MAX)
- Tracks the maximum across all critical hot sensors: CPU PECI, CPU Die, CPU Package, dGPU Die, dGPU Proximity and PCH.
- Only live, plausible readings are used (
0 < T ≤ 125 °C), so a missing or stale SMC value can never make the aggregate look cold. - Fan curves, Predictive Cooling and the CPU clock policies can target the aggregate, so neither the CPU nor the discrete GPU overheats on 15"/16" MacBook Pros.
- The sensor table shows it as
MAXand names the hottest component, e.g.Highest: 82 °C (dGPU).
📟 Numeric Temperature in the System Tray
- Enable Show temperature in system tray and pick the sensor (default: Highest Temp Overall).
- A crisp two-digit number rendered with the native Windows GDI (
Segoe UIbold viaDrawTextW) on a fully transparent background: green below 65 °C, yellow at 65 °C, orange at 75 °C, red at 85 °C and above. - Refreshed every ~2 seconds, also while the window is hidden in the tray. Every GDI object (
HDC,HBITMAP,HFONT) is released after each frame, so the icon can be refreshed endlessly without leaking handles.
🪟 UI & Stability Fixes
- Preferences in their own window instead of a menu popup, so the sensor drop-down stays open while you pick a value.
- Graceful instance handover: starting a second copy asks the running one to shut down cleanly (named event + console-close handler) instead of killing it, so fans and the CPU limit are always restored.
- Demo mode is strictly opt-in (
--demo); the simulated SMC is never entered automatically and the demo never touches the real power plan. - Configuration robustness: a UTF-8 BOM in
config.jsonno longer wipes your settings, and impossible CPU-scaling values are repaired automatically. - Opt-in debug logging:
--debugwriteswmf-control.lognext to the executable; nothing is logged during normal use.
📦 Included in the release archive
wmf-control.exe— release binary, x64 (manifest requests administrator privileges)inpoutx64.dll— Apple T2 MMIO physical memory driver (must stay next to the executable)README.md,LICENSE,driver-license.txt
⬆️ Updating to v1.4.0
- Quit WMF Control from the tray icon — this hands the fans back to the SMC and restores any CPU frequency limit.
- Download
WMF-Control-T2-v1.4.0-win64.zipbelow and extract it over your installation folder (e.g.%LOCALAPPDATA%\Programs\WMFControl). Keepinpoutx64.dllnext towmf-control.exe. - Start
wmf-control.exeonce as administrator so the Task Scheduler autostart entry is re-registered with the new path. - Settings are migrated automatically —
config.jsonstays in%APPDATA%\WMF Control\. New keys (tray_show_temp,cpu_thermal_scaling_*,cpu_app_profiles) are filled with safe defaults on first start.
Rolling back to v1.3.0 is safe: the new configuration keys are simply ignored by the older build.
SHA-256 (wmf-control.exe): 26070485D1FB199FC5DE2610337B34C51DB19271E036CC6C4CA7E21DEBF5E05E