In my previous Kubuntu system I was able to hibernate, but with 22.04 I am unable.
My output for grub:
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=4ff9741-2dc2-4f32-96e3-9b574a7f2739 resume_offset=34818 quiet splash"
GRUB_CMDLINE_LINUX=""
Then my output for fstab, specifically the section for swap:
swap was on /dev/sda4 during installation
UUID=14ff9741-2dc2-4f32-96e3-9b574a7f2739 none swap sw 0 0
the output of /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes
[Enable hibernate to be run via cron]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions
ResultAny=yes
Now when I do df -h:
Filesystem Size Used Avail Use% Mounted on
tmpfs 785M 2.3M 783M 1% /run
/dev/sda2 24G 14G 8.5G 62% /
tmpfs 3.9G 3.6M 3.9G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/sda3 211G 140G 61G 70% /home
/dev/sda1 140M 22M 118M 16% /boot/efi
tmpfs 785M 13M 773M 2% /run/user/1000
Swap is supposed to be visible under sda4 with 17gb after I gparted it to increase its size.
Lastly, if I do systemctl hibernate
I have this error "Failed to hibernate system via logind: Not enough swap space for hibernation"
I really like the option to hibernate as it really save tons of battery and extend the durability of the battery. I also live in a country where shortage of electricity are common.
EDIT
Output of swap -s
Filename Type Size Used Priority
/dev/sda4 partition 17746940 0 -2