News for hackers. Stuff that matters.
Re:Ask HN: Why is the Linux community struggling to implemen... by hobonate on Thursday April 08, 2021 @05:16PM (#26743853)
Frustrated with my Fedora Linux configuration, I recently got hibernate to work with my Gentoo Linux system.

I have a LUKS (but not LVM) encrypted root and swap partition on /dev/sda3 and /dev/sda4 respectively.

I use the command "su && mount /boot && genkernel --luks initramfs" to generate the initramfs.

I give the initramfs the following parameters: "crypt_root=/dev/sda3 root=/dev/mapper/root crypt_swap=/dev/sda4 resume=/dev/mapper/swap". This makes my initramfs ask for my password for the partitions, then decrypt the partition, then mount them and resume from hibernation if possible.

I add this parameter by setting GRUB_CMDLINE_LINUX in /etc/default/grub, and then running "grub-mkconfig -o /boot/grub".

When I want to hibernate I use the following command: "exec loginctl hibernate". My window managers let me bind this to a keyboard combination.

I am using openrc as my init system (with elogind), and sway/GNOME as my window manager. The computer uses legacy BIOS (SeaBIOS) and the storage uses GUID partition table with the grub bootloader. Hope this helps.

Re:Ask HN: Why is the Linux community struggling to implemen... by ka0lin on Thursday April 08, 2021 @05:20PM (#26743888)
You should add this to the Gentoo Wiki.