Hibernate to encrypted swap partition not working

Hello! I’ve started using EndeavourOS on my Framework laptop this year, and so far it’s been a fantastic experience! I can’t remember the last time I’ve had this much fun using my computer!

When I originally installed EndeavourOS, I set up an encrypted swap partition to use with hibernate. This setup worked without issue out of the box. A little while ago after running some updates, I noticed that the hibernate feature of my laptop has stopped working. When trying to hibernate, the system behaves normally and shuts down properly. However, when powering back on, the system behaves as if it is fully rebooting or starting up from a full shutdown.

I did some research, including browsing several posts made here on the forums, but haven’t been able to crack this nut quite yet. My issue seems most similar to this post, although this more recent post seems to be directly relevant; the solution in that post did not work for me, however.

Below is the output of some commands that I ran right after another failed hibernate attempt that I hope will prove useful:

>journalctl -b -u systemd-hibernate.service
-- No entries --
>journalctl -b -t systemd-sleep
-- No entries --
>journalctl -b | grep hiber
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x0009f000-0x000fffff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x39f99000-0x3a898fff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x3f926000-0x3f974fff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x3f979000-0x3f979fff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x434af000-0x452fefff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x452ff000-0x45b2efff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x45b2f000-0x45bfefff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x45c00000-0x49ffffff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x4a000000-0x4a2fffff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x4a300000-0x4a3fffff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x4a400000-0x4affffff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x4b000000-0x503fffff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0x50400000-0xfe00ffff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0xfe010000-0xfe010fff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0xfe011000-0xfed1ffff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0xfed20000-0xfed7ffff]
Dec 21 19:04:41 Framework kernel: PM: hibernation: Registered nosave memory: [mem 0xfed80000-0xffffffff]
Dec 21 19:04:41 Framework systemd-hibernate-resume-generator[126]: Reported hibernation image: ID=endeavouros kernel=6.6.7-arch1-1 UUID=c4972de0-265c-4c09-9615
-956aba86b840 offset=0
Dec 21 19:04:42 Framework systemd-hibernate-resume-generator[407]: Reported hibernation image: ID=endeavouros kernel=6.6.7-arch1-1 UUID=c4972de0-265c-4c09-9615
-956aba86b840 offset=0

>free -h
               total        used        free      shared  buff/cache   available
Mem:            31Gi       4.4Gi        24Gi       1.1Gi       3.5Gi        26Gi
Swap:           34Gi          0B        34Gi
>swapon --show
NAME      TYPE       SIZE USED PRIO
/dev/dm-1 partition 34.3G   0B   -2
>inxi -F
System:
  Host: Framework Kernel: 6.6.7-arch1-1 arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.27.10 Distro: EndeavourOS
Machine:
  Type: Laptop System: Framework product: Laptop v: AB
    serial: <superuser required>
  Mobo: Framework model: FRANBMCP0B v: AB serial: <superuser required>
    UEFI: INSYDE v: 03.17 date: 10/27/2022
Battery:
  ID-1: BAT1 charge: 51.6 Wh (100.0%) condition: 51.6/55.0 Wh (93.8%)
CPU:
  Info: quad core model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MT MCP
    cache: L2: 5 MiB
  Speed (MHz): avg: 480 min/max: 400/4700 cores: 1: 400 2: 1041 3: 400
    4: 400 5: 400 6: 400 7: 400 8: 400
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] driver: i915 v: kernel
  Display: x11 server: X.Org v: 21.1.10 driver: X: loaded: modesetting
    dri: iris gpu: i915 resolution: 2256x1504~60Hz
  API: EGL v: 1.5 drivers: iris,swrast platforms: x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 23.3.1-arch1.1
    renderer: Mesa Intel Xe Graphics (TGL GT2)
  API: Vulkan Message: No Vulkan data available.
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio driver: snd_hda_intel
  API: ALSA v: k6.6.7-arch1-1 status: kernel-api
  Server-1: PipeWire v: 1.0.0 status: active
Network:
  Device-1: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz driver: iwlwifi
  IF: wlan0 state: up mac: bc:09:1b:cc:fe:b1
Bluetooth:
  Device-1: Intel AX210 Bluetooth driver: btusb type: USB
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: BC:09:1B:CC:FE:B5 bt-v: 5.3
Drives:
  Local Storage: total: 931.51 GiB used: 40.26 GiB (4.3%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: WDS100T1X0E-00AFY0
    size: 931.51 GiB
Partition:
  ID-1: / size: 896.28 GiB used: 40.17 GiB (4.5%) fs: btrfs dev: /dev/dm-0
  ID-2: /home size: 896.28 GiB used: 40.17 GiB (4.5%) fs: btrfs
    dev: /dev/dm-0
  ID-3: /var/log size: 896.28 GiB used: 40.17 GiB (4.5%) fs: btrfs
    dev: /dev/dm-0
Swap:
  ID-1: swap-1 type: partition size: 34.25 GiB used: 0 KiB (0.0%)
    dev: /dev/dm-1
Sensors:
  System Temperatures: cpu: 37.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Processes: 274 Uptime: 12m Memory: total: 32 GiB note: est.
  available: 31.14 GiB used: 4.4 GiB (14.1%) Shell: Zsh inxi: 3.3.31
>cat /etc/fstab | grep swap
/dev/mapper/luks-4ec81462-c03b-4dd5-83ee-75609ef9b07c swap           swap    defaults   0 0

>cat /etc/default/grub | grep resume
[this command did not return anything]

Any help with this would be greatly appreciated! Thank you!!

Your config file in /etc/dracut.conf.d/ is exactly like this?

add_dracutmodules+=" resume "
install_items+=" /usr/lib/systemd/system/systemd-hibernate-resume.service "

The “padding” spaces are needed.

After setting the config with the resume modules you must rebuild the init images.

sudo dracut-rebuild
3 Likes

Arrrgh, that was it!! I had previously added the install_items line in /etc/dracut.conf.d/resume.conf, but neglected to run sudo dracut-rebuild afterwards. I did so, and hibernate works just like before. Thank you very much!!

1 Like

This is one of several things which irk me about dracut. If they can’t even be bothered to get the spaces separator by themselves like every other program with a conf file, why should I trust them with the rest?

lol…well if that small detail bothers you, don’t ever work with JSON. Now that’s a picky config format. :crazy_face:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.