I just nuked my CachyOS install for the third time, this time to fix an alignment issue with LUKS that was severely hampering my SSD speeds (over 50% of the performance was being lost!). Now I want to see if I can get hibernating working on this new installation.
I know that there is a way to get it set up on my machine, as on Tumbleweed hibernate would show up. I also know that there exists a guide for systems that are not encrypted. However, I would like to enable hibernate for those rare trips where sleep won’t cut it, and by default CachyOS just doesn’t do that. Does anyone know how I can enable hibernate on CachyOS when FDE is in play?
the kernel must know where the swap space is
1.1) put resume=/path/to/swap
also must the resume hook be set in /etc/mkinitcpio.conf
2.1) check /etc/mkinitcpio.conf if is set
2.2) if isn’t set add the hook and regenerate the initramfs with sudo mkinitcpio -P
I just recently did this, you may also need to set this parameter if that isn’t enough:
systemd.zram=0 - zram will ignore the swap partition and swap to compressed memory instead. For some reason even if you have a swap partition mounted, hibernation will fail when zram is enabled. If you fiddle around with the priority of the swap with swapon you may get it to work with both, but “The Internet” seemed pretty certain that zram and hibernation don’t play nicely together.
Also, because of a known regression in the kernel (see this thread) if you have an intel laptop you may need to add:
module_blacklist=intel_hid as well - WARNING, this may disable some of your hot keys - you have been warned
(There are other ways to blacklist kernel modules - see the Arch Wiki - this was just the easiest.)
Oh, one other possible thing, erm, let me run test first…
[edit]
Nope, all good, I was tinkering with zswap, but can still hibernate.
[/edit]