My mini PC doesn't hibernate well

I know my Mini PC is able to hibernate ok, because with CachyOS did hibernate.

I’ve read carefully the hibernate guide from the Arch wiki.
My setup:

  • One non encryupted BTRFS partition holding root
  • One LUKS encryupted BTRFS partition holding home
  • A separated non encrypted partition for swap (26 Gb)
  • KDE Plasma
  • Grub
  • AMD Ryzen 7 5800H with Radeon Graphics
  • 32 Gb RAM
> uname -a
Linux peque 6.12.20-2-MANJARO #1 SMP PREEMPT_DYNAMIC Mon, 24 Mar 2025 06:33:36 +0000 x86_64 GNU/Linux

Some info about my system:

# swapon -s
Filename                                Type            Size            Used            Priority
/dev/nvme0n1p1                          partition       27339772        2497552         -2

# free -h
               total       usada       livre    compart.  buff/cache  disponível
Mem.:           28Gi        20Gi       1,6Gi       297Mi       6,6Gi       7,5Gi
Swap:           26Gi       2,4Gi        23Gi

# blkid /dev/nvme0n1p1
/dev/nvme0n1p1: UUID="df119baa-39a0-4654-a9ef-51f1e03f05f3" TYPE="swap" PARTUUID="8ded9620-6450-4b46-935a-16fc91c6bce8"

# grep resume /etc/mkinitcpio.conf
HOOKS=(base udev autodetect microcode kms modconf block keyboard keymap consolefont plymouth filesystems resume)
# grep GRUB_CMDLINE_LINUX_DEFAULT /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash udev.log_priority=3 resume=UUID=df119baa-39a0-4654-a9ef-51f1e03f05f3"

It seems that it tries to hibernate, because there is a delay while it is storing RAM contents to swap, but it doen’t resume. Instead it performs a clean boot.

An excerpt of dmesg:

