EnergyStar icon indicating copy to clipboard operation
EnergyStar copied to clipboard

Is there a version for Windows 10, or is Windows 10 available

Open Dukecccp opened this issue 2 years ago • 6 comments

Dukecccp avatar Aug 18 '22 08:08 Dukecccp

I don't think it's possible since Windows 10 lacks the API EnergyStar relies on (EcoQoS).

shanoaice avatar Aug 22 '22 13:08 shanoaice

EnergyStar does two things for processes that don't need performance:

One is to set the process to PROCESS_POWER_THROTTLING_EXECUTION_SPEED. If it is a Windows 10 system, it is marked as LowQoS. Windows 11 is EcoQoS. Processes marked as LowQoS select the most efficient CPU frequency and schedule to efficient cores only when using battery. Processes marked with EcoQoS always choose the most efficient CPU frequency and schedule to efficient cores.

The second is to set the process to IDLE_PRIORITY_CLASS. The thread of the process that is set to IDLE_PRIORITY_CLASS only runs when the system is idle.

in conclusion: Windows 10 1709 and above, except that EcoQoS is not supported, all others are supported.

Reference documentation: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setprocessinformation

https://docs.microsoft.com/en-us/windows/win32/procthread/quality-of-service

zqhong avatar Aug 24 '22 03:08 zqhong

I wrote a tool that integrates ryzenadj and EnergyStar called RyzenTuner.

Since version 1.2.1, a function similar to EnergyStar has been built in, which supports Windows 10 and above.

Project URL: https://github.com/zqhong/RyzenTuner

zqhong avatar Aug 25 '22 15:08 zqhong

EnergyStar does two things for processes that don't need performance:

One is to set the process to PROCESS_POWER_THROTTLING_EXECUTION_SPEED. If it is a Windows 10 system, it is marked as LowQoS. Windows 11 is EcoQoS. Processes marked as LowQoS select the most efficient CPU frequency and schedule to efficient cores only when using battery. Processes marked with EcoQoS always choose the most efficient CPU frequency and schedule to efficient cores.

The second is to set the process to IDLE_PRIORITY_CLASS. The thread of the process that is set to IDLE_PRIORITY_CLASS only runs when the system is idle.

in conclusion: Windows 10 1709 and above, except that EcoQoS is not supported, all others are supported.

Reference documentation: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setprocessinformation

https://docs.microsoft.com/en-us/windows/win32/procthread/quality-of-service

if (Environment.OSVersion.Version.Build < 22000)
{
    Console.WriteLine("E: You are too poor to use this program.");
    Console.WriteLine("E: Please upgrade to Windows 11 22H2 for best result, and consider ThinkPad Z13 as your next laptop.");
    // ERROR_CALL_NOT_IMPLEMENTED
    Environment.Exit(120);
}     

From my knowledge, Windows 10 Version.Build less than 22000

weifeng12x avatar Aug 29 '22 14:08 weifeng12x

if (Environment.OSVersion.Version.Build < 22000)
{
    Console.WriteLine("E: You are too poor to use this program.");
    Console.WriteLine("E: Please upgrade to Windows 11 22H2 for best result, and consider ThinkPad Z13 as your next laptop.");
    // ERROR_CALL_NOT_IMPLEMENTED
    Environment.Exit(120);
}     

From my knowledge, Windows 10 Version.Build less than 22000

As mentioned in the article below, EcoQoS was introduced in Windows 11 Preview Build 21359.

https://devblogs.microsoft.com/performance-diagnostics/introducing-ecoqos/

In the article below, LowQoS has been supported since Windows 10 1709. The system version of the computer I am using is Windows 10 Build 17763, and there is no error in calling the ToggleEfficiencyMode method. I have not actually tested whether it actually affects the battery life. From the official documentation, it is recommended to use the latest version of Windows 11, which has the best support for EcoQoS.

https://github.com/imbushuo/EnergyStar/blob/18872289ac4de7d22208f1fc5b156abaa904dff8/EnergyStar/EnergyManager.cs#L81-L86

https://docs.microsoft.com/en-us/windows/win32/procthread/quality-of-service

In conclusion: Windows 10 1709 and above, except that EcoQoS is not supported, all others are supported.

Going back to the summary of my first reply, I think it's ok.

zqhong avatar Aug 29 '22 15:08 zqhong

OK, I commented out the limit code, the application is running now. I will follow up the application's performance.

thanks for your explanation.

weifeng12x avatar Aug 29 '22 15:08 weifeng12x