Platform SDK: Hardware |
To the user, the system appears to be either on or off. There are no other detectable states. However, you should be aware that the system supports these power states. The following table lists the power states from highest to lowest power consumption.
Power State | Description |
---|---|
Working | The system is fully usable; power saving occurs on a per-device basis. Devices that are not in use can save power by entering a lower power state. |
Sleeping | Appears to be off. Power consumption is reduced to one of several levels of power consumption, depending on how the system is to be used. The lower the level of power consumption, the more time it takes the system to return to the working state. |
Soft Off | Appears to be off. Very low power consumption. The working context can be restored if it is stored on nonvolatile media. |
Mechanical Off | No power consumption. The system returns to the working state only after a full reboot. |
Applications that assume the system is always in the working state can inadvertently keep it from entering a lower power state. To avoid this, applications should watch for the WM_POWERBROADCAST message. WM_POWERBROADCAST notifies applications of changes in the power state. The Sleeping State
There are different levels in the sleeping state. The following table shows the system sleep states and their corresponding advanced configuration and power interface (ACPI) and advanced power management (APM) states.
System Sleep State | ACPI State | APM State |
---|---|---|
PowerSystemWorking | S0 | Working |
PowerSystemSleeping1 | S1 | SUSPEND |
PowerSystemSleeping2 | S2 | SUSPEND |
PowerSystemSleeping3 | S3 | SUSPEND |
PowerSystemHibernate | S4 | SUSPEND |
It takes longer to restore a system from a lower power state than from a higher power state because of the extra work the hardware may have to do (stabilize power supply, reinitialize the processor, and so forth). By default, the system will use the lowest sleeping state supported by all enabled wake-up devices, within the specified latency requirements. To set the default sleep state, the user can use the Power Management control panel application. An application can specify its latency requirements using the RequestWakeupLatency function.
After the system has selected the sleeping state the system will enter, it requests permission to enter the sleeping state from all applications, using the PBT_APMQUERYSUSPEND event. If no applications deny the request, the system broadcasts it to the drivers by using IRP_MJ_POWER and IRP_MN_QUERY_POWER. If any drivers deny the request, the system requests the next highest sleeping state, until a sleep state is successfully entered or there are no more available sleep states. The user can configure the system to take one of the following actions if the requested sleep state is higher than the preferred sleep state: