You are not logged in.
Hello.
I can't to setup hibernation.
I have brtfs filesystem.
I get this error:
systemctl hibernate
Call to Hibernate failed: Not enough swap space for hibernationI increase swap file to 34 GB from 24Gb but it don't help me.
Some my debug outputs:
free -h
total used free shared buff/cache available
Mem: 31Gi 1,8Gi 27Gi 740Mi 2,0Gi 28Gi
Swap: 33Gi 0B 33Giswapon --show
NAME TYPE SIZE USED PRIO
/swapfile file 34G 0B -2/etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/cryptdisk
UUID=f9c9d233-99a5-4deb-a409-14279cad247b / btrfs rw,relatime,compress=zstd:3,ssd,space_cache=v2,subvolid=256,subvol=/@ 0 0
# /dev/nvme0n1p4
UUID=8281-BEC0 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/mapper/cryptdisk
UUID=f9c9d233-99a5-4deb-a409-14279cad247b /home btrfs rw,relatime,compress=zstd:3,ssd,space_cache=v2,subvolid=257,subvol=/@home 0 0
#/swapfile
/swapfile none swap default 0 0/boot/loader/entries/arch.conf
title Arch Linux Zen
linux /vmlinuz-linux-zen
initrd /initramfs-linux-zen.img
options cryptdevice=UUID=c6fef343-9918-42bb-b56f-05a54fe1497b:cryptdisk root=/dev/mapper/cryptdisk rootflags=subvol=@ rw resume=UUID=c6fef343-9918-42bb-b56f-05a54fe1497b resume_offset=3763994 quiet
options ibt=offLast edited by zakrush (2023-05-10 15:18:45)
Offline
Somebody can help me?
Offline
Did you use the btrfs-progs to create and reference the swap file?
https://wiki.archlinux.org/title/Btrfs#Swap_file
https://wiki.archlinux.org/title/Power_ … _swap_file
Online
Ok.
Thanks, but I didn't have any idea what I can enable hibernation.
Yes. I all did as describe instructions.
this is my history of commands:
sudo btrfs filesystem mkswapfile --size 34G /swapfile
sudo swapon /swapfile
sudo ./btrfs_map_physical /swapfilethe result of ./btrfs_map_physical /swapfile
FILE OFFSET FILE SIZE EXTENT OFFSET EXTENT TYPE LOGICAL SIZE LOGICAL OFFSET PHYSICAL SIZE DEVID PHYSICAL OFFSET
0 4096 0 regular 268435456 14335188992 268435456 1 15417319424
4096 268431360 4096 prealloc 268435456 14335188992 268435456 1 15417319424
268435456 268435456 0 prealloc 268435456 41906339840 268435456 1 44062212096getconf PAGESIZE
4096Offline
Yes. I all did as describe instructions.
No, you did obviously not.
What is "./btrfs_map_physical", why does it produce completely unaligned output and where does "resume_offset=3763994" come from?
Online
Yes. I all did as describe instructions.
No, you did obviously not.
What is "./btrfs_map_physical", why does it produce completely unaligned output and where does "resume_offset=3763994" come from?
I get it from old version of wiki
see here
https://wiki.archlinux.org/index.php?ti … did=758420
where does "resume_offset=3763994"
It is first phisical offset devided to PAGESIZE
The
btrfs inspect-internal map-swapfile -r /swapfile
has the same result:
sudo btrfs inspect-internal map-swapfile -r /swapfile
3763994Offline
Did you create the swap file on a non-snapshotted subvolume like https://wiki.archlinux.org/title/Btrfs#Swap_file instructs?
Offline
Note:
For a stacked block device such as an encrypted container (LUKS), RAID or LVM, the resume parameter must point to the unlocked/mapped device that contains the file system with the swap file.
Offline
Did you create the swap file on a non-snapshotted subvolume like https://wiki.archlinux.org/title/Btrfs#Swap_file instructs?
I all did as describe instruction. I create snapshot file on root subvolume.
It's
rootflags=subvol=@ wiki wrote:
Note:For a stacked block device such as an encrypted container (LUKS), RAID or LVM, the resume parameter must point to the unlocked/mapped device that contains the file system with the swap file.
As I understand I'm using LUCS:
cryptsetup -y -v luksFormat /dev/nvme0n1p5How should to be looks my loader file on start topic message?
Here is my hooks in /etc/mkinitcpio.conf
HOOKS=(base udev resume autodetect modconf encrypt keyboard keymap consolefont block filesystems fsck)Last edited by zakrush (2023-05-05 09:14:20)
Offline
Looking at your posted fstab, the resume= parameter looks correct. A lot of people would likely use the same device specifier for both root= and resume=, but there's nothing wrong with using different ones as long as they resolve to the same block device.
Post the output of:
$ findmnt -no MAJ:MIN -T /swapfile
$ grep . /sys/power/resume*Last edited by nl6720 (2023-05-10 13:59:50)
Offline
Post the output of:
$ findmnt -no MAJ:MIN -T /swapfile $ grep . /sys/power/resume*
There is output
findmnt -no MAJ:MIN -T /swapfile
0:25
sudo grep ./sys/power/resume*
zsh: no matches found: ./sys/power/resume*Offline
sudo grep ./sys/power/resume*
grep . /sys/power/resume*
Online
So, sorry. I didn't see
findmnt -no MAJ:MIN -T /swapfile
0:25
grep . /sys/power/resume*
/sys/power/resume:259:5
/sys/power/resume_offset:3763994Offline
The resume= parameter in /boot/loader/entries/arch.conf is wrong.
I could have sworn the UUID in the resume= parameter matched with the "/" UUID in fstab when I first looked at it. I guess I can't read, shame on me. ![]()
Offline
The resume= parameter in /boot/loader/entries/arch.conf is wrong.
I could have sworn the UUID in the resume= parameter matched with the "/" UUID in fstab when I first looked at it. I guess I can't read, shame on me.
What is wrong?
I tried to reinstall swapfile. Then I set up HOOK resume between filesystems and fsck as describe arch wiki. It didn't help me.
setup resume=/swapfile in bootloader also didn't help. I get /swapfile not found error on boot
Offline
I understand.
nl6720 thank you very much. I'm see error. It was incorrect UUID in bootloader.
the command
findmnt -no UUID -T /swapfilehelped me to see it.
Offline