Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/sys/class/wakeup

FieldValue
SubsystemPM wakeup sources statistics class (wakeup_source tracking), Contact Tri Vo in the ABI file; implementation file not in cached tree
Config gatenot verifiable from the cached sources (cached tree has no Kconfig or driver files); class absent on the live host
ABI documentationDocumentation/ABI/testing/sysfs-class-wakeup (11 What entries)
SinceJune 2019 (all entries; no KernelVersion lines stated in the file)
Live (5.10.134 host)class absent: not in live-sys/class-list.txt, no /sys/class/wakeup
Ledger IDSYSC-wakeup

What it represents

Pointers to all wakeup sources in the kernel at a given moment. A wakeup source is any entity that can prevent autosleep or abort a suspend; every wakeup event in the system is accounted here. The class is the aggregated statistics view - counts and durations - while the decision surface for whether a given device may wake the system lives elsewhere, in the per-device power/wakeup file documented in sysfs-devices-power.

Relationship to the device model

Each directory under the class corresponds to one struct wakeup_source. Wakeup sources are registered both by the device core (for devices that can signal wakeup events) and by kernel subsystems for software sources, so the directories are not a one-to-one view of physical devices: they are the set of active accounting objects. All attributes are read-only counters and timestamps; nothing here enables or disables anything.

Attributes

AttributeR/WUnit/formatConditional?Source
.../nameROwakeup source namewakeup sourceABI, June 2019
.../active_countROtimes the wakeup source was activatedwakeup sourceABI, June 2019
.../event_countROnumber of signaled wakeup eventswakeup sourceABI, June 2019
.../wakeup_countROnumber of times the source might abort suspendwakeup sourceABI, June 2019
.../expire_countROnumber of times the source’s timeout expiredwakeup sourceABI, June 2019
.../active_time_msROms continuously active; 0 if inactivewakeup sourceABI, June 2019
.../total_time_msROms total time activewakeup sourceABI, June 2019
.../max_time_msROms longest continuous active periodwakeup sourceABI, June 2019
.../last_change_msROmonotonic ms time of last touchwakeup sourceABI, June 2019
.../prevent_suspend_time_msROms spent preventing autosleepwakeup sourceABI, June 2019

Safety and writes

Purely observational: every documented attribute is read-only, so there is no write path, no capability requirement and no risk of changing power behavior through this class. It answers “who woke the machine and for how long” - the data behind wakeup debugging on Android-derived systems (the ABI contact is from the Android team). To change wakeup behavior, use the per-device /sys/devices/.../power/wakeup enabled/disabled control (ABI sysfs-devices-power, January 2009) instead; that file exists only for devices capable of generating system wakeup events.

References

  • Documentation/ABI/testing/sysfs-class-wakeup (cached copy; 11 What entries)
  • Documentation/ABI/testing/sysfs-devices-power (per-device wakeup control, cached copy)
  • Implementation: not in cached tree
  • Coverage: ledger
  • Live check: /sys/class/wakeup absent (kernel 5.10.134, read-only enumeration)