Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 338239

Summary: sys-power/pm-utils-1.4.1: "PM: Error -22 checking image file" on resume from hibernation
Product: Gentoo Linux Reporter: Fabian Hahn <esmf68>
Component: [OLD] Core systemAssignee: Freedesktop bugs <freedesktop-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Fabian Hahn 2010-09-20 21:56:56 UTC
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.

Reproducible: Always

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

Actual Results:  
System boots normally, but no resume happens.

Expected Results:  
System resumes to hibernation states

How to fix:

Add the following line to /etc/pm/config.d/gentoo:

SLEEP_MODULE="kernel"


Similar problems were reported for Arch and Debian here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586674
https://bbs.archlinux.org/viewtopic.php?id=99766
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-11-26 12:58:03 UTC
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.
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-11-04 12:22:47 UTC
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.
Comment 3 Fabian Hahn 2012-11-09 10:44:56 UTC
(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...
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-11-09 13:26:31 UTC
hum, well, ok then. I'll close this as fixed but do not hesitate to report the problem if it occurs again.
Comment 5 keets 2016-03-10 14:27:22 UTC
I also need to add the SLEEP_MODULE="kernel" statement to /etc/pm/conf.d/gentoo. 

Here are some relevant system configs:

$ uname -r
4.1.12-gentoo

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.