Lvm hibernation problems, maybe bugs?

Hello,

I have difficulty setting up hibernation with lvm

My lsblk output is as follows

sudo lsblk
NAME           MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda              8:0    0 447,1G  0 disk 
├─sda1           8:1    0   512M  0 part /boot
├─sda2           8:2    0   256M  0 part /boot/efi
└─sda3           8:3    0 446,4G  0 part 
  ├─vg1-lvhome 254:0    0   100G  0 lvm  /home
  ├─vg1-lvswap 254:1    0    20G  0 lvm  [SWAP]
  └─vg1-lvroot 254:2    0    50G  0 lvm  /
sdb              8:16   0 465,8G  0 disk 
└─sdb1           8:17   0 465,8G  0 part 
sr0             11:0    1  1024M  0 rom  

My /etc/fstab

# /dev/sda1 UUID=FFDC-1F99
PARTUUID=b35edc64-dd68-442d-a8be-ea9d0db98a03   /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro       0 0

# /dev/sda2 UUID=11CA-2D33
PARTUUID=6b0c56c8-f0c2-4768-b4f4-83bb5ae86b0c   /boot/efi       vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro       0 0

# /dev/mapper/vg1-lvswap UUID=fead67c7-2d48-4452-bd79-7208a05a221d
/dev/mapper/vg1-lvswap                          none            swap            defaults,pri=-2 0 0

# /dev/mapper/vg1-lvroot UUID=e478e9c9-2f3d-43fb-afe8-fba87fcd2f51
/dev/mapper/vg1-lvroot                          /               ext4            defaults,relatime       0 0

# /dev/mapper/vg1-lvhome UUID=5903fef1-3e1c-42b5-8ec7-55fd93345b9c
/dev/mapper/vg1-lvhome                          /home           ext4            defaults,relatime       0 0

free command output

free 
  total            used        free      shared  buff/cache   available
Mem:            14Gi       2,2Gi        10Gi       539Mi       2,2Gi        11Gi
Swap:           19Gi          0B        19Gi

GRUB CMDLINE AT /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3 resume=/dev/vg1/lvswap zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=20 zswap.zpool=z3fold"

I can see the grub.cfg file is generate properly at /boot/grub/grub.cfg

BUT : The major and minor number at /sys/power/resume is always 0:0.

As far as I know based on lsblk output, it has to be 254:1

I tried changed them via echo "254:1" > /sys/power/resume as suggested at Arch Wiki Suspend and Hibernate but it is overwritten at reboots.

Any help is much appreciated.

your /etc/fstab says:

your kernel parameter (of what is supposed to be the same) says:

shouldn’t it be:
resume=/dev/mapper/vg1-lvswap
(note the word “mapper” in the path, also the device name is different in what you have now)

or, rather:
resume=UUID=fead67c7-2d48-4452-bd79-7208a05a221d

?

Power management/Suspend and hibernate - ArchWiki

Those should both be symlinks and pointing to the same target.

maybe, it looks like it, you probably know :wink:

but I have only ever seen this notation in a kernel command-line (in Grub)

to be working

I was my best guess. :wink:

ps:
on my current system, I opted to not use lvm, but just dm-crypt
and /dev/mapper/cryptroot is a symlink to /dev/dm-0

and I use a swap file, not a swap partition

My kernel command line is referred to by UUID
like this:
resume=/dev/disk/by-uuid/xxxxxxx
and then
resume_offset=xxxxx

The arch wiki (link already given) has some extra notes for lvm.
The resume-hook placement after lvm-hook in mkinitcpio.conf could have been overlooked?

@Nachlese, @freggel.doe thank for the response. I have one pc and one labtop installed manjaro. They are updated to the latest version. They both have the same disk layout presented in the question. The question is asked for the pc.

/dev/mapper/vg1-lvswap or /dev/vg1/lvswap should work everywhere but in my labtop if I use resume=/dev/mapper/vg1-lvswap in GRUB_CMDLINE_LINUX_DEFAULT at /etc/default/grub it does not boot. However in my pc, both version does work.

In my labtop, I could have changed /sys/power/resume by overwriting it, but in my pc it does not allow that. It always resets to 0.0 .

lvm2 is added to /etc/mkinitcpio.conf hooks previously. I use lvm without problem but hibernation does not work.