Power Management in Windows Vista
Stephen, a program manager on the Windows Kernal team, posted a response to a question in the General Windows Vista Development Issues forum, and I thought it could bear repeating here. The original question was about how to control the processor throttle in Windows Vista. Apparently, some of the calls that used to work in an application geared to Windows XP were not acting the same way in Windows Vista. Here's Stephen's response:
Windows Vista and Windows Server 2008 use a new power policy infrastructure and API. This page details all the power APIs and indicates what is supported by the various Windows versions:
http://msdn2.microsoft.com/en-us/library/aa373163(VS.85).aspx
While some of the older APIs are supported in Vista, it is recommended that you use the new APIs on Windows Vista and later versions.
To give some background, in Windows Vista a power plan (sometimes called a power scheme) contains the power setting values that are actually in effect on the system. A power plan is uniquely identified by a GUID and contains an AC and DC values for each power setting. There can only be one power plan active at a time on the system. The current plan can be obtained using the PowerGetActiveScheme.
Like power plans, power settings are also identified by unique GUIDs and include a friendly name, description, allowable values, and default values for AC and DC. Power setting values can be modified using the PowerWriteACValueIndex and PowerWriteDCValueIndex routines. Note that you must call PowerSetActiveScheme after modifying any of the power settings in order to activate the new values.
Specifically to your question, there are two settings that allow you to adjust the minimum and maximum state for processor power management. These are expressed as a percentage of the maximum processor frequency. Here is a summary of these two settings:
|
Description |
Minimum processor performance state. The performance state is specified as a percentage of maximum processor frequency. |
|
GUID |
893dee8e-2bef-41e0-89c6-b55d0929964c |
|
PowerCfg Alias |
PROCTHROTTLEMIN |
|
Minimum Value |
0 |
|
Maximum Value |
100 |
|
Label |
Percentage (%) |
|
Hidden |
No |
|
Description |
Maximum processor performance state. The performance state is specified as a percentage of maximum processor frequency. |
|
GUID |
bc5038f7-23e0-4960-96da-33abaf5935ec |
|
PowerCfg Alias |
PROCTHROTTLEMAX |
|
Minimum Value |
0 |
|
Maximum Value |
100 |
|
Label |
Percentage (%) |
|
Hidden |
No |
Additional information on Vista power policy is described in detail in the following whitepaper:
http://www.microsoft.com/whdc/system/pnppwr/powermgmt/PMpolicy_Vista.mspx
Cheers,
Stephen [Microsoft]
Eliot works in the Windows Support and Technology (Developer Content) group in the Windows Experience Division. He is currently working on HTML5 specifications with the W3C.