How does Linux move from an awake machine to a hibernating one? How does it then manage to restore all state? These questions led me to read way too much C in trying to figure out how this particular hardware/software boundary is navigated. Linux's Bedtime Routine https://tookmund.com/2024/09/hibernation-preparation#linux#goodreads#opensource
@fredbrooker Both Linux and macOS achieve faster boot times by starting all services in the background. Some serious engineering work goes into it, for sure. I believe there is some work done recently for FreeBSD 14, too.
@nixCraft I went through a bunch of grief getting hibernate to work on Ubuntu, turns out that some distros *really* don't want you using hibernate.
What I think did it was (1) follow the arch wiki stuff so your bootloader has a good resume value (2) check /sys/power/resume (2) fix up /etc/systemd/logind.conf with s/suspend/suspend-then-hibernate (3) fuck around with /var/lib/polkid-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla and /usr/share/polkit-1/rules.d/com.ubuntu.desktop.rules