__pm_relax(9)
π __pm_relax β the "okay bestie, we're done here" call π
So this is __pm_relax from the Kernel API Manual, section 9 β it's a kernel function, and honestly? It's the chill one. Let me tell you about it π«Ά
β¨ NAME β¨
__pm_relax β the function that tells the PM core "okay, the wakeup event is handled, processing has ended, we can all breathe now" π
No cap, that's literally its whole job: notify the PM core that processing of a wakeup event has ended.
π SYNOPSIS π
void __pm_relax (struct wakeup_source *ws );
Void return, one pointer in, no drama. Periodt. β¨
πΈ ARGUMENTS πΈ
wsβ the wakeup source object that's associated with the source of the event. Like, which thing woke us up. That's the one you hand over π¦
π¦ DESCRIPTION π¦
Okay so the vibe: you call this function for wakeup events whose processing started with a call to __pm_stay_awake. It's the matching end-of-story call β you stayed awake for this event, now you're relaxing the grip on it. Iconic pairing, honestly π
And the best part? It is safe to call it from interrupt context π₯ Like, yes, go ahead, do it from an IRQ handler, it's fine, it's built for that. Main character energy for real.
β SEE ALSO β
Everything below lives in the kernel file ./drivers/base/power/wakeup.c β go read the source, bestie, it's giving lore π
wakeup_source_create(9)wakeup_source_destroy(9)wakeup_source_add(9)wakeup_source_remove(9)wakeup_source_register(9)wakeup_source_unregister(9)wakeup_sources_read_lock(9)wakeup_sources_read_unlock(9)wakeup_sources_walk_start(9)wakeup_sources_walk_next(9)device_wakeup_attach(9)device_wakeup_enable(9)device_wakeup_attach_irq(9)device_wakeup_detach_irq(9)device_wakeup_arm_wake_irqs(9)device_wakeup_disarm_wake_irqs(9)device_wakeup_detach(9)device_wakeup_disable(9)device_set_wakeup_capable(9)device_set_wakeup_enable(9)wakeup_source_not_usable(9)wakeup_source_activate(9)wakeup_source_report_event(9)__pm_stay_awake(9)pm_stay_awake(9)wakeup_source_deactivate(9)pm_relax(9)pm_wakeup_timer_fn(9)pm_wakeup_ws_event(9)pm_wakeup_dev_event(9)pm_wakeup_pending(9)pm_get_wakeup_count(9)pm_save_wakeup_count(9)pm_wakep_autosleep_enabled(9)print_wakeup_source_stats(9)wakeup_sources_stats_seq_show(9)bpf_wakeup_sources_read_lock(9)bpf_wakeup_sources_read_unlock(9)bpf_wakeup_sources_get_head(9)
Side note: yeah,pm_wakep_autosleep_enabled(9)really has thatpin it in the list β we don't fix typos here, we report them with love π
π Sign-off π
That's the whole page, bestie β short and sweet, from the ./drivers/base/power corner of the kernel world, in the October 2026 edition of the Kernel API Manual. Slay, go relax a wakeup source πβ¨π§
π¦ 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