You are not logged in.

#1 2019-06-11 21:12:56

dbacc
Member
Registered: 2014-09-25
Posts: 119

[Solved] hibernate: Image not found (code -22)

Hi,

I'm trying to get hibernate to work.
After running

systemctl hibernate the system shuts down instead of hibernating.


This is what I found in the logs from last boot.

Jun 11 22:56:57 daniel-think kernel: PM: Image not found (code -22)
Jun 11 22:56:57 daniel-think kernel: PM: hibernation entry
Jun 11 22:56:57 daniel-think kernel: PM: Syncing filesystems ...

My kernel boot line is
Command line: BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=29b53460-8315-46da-ac55-67611f2f17e1 rw i915.enable_psr=1 netconsole=6555@192.168.42.91/enp0s25,6666@192.168.42.201/ loglevel=7 resume=/swapfile resume_offset=15683584



Any idea why it still does not work?

Last edited by dbacc (2019-06-12 14:11:06)

Offline

#2 2019-06-11 21:39:41

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: [Solved] hibernate: Image not found (code -22)

> resume=/swapfile
https://www.kernel.org/doc/Documentatio … -files.txt

I guess you'll also have to swapon the file (in case you haven't yet)

Offline

#3 2019-06-11 22:26:09

dbacc
Member
Registered: 2014-09-25
Posts: 119

Re: [Solved] hibernate: Image not found (code -22)

Hmm,
swapon -v
NAME      TYPE SIZE USED PRIO
/swapfile file  16G   0B   -2

What I got from that link is at least, that I still need to do something like resume=UUID=uuid-of-/dev/sda1-where-swapfile-is-located.

This still didn't change the error message hmm

Offline

#4 2019-06-12 05:46:37

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: [Solved] hibernate: Image not found (code -22)

What's your actual parameter list now?

cat /proc/cmdline

Offline

#5 2019-06-12 08:48:18

dbacc
Member
Registered: 2014-09-25
Posts: 119

Re: [Solved] hibernate: Image not found (code -22)

Its

BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=29b53460-8315-46da-ac55-67611f2f17e1 rw i915.enable_psr=1 netconsole=6555@192.168.42.91/enp0s25,6666@192.168.42.201/ loglevel=7 resume=UUID=22273083-8b76-4548-910c-75b91f72e6d5 resume_offset=15683584

Last edited by dbacc (2019-06-12 11:15:40)

Offline

#6 2019-06-12 10:56:21

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: [Solved] hibernate: Image not found (code -22)

Please use code tags to wrap such things (makes it more readable)
The UUID is not the same as the root device, since the fomer location was "/swapfile" and the offset didn't change, that seems wrong?
Where's the file actually located, what's the output of "lsblk -f" and "df -T /path/to/swapfile"? How did you calculate the offset?

Offline

#7 2019-06-12 11:44:14

dbacc
Member
Registered: 2014-09-25
Posts: 119

Re: [Solved] hibernate: Image not found (code -22)

Yes, I thought that might have been the mistake. The arch wiki is not saying much about setting resume for swapfiles and according to your link it seems like I have to point it to the according partition and use the correct offset.
Some more information:

The swapfile is located on at /swapfile

swapon -v
NAME      TYPE SIZE USED PRIO
/swapfile file  16G   0B   -2

I computed the offest via

filefrag -v /swapfile
Filesystem type is: ef53
File size of /swapfile is 17179869184 (4194304 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..       0:   15683584..  15683584:      1:            
...
lsblk -f
NAME   FSTYPE LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                     
├─sda1 ext4   Data  22273083-8b76-4548-910c-75b91f72e6d5  291,5G    54% /home
├─sda2 ext4   arch  29b53460-8315-46da-ac55-67611f2f17e1     88G    50% /
└─sda3                                                                  
df -T
Filesystem     Type       1K-blocks      Used Available Use% Mounted on
dev            devtmpfs     5981668         0   5981668   0% /dev
run            tmpfs        5992484       960   5991524   1% /run
/dev/sda2      ext4       205353712 102623696  92275600  53% /
tmpfs          tmpfs        5992484    483404   5509080   9% /dev/shm
tmpfs          tmpfs        5992484         0   5992484   0% /sys/fs/cgroup
tmpfs          tmpfs        5992484      9068   5983416   1% /tmp
/dev/sda1      ext4       743082632 399629600 305636972  57% /home
tmpfs          tmpfs        1198496        12   1198484   1% /run/user/1000

Offline

#8 2019-06-12 13:08:10

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: [Solved] hibernate: Image not found (code -22)

Then why did you hand your /home partition as resume partition?

df -T /swapfile

Offline

#9 2019-06-12 13:13:06

dbacc
Member
Registered: 2014-09-25
Posts: 119

Re: [Solved] hibernate: Image not found (code -22)

I guess/hope I didn't

df -T /swapfile
Filesystem     Type 1K-blocks      Used Available Use% Mounted on
/dev/sda2      ext4 205353712 102623700  92275596  53% /

Offline

#10 2019-06-12 13:16:16

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: [Solved] hibernate: Image not found (code -22)

You said the cmdline is "… resume=UUID=22273083-8b76-4548-910c-75b91f72e6d5 …" and that's sda1 - your /home partition according to your fdisk output.

Offline

#11 2019-06-12 13:42:01

dbacc
Member
Registered: 2014-09-25
Posts: 119

Re: [Solved] hibernate: Image not found (code -22)

Yes, I did. OMG, sorry, I actually double checked that but must have read the UUID from the root=UUID=... part -.-

Offline

#12 2019-06-12 13:49:53

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: [Solved] hibernate: Image not found (code -22)

Does it work w/ the correct UUID?

Offline

#13 2019-06-12 13:51:13

dbacc
Member
Registered: 2014-09-25
Posts: 119

Re: [Solved] hibernate: Image not found (code -22)

Still does not work with the same error message in logs hmm

BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=29b53460-8315-46da-ac55-67611f2f17e1 rw i915.enable_psr=1 netconsole=6555@192.168.42.91/enp0s25,6666@192.168.42.201/ loglevel=7 resume=UUID=29b53460-8315-46da-ac55-67611f2f17e1 resume_offset=15683584

Offline

#14 2019-06-12 14:03:13

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: [Solved] hibernate: Image not found (code -22)

Last straw: do you have the resume hook in the mkinitcpio.conf (and did you recreate the initramfs)?

Offline

#15 2019-06-12 14:10:44

dbacc
Member
Registered: 2014-09-25
Posts: 119

Re: [Solved] hibernate: Image not found (code -22)

Good call!

I added the hook and rebuilt initramfs. However, I noticed I did this for the linux kernel - and not the lts kernel I switched to a few weeks ago.
Now, hibernation seems to be working.
Thanks for the help, shouldn't be doing such things when not fully concentrated.

Offline

#16 2019-06-12 14:13:20

seth
Member
Registered: 2012-09-03
Posts: 49,969

Re: [Solved] hibernate: Image not found (code -22)

Try Methyltheobromine ;-)

Offline

Board footer

Powered by FluxBB