5/11/2020

Enable Ubuntu 18.04/22.04 hibernate

To make things easy: create a swap drive instead of using a swap file.

In the BIOS settings: disable secure boot FIRST.

Then follow: https://www.geeksforgeeks.org/how-to-enable-hibernate-in-ubuntu-22-04-lts/

Edit the file /etc/systemd/sleep.conf with the following configuration:


[Sleep]
HibernateMode=shutdown


Enable the hibernation menu:

sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.desktop.pkla
 
[Enable hibernate in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Enable hibernate 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
  

No comments: