Hello,
I need some advice on managing the hibernation mode. I tried for hours, but by now I’m almost out of ideas…
I have an i7 12700K on a Gigabyte Aorus Z790 Elite AX with 32GB of RAM and a RTX 4060ti 16GB.
I installed grub instead of systemd for boot because I find it’s booting faster, and I want to use the snapper integration.
When fresh installed, CachyOS uses ZRAM for swap. As far as I know, ZRAM does not support hibernation.
So first I disable ZRAM
sudo systemctl stop systemd-zram-setup@zram0.service
sudo systemctl mask systemd-zram-setup@zram0.service
Then I start gparted and generate a swap partition with 32GB size.
swapon --show
gives
NAME TYPE SIZE USED PRIO
/dev/nvme2n1p8 partition 32G 0B -2
sudo blkid | grep swap
gives
/dev/nvme2n1p8: UUID="296e2d67-e962-45bb-8bb3-7a8fbf318334" TYPE="swap" PARTLABEL="CachyOS-swap" PARTUUID="b3e91e4a-1a2d-425f-9cc1-6675c4b3bbac"
Then edit fstab
sudo nano /etc/fstab
and add the UUID for swap
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=F102-B14B /boot/efi vfat defaults,umask=0077 0 2
UUID=09863c53-0bb0-474f-b780-ef2f1e288527 / btrfs subvol=/@,defaults,noatime,compress=zstd,commit=120 0 0
UUID=09863c53-0bb0-474f-b780-ef2f1e288527 /root btrfs subvol=/@root,defaults,noatime,compress=zstd,commit=120 0 0
UUID=09863c53-0bb0-474f-b780-ef2f1e288527 /srv btrfs subvol=/@srv,defaults,noatime,compress=zstd,commit=120 0 0
UUID=09863c53-0bb0-474f-b780-ef2f1e288527 /var/cache btrfs subvol=/@cache,defaults,noatime,compress=zstd,commit=120 0 0
UUID=09863c53-0bb0-474f-b780-ef2f1e288527 /var/tmp btrfs subvol=/@tmp,defaults,noatime,compress=zstd,commit=120 0 0
UUID=09863c53-0bb0-474f-b780-ef2f1e288527 /var/log btrfs subvol=/@log,defaults,noatime,compress=zstd,commit=120 0 0
UUID=5153b110-760b-4ccd-aad3-d2e379efe590 /home btrfs defaults,noatime,compress=zstd,commit=120 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
UUID=296e2d67-e962-45bb-8bb3-7a8fbf318334 none swap defaults 0 0
after written, update the system by
sudo systemctl daemon-reload
thereafter edit grub
sudo nano /etc/default/grub
and add the swap for resuming in the line
GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES loglevel=3 resume=UUID=296e2d67-e962-45bb-8bb3-7a8fbf318334'
after written, update the system with
sudo grub-mkconfig -o /boot/grub/grub.cfg
Then edit the HOOKS in file mkinitcpio.conf
sudo nano /etc/mkinitcpio.conf
add resume after udev in the line
HOOKS=(base udev resume autodetect microcode kms modconf block keyboard keymap consolefont plymouth filesystems)
after written, update the system with
sudo mkinitcpio -P
Then reboot the system and it should work.
This is the first time I can see the menu-point hibernation in the closing menu, so far so good.
As I can see and understand, the system goes to hibernation when I click. But when I start the system, it shows resuming, but when it’s ready it shows as if it has had a fresh boot.
I did a bit of searching with ChatGPT, and it told me that there could be a problem with the NVIDIA VRAM and it should be added
NVreg_PreserveVideoMemoryAllocations=1
in /etc/default/grub.
I did this, but no success.
I can’t believe that no one uses hibernation with Intel CPU and NVIDIA GPU and has not managed the setup for hibernation.
And yes: all necessary steps for power management in the UEFI are made.
Could anyone give some advice?
Thank you very much
Jo