Skip to content

feat: Support Windows 11 EcoQoS (Efficiency Mode) for live processes and persistent rules #66

Closed

Description

@SA-Mousavichashmi

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 in Save 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

  1. 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.
  2. 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

  1. PrimeBuild-pc commented on Oct 14, 2026

    @PrimeBuild-pc
    Owner

    Thanks for the detailed write-up — this fits ThreadPilot well: we already call SetProcessInformation for memory priority, and persistent rules already follow the Value? + Apply…OnStart pattern, 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 SetProcessInformation docs define three distinct cases for PROCESS_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 a bool, stored in rules as EfficiencyMode? + ApplyEfficiencyModeOnStart like 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_RESOLUTION in 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 PowerThrottlingOff tweak. 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.

  2. PrimeBuild-pc commented on Oct 14, 2026

    @PrimeBuild-pc
    Owner

    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.

  3. PrimeBuild-pc commented on Oct 14, 2026

    @PrimeBuild-pc
    Owner

    @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

    1. Live process: start something CPU-heavy that runs in the background, for example a compression benchmark or a long encode. In ThreadPilot go to Processes, select it, set Efficiency to On and click Apply. Watch per-core load in HWiNFO or Task Manager (Performance → CPU → Change graph to → Logical processors). Does the work move to the E-cores and do the clocks drop? Then set it to Off and check that it goes back.
    2. Saved rule: with the process selected, click Save as rule, or set Efficiency mode in Rules → Process rules. Restart the process and check that the mode is applied again. The Activity page logs every change.
    3. Combined with priority: Task Manager's efficiency mode also lowers priority. Does Efficiency On + CPU priority Low in ThreadPilot behave like Task Manager's mode on your machine?
    4. Anything odd: errors in Activity, a protected or anti-cheat process refusing, apps that undo it on their own (browsers do this for their background processes), or the warning about the Power Throttling tweak.

    Please include your CPU model and Windows build (winver) with the results. Screenshots are welcome. Thanks!

  4. SA-Mousavichashmi commented on Oct 16, 2026

    @SA-Mousavichashmi
    ContributorAuthor

    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

    • CPU: 12th Gen Intel(R) Core(TM) i5-12500H (12 Cores / 16 Threads: 4 P-Cores / 8 Threads [Cores 0–7] + 8 E-Cores / 8 Threads [Cores 8–15])
    • OS: Windows 11 Pro 64-bit (Build 26300.9711)
    • Test Build: ThreadPilot v1.7.7-beta.1 (20abf70)

    1. Live Process QoS & Thread Director Migration

    • Efficiency Mode: On (EcoQoS):
      • Windows Thread Director immediately demotes/schedules worker threads to the Gracemont E-cores (Cores 8–15).
      • Clocks drop to the E-core base/boost envelope (~2.0–2.5 GHz), and power draw drops substantially. In a controlled multi-thread compute benchmark, throughput dropped from ~15.8M ops/sec to ~4.15M ops/sec (-73.7%), showing that power throttling is taking full effect.
    • Efficiency Mode: Off (HighQoS):
      • Threads instantly migrate back to P-cores (Cores 0–7) with full turbo boost (up to ~4.5 GHz). Windows does not downclock or throttle the process even when the window loses focus.
    • System Managed (Windows Decides):
      • Reverts cleanly to default Windows dynamic heuristics (ControlMask=0x0, StateMask=0x0).

    2. Persistent Rules & Startup Application

    • Created persistent rules with EfficiencyMode: On and ApplyEfficiencyModeOnStart: true.
    • Upon launching the target executable, ThreadPilot's PersistentRulesEngine detected the new process and auto-applied EcoQoS (ControlMask=0x1, StateMask=0x1) at ~1.5s after launch.
    • The Activity tab logged the application event cleanly, and existing rules in persistent_rules.json were preserved without any corruption.

    3. Decoupling from CPU Priority

    • Verified that setting Efficiency Mode: On keeps CPU Priority at Normal (Win32 NORMAL_PRIORITY_CLASS). This is a huge ergonomic improvement over Task Manager, which forces Low priority.
    • Combining Efficiency Mode: On + CPU Priority: Low in ThreadPilot perfectly reproduces Task Manager's compound behavior. Keeping them independent is definitely the right architectural decision.

    4. Edge Cases & Global Tweak Warning

    • Tested the PowerThrottlingOff registry tweak check: the warning banner is clear and prevents confusion when system-wide throttling overrides per-process settings.
    • Tested against Chromium background renderers: behavior is stable with no conflicts.
    • Protected/system processes handle access denial gracefully without UI freeze or crash.

    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!

  5. PrimeBuild-pc commented on Oct 16, 2026

    @PrimeBuild-pc
    Owner

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions