Skip to content
Fredrik Orderud edited this page Jan 26, 2024 · 13 revisions

Power management fundamentals

Information sources

Per-battery pack information:

  • Battery charge level and other metadata.
  • AC vs. DC power status.

These are both provided by the battery miniclass driver. HW vendors using "standard" battery packs can usually use the in-built ACPI cmbatt.sys driver included in Windows. However, HW vendors relying on custom battery pack integration might also need to develop a custom miniclass driver.

Windows Battery and charging documentation.

Power configuration

Use "Power Options" UI or Powercfg.

Device compatibility

All relevant devices need to be plug-n-play compatible and power-management aware. The associated device driver need to provide the following:

  • Mapping between system power state (S0-S5) and device power state (D0-D3).
  • Save and restore context state for the HW when transitioning between device power states.

This means that most applications doesn't need to think about power management, since all devices are automatically powered on & off without applications noticing it.