Hibernate with LUKS (albeit after a lot of hacking) works pretty well on Debian Buster. I've resumed and hibernated for many cycles with no issues. Wifi comes back etc. It never used to be the case, in my experience at least
Hibernation is a very nice feature (I use it for laptop and desktop machines) and it requires a swap partition. Also, a encrypted swap is even more important in this scenario.
In the laptop I'm typing this, swap is one of the partions over a LVM2 physical volume over LUKS.
I am aware of this. Plus there are constant power attacks when one disconnects the disk while the system is suspended when the key is unlocked on the disk.
But this is a development machine and I figured out that surprisingly non-trivial overhead of LUKS encryption in Linux is not worth it. On the plus side wake up from hibernation is very fast and to mitigate the risk of the above I configured the laptop to hibernate shortly after suspend.
I've run both a Secure Boot/encrypted boot partition NixOS and plain LVM on LUKS archlinux on my Framework and neither had any issues or bugs with hibernating. Just add a resume hook to mkinitcpio and a kernel parameter to the UUID of the swap vol and it works fine.
When I had Manjaro on a desktop machine, hibernation worked out of the box and pretty well. I didn't use it that frequently though. But this was without full system encryption.
I use it too it's not hard to setup and works well (with very few exceptions and if you use a "recent" enough linux kernel, depending on your hardware).
Once hibernation is setup just set systemd [Login]HandleLidSwitch=suspend-then-hibernate and maybe configure the delay with [Sleep]HibernateDelaySec=5min.
Hibernation most times works nice too (even with Full Disk Encryption (FDE)) there is just one gotcha, lockdown mode is currently fundamentally incompatible with hibernation (even through it's docs seem to imply something else, they refer to a not yet existing feature). And some distros enable lockdown mode by default if you use a proper FDE setup. Leading to a lot of confusion about hibernation suposedly not working anymore in linux or being incompatible with FDE.
Yes. I agree. It seems to be getting harder to set up hibernate as an option. Regular (non HN) users might not even figure out that hibernate is a possibility. But it definitely is a better option than sleep.
The Linux kernel is huge, complex and particularly messy in terms of internal structure. This makes even otherwise trivial modifications hard, and complex modifications extremely hard. The development overhead is brutal.
And hibernation just happens to be a scenario that's a nightmare to implement with such a design.
no, they are not (uptimes measured in hours), on windows laptops hibernation has been working fine in windows for a few years. I don't know of any unix different from osx for which the same applies.
Servers and desktop are not really the point of discussion here.
TBF hibernation has never been entirely reliable under Linux due to hardware vendors being difficult (IIUC). Getting it working for me has typically involved trying to make sense of arcane kernel log messages. I never managed to on my current laptop.
I got hibernation working on my PopOS machine a while ago, but it took a lot of steps. The problem is that it requires a LOT of swap space. That machine has 32GB of RAM—and that means I have to have a dedicated swap partition at least that large to make it work.
Honestly, it would probably be easier to just run everything off a VM if having persistent states matters to you.
reply