pm_request_idle(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’€ 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 in RPM_ACTIVE state. Three whole reasons in one code, main character energy honestly. 😭
  • -EBUSY β€” Runtime PM child_count non-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_PM not 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:


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