Kernel should have this: https://www.phoronix.com/news/LZ4-Linux-Hibernation-v2
sudo swapoff /home/swapfile
sudo dd if=/dev/zero of=/home/swapfile bs=1M count=24576 oflag=append conv=notrunc
sudo mkswap /home/swapfile
sudo swapon /home/swapfile
sudo frzr-unlock
sudo mv /boot/initramfs-linux.img /boot/initramfs-linux-stock.img
sudo nano /etc/mkinitcpio.conf # add resume after udev in the HOOKS= line
sudo mkinitcpio -g /boot/initramfs-linux.img
Get the UUID of the partition and the swapfile offset
lsblk -f # note down the UUID
sudo btrfs inspect-internal map-swapfile -r /home/swapfile # note down the offset
add resume=UUID= and resume_offset= before nowatchdog in the options line:
sudo nano /boot/loader/entries/frzr.conf
Step 5. Workaround for systemd/systemd#15354
sudo systemctl edit systemd-logind.service
add the following under Anything between here and the comment below will become the contents of the drop-in file
[Service]
ProtectHome=read-only
change power_button from SUSPEND to HIBERNATE:
sudo vim /etc/handygccs/handygccs.conf
change HandlePowerButton to suspend-then-hibernate:
sudo nano /etc/systemd/logind.conf.d/power_off.conf
setting: HibernateDelaySec=X
in /etc/systemd/sleep.conf
you can configure how much time after sleep it will hibernate given how fast nvmes are, this is the sweet spot. use sleep-then-hibernate with 30 minutes more or less until it hibernates and continue from where we left with much more power in the battery