After my last upgrade, resuming from hibernation (suspend to disk) didn't work anymore. Dmesg produced the following output:
PM: Checking hibernation image.
PM: Error -22 checking image file
PM: Resume from disk failed.
Steps to Reproduce:
1. hibernate (using sys-power/hibernate-script)
2. Wait for machine to dump RAM to disk and shut down
3. Power up machine again, boot into kernel
System boots normally, but no resume happens.
System resumes to hibernation states
How to fix:
Add the following line to /etc/pm/config.d/gentoo:
Similar problems were reported for Arch and Debian here:
What about if you are using pm-utils provided tools like pm-suspend and pm-hibernate ? hibernate-scripts are configured in separate config files and iirc the init script to cleanup swap is not the same as well.
A couple of release after, it looks like there was some fixes related to hibernation image verification. Could you please try a recent pm-utils and also reply to my previous questions.
(In reply to comment #2)
> A couple of release after, it looks like there was some fixes related to
> hibernation image verification. Could you please try a recent pm-utils and
> also reply to my previous questions.
I can confirm that this was fixed at some point, it works now without the fix I originally described. However, I'm still using the same pm-utils version as before (1.4.1), so it must have been fixed by another package or a kernel update (of which I did several in the meanwhile).
Responding to your previous question, I did actually try pm-hibernate the first time I encountered this problem, but the problem remained. Calling pm-hibernate now also works...
hum, well, ok then. I'll close this as fixed but do not hesitate to report the problem if it occurs again.
I also need to add the SLEEP_MODULE="kernel" statement to /etc/pm/conf.d/gentoo.
Here are some relevant system configs:
$ uname -r
sys-power/pm-utils-1.4.1-r6::gentoo was built with the following:
USE="alsa -debug -ntp" ABI_X86="64" VIDEO_CARDS="radeon -intel"
sys-power/suspend-1.0_p20150810::gentoo was built with the following:
USE="crypt lzo -fbsplash -threads" ABI_X86="64"
Without adding SLEEP_MODULE="kernel", the system does not go into the hibernate state and I see the following in /var/log/pm-suspend.log:
s2disk: Could not stat the resume device file. Reason: No such file or directory
However, after adding SLEEP_MODULE="kernel", I am able to go in and out of the hibernate state.