Sleep and Wake in ACPI

How ACPI describes sleep states, wake sources, power methods, and the common debug path for instant wake, failed resume, and device wake bugs.

3 min read
ACPI Advanced cover

Sleep bugs are some of the most frustrating firmware bugs because the failure appears after the machine has already “worked.”

The system boots. Devices enumerate. Drivers load. Then the user closes the lid, presses power, or waits for idle sleep - and the machine refuses to sleep, wakes instantly, or resumes with broken devices.

ACPI is central to this path.

01 OS

OS chooses a sleep state

The OS decides whether to enter S3, S4, S5, or a modern standby style state depending on platform capability.

02 ACPI

OS evaluates methods and wake capabilities

Methods such as `_PTS`, `_GTS`, `_PRW`, `_DSW`, `_SxW`, `_PS3`, and `_PS0` may be involved.

03 PM Reg

Power management register transition

The OS writes PM control registers or platform-specific interfaces to enter the target state.

04 Wake

Wake source triggers resume

GPIO, GPE, power button, lid, EC, RTC, USB, or PCIe wake event brings the system back.

05 Resume

Firmware and OS restore devices

Devices must return to a consistent state before drivers continue operation.

Simplified ACPI sleep/wake path

ACPI objects commonly seen in sleep/wake debug

Item Value Note
_S3 / _S4 / _S5 Sleep state objects Legacy state descriptors used by OS power management.
_PTS Prepare To Sleep AML method called before entering a sleep state.
_WAK Wake method AML method called after waking.
_PRW Power Resources for Wake Describes wake capability and GPE/wake source.
_PS0 / _PS3 Device power methods Move a device between D0 and D3-like power states.
_ON / _OFF PowerResource methods Control shared rails or power resources.

Debug Diary: instant wake after S3

Symptom:

User selects sleep
Power LED blinks once
System wakes immediately
OS wake source: GPIO / ACPI / unknown

Debug path:

Check OS wake source log

Find ACPI device with wake capability

Inspect _PRW / GPIO wake descriptors

Check GPE or GPIO event status before sleep

Confirm event is cleared or masked properly

Common Pitfalls

  • _PRW points to the wrong GPE.
  • GPIO wake polarity is inverted.
  • EC query event is not cleared before sleep.
  • Device _PS3 turns off a rail needed by another wake device.
  • _WAK restores platform state too late.
  • S3 assumptions are reused on a platform that uses modern standby.

Sleep/wake debug checklist

Found this useful?

Save it or share it with someone learning firmware, BIOS/UEFI, and embedded systems.

Nội dung liên quan

Một số bài viết, ghi chú hoặc project có liên quan đến nội dung bạn vừa đọc.

Biến note thành bài viết hoàn chỉnh

Notes là nơi ghi nhanh khái niệm.