Repository navigation
feat: Support Windows 11 EcoQoS (Efficiency Mode) for live processes and persistent rules #66
Description
Problem Statement
Process Lasso power users migrating to ThreadPilot frequently rely on persistent per-process Windows 11 Efficiency Mode (EcoQoS). On modern hybrid CPU architectures (e.g., Intel Alder Lake / Raptor Lake with P-cores and E-cores), running secondary or background applications (browsers, music players, communication tools, background sync services) under EcoQoS:
- Coalesces thread timers and disables execution speed boost.
- Instructs the Windows scheduler / Intel Thread Director to prioritize Gracemont/Crestmont Efficiency cores.
- Reduces package power draw, fan acoustics, and thermal headroom contention for foreground games and performance-critical workloads.
Currently, ThreadPilot allows configuring CPU priority classes (e.g. BelowNormal), memory priority, I/O priority, and explicit E-core CPU affinity / CPU Sets. It also includes a global registry tweak (PowerThrottlingOff). However, it lacks native Win32 Quality of Service (QoS) power throttling tagging at the process level.
Proposed Solution
Add first-class EcoQoS / Efficiency Mode support to ThreadPilot for live processes and persistent rules:
1. Win32 Native Layer (Platforms/Windows/)
Add P/Invoke definitions for SetProcessInformation / GetProcessInformation using ProcessPowerThrottling:
[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_POWER_THROTTLING_STATE
{
public uint Version;
public uint ControlMask;
public uint StateMask;
}
public static class ProcessPowerThrottlingNativeMethods
{
public const uint PROCESS_POWER_THROTTLING_CURRENT_VERSION = 1;
public const uint PROCESS_POWER_THROTTLING_EXECUTION_SPEED = 0x1;
public const uint PROCESS_POWER_THROTTLING_IGNORE_TIMER_RESOLUTION = 0x4;
public const int ProcessPowerThrottling = 4; // ProcessInformationClass
}Implement IProcessEcoQoSService / ProcessEcoQoSService with:
Task<bool> SetEcoQoSAsync(int processId, bool enable)Task<bool?> GetEcoQoSAsync(int processId)
2. Models & Rule Persistence (Models/PersistentProcessRule.cs)
Add rule persistence properties:
public bool? EcoQoS { get; init; }
public bool ApplyEcoQoSOnStart { get; init; }Integrate with PersistentRuleAutoApplyService and PersistentRulesEngine so matching processes automatically receive EcoQoS when launched alongside affinity, priority, memory priority, and I/O priority.
3. User Experience (Process View & Rules)
- Context Menu: Add
Efficiency Mode (EcoQoS)->[Enable / Disable]and support it inSave as rule/Apply now. - Process List / Summary: Display an Efficiency Mode indicator or badge (similar to Task Manager's leaf badge) when EcoQoS is detected.
- Rule Management: Include an EcoQoS toggle in the rule creation/edit dialog.
- Localization: Add dictionary strings across
Locales/*.xaml.
Alternatives Considered
- Relying solely on CPU Affinity (E-Core mask): Restricting affinity to E-cores confines threads physically, but does not configure hardware autonomous Energy Performance Preference (EPP), aggressive DVFS downclocking, or timer resolution coalescing.
- External CLI / IFEO hooks (e.g., procgov): Requires external services or static IFEO registry hooks that fail on modern auto-updating applications installed in version-stamped paths.
Impact Areas
- Process management & automation engine
- Win32 P/Invoke native layer
- Persistent process rules schema
- UI (Process view context menus, rule editor, localization)
Activity
PrimeBuild-pc commentedon Oct 14, 2026
Thanks for the detailed write-up — this fits ThreadPilot well: we already call
SetProcessInformationfor memory priority, and persistent rules already follow theValue?+Apply…OnStartpattern, so EcoQoS slots in naturally. I'm picking it up. A few adjustments to the proposal, with the reasoning:1. Three states, not two. The
SetProcessInformationdocs define three distinct cases forPROCESS_POWER_THROTTLING_EXECUTION_SPEED:ControlMask = EXECUTION_SPEED, StateMask = EXECUTION_SPEED→ EcoQoS (efficiency mode on)ControlMask = EXECUTION_SPEED, StateMask = 0→ HighQoS (throttling explicitly off)ControlMask = 0, StateMask = 0→ system managed (Windows' own heuristics)The "explicitly off" case is useful in its own right for the same audience: it stops Windows from throttling a game or encoder that loses focus. So the model will be a small enum (
SystemManaged/On/Off) rather than abool, stored in rules asEfficiencyMode?+ApplyEfficiencyModeOnStartlike the other settings.2. It will not lower CPU priority by itself. Task Manager's "Efficiency mode" does two things: it lowers the base priority to Low and sets EcoQoS. ThreadPilot already controls CPU priority separately, so we keep the two independent (you can combine them in one rule) and say so in the tooltip. Otherwise people coming from Task Manager would expect a priority change that doesn't happen.
3. No
IGNORE_TIMER_RESOLUTIONin the first version. It's listed in the constants but the proposed API doesn't use it, and it's a separate behavior with its own trade-offs. It can follow later if someone needs it.4. Show the state for the selected process, not as a list column. Reading the throttling state needs an open handle per process. Doing that for every row on each refresh is real overhead, so the state is shown in the selected process's details (and set from the context menu / details panel).
5. Interaction with the global
PowerThrottlingOfftweak. When the system-wide power-throttling tweak is enabled, Windows power throttling is turned off globally, so a per-process EcoQoS request may have little or no effect. ThreadPilot will flag this instead of silently looking broken.6. Known limits. The rule is applied when the process starts, like priority and affinity. Applications that manage their own QoS (Chromium-based browsers do this for background processes) may change it later. Protected or anti-cheat processes can refuse
PROCESS_SET_INFORMATION, and you'll get the usual access-denied message. On Windows 10 the same call marks the process as LowQoS (EcoQoS only exists on Windows 11), so it still works there, with a smaller effect.I'll link the PR here when it's up.
PrimeBuild-pc commentedon Oct 14, 2026
Implementation is up in #69: three-state efficiency mode (Windows decides / On / Off) for live processes and persistent rules, with the points above applied. It also includes a real Set/Get round-trip test against the Windows API.
PrimeBuild-pc commentedon Oct 14, 2026
@SA-Mousavichashmi a test build is ready. Could you try it on your hybrid CPU? We don't have a machine with E-cores, so your result decides whether this ships as is.
Download: ThreadPilot 1.7.7-beta.1 (pre-release). It installs over 1.7.x and keeps your settings. The SHA256 checksum is in the release.
It contains efficiency mode as discussed above (Windows decides / On / Off, for running processes and in saved rules). It also has a redesigned interface, so things may look different.
What would help most
Please include your CPU model and Windows build (
winver) with the results. Screenshots are welcome. Thanks!SA-Mousavichashmi commentedon Oct 16, 2026
Hi @PrimeBuild-pc,
I've completed thorough hardware testing of v1.7.7-beta.1 on an Intel hybrid CPU. Here are the empirical findings:
Environment
20abf70)1. Live Process QoS & Thread Director Migration
ControlMask=0x0, StateMask=0x0).2. Persistent Rules & Startup Application
EfficiencyMode: OnandApplyEfficiencyModeOnStart: true.PersistentRulesEnginedetected the new process and auto-applied EcoQoS (ControlMask=0x1, StateMask=0x1) at ~1.5s after launch.persistent_rules.jsonwere preserved without any corruption.3. Decoupling from CPU Priority
Normal(Win32NORMAL_PRIORITY_CLASS). This is a huge ergonomic improvement over Task Manager, which forcesLowpriority.4. Edge Cases & Global Tweak Warning
PowerThrottlingOffregistry tweak check: the warning banner is clear and prevents confusion when system-wide throttling overrides per-process settings.The implementation is rock solid on Alder Lake hybrid architecture. From my side, this is fully verified and ready to ship in 1.7.7!
PrimeBuild-pc commentedon Oct 16, 2026
Thanks @SA-Mousavichashmi for the hardware validation! EcoQoS is now available in stable v1.7.7: https://github.com/PrimeBuild-pc/ThreadPilot/releases/tag/v1.7.7 . This stable build does not include experimental Game Boost.
For users who want to help test Game Boost, there is a separate opt-in v1.7.8-beta.1 pre-release: https://github.com/PrimeBuild-pc/ThreadPilot/releases/tag/v1.7.8-beta.1 . Its notes explain the pending dual-CCD Ryzen/X3D, supported Intel hybrid, benchmark and anti-cheat validation, with quick test steps and an issue-reporting checklist. EcoQoS validation and Game Boost validation are separate. v1.7.7 remains the latest stable release.