suspend_enter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, this is suspend_enter β€” and it's literally the function that makes the system enter the given sleep state. that's the whole vibe. πŸ’€

(this one lives in the Kernel API Manual, iykyk πŸ‘‘)


🌸 SYNOPSIS 🌸

int suspend_enter (suspend_state_t state , bool *wakeup );

like, that's it. two args, one int coming back at you. no cap. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • state β€” the system sleep state you wanna enter. that's the one, the target, the main character of this call πŸ’…
  • wakeup β€” a bool *, and it returns info saying the sleep state should not be re-entered. so it's a little out-param telling you "bestie, don't go back in there" πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

This function should be called after devices have been suspended. that's the rule, that's the assignment, and the way that ordering matters is honestly iconic. devices first, then you enter the sleep state. in that order. periodt. πŸ”₯


🌈 SEE ALSO 🌈

Kernel file ./kernel/power/suspend.c β€” plus the whole friend group:

like, go read those too, they're all part of the same little power-management squad fr fr 🫢


⭐ tiny reminder: suspend_enter goes after the devices are already suspended. that's the whole point. don't skip ahead. πŸ’–

and that's the page, bestie!! this one shipped out of ./kernel/power, all cute and dated October 2026, and it's suspend_enter(9) through and through β€” mwah πŸ’‹πŸ§šπŸ’œ

πŸ“¦ where this page comes from