pm_runtime_forbid(9)
π pm_runtime_forbid(9) β like, the kernel API manual bestie β¨
okay so real quick before we dive in: this is a page from the Kernel API Manual, and the star of the show is pm_runtime_forbid(9). yes that's the whole title. she's a function. she's iconic. let's go π
πΈ NAME πΈ
pm_runtime_forbid β block runtime PM of a device. that's it. that's the vibe. a little bouncer for your device's power management, and she is NOT letting anyone in π
β¨ SYNOPSIS β¨
void pm_runtime_forbid (struct device *dev );
literally one argument. one. we love a low-maintenance queen π«Ά
π§ ARGUMENTS π§
devβ the device you're handling. like, the one you're about to put in timeout. just hand her over and let the function do its thing π
π DESCRIPTION π
okay so here's the tea, bestie π
pm_runtime_forbid resumes dev if it's already suspended β yes, she wakes it up first, respectfully β and then blocks runtime suspend of dev. so the device can't just yeet itself into a low-power nap whenever it feels like it.
and here's the cute part: this block is unblockable in a very specific way. you can undo it via the /sys/devices/.../power/control interface, or otherwise by calling pm_runtime_allow. two doors out. pick one πͺβ¨
lowkey important: calling this function many times in a row has the same effect as calling it once. so like, spamming it does nothing extra. no stacking, no combo multiplier, no cap. she's idempotent and she knows it π
π¦ SEE ALSO π¦
the whole squad, fr fr. every single one of these:
- Kernel file
./drivers/base/power/runtime.c update_pm_runtime_accounting(9)pm_runtime_deactivate_timer(9)pm_runtime_cancel_pending(9)rpm_check_suspend_allowed(9)pm_runtime_release_supplier(9)__rpm_callback(9)rpm_callback(9)rpm_idle(9)rpm_suspend(9)rpm_resume(9)pm_runtime_work(9)pm_suspend_timer_fn(9)pm_schedule_suspend(9)__pm_runtime_idle(9)__pm_runtime_suspend(9)__pm_runtime_resume(9)pm_runtime_get_conditional(9)pm_runtime_get_if_active(9)pm_runtime_get_if_in_use(9)__pm_runtime_set_status(9)__pm_runtime_barrier(9)pm_runtime_barrier(9)pm_runtime_enable(9)devm_pm_runtime_set_active_enabled(9)devm_pm_runtime_enable(9)devm_pm_runtime_get_noresume(9)pm_runtime_allow(9)pm_runtime_no_callbacks(9)pm_runtime_irq_safe(9)update_autosuspend(9)pm_runtime_set_autosuspend_delay(9)__pm_runtime_use_autosuspend(9)pm_runtime_init(9)pm_runtime_reinit(9)pm_runtime_remove(9)pm_runtime_get_suppliers(9)pm_runtime_put_suppliers(9)pm_runtime_drop_link(9)pm_runtime_force_suspend(9)pm_runtime_force_resume(9)
like I said. the whole squad. screenshot it, memorize it, whatever ππ₯
and that's the page, bestie!! this little number lives in ./drivers/base/power and it's dated October 2026 β so she's from the future, of course she is πβ¨ go forth and forbid some runtime PM, iykyk ππ
π¦ 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