Hibernation not working

distro: arch linux

last updated is now, its a fresh install

bios version is the newest

model: ryzen ai 9 hx 370, 32gb ram

when trying to hibernate i finally managed to get it to enter hibernation, problem is when booting back in nothing happens. in the debug text that shows while booting i see it tries to resume hibernation, but it just doesnt. it doesnt freeze or hang, it just boots into sddm like it normally would without hibernation. ive tried putting it into airplane mode as people have reported that fixing it, but to no luck.

heres a journalctl log if its at all helpful, i just dont know what to try anymore.

╰─❯ journalctl -b -1 | grep -i resume
Jan 02 20:49:50 archlinux kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=d8206e4d-7808-4782-9348-2594471cd7f0 rw loglevel=3 resume=UUID=5622e822-17ed-4e04-b13f-46b3a0735809
Jan 02 20:49:50 archlinux kernel: Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=d8206e4d-7808-4782-9348-2594471cd7f0 rw loglevel=3 resume=UUID=5622e822-17ed-4e04-b13f-46b3a0735809
Jan 02 20:49:50 archlinux systemd[1]: Starting Resume from hibernation...
Jan 02 20:49:50 archlinux systemd-hibernate-resume[418]: Unable to resume from device '/dev/disk/by-uuid/5622e822-17ed-4e04-b13f-46b3a0735809' (259:2) offset 0, continuing boot process.
Jan 02 20:49:50 archlinux systemd[1]: systemd-hibernate-resume.service: Deactivated successfully.
Jan 02 20:49:50 archlinux systemd[1]: Finished Resume from hibernation.

been trying for a bit longer, still no success. i managed to get it to boot from hibernation once, and was never able to reproduce it. checked /sys/power/mem_sleep and “[s2idle]” was returned, from what ive seen it needs to be s3. does that mean i just cant use hibernate on this? idk i feel like im probably doing it wrong cause i feel like it would be weird for it to just simply not support that. it wouldnt be the first laptop id have that is like that but those were old.

Framework laptops do not support s3 sleep. It is due to a limitation on new amd and Intel chips.

That being said, hibernation should still work. Your ram is quite large though, so make sure your swap file is bigger than your ram.

Do you have secureboot on? Sometimes you need to disable secureboot to use hibernation.

yeah i have a 36gb swap partition, secure boot is off.

Try increase the swap. 64GB or 48GB- sometimes that’s all it takes.

Based on your output from boot, the kernel can’t find the hibernation image. Are you sure you set your offset to your swap correctly? What is your boot system? Limine?

Hibernation is so useful and how it is an after thought for most distros is VERY annoying in the Linux world.

Your swap is big enough by the way. If that was the problem it would have prevented the system from entering hibernation to begin with. The problem seems to be that either your swap is not properly defined in your fstab or that the offset is not correctly set. What file system are you using? BTFS?

1 Like

im using ext4, but the swap is a seperate partition than the ext4 root. i think the kernel parameter stuff is right for swap, it worked once not sure how or why, but ill send info below about all of it. also for the bootloader im using grub.

lsblk (also the 2tb drive i havent set up yet, its meant to be empty):

nvme0n1     259:0    0 931.5G  0 disk 
├─nvme0n1p1 259:1    0     1G  0 part /boot
├─nvme0n1p2 259:2    0  35.8G  0 part [SWAP]
└─nvme0n1p3 259:3    0 894.7G  0 part /
nvme1n1     259:4    0   1.8T  0 disk 

blkid

/dev/nvme0n1p3: UUID="d8206e4d-7808-4782-9348-2594471cd7f0" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="ebd49c88-d367-48f0-9c84-0bcfa3b22085"
/dev/nvme0n1p1: UUID="F90C-1B21" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="746e89cb-c3d3-4a52-982f-b8b38348b8e3"
/dev/nvme0n1p2: UUID="5622e822-17ed-4e04-b13f-46b3a0735809" TYPE="swap" PARTUUID="f9913bc7-775e-43b8-a6e3-94b4e8d4b385"
/dev/nvme1n1: PTUUID="19ecc286-7cbf-44d1-8496-8a13417612eb" PTTYPE="gpt"

fstab file:

# /dev/nvme0n1p3
UUID=d8206e4d-7808-4782-9348-2594471cd7f0	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p1
UUID=F90C-1B21      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/nvme0n1p2
UUID=5622e822-17ed-4e04-b13f-46b3a0735809	none      	swap      	defaults  	0 0

boot parameters (cat /proc/cmdline)

BOOT_IMAGE=/vmlinuz-linux root=UUID=d8206e4d-7808-4782-9348-2594471cd7f0 rw loglevel=3 resume=UUID=5622e822-17ed-4e04-b13f-46b3a0735809

if theres any other useful info or things to try lmk

Ahh ok, in this case, you should be good to go. With a swap partition, an offset is not needed. You having the resume parameter in your cmdline is all you need as well.

Is your drive encrypted?

nope the drive isnt encrypted, its just a fairly standard arch install going off the guide on the wiki.

maybe swap out the UUID listing in fstab with the logical location:

/dev/nvme0n1p2

I say that because systemd is complaining about not being able to resume from /dev/disk/by-UUID/and-your-swap-uuid.

Seems like trying the logical location would be worth a shot.

i wanted to try that at one point but thre reason i started using uuid’s in grub (its used in fstab by default on arch as far as i know) is because the /dev/nvme()n1 changes between 0 and 1 every reboot, for some reason the order the two nvme drives load changes. seems like this is a fairly normal thing to happen on linux but it just means i cant reliably use that location i dont think. that was kinda wordy its basically just my main drive is sometimes /dev/nvme0n1 and other times /dev/nvme1n1