When a device is asked to suspend, it is being asked to remain powered to the point that RAM is in a self-refresh state where an interrupt can wake the device. The suspend process can occur in three ways:
The GwesPowerOff function performs key operations before a device can suspend.
To suspend a device
- Notify the Taskbar that the device is being suspended.
Post the WM_POWERBROADCAST message with the flag PBT_APMSUSPEND. Only the registered Taskbar will get this message.
- Abort calibration if the calibration screen is up and in one of the following states:
- Waiting at cross hairs.
- If calibration was waiting at confirmation.
- Turn off window message queues, stopping the processing of messages.
- Determine if the Startup UI screen needs to appear on resume.
- Save video RAM to system RAM is necessary to preserve state on resume.
- Call SetSystemPowerState with the arguments (NULL, POWER_STATE_SUSPEND, POWER_FORCE). This calls into the power manager that coordinates the rest of the suspend operation. At this point, GwesPowerOff is not completed until the system resumes.
- Power manager performs the following actions:
- The kernel performs the following final steps to suspend:
See Also
Kernel States | Enabling Power Management | Debugging and Testing
Send Feedback on this topic to the authors
Feedback FAQs