pm_request_idle(9)
π€ pm_request_idle β kernel API manual, bestie edition π€
okay so this one lives in the Kernel API Manual (section 9, the kernel-functions girlies) and it's genuinely such a mood. It's pm_request_idle, and it's all about queuing up an idle check for a device instead of doing it right this second. Lowkey iconic of it. β¨
πΈ NAME πΈ
pm_request_idle β Queue up "idle check" execution for a device.
Like, you're not doing the idle check, you're putting it in the queue so it happens later. Delegation queen behavior fr fr. π
π SYNOPSIS π
int pm_request_idle (struct device *dev );
(yes the return type is int, yes it takes a struct device *, yes the spacing is exactly like that, don't come for me π
)
π¦ ARGUMENTS π¦
devβ Target device. The one device you're being all "go to sleep bestie" about. π€
β¨ DESCRIPTION β¨
So here's the tea: pm_request_idle queues up a work item π§ that will run the equivalent of pm_runtime_idle for dev asynchronously. Asynchronously!! Meaning it does not happen right now, it happens whenever the work item gets its turn. It's giving "I'll get to it, I promise" energy, but like, in a reliable kernel way. π«Ά
π₯ RETURN π₯
The return values, and there are a lot of them, so buckle up buttercup:
0β Success. Slay. π-EINVALβ Runtime PM error. π-EACCESβ Runtime PM disabled. The door is locked, no entry. π-EAGAINβ Runtime PM usage counter non-zero, Runtime PM status change ongoing, or the device is not inRPM_ACTIVEstate. Three whole reasons in one code, main character energy honestly. π-EBUSYβ Runtime PMchild_countnon-zero. The children said "not today". πΆ-EPERMβ Device PM QoS resume latency 0. π«-EINPROGRESSβ Suspend already in progress. Somebody already asked, bestie, wait your turn. β³-ENOSYSβCONFIG_PMnot enabled. The whole subsystem is simply not here. β
π SEE ALSO π
All my bestie syscalls and friends (iykyk) π β and the kernel file lives at ./include/linux/pm_runtime.h:
pm_suspend_ignore_children(9)pm_runtime_get_noresume(9)pm_runtime_put_noidle(9)pm_runtime_suspended(9)pm_runtime_active(9)pm_runtime_status_suspended(9)pm_runtime_enabled(9)pm_runtime_blocked(9)pm_runtime_has_no_callbacks(9)pm_runtime_mark_last_busy(9)pm_runtime_is_irq_safe(9)pm_runtime_idle(9)pm_runtime_suspend(9)pm_runtime_autosuspend(9)pm_runtime_resume(9)pm_request_resume(9)pm_request_autosuspend(9)pm_runtime_get(9)pm_runtime_get_sync(9)pm_runtime_resume_and_get(9)pm_runtime_put(9)__pm_runtime_put_autosuspend(9)pm_runtime_put_autosuspend(9)pm_runtime_put_sync(9)pm_runtime_put_sync_suspend(9)pm_runtime_put_sync_autosuspend(9)pm_runtime_set_active(9)pm_runtime_set_suspended(9)pm_runtime_disable(9)pm_runtime_use_autosuspend(9)pm_runtime_dont_use_autosuspend(9)
ngl the whole "queue it up and walk away" thing is such a vibe, but remember: async means you don't get to know exactly when it goes down. π
and that's the page!! π sign-off time: this one ships from ./include/linux and it's dated October 2026 β so go forth, queue your idle checks, and stan responsible runtime PM. periodt. π
π¦π
π¦ 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