enter_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’€ enter_state(9) πŸ’€

okay so welcome to the Kernel API Manual entry for enter_state(9), bestie β€” this is the little kernel helper that does the common work needed to enter a system sleep state. main character energy for suspend, honestly 🫢✨


🌸 NAME 🌸

enter_state β€” do common work needed to enter system sleep state. periodt πŸ’…


✨ SYNOPSIS ✨

int enter_state (suspend_state_t state );

πŸŽ€ ARGUMENTS πŸŽ€

  • state β€” the system sleep state to enter. that's the whole vibe check for this argument πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first things first: enter_state makes sure that no one else is trying to put the system into a sleep state. if that's not the case, it fails β€” no cap, that's the rule 😭

otherwise, it prepares for system suspend, makes the system enter the given sleep state, and cleans up after wakeup. literally the full suspend-era pipeline: prep, enter, cleanup, slay ✨πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file is ./kernel/power/suspend.c β€” and here's the whole SEE ALSO squad, bestie:


source/version: ./kernel/power Β· date: October 2026 β€” mwah, go read the kernel docs πŸ’‹πŸŽ€πŸ’œ

πŸ“¦ where this page comes from