0

After setting up hibernation on my encrypted disk with LVM2 (standard ubuntu 20.04 Focal installation with encryption) it finally worked... once!

I installed pm-utils, uswsusp and hibernation packages - added and configured a swapfile on my root partition - setup grub and initramfs with the correct partition UUID and resume_offset of the swap and updated both. After a lot of trial and error with systemctl hibernate and different UUID the command "sudo pm-hibernate" wrote image with s2disk to swap and when booting up it loaded it from swap and booted with apps open. It then locked the screen for user login and as this annoyed me I disabled this in the privacy settings and hibernated again. With the lockscreen login still happening I rebooted without hibernation. I changed nothing else.

After reboot I used the same command to hibernate again "sudo pm-hibernate". It wrote images to swap via s2disk and shutdown. Booting up then failed and still does and I have tried everything and I just cant figure out why it would work and a simple reboot would stop it from working. I tried resetting all the privacy settings but still fails and no guide or forum posts worked for me.

After decrypting my disk with the correct password it writes the following and only hard shutdown will reboot a clean ubuntu and no hibernation image. Any idea what happened or what I can do to make it work again?

cryptsetup: sda3_crypt: set up successfully resume: Compressed image Loading image data pages (365257 pages)... 0% Error while writing an image page: Operation not permitted

The system snapshot image could not be read. This might be a result of booting a wrong kernel.

You can now boot the system and lose the saved state or reboot and try again.

(Notice that if you decide to reboot, you MUST NOT mount any filesystems before a successful resume. Resuming after some filesystems have been mounted will badly damage these filesystems. ) Do you want to continue booting (Y/n)?

0

EDIT: broke again... below didn't work

Solved by using fix from this question:

How to resume Ubuntu 18.04 after hibernate?

Resume:

After installing with swap partition instead of a swap file I hibernated without issues until the 2nd hibernation and everything broke again. This time I got a pre log error:

"PM: image not found"

And a post hibernation log error:

"Inconsistent memory map" and "image mismatch"

I found several topics pointing to issues with ACPI and graphic card drivers. Ended up putting "nomodeset" in my grub configuration and this works. Its probably a workaround and not a fix but it works for me. I don't have the time to find the driver / module breaking this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.