I’m struggling to get hibernation working. My system is LUKS-encrypted and with the help of SDB:Encrypted root file system - openSUSE Wiki the partitions are decrypted fine with the key file. But resuming from hibernation does not work, no matter what I tried so far.
The swap partition is decrypted on boot just fine (SWAP is available afterwards)
# lsblk -o +uuid | grep -iE 'n1p3|swap'
└─nvme0n1p3 259:3 0 15.5G 0 part 0a77e4b4-ecfe-495f-b66b-2554bcd320f8
└─cr_swap 254:1 0 15.5G 0 crypt [SWAP] 8589e972-0658-4809-9814-c5e188534da9
# grep resume /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="splash=silent resume=UUID=8589e972-0658-4809-9814-c5e188534da9 quiet randomize_kstack_offset=off mitigations=auto ibt=off"
# cat /etc/crypttab
cr_root UUID=767692ec-d630-4b20-8377-01f5605076bf /.root.key
cr_swap UUID=0a77e4b4-ecfe-495f-b66b-2554bcd320f8 /.root.key
# cat /etc/dracut.conf.d/99-swap-partition.conf
add_device+=" UUID=0a77e4b4-ecfe-495f-b66b-2554bcd320f8 "
# grep swap /etc/fstab
UUID=8589e972-0658-4809-9814-c5e188534da9 swap swap defaults 0 0
In the journal of the previous boot, when hibernating, I see:
[...]
Jul 02 09:36:52 local systemd[1]: Reached target Sleep.
Jul 02 09:36:52 local dns-dnsmasq.sh[5235]: <debug> NETWORKMANAGER_DNS_FORWARDER is not set to "dnsmasq" in /etc/sysconfig/network/config -> exit
Jul 02 09:36:52 local systemd[1]: Starting Hibernate...
Jul 02 09:36:52 local dns-dnsmasq.sh[5250]: <debug> NETWORKMANAGER_DNS_FORWARDER is not set to "dnsmasq" in /etc/sysconfig/network/config -> exit
Jul 02 09:36:52 local kernel: PM: Image not found (code -22)
Jul 02 09:36:52 local systemd-sleep[5254]: INFO: running /usr/lib/systemd/system-sleep/grub2.sleep for hibernate
Jul 02 09:36:52 local systemd-sleep[5254]: INFO: Running prepare-grub ..
Jul 02 09:36:53 local systemd-sleep[5254]: running kernel is grub menu entry openSUSE Tumbleweed (vmlinuz-6.3.9-1-default)
Jul 02 09:36:53 local systemd-sleep[5254]: preparing boot-loader: selecting entry openSUSE Tumbleweed, kernel /boot/6.3.9-1-default
Jul 02 09:36:53 local systemd-sleep[5254]: running /usr/sbin/grub2-once "openSUSE Tumbleweed"
Jul 02 09:36:53 local systemd-sleep[5254]: time needed for sync: 0.1 seconds, time needed for grub: 0.2 seconds.
Jul 02 09:36:53 local systemd-sleep[5254]: INFO: Done.
Jul 02 09:36:53 local systemd-sleep[5233]: Entering sleep state 'hibernate'...
Jul 02 09:36:53 local kernel: PM: hibernation: hibernation entry
In the boot journal after hibernation:
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x0009f000-0x000fffff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x5df99000-0x5e898fff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x631c4000-0x631c4fff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x6321d000-0x63310fff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x63317000-0x63317fff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x674af000-0x692fefff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x692ff000-0x69b2efff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x69b2f000-0x69bfefff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x69c00000-0x737fffff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0x73800000-0xfe00ffff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0xfe010000-0xfe010fff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0xfe011000-0xfed1ffff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0xfed20000-0xfed7ffff]
Jul 02 09:37:34 local kernel: PM: hibernation: Registered nosave memory: [mem 0xfed80000-0xffffffff]
What am I mixing up here?