Hi,
I have been using EndeavourOS on my laptop for over a year with satisfaction. However these days I wanted to configure hibernation. I have EOS In dual boot with W11 (no secure boot) on a btrfs partition encrypted with luks, I use grub as bootloader. I use zram for swap (I have 40GB of ram and 16 of swap). So I created a new 50GB partition for swap and encrypted it with luks.
My goal is that this partition is automatically decrypted at boot (obviously after I manually opened the root partition) and that it is used only for hibernation.
I created a key to open the swap partition and added the partition to /etc/crypttab so that it is automatically opened by systemd and I also added it to /etc/fstab.
Then I added to GRUB_CMDLINE_LINUX_DEFAULT resume=UUID=UUID_OF_SWAP_PARTITION
and created the configuration /etc/dracut.conf.d/resume.conf like this:
add_dracutmodules+=" resume crypt "
install_items+=" KEY_OF_SWAP_PARTITION_PATH "
Then I regenerated the initramfs and the grub configuration, but I get this error when I try to hibernate the system:
Call to Hibernate failed: Specified resume device is missing or is not an active swap device
I’m pretty sure that the swap partition is decrypted fine automatically because from swapon --show
I get:
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 16G 0B 100
/dev/dm-1 partition 50G 0B -2
where /dev/dm-1 corresponds to /dev/mapper/swap_luks, the mount point of the partition (/dev/mapper/swap_luks and /dev/dm-1 have the same UUID, so I think it’s a simple link.)
What am I doing wrong? How can I get hibernation working?
If it helps here are some logs:
>$ journalctl -b -1 -k | grep -i "resume\\|swap\\|hibernate\\|luks\\|dm-1\\|panic"
giu 02 15:47:25 host kernel: Command line: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=eb80cf8c-c9a5-XXXX-XXXX-7c08272ff5f5 rw rootflags=subvol=@ quiet splash nowatchdog nvme_load=YES rd.luks.uuid=b9c87837-05f4-XXXX-XXXX-51dec062a99b loglevel=3 resume=UUID=5e749008-2986-XXXX-XXXX-6defea28bf4f
giu 02 15:47:25 host kernel: Kernel command line: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=eb80cf8c-c9a5-XXXX-XXXX-7c08272ff5f5 rw rootflags=subvol=@ quiet splash nowatchdog nvme_load=YES rd.luks.uuid=b9c87837-05f4-XXXX-XXXX-51dec062a99b loglevel=3 resume=UUID=5e749008-2986-XXXX-XXXX-6defea28bf4f rd.luks.name=5e749008-2986-XXXX-XXXX-6defea28bf4f=swap_luks
giu 02 15:47:25 host kernel: Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
giu 02 15:47:25 host kernel: simple-framebuffer simple-framebuffer.0: [drm] Registered 1 planes with drm panic
giu 02 15:47:25 host kernel: zswap: loaded using pool zstd/zsmalloc
giu 02 15:47:25 host systemd[1]: Reached target Swaps.
giu 02 15:49:41 host kernel: BTRFS: device fsid eb80cf8c-c9a5-XXXX-XXXX-7c08272ff5f5 devid 1 transid 276180 /dev/mapper/luks-b9c87837-05f4-XXXX-XXXX-51dec062a99b (253:0) scanned by mount (752)
giu 02 15:46:26 host systemd[1]: Reached target Block Device Preparation for /dev/mapper/luks-b9c87837-05f4-XXXX-XXXX-51dec062a99b.
giu 02 15:46:26 host systemd[1]: Reached target Block Device Preparation for /dev/mapper/swap_luks.
giu 02 15:46:26 host systemd[1]: Activating swap /dev/mapper/swap_luks...
giu 02 15:46:26 host systemd[1]: Clear Stale Hibernate Storage Info was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-XXXX-XXXX-6d876050dc67).
giu 02 15:46:26 host kernel: Adding 52426748k swap on /dev/mapper/swap_luks. Priority:-2 extents:1 across:52426748k SS
giu 02 15:46:26 host systemd[1]: Activated swap /dev/mapper/swap_luks.
giu 02 15:46:27 host kernel: Adding 16777212k swap on /dev/zram0. Priority:100 extents:1 across:16777212k SSDsc
giu 02 15:46:43 host init: Command 'write /proc/sys/kernel/panic_on_oops 1' action=init (/system/etc/init/hw/init.rc:227) took 0ms and failed: Unable to write to file '/proc/sys/kernel/panic_on_oops': open() failed: Read-only file system
Thanks for any help
sim