You are not logged in.

#1 2019-10-15 12:00:18

titaniumbones
Member
Registered: 2013-12-20
Posts: 52

[SOLVED] unable to resume from hibernation on encrypted swap

I'm working on a new install on a thinkpad T490. I have set up an encrypted root using LVM on LUKS (https://wiki.archlinux.org/index.php/Dm … VM_on_LUKS).

- My root and scratch partitions are both contained in the LUKS partition, which is on a physical nvm disk at /dev/nvme0n1p5.
- /boot is an EFI partition, /dev/nvme0n1p1, and is shared with Windows, which I'm retaining at least for now to help me troubleshoot student software installation issues.
- I'm using a udev-based initramfs, as I was unable to boot into the encrypted root successfully with systemd (haven't yet tracked down the source of the problem).

I can boot and suspend-to-ram successfully, an in general the system seems to be working pretty well.  However, I am unable to rresume after suspend-to-disk (hibernate). the RAM image seems to be written to disk, but instead of resuming from the image, the system undergoes the normal boot process.  The only relevant message I see in journalctl is this:

Oct 14 23:18:24 anarres swapon[680]: swapon: /dev/mapper/MainVG-swap: software suspend data detected. Rewriting the swap signature

I figure my resume instruction is not being acted on, but I'm not sure why

Here is some system info.

My arch.conf in /boot/loader/entries:

title arch
linux /vmlinuz-linux 
initrd /initramfs-linux.img
options cryptdevice=UUID=1f77cd7b-695c-407b-848c-a49c740799c7:cryptlvm root=/dev/MainVG/root rw  resume=/dev/MainVG/swap 
# uncomment to attempt systemd boot
# options rd.luks.name=UUID=1f77cd7b-695c-407b-848c-a49c740799c7=cryptlvm root=/dev/MainVG/root rw

Uncommented parts of my /etc/mkinitcpio.conf:

MODULES=()

BINARIES=()

FILES=()

HOOKS=(base udev autodetect keyboard  keymap modconf block encrypt lvm2 filesystems fsck)
# uncomment to attempt systemd boot
# HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt sd-lvm2 filesystems  fsck)

Both /root and swap partitions are in an encrypted PV containing one VG, "MainVG", where they have the names MainVG/root and MainVG/swap.  Both seem to load normally during a regular boot. 

Thanks for your help, and please let me know if I should include more information!

Last edited by titaniumbones (2019-10-15 12:34:02)

Offline

#2 2019-10-15 12:32:17

titaniumbones
Member
Registered: 2013-12-20
Posts: 52

Re: [SOLVED] unable to resume from hibernation on encrypted swap

well, that was simple. 

titaniumbones wrote:

Uncommented parts of my /etc/mkinitcpio.conf:

MODULES=()

BINARIES=()

FILES=()

HOOKS=(base udev autodetect keyboard  keymap modconf block encrypt lvm2 filesystems fsck)
# uncomment to attempt systemd boot
# HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt sd-lvm2 filesystems  fsck)

I was missing the resume hook -- since it's not required in systemd initramfs, I had forgotten all about it. Change the hooks line above to

HOOKS=(base udev autodetect keyboard  keymap modconf block encrypt lvm2 filesystems resume fsck)

And resume works just fine.  Sorry for the noise. Next step: debugging systemd initramfs.

Last edited by titaniumbones (2019-10-15 12:32:39)

Offline

Board footer

Powered by FluxBB