Created
March 12, 2021 16:22
-
-
Save omkar-tenkale/0aad50c7dfbaac47a0a8d89d146c2ace to your computer and use it in GitHub Desktop.
hibernate ubuntu 20 steps to enable hibernation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enabling Hibernate | |
[https://kaigo.medium.com/ubuntu-20-04-on-dell-xps-15-9570-14efd881f0d2] | |
Install gparted from Ubuntu Software Centre | |
Find the partition with the file system linux-swap | |
Right click > Swapon (if not already on) | |
Right click > Information | |
Copy the UUID=14cee2ec-9d37–4ac0-b594-eae0e55814aa (for example) | |
Add this UUID to /etc/default/grub file by running sudo gedit /etc/default/grub and editing the line | |
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" | |
to | |
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=14cee2ec-9d37-4ac0-b594-eae0e55814aa" | |
7. Run sudo update-grub | |
8. Add the UUID again, to `/etc/initramfs-tools/conf.d/resume` file by running sudo gedit /etc/initramfs-tools/conf.d/resume | |
and pasting in the following: | |
RESUME=UUID=14cee2ec-9d37-4ac0-b594-eae0e55814aa | |
9. Run `sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla` | |
and paste in the following: | |
[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 | |
10. Run `sudo gedit /etc/systemd/logind.conf` | |
and change the following line: | |
#HandleLidSwitch=poweroff | |
to | |
HandleLidSwitch=hibernate | |
And . . . . reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment