locked
Power Management API Issues in Windows Vista RRS feed

  • Question

  • In previous version of windows, we call "ReadProcessorPwrScheme()" to retrieve the processor power policy settings, then modify the DynamicThrottle field (may be PO_THROTTLE_ADAPTIVE, PO_THROTTLE_CONSTANT, PO_THROTTLE_DEGRADE or PO_THROTTLE_NONE) of ProcessorPolicyAC or ProcessorPolicyDC in MACHINE_PROCESSOR_POWER_POLICY structure, and set the new processor power policy with "WriteProcessorPwrScheme()" to switch the processor performance.

    But in Windows Vista, these two APIs are no longer available. Though the documentation says they are supported in Windows Vista, you may find that they can just be called in previous version of windows if you see their declaration in the header file "PowrProf.h".

    I also tried "CallNtPowerInfomation()" to retrieve processor information, processor power policy AC or DC, but never succeed.

    I wonder how I can control the processor throttle in Windows Vista as previous version of windows.

    Thanks

    Thursday, October 12, 2006 9:33 AM

Answers

  • 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 the new APIs be used on Vista and above.

     

    To give some background, in 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 PowerSetActiveScheme must be called 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]

    Thursday, February 21, 2008 9:56 PM

All replies

  • I am facing the same issue any workarounds?

     SS7E1983 wrote:
    In previous version of windows, we call "ReadProcessorPwrScheme()" to retrieve the processor power policy settings, then modify the DynamicThrottle field (may be PO_THROTTLE_ADAPTIVE, PO_THROTTLE_CONSTANT, PO_THROTTLE_DEGRADE or PO_THROTTLE_NONE) of ProcessorPolicyAC or ProcessorPolicyDC in MACHINE_PROCESSOR_POWER_POLICY structure, and set the new processor power policy with "WriteProcessorPwrScheme()" to switch the processor performance.

    But in Windows Vista, these two APIs are no longer available. Though the documentation says they are supported in Windows Vista, you may find that they can just be called in previous version of windows if you see their declaration in the header file "PowrProf.h".

    I also tried "CallNtPowerInfomation()" to retrieve processor information, processor power policy AC or DC, but never succeed.

    I wonder how I can control the processor throttle in Windows Vista as previous version of windows.

    Thanks

    Tuesday, November 21, 2006 8:22 AM
  • same here. does anyone know how to set processor power policy in desktop? or, is the setting of processor power policy supported by desktop CPU?
    Tuesday, February 19, 2008 2:23 AM
  • 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 the new APIs be used on Vista and above.

     

    To give some background, in 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 PowerSetActiveScheme must be called 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]

    Thursday, February 21, 2008 9:56 PM