You are not logged in.
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
> 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
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
Offline
What's your actual parameter list now?
cat /proc/cmdline
Offline
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
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
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
Then why did you hand your /home partition as resume partition?
df -T /swapfile
Offline
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
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
Yes, I did. OMG, sorry, I actually double checked that but must have read the UUID from the root=UUID=... part -.-
Offline
Does it work w/ the correct UUID?
Offline
Still does not work with the same error message in logs
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
Last straw: do you have the resume hook in the mkinitcpio.conf (and did you recreate the initramfs)?
Offline
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
Try Methyltheobromine ;-)
Offline