hibernation_snapshot(9)
π hibernation_snapshot(9) β kernel API manual, bestie edition π
okay so this is hibernation_snapshot(9), straight out of the Kernel API Manual, and it is literally the moment your computer goes "mmkay bestie, everyone freeze, we're making a memory image β¨". buckle up π
πΈ NAME πΈ
hibernation_snapshot β quiesce devices and create a hibernation image. that's the whole vibe. devices get quiet, image gets made, slay π
β¨ SYNOPSIS β¨
int hibernation_snapshot (int platform_mode );
π¦ ARGUMENTS π¦
platform_modeβ if it's set, use the platform driver to prepare for the transition. if it's not setβ¦ don't. that's the whole rule, no cap π«Ά
π DESCRIPTION π
okay so this routine must be called with system_transition_mutex held. like, that's not a suggestion, that's the assignment. hold the mutex, then call the function. periodt π₯
β οΈ for real though β no system_transition_mutex held? that's a you problem, not a function problem, and the manual is very clear about it π
π SEE ALSO π
π«Ά the kernel file it lives in:
./kernel/power/hibernate.c
and the whole friend group of related functions β go say hi to all of them:
pm_hibernation_mode_is_suspend(9)hibernation_set_ops(9)platform_begin(9)platform_end(9)platform_pre_snapshot(9)platform_leave(9)platform_finish(9)platform_pre_restore(9)platform_restore_cleanup(9)platform_recover(9)swsusp_show_speed(9)create_image(9)resume_target_kernel(9)hibernation_restore(9)hibernation_platform_enter(9)power_down(9)hibernate(9)hibernate_quiet_exec(9)software_resume_initcall(9)
like, that's a full squad. iykyk π«
okay that's the whole page, mwah π β this one lives in ./kernel/power, dated October 2026, and honestly? iconic of it. go hold that system_transition_mutex and make some good choices π§ββοΈβπ
π¦ 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