#include <IOKit/pwr_mgt/RootDomain.h>
IOKit/pwr_mgt/RootDomain.h
Types for PM Assertions
For creating, releasing, and getting PM assertion levels.
typedefIOPMDriverAssertionType
IOPMDriverAssertionType
A bitfield describing a set of assertions. May be used to specify which assertions
to set with <link>IOPMrootDomain::createPMAssertion</link>; or to query which
assertions are set with <link>IOPMrootDomain::releasePMAssertion</link>.
typedef uint64_t IOPMDriverAssertionType
typedefIOPMDriverAssertionID
IOPMDriverAssertionID
Drivers may create PM assertions to request system behavior (keep the system awake,
or keep the display awake). When a driver creates an assertion via
<link>IOPMrootDomain::createPMAssertion</link>, PM returns a handle to
the assertion of type IOPMDriverAssertionID.
typedef uint64_t IOPMDriverAssertionID
macrokIOPMUndefinedDriverAssertionID
#define kIOPMUndefinedDriverAssertionID 0
typedefIOPMDriverAssertionLevel
IOPMDriverAssertionLevel
Possible values for IOPMDriverAssertionLevel are <link>kIOPMDriverAssertionLevelOff</link>
and <link>kIOPMDriverAssertionLevelOn</link>
typedef uint32_t IOPMDriverAssertionLevel
macrokIOPMDriverAssertionLevelOff
#define kIOPMDriverAssertionLevelOff 0
macrokIOPMDriverAssertionLevelOn
#define kIOPMDriverAssertionLevelOn 255
enum(anonymous)
Flags for get/setSleepSupported()
| kRootDomainSleepNotSupported | 0 | |
| kRootDomainSleepSupported | 1 | |
| kFrameBufferDeepSleepSupported | 2 | |
| kPCICantSleep | 4 |
macrokRootDomainSupportedFeatures
IOPMrootDomain registry property keys
#define kRootDomainSupportedFeatures "Supported Features"
macrokRootDomainSleepReasonKey
#define kRootDomainSleepReasonKey "Last Sleep Reason"
macrokRootDomainSleepOptionsKey
#define kRootDomainSleepOptionsKey "Last Sleep Options"
macrokIOPMRootDomainWakeReasonKey
#define kIOPMRootDomainWakeReasonKey "Wake Reason"
macrokIOPMRootDomainWakeTypeKey
#define kIOPMRootDomainWakeTypeKey "Wake Type"
macrokIOPMRootDomainPowerStatusKey
#define kIOPMRootDomainPowerStatusKey "Power Status"
macrokIOPMClamshellSleepKey
Possible sleep reasons found under kRootDomainSleepReasonsKey
#define kIOPMClamshellSleepKey "Clamshell Sleep"
macrokIOPMPowerButtonSleepKey
#define kIOPMPowerButtonSleepKey "Power Button Sleep"
macrokIOPMSoftwareSleepKey
#define kIOPMSoftwareSleepKey "Software Sleep"
macrokIOPMOSSwitchHibernationKey
#define kIOPMOSSwitchHibernationKey "OS Switch Sleep"
macrokIOPMIdleSleepKey
#define kIOPMIdleSleepKey "Idle Sleep"
macrokIOPMLowPowerSleepKey
#define kIOPMLowPowerSleepKey "Low Power Sleep"
macrokIOPMThermalEmergencySleepKey
#define kIOPMThermalEmergencySleepKey "Thermal Emergency Sleep"
macrokIOPMMaintenanceSleepKey
#define kIOPMMaintenanceSleepKey "Maintenance Sleep"
macrokIOPMRootDomainLidCloseCString
String constants for communication with PM CPU
#define kIOPMRootDomainLidCloseCString "LidClose"
macrokIOPMRootDomainBatPowerCString
#define kIOPMRootDomainBatPowerCString "BatPower"
macrokIOPMRootDomainShutdownTime
String constants to use as keys for a dictionary passed to IOPMRootDomain::claimSystemShutdownEvent
#define kIOPMRootDomainShutdownTime "IOPMShutdownTime"
enum(anonymous)
Supported Feature bitfields for IOPMrootDomain::publishFeature()
| kIOPMSupportedOnAC | 1 | |
| kIOPMSupportedOnBatt | 2 | |
| kIOPMSupportedOnUPS | 4 |
enum(anonymous)
Supported run mode bitfields for IOPMrootDomain::requestRunMode()
| kIOPMRunModeFullWake | 18446744073709551615 |
typedefIOPMSettingControllerCallback
typedef IOReturn (*)(OSObject *, const OSSymbol *, OSObject *, uintptr_t) IOPMSettingControllerCallback;
functionregisterSleepWakeInterest
IONotifier * registerSleepWakeInterest(IOServiceInterestHandler, void *, void * = NULL)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IOPMrootDomain.cpp
Registers a general-interest handler with the power management root domain for system sleep/wake notifications (kIOMessageSystemWillSleep, kIOMessageCanSystemSleep, kIOMessageSystemWillPowerOn, kIOMessageSystemHasPoweredOn, ...). self is passed to the handler as its target and ref as its refCon. For messages that require a response the handler must call acknowledgeSleepWakeNotification or vetoSleepWakeNotification with the notification's refcon. Returns an IONotifier whose remove method cancels the registration.
functionregisterPrioritySleepWakeInterest
IONotifier * registerPrioritySleepWakeInterest( IOServiceInterestHandler handler, void * self, void * ref = NULL )
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IOPMrootDomain.cpp
Registers a priority-interest handler (gIOPriorityPowerStateInterest) with the power management root domain; such handlers are notified of system power state changes ahead of general-interest clients registered with registerSleepWakeInterest. handler is invoked with self as target and ref as refCon. Returns an IONotifier whose remove method cancels the registration.
functionacknowledgeSleepWakeNotification
IOReturn acknowledgeSleepWakeNotification(void *)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IOPMrootDomain.cpp
Acknowledges an in-progress sleep/wake interest notification, allowing the root domain power change to proceed without waiting for the notification timeout; calls allowPowerChange on the root domain. PMrefcon is the refcon delivered with the notification message.
functionvetoSleepWakeNotification
IOReturn vetoSleepWakeNotification(void * PMrefcon)
▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu iokit/Kernel/IOPMrootDomain.cpp
Vetoes a pending sleep/wake interest notification by calling cancelPowerChange on the root domain, refusing the power change; effective for messages that may be refused, such as kIOMessageCanSystemSleep. PMrefcon is the refcon delivered with the notification message.
macroIOPM_ROOTDOMAIN_REV
#define IOPM_ROOTDOMAIN_REV 2