TLDR Web Dev · MISCELLANEOUS

LINUX'S BEDTIME ROUTINE

tookmund.com28 min read

Summary from the TLDR Web Dev newsletter

This article presents an overview of how Linux hibernates, focusing on the initial steps leading up to the system freeze. It starts by examining the system files /sys/power/state and /sys/power/disk, which serve as entry points for debugging and controlling hibernation. It then explores the autosleep mechanism, a feature borrowed from Android, which automatically suspends or hibernates the system when it's inactive. Finally, it goes over the steps involved in preparing the system for hibernation, including locking the system, preparing the console, notifying power management components, and synchronizing filesystems to disk.