Upgrade to .NET 10 and add GPU keep-off-on-battery feature#2
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.NET 10 upgrade (
fe8d459a)net8.0-windowstonet10.0-windowsContextMenuambiguityMicrosoft.CSharp/Microsoft.Win32.SystemEvents(now in shared framework)Keep discrete GPU powered off on battery (
1b6ee60a)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 downTesting
🤖 Generated with Claude Code