Power Manager Suspend Timeouts
A version of this page is also available for
The sample Power Manager implementation maintains a development workstation based on the system power source, user activity, and system activity.
The sample Power Manager implements configurable timeouts for transitioning between OS power states. Because Power Manager is designed to be customized by the OEM, the following description may not apply to all Windows Mobile devices. OEMs control how and when Power Manager changes system power states.
The following registry values control system power state transitions for the sample Power Manager.
These DWORD values are stored in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\Timeouts registry key. A value of zero indicates that no timeout occurs. The sample implementation does not provide a method for bypassing OS power states. However, OEMs may choose to do so.
Several legacy registry settings in the HKEY_CURRENT_USER\ControlPanel\Power registry can override the timeout specified in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\Timeouts registry key. 3rd party applications should avoid using legacy registry settings but, if it is necessary to modify the Display, BatteryTimeout, or ACTimeout legacy registry settings, the setting should be reset back to its original value after the application closes.
For Power Manager to actively manage system power states, these settings must be present in the registry. The decision to manage system power is based on the presence of ACUserIdle.
To prevent conflicts between the Graphics, Windowing, and Events Subsystem (GWES) and Power Manager, you must disable GWES power management. When Power Manager is actively managing system power, it may restrict applications from entering arbitrary system power states.
You can reset the system state transition timers by creating a named auto-reset event called _T("PowerManager/ReloadActivityTimeouts") and calling SetEvent on the handle of that event. This instructs Power Manager to read transition timer settings again from the Timeouts registry key.