Skip to content

Upgrade to .NET 10 and add GPU keep-off-on-battery feature#2

Merged
lenuswalker merged 2 commits into
processor-controllerfrom
claude/sweet-noether-8901f5
Jun 12, 2026
Merged

Upgrade to .NET 10 and add GPU keep-off-on-battery feature#2
lenuswalker merged 2 commits into
processor-controllerfrom
claude/sweet-noether-8901f5

Conversation

@lenuswalker

Copy link
Copy Markdown
Owner

Summary

.NET 10 upgrade (fe8d459a)

  • Retarget all 7 projects from net8.0-windows to net10.0-windows
  • Upgrade packages: Autofac 9.1.0, Humanizer 3.0.10, Markdig 1.2.0, ManagedNativeWifi 3.0.2, System.CommandLine 2.0.9 (stable), System.Management/ServiceController 10.0.9, and more
  • Rewrite CLI for the stable System.CommandLine API, preserving exit codes and validation behavior
  • Fix breaking changes: ManagedNativeWifi radio API rename, Humanizer namespace removal, .NET 10 WinForms ContextMenu ambiguity
  • Remove Microsoft.CSharp / Microsoft.Win32.SystemEvents (now in shared framework)
  • Held back deliberately: WPF-UI 2.1.0 (4.x is a ground-up UI redesign) and CsWin32 0.3.183 (newer generator rewrites P/Invoke signatures across driver code); both fully .NET 10 compatible
  • CI workflows, Inno Setup runtime installer (10.0.9), and READMEs updated

Keep discrete GPU powered off on battery (1b6ee60a)

  • New opt-in GPUKeepOffMonitorService: on battery, detects the dGPU waking into the Inactive state (powered on, nothing using it) and restarts the device so Windows powers it back down
  • Holds a single NVAPI session for the monitor loop lifetime — per-poll driver session init resets the GPU idle timer and keeps the GPU awake (this is also why the GPU previously only powered off while the dashboard was open)
  • Never touches the GPU when it is in active use, when a monitor is connected, or on AC; device restarts rate-limited to one per 3 minutes
  • Toggle: Dashboard → Discrete GPU → Deactivate GPU menu → "Keep powered off on battery"

Testing

  • Full Release build: 0 errors, 0 warnings; all three release binaries publish cleanly
  • CLI verified live over IPC against a running instance (feature list, quick actions, validation errors, exit-code mapping)
  • Runtime smoke tests for Autofac 9 (real app container), Humanizer 3 (all call shapes incl. localized output), Markdig 1.2 under Markdig.Wpf
  • GPU feature verified on battery with an RTX 3060 with the app running tray-only: spontaneous and induced (nvidia-smi) wakes settle back to powered-off within seconds; trace logs confirm no restart churn and no action while the GPU is in use

🤖 Generated with Claude Code

lenuswalker and others added 2 commits June 11, 2026 21:29
Retarget all projects from net8.0-windows to net10.0-windows and update
dependencies for compatibility:

- Autofac 9.1.0, Humanizer 3.0.10, Markdig 1.2.0, CoordinateSharp,
  ManagedNativeWifi 3.0.2, NAudio.Wasapi, Newtonsoft.Json, TaskScheduler,
  PixiEditor.ColorPicker, System.Management/ServiceController 10.0.9
- Migrate CLI to stable System.CommandLine 2.0.9 (SetAction/ParseResult API),
  preserving validation messages and exit codes
- Fix ManagedNativeWifi 3.0 rename (TurnOnRadio/TurnOffRadio)
- Fix Humanizer 3 namespace removal and net10 WinForms ContextMenu ambiguity
- Remove Microsoft.CSharp and Microsoft.Win32.SystemEvents (now in shared
  framework, NU1510)
- Hold WPF-UI at 2.1.0 (4.x is a breaking UI redesign) and CsWin32 at
  0.3.183 (newer generator changes P/Invoke signatures across driver code);
  both fully compatible with .NET 10
- Update CI workflows, Inno Setup runtime installer (10.0.9) and READMEs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New opt-in GPUKeepOffMonitorService: while on battery, polls the dGPU and,
if it wakes up powered-on but idle (Inactive), restarts the device so
Windows powers it back down. Never touches the GPU when something is
actively using it, when a monitor is connected to it, or on AC power.

The monitor holds a single NVAPI session for the lifetime of the loop --
opening a fresh driver session per poll resets the GPU runtime idle timer
and keeps the GPU awake, which is also why the GPU previously only powered
off while the dashboard was open. With the held session the GPU idles back
to D3 naturally within seconds and the device restart serves as a backstop,
rate-limited to one per 3 minutes.

Toggle lives in Dashboard > Discrete GPU > Deactivate GPU menu
("Keep powered off on battery"), persisted in settings.

Tested on battery with an RTX 3060: spontaneous and induced wakes settle
back to powered-off within seconds with the app running in the tray.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lenuswalker lenuswalker merged commit 1f940a3 into processor-controller Jun 12, 2026
1 check passed
@lenuswalker lenuswalker deleted the claude/sweet-noether-8901f5 branch June 12, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant