EnergyStar
EnergyStar copied to clipboard
Is there a version for Windows 10, or is Windows 10 available
I don't think it's possible since Windows 10 lacks the API EnergyStar relies on (EcoQoS).
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
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
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
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.
OK, I commented out the limit code, the application is running now. I will follow up the application's performance.
thanks for your explanation.