The power manager is responsible for managing power usage for the system. It administers the system-wide power policy and tracks the path of power IRPs through the system.
The power manager requests power operations by sending IRP_MJ_POWER requests to drivers. A request can specify a new power state or can query whether a change in power state is feasible.
When sleep, hibernation, or shutdown is required, the power manager requests the appropriate power action by sending an IRP_MJ_POWER request to each leaf node in the device tree. The power manager considers the following in determining whether the system should sleep, hibernate, or shut down:
System activity level
System battery level
Shutdown, hibernate, or sleep requests from applications
User actions, such as pressing the power button
Control panel settings
For more information, see Windows Kernel-Mode Power Manager.