[    0.000000] Linux version 6.12.20-2-MANJARO (linux612@manjaro) (gcc (GCC) 14.2.1 20250207, GNU ld (GNU Binutils) 2.44) #1 SMP PREEMPT_DYNAMIC Mon, 24 Mar 2025 06:33:36 +0000
[    0.000000] Command line: BOOT_IMAGE=/@/boot/vmlinuz-6.12-x86_64 root=UUID=ccceccff-aa97-4f87-ba36-878c1d08d96a rw rootflags=subvol=@ quiet splash udev.log_priority=3 resume=UUID=df119baa-39a0-4654-a9ef-51f1e03f05f3
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000009bfefff] usable
[    0.000000] BIOS-e820: [mem 0x0000000009bff000-0x000000000a000fff] reserved
[    0.000000] BIOS-e820: [mem 0x000000000a001000-0x000000000a1fffff] usable
[    0.000000] BIOS-e820: [mem 0x000000000a200000-0x000000000a20efff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x000000000a20f000-0x00000000cc222fff] usable
❯ head -n 500 dmesg-resume-fallado.txt
[    0.000000] Linux version 6.12.20-2-MANJARO (linux612@manjaro) (gcc (GCC) 14.2.1 20250207, GNU ld (GNU Binutils) 2.44) #1 SMP PREEMPT_DYNAMIC Mon, 24 Mar 2025 06:33:36 +0000
[    0.000000] Command line: BOOT_IMAGE=/@/boot/vmlinuz-6.12-x86_64 root=UUID=ccceccff-aa97-4f87-ba36-878c1d08d96a rw rootflags=subvol=@ quiet splash udev.log_priority=3 resume=UUID=df119baa-39a0-4654-a9ef-51f1e03f05f3
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000009bfefff] usable
[    0.000000] BIOS-e820: [mem 0x0000000009bff000-0x000000000a000fff] reserved
[    0.000000] BIOS-e820: [mem 0x000000000a001000-0x000000000a1fffff] usable
[    0.000000] BIOS-e820: [mem 0x000000000a200000-0x000000000a20efff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x000000000a20f000-0x00000000cc222fff] usable
[    0.000000] BIOS-e820: [mem 0x00000000cc223000-0x00000000cc3a3fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000cc3a4000-0x00000000cc3f5fff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000cc3f6000-0x00000000cc5adfff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000cc5ae000-0x00000000ccdfefff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ccdff000-0x00000000cdffffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000ce000000-0x00000000cfffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000f0000000-0x00000000f7ffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fd000000-0x00000000fdffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000feb80000-0x00000000fec01fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec10000-0x00000000fec10fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed40000-0x00000000fed44fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed80000-0x00000000fed8ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fedc4000-0x00000000fedc9fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fedcc000-0x00000000fedcefff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fedd5000-0x00000000fedd5fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000076e2fffff] usable
[    0.000000] BIOS-e820: [mem 0x000000076e300000-0x000000082fffffff] reserved
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] APIC: Static calls initialized
[    0.000000] e820: update [mem 0xc8811018-0xc881e857] usable ==> usable
[    0.000000] extended physical RAM map:
[    0.000000] reserve setup_data: [mem 0x0000000000000000-0x000000000009ffff] usable
[    0.000000] reserve setup_data: [mem 0x00000000000a0000-0x00000000000fffff] reserved
[    0.000000] reserve setup_data: [mem 0x0000000000100000-0x0000000009bfefff] usable
[    0.000000] reserve setup_data: [mem 0x0000000009bff000-0x000000000a000fff] reserved
[    0.000000] reserve setup_data: [mem 0x000000000a001000-0x000000000a1fffff] usable
[    0.000000] reserve setup_data: [mem 0x000000000a200000-0x000000000a20efff] ACPI NVS
[    0.000000] reserve setup_data: [mem 0x000000000a20f000-0x00000000c8811017] usable
[    0.000000] reserve setup_data: [mem 0x00000000c8811018-0x00000000c881e857] usable
[    0.000000] reserve setup_data: [mem 0x00000000c881e858-0x00000000cc222fff] usable
[    0.000000] reserve setup_data: [mem 0x00000000cc223000-0x00000000cc3a3fff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000cc3a4000-0x00000000cc3f5fff] ACPI data
[    0.000000] reserve setup_data: [mem 0x00000000cc3f6000-0x00000000cc5adfff] ACPI NVS
[    0.000000] reserve setup_data: [mem 0x00000000cc5ae000-0x00000000ccdfefff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000ccdff000-0x00000000cdffffff] usable
[    0.000000] reserve setup_data: [mem 0x00000000ce000000-0x00000000cfffffff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000f0000000-0x00000000f7ffffff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000fd000000-0x00000000fdffffff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000feb80000-0x00000000fec01fff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000fec10000-0x00000000fec10fff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000fed00000-0x00000000fed00fff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000fed40000-0x00000000fed44fff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000fed80000-0x00000000fed8ffff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000fedc4000-0x00000000fedc9fff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000fedcc000-0x00000000fedcefff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000fedd5000-0x00000000fedd5fff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[    0.000000] reserve setup_data: [mem 0x0000000100000000-0x000000076e2fffff] usable
[    0.000000] reserve setup_data: [mem 0x000000076e300000-0x000000082fffffff] reserved
[    0.000000] efi: EFI v2.7 by American Megatrends
[    0.000000] efi: ACPI=0xcc597000 ACPI 2.0=0xcc597014 TPMFinalLog=0xcc563000 SMBIOS=0xccc27000 SMBIOS 3.0=0xccc26000 MEMATTR=0xc87f4018 INITRD=0xc881fa98 RNG=0xcc3b3018 TPMEventLog=0xcc3b1018 
[    0.000000] random: crng init done
[    0.000000] efi: Remove mem57: MMIO range=[0xf0000000-0xf7ffffff] (128MB) from e820 map
[    0.000000] e820: remove [mem 0xf0000000-0xf7ffffff] reserved
[    0.000000] efi: Remove mem58: MMIO range=[0xfd000000-0xfdffffff] (16MB) from e820 map
[    0.000000] e820: remove [mem 0xfd000000-0xfdffffff] reserved
[    0.000000] efi: Remove mem59: MMIO range=[0xfeb80000-0xfec01fff] (0MB) from e820 map
[    0.000000] e820: remove [mem 0xfeb80000-0xfec01fff] reserved
[    0.000000] efi: Not removing mem60: MMIO range=[0xfec10000-0xfec10fff] (4KB) from e820 map
[    0.000000] efi: Not removing mem61: MMIO range=[0xfed00000-0xfed00fff] (4KB) from e820 map
[    0.000000] efi: Not removing mem62: MMIO range=[0xfed40000-0xfed44fff] (20KB) from e820 map
[    0.000000] efi: Not removing mem63: MMIO range=[0xfed80000-0xfed8ffff] (64KB) from e820 map
[    0.000000] efi: Not removing mem64: MMIO range=[0xfedc4000-0xfedc9fff] (24KB) from e820 map
[    0.000000] efi: Not removing mem65: MMIO range=[0xfedcc000-0xfedcefff] (12KB) from e820 map
[    0.000000] efi: Not removing mem66: MMIO range=[0xfedd5000-0xfedd5fff] (4KB) from e820 map
[    0.000000] efi: Remove mem67: MMIO range=[0xff000000-0xffffffff] (16MB) from e820 map
[    0.000000] e820: remove [mem 0xff000000-0xffffffff] reserved
[    0.000000] SMBIOS 3.3.0 present.
[    0.000000] DMI: Trigkey S5/S5, BIOS 5800H506 03/29/2023
[    0.000000] DMI: Memory slots populated: 2/2
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.000000] tsc: Detected 3194.137 MHz processor
[    0.000129] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000130] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000136] last_pfn = 0x76e300 max_arch_pfn = 0x400000000
[    0.000142] MTRR map: 5 entries (3 fixed + 2 variable; max 20), built from 9 variable MTRRs
[    0.000143] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
[    0.000293] e820: update [mem 0xd0000000-0xffffffff] usable ==> reserved
[    0.000299] last_pfn = 0xce000 max_arch_pfn = 0x400000000
[    0.003341] Using GB pages for direct mapping
[    0.003556] Secure boot disabled
[    0.003556] RAMDISK: [mem 0xc186b000-0xc45a9fff]
[    0.003578] ACPI: Early table checksum verification disabled
[    0.003581] ACPI: RSDP 0x00000000CC597014 000024 (v02 ALASKA)
[    0.003584] ACPI: XSDT 0x00000000CC596728 0000E4 (v01 ALASKA A M I    01072009 AMI  01000013)
[    0.003587] ACPI: FACP 0x00000000CC3E8000 000114 (v06 ALASKA A M I    01072009 AMI  00010013)
[    0.003591] ACPI: DSDT 0x00000000CC3DF000 008D01 (v02 ALASKA A M I    01072009 INTL 20200717)
[    0.003593] ACPI: FACS 0x00000000CC561000 000040
[    0.003594] ACPI: SSDT 0x00000000CC3EE000 0072B0 (v02 AMD    AmdTable 00000002 MSFT 04000000)
[    0.003596] ACPI: IVRS 0x00000000CC3ED000 0001A4 (v02 AMD    AmdTable 00000001 AMD  00000000)
[    0.003597] ACPI: SSDT 0x00000000CC3E9000 003A21 (v01 AMD    AMD AOD  00000001 INTL 20200717)
[    0.003599] ACPI: FIDT 0x00000000CC3DE000 00009C (v01 ALASKA A M I    01072009 AMI  00010013)
[    0.003601] ACPI: MCFG 0x00000000CC3DD000 00003C (v01 ALASKA A M I    01072009 MSFT 00010013)
[    0.003602] ACPI: HPET 0x00000000CC3DC000 000038 (v01 ALASKA A M I    01072009 AMI  00000005)
[    0.003604] ACPI: FPDT 0x00000000CC3DB000 000044 (v01 ALASKA A M I    01072009 AMI  01000013)
[    0.003605] ACPI: VFCT 0x00000000CC3CD000 00D884 (v01 ALASKA A M I    00000001 AMD  31504F47)
[    0.003607] ACPI: BGRT 0x00000000CC3CC000 000038 (v01 ALASKA A M I    01072009 AMI  00010013)
[    0.003608] ACPI: TPM2 0x00000000CC3CB000 00004C (v04 ALASKA A M I    00000001 AMI  00000000)
[    0.003610] ACPI: SSDT 0x00000000CC3C5000 005354 (v02 AMD    AmdTable 00000001 AMD  00000001)
[    0.003611] ACPI: CRAT 0x00000000CC3C4000 000EE8 (v01 AMD    AmdTable 00000001 AMD  00000001)
[    0.003613] ACPI: CDIT 0x00000000CC3C3000 000029 (v01 AMD    AmdTable 00000001 AMD  00000001)
[    0.003614] ACPI: SSDT 0x00000000CC3C2000 000149 (v01 AMD    AmdTable 00000001 INTL 20200717)
[    0.003616] ACPI: SSDT 0x00000000CC3C0000 00148E (v01 AMD    AmdTable 00000001 INTL 20200717)
[    0.003617] ACPI: SSDT 0x00000000CC3BE000 00151E (v01 AMD    AmdTable 00000001 INTL 20200717)
[    0.003619] ACPI: SSDT 0x00000000CC3BD000 00078E (v01 AMD    AmdTable 00000001 INTL 20200717)
[    0.003620] ACPI: SSDT 0x00000000CC3BC000 000641 (v01 AMD    AmdTable 00000001 INTL 20200717)
[    0.003621] ACPI: SSDT 0x00000000CC3B8000 00386E (v01 AMD    AmdTable 00000001 INTL 20200717)
[    0.003623] ACPI: WSMT 0x00000000CC3B7000 000028 (v01 ALASKA A M I    01072009 AMI  00010013)
[    0.003624] ACPI: APIC 0x00000000CC3B6000 0000DE (v04 ALASKA A M I    01072009 AMI  00010013)
[    0.003626] ACPI: SSDT 0x00000000CC3B5000 00008D (v01 AMD    AmdTable 00000001 INTL 20200717)
[    0.003627] ACPI: SSDT 0x00000000CC3B4000 0008F0 (v01 AMD    AmdTable 00000001 INTL 20200717)
[    0.003628] ACPI: Reserving FACP table memory at [mem 0xcc3e8000-0xcc3e8113]
[    0.003629] ACPI: Reserving DSDT table memory at [mem 0xcc3df000-0xcc3e7d00]
[    0.003630] ACPI: Reserving FACS table memory at [mem 0xcc561000-0xcc56103f]
[    0.003630] ACPI: Reserving SSDT table memory at [mem 0xcc3ee000-0xcc3f52af]
[    0.003631] ACPI: Reserving IVRS table memory at [mem 0xcc3ed000-0xcc3ed1a3]
[    0.003631] ACPI: Reserving SSDT table memory at [mem 0xcc3e9000-0xcc3eca20]
[    0.003632] ACPI: Reserving FIDT table memory at [mem 0xcc3de000-0xcc3de09b]
[    0.003632] ACPI: Reserving MCFG table memory at [mem 0xcc3dd000-0xcc3dd03b]
[    0.003633] ACPI: Reserving HPET table memory at [mem 0xcc3dc000-0xcc3dc037]
[    0.003633] ACPI: Reserving FPDT table memory at [mem 0xcc3db000-0xcc3db043]
[    0.003633] ACPI: Reserving VFCT table memory at [mem 0xcc3cd000-0xcc3da883]
[    0.003634] ACPI: Reserving BGRT table memory at [mem 0xcc3cc000-0xcc3cc037]
[    0.003634] ACPI: Reserving TPM2 table memory at [mem 0xcc3cb000-0xcc3cb04b]
[    0.003635] ACPI: Reserving SSDT table memory at [mem 0xcc3c5000-0xcc3ca353]
[    0.003635] ACPI: Reserving CRAT table memory at [mem 0xcc3c4000-0xcc3c4ee7]
[    0.003635] ACPI: Reserving CDIT table memory at [mem 0xcc3c3000-0xcc3c3028]
[    0.003636] ACPI: Reserving SSDT table memory at [mem 0xcc3c2000-0xcc3c2148]
[    0.003636] ACPI: Reserving SSDT table memory at [mem 0xcc3c0000-0xcc3c148d]
[    0.003637] ACPI: Reserving SSDT table memory at [mem 0xcc3be000-0xcc3bf51d]
[    0.003637] ACPI: Reserving SSDT table memory at [mem 0xcc3bd000-0xcc3bd78d]
[    0.003637] ACPI: Reserving SSDT table memory at [mem 0xcc3bc000-0xcc3bc640]
[    0.003638] ACPI: Reserving SSDT table memory at [mem 0xcc3b8000-0xcc3bb86d]
[    0.003638] ACPI: Reserving WSMT table memory at [mem 0xcc3b7000-0xcc3b7027]
[    0.003639] ACPI: Reserving APIC table memory at [mem 0xcc3b6000-0xcc3b60dd]
[    0.003639] ACPI: Reserving SSDT table memory at [mem 0xcc3b5000-0xcc3b508c]
[    0.003640] ACPI: Reserving SSDT table memory at [mem 0xcc3b4000-0xcc3b48ef]
[    0.003694] No NUMA configuration found
[    0.003694] Faking a node at [mem 0x0000000000000000-0x000000076e2fffff]
[    0.003699] NODE_DATA(0) allocated [mem 0x76e2d52c0-0x76e2fffff]

