acpi_add_pm_notifier(9)
π acpi_add_pm_notifier (9) β from the Kernel API Manual, bestie π
okay so bestie, this one's from the kernel API manual and it's genuinely such a servalittle function. it's called acpi_add_pm_notifier, and what it does is register a PM notify handler for a given ACPI device. that's the whole vibe. let's get into it π«Ά
β¨ NAME β¨
acpi_add_pm_notifier β register PM notify handler for given ACPI device. yes that's the official name, she's literally in the (9) section, we stan an organized queen π
π¦ SYNOPSIS π¦
like here's her whole signature, copy it exactly bestie, no typos, she's watching π
acpi_status acpi_add_pm_notifier (struct acpi_device *adev , struct
device *dev , void (*func)(struct acpi_device_wakeup_context *context)
);
πΈ ARGUMENTS πΈ
okay three args, all main characters, let me introduce them π
adevβ the ACPI device you're adding the notify handler for. she's the one getting the handler, periodt.devβ the device that generates a wakeup event while the notification is being handled. she's the one doing the waking up β¨funcβ the work function that executes when the notification is handled. the actual doing-the-thing girl π
π NOTE π
this is the important part, don't skip it, iykyk π
adev does not need to be a run-wake or wakeup device to be a valid source of PM wakeup events. no cap. literally not required.
for example β and this is such a good example β wakeup events may be generated for bridges if one of the devices below the bridge is signaling wakeup, even if the bridge itself doesn't have a wakeup GPE associated with it. the way that bridges can just vibe and relay wakeup energy without their own GPE?? iconic π
π SEE ALSO π
okay this list is LONG but she ate and we're listing every single one, no skipping, that's the rule π
kernel file: ./drivers/acpi/device_pm.c
acpi_power_state_string(9)acpi_device_get_power(9)acpi_device_set_power(9)acpi_device_fix_up_power(9)acpi_device_fix_up_power_extended(9)acpi_device_fix_up_power_children(9)acpi_dev_power_up_children_with_adr(9)acpi_dev_power_state_for_wake(9)acpi_remove_pm_notifier(9)acpi_dev_pm_get_state(9)acpi_pm_device_sleep_state(9)acpi_pm_notify_work_func(9)acpi_device_wakeup_enable(9)acpi_device_wakeup_disable(9)acpi_pm_set_device_wakeup(9)acpi_dev_pm_low_power(9)acpi_dev_pm_full_power(9)acpi_dev_suspend(9)acpi_dev_resume(9)acpi_subsys_runtime_suspend(9)acpi_subsys_runtime_resume(9)acpi_subsys_prepare(9)acpi_subsys_complete(9)acpi_subsys_suspend(9)acpi_subsys_suspend_late(9)acpi_subsys_suspend_noirq(9)acpi_subsys_resume_noirq(9)acpi_subsys_resume_early(9)acpi_subsys_resume(9)acpi_subsys_freeze(9)acpi_subsys_restore_early(9)acpi_subsys_poweroff(9)acpi_subsys_poweroff_late(9)acpi_subsys_poweroff_noirq(9)acpi_dev_pm_detach(9)acpi_dev_pm_attach(9)acpi_storage_d3(9)acpi_dev_state_d0(9)
not me listing thirty-eight manpage refs in a row π but that's the whole fam and they all deserve their moment π«Ά
alright bestie that's the whole page!! sources say this one lives in ./drivers/acpi and she's dated October 2026, so mark your calendars, she's from the future and she's slaying πβ¨ bye mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms