Skip to content

[Feature]: Efficiency Mode (EcoQoS) helper #220

Closed

Description

@ryanlua

feature proposal

Windows offers developers the ability to opt into EcoQoS which allows better app battery efficiency.

App opted into EcoQoS in the Task Manager
Image

Using SetProcessInformation and SetThreadInformation developers use EcoQoS but the code requires interop.

Example App.xaml.cs using CsWin32 for interop

    public App()
    {
        InitializeComponent();

        PROCESS_POWER_THROTTLING_STATE powerThrottling = new()
        {
            ControlMask = PInvoke.PROCESS_POWER_THROTTLING_EXECUTION_SPEED,
            StateMask = PInvoke.PROCESS_POWER_THROTTLING_EXECUTION_SPEED,
            Version = PInvoke.PROCESS_POWER_THROTTLING_CURRENT_VERSION
        };

        // Set the process power throttling to efficiency mode
        unsafe
        {
            _ = PInvoke.SetProcessInformation(PInvoke.GetCurrentProcess(),
                PROCESS_INFORMATION_CLASS.ProcessPowerThrottling, &powerThrottling,
                (uint)sizeof(PROCESS_POWER_THROTTLING_STATE));
        }

        // Set the process priority to idle
        _ = PInvoke.SetPriorityClass(PInvoke.GetCurrentProcess(), PROCESS_CREATION_FLAGS.IDLE_PRIORITY_CLASS);
    }

This issue proposes a helper to opt into EcoQoS more easily in DevWinUI.

Additional context

Code used in my app to opt into EcoQoS:
https://github.com/ryanlua/auraclick/blob/9bed6da6869b0ccae3fb95cda527a7ffb06569ef/AuraClick/App.xaml.cs

Activity

  1. added
    enhancement
    on Oct 10, 2026
  2. added a commit that references this issue on Oct 10, 2026
  3. ghost1372 commented on Oct 10, 2026

    @ghost1372
    Owner

    Thank you, Done.
    d119443

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions