Since "Suspend" option doesn't work for me properly (my laptop may wake up on its own without my interfearance) and even if it doesn't wake up, the Suspend option drains the battery like hell.
I started reading about getting Hibernation option in LM as the Windows hibernation works as expected.
I have LM 20.2 with 5.11.0-36-generic Kernel installed.
I have dual boot having Windows installed on my 512GB NVMe SSD and LM installed on 120GB SATA SSD. The laptop has 32GB of RAM
Since I don't utilize the NVMe SSD fully (I have around 300GB of free space) I figured I could shrink the C drive to get 38GB of space for only one purpose - to create the swapfile.
Since the swap was already enabled during the installation (2GB), I removed that one, used gparted to find the unallocated space from Windows (/dev/nvme0n1p5) and formatted it into linux-swap. I commented out the previous /swapfile and I then entered /dev/nvme0n1p5 none swap sw 0 0 in my /etc/fstab
$free -h shows Swap: 38Gi 0B 38Gi
After that, I tried using sudo pm-hibernate but it didn't work for me properly. It just shut down the OS without restoring the previous state of it. I still added the hibernate button
Code: Select all
sudo -i
cd /var/lib/polkit-1/localauthority/50-local.d/
nano com.ubuntu.enable-hibernate.pkla
Paste the following content into that file:
[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
ResultActive=yes
Any ideas how to fix this issue and make the hibernation work propelry?