Without ever trying this specific configuration - I do think the problem is the encrypted home volume - which the system cannot decrypt upon resume causing the system to start from scratch.

You can test by using systemctl commands

System Commands:
  is-system-running                   Check whether system is fully running
  default                             Enter system default mode
  rescue                              Enter system rescue mode
  emergency                           Enter system emergency mode
  halt                                Shut down and halt the system
  poweroff                            Shut down and power-off the system
  reboot                              Shut down and reboot the system
  kexec                               Shut down and reboot the system with kexec
  soft-reboot                         Shut down and reboot userspace
  exit [EXIT_CODE]                    Request user instance or container exit
  switch-root [ROOT [INIT]]           Change to a different root file system
  sleep                               Put the system to sleep (through one of
                                      the operations below)
  suspend                             Suspend the system
  hibernate                           Hibernate the system
  hybrid-sleep                        Hibernate and suspend the system
  suspend-then-hibernate              Suspend the system, wake after a period of
                                      time, and hibernate

Thanks for answering.
With CachyOS I could hibernate with the encrypted home and no issues.
Curiously, when resuming, it doesn’t ask for the passphrase for decrypting home.

What it didn’t work was hibernating to a swap file.
This is why I have a dedicated swap partition.

Which config. do you recommend?

Doesn’t help… share this:

journalctl --boot -1 | sed -n -r "/Starting.+Hibernate/,/Finished.+Hibernate/p"

If no content, use another “boot number”.

So you are telling me the decryption passphrase is stored in the hibernated state on the unencrypted swap ?

Sounds insecure to me.

You ask what config I could recommend - that is a difficult question because it will be with my personal point of view

  • Use sleep instead of hibernation
  • If you want to use hibernation - don’t encrypt the system
  • If you want to use encryption - don’t use hibernation - they don’t play well together
  • If you want to use encryption - don’t use non-encrypted swap
  • As swap is a buffer - re-create the swap encryption on system boot