You are not logged in.
Hi,
I've been struggling setting up hibernation
I created a swap file on /
-rw------- 1 root root 16G Oct 5 19:32 swapfilecat /proc/swaps
Filename Type Size Used Priority
/swapfile file 16777212 0 -2 configured the initramfs and regenerate it
cat /etc/mkinitcpio.conf | grep resume
HOOKS=(base udev autodetect modconf block filesystems keyboard resume fsck)and modify the kernel parameters
cat /etc/default/grub | grep resume
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet iommu=soft resume=UUID=942a579c-141a-4e77-a743-848bbda9891e resume_offset=8540160"sudo grub-mkconfig -o /boot/grub/grub.cfg && cat /boot/grub/grub.cfg | grep resume
linux /vmlinuz-linux root=UUID=942a579c-141a-4e77-a743-848bbda9891e rw loglevel=3 quiet iommu=soft resume=UUID=942a579c-141a-4e77-a743-848bbda9891e resume_offset=8540160On boot this error shows up:
ERROR: no device specified for hibernationBasically systemctl hibernate acts as shutdown
Last edited by kbunny (2021-10-07 16:27:01)
Offline
btrfs? LV?
How did you calculate the offset?
Online
btrfs? LV?
How did you calculate the offset?
I'm not using LVM neither btrfs
I calculated the offset using
filefrag -v /swapfile | awk '{ if($1=="0:"){print substr($4, 1, length($4)-2)} }'Offline
ZFS? Parallel windows installation?
lsblk -fOnline
ZFS? Parallel windows installation?
lsblk -f
Nope
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1
└─sda3 ext4 1.0 942a579c-141a-4e77-a743-848bbda9891e 98.7G 50% /boot
/
sdbLast edited by kbunny (2021-10-06 13:08:21)
Offline
Copy and paste error?
Online
Copy and paste error?
ERROR: resume: no device specified for hibernationLast edited by kbunny (2021-10-06 13:20:57)
Offline
No, in #5 - there's something wrong w/ that lsblk.
Online
No, in #5 - there's something wrong w/ that lsblk.
It returns no error..
Offline
The lsblk output is severly misaligned or whatever…, please run
lsblk -f | curl -F 'f:1=<-' ix.ioand post the url you receive
Online
The lsblk output is severly misaligned or whatever…, please run
lsblk -f | curl -F 'f:1=<-' ix.ioand post the url you receive
It's because of xsel
Offline
That's the same output and it's weirdly off.
sda3 is ~100GB and mounted to /boot, nothing(?) is mounted to /, there's some sda1, no sda2 and an sdb.
Did you shred the partition table?
=>
fdisk -l /dev/sdaOnline
That's the same output and it's weirdly off.
sda3 is ~100GB and mounted to /boot, nothing(?) is mounted to /, there's some sda1, no sda2 and an sdb.
Did you shred the partition table?
=>fdisk -l /dev/sda
Disk /dev/sda: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4A456725-6CA2-D044-893E-DABB711039C2
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda3 3147776 468862094 465714319 222.1G Linux filesystem
Disk /dev/sdb: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 16E83746-7F17-4270-8089-4675CB258D17I had /dev/sda2 as swap, which I deleted
Offline
/dev/sda3 3147776 468862094 465714319 222.1G Linux filesystemThat's significantly bigger than the filesystem listed in lsblk, I assume you repartitioned the drive but didn't move & grow the filesystem?
Online
/dev/sda3 3147776 468862094 465714319 222.1G Linux filesystemThat's significantly bigger than the filesystem listed in lsblk, I assume you repartitioned the drive but didn't move & grow the filesystem?
There's around 1GB unallocated space on /dev/sda(the old swap partition size) and 99GB free space on /dev/sda3, allocated
Offline
Ah, lsblk does indeed account for the 10% reserve, sorry.
Can you boot w/ "resume=/dev/sda3"?
Online
Ah, lsblk does indeed account for the 10% reserve, sorry.
Can you boot w/ "resume=/dev/sda3"?
Boot? Yes
Hibernate? No, same error
Offline
Got something out of journalctl
Oct 06 21:30:38 ArchWrkSt systemd[1]: Reached target Sleep.
Oct 06 21:30:38 ArchWrkSt systemd[1]: Starting Hibernate...
Oct 06 21:30:38 ArchWrkSt systemd-sleep[955]: Failed to find location to hibernate to: Function not implemented
Oct 06 21:30:38 ArchWrkSt systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Oct 06 21:30:38 ArchWrkSt systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Oct 06 21:30:38 ArchWrkSt systemd[1]: Failed to start Hibernate.
Oct 06 21:30:38 ArchWrkSt systemd[1]: Dependency failed for System Hibernation.
Oct 06 21:30:38 ArchWrkSt systemd[1]: hibernate.target: Job hibernate.target/start failed with result 'dependency'.
Oct 06 21:30:38 ArchWrkSt audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hibernate comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? termi>
Oct 06 21:30:38 ArchWrkSt systemd-logind[308]: Operation 'sleep' finished.
Oct 06 21:30:38 ArchWrkSt systemd[1]: Stopped target Sleep.edit: nvm I put 8:0 instead of 8:3 in /sys/power/resume
Last edited by kbunny (2021-10-06 18:37:26)
Offline
Do/did you always hibernate by writing /sys/power/resume and is 8:3 correct (lsblk) and do you also write /sys/power/resume_offset ?
Do the journals otherwise promise successful hibernation preperation?
You did "mkswap /swapfile" (ie. did follow https://wiki.archlinux.org/title/Swap#Manually )?
Online
Do/did you always hibernate by writing /sys/power/resume and is 8:3 correct (lsblk) and do you also write /sys/power/resume_offset ?
Do the journals otherwise promise successful hibernation preperation?
You did "mkswap /swapfile" (ie. did follow https://wiki.archlinux.org/title/Swap#Manually )?
I tried to hibernate using /sys/power/resume to avoid reboot
I also wrote /sys/power/resume_offset
I did mkswap on that file
cat /proc/swaps
Filename Type Size Used Priority
/swapfile file 16777212 0 -2systemd-hibernation log:
sudo journalctl -e -u systemd-hibernate
-- Boot acb38c2a1d1642a3b93d6039e97108e1 --
Oct 07 15:35:58 ArchWrkSt systemd[1]: Starting Hibernate...
Oct 07 15:35:58 ArchWrkSt systemd-sleep[29028]: Entering sleep state 'hibernate'...Offline
I tried to hibernate using /sys/power/resume to avoid reboot
Don't.
Reboot (you only need to do that once to get the kernel commandline) and then use the regular "systemctl hibernate" for hibernation.
Online
I tried to hibernate using /sys/power/resume to avoid reboot
Don't.
Reboot (you only need to do that once to get the kernel commandline) and then use the regular "systemctl hibernate" for hibernation.
Tried both. Same error
Offline
Edited kernel parameters in grub manually and it works. It doesn't pick up what's in /boot/grub/grub.cfg ffs
Offline
But you had
sudo grub-mkconfig -o /boot/grub/grub.cfg && cat /boot/grub/grub.cfg | grep resume
linux /vmlinuz-linux root=UUID=942a579c-141a-4e77-a743-848bbda9891e rw loglevel=3 quiet iommu=soft resume=UUID=942a579c-141a-4e77-a743-848bbda9891e resume_offset=8540160
?
Did you simpyl forget to mount the /boot partition at the time?
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Online
But you had
sudo grub-mkconfig -o /boot/grub/grub.cfg && cat /boot/grub/grub.cfg | grep resume
linux /vmlinuz-linux root=UUID=942a579c-141a-4e77-a743-848bbda9891e rw loglevel=3 quiet iommu=soft resume=UUID=942a579c-141a-4e77-a743-848bbda9891e resume_offset=8540160?
Did you simpyl forget to mount the /boot partition at the time?
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
No. It doesn't read /boot/grub/grub.cfg
Offline