Enable Hibernate in Ubuntu 18.04 LTS [duplicate]

How can I set Hibernation in Ubuntu 18.04 LTS (laptop)?

When I open the Power option > When the Power Button is pressed, I just see the following options:

  • Suspend
  • Power OFF
  • Nothing

But does not show Hibernate.


Solution 1:

If you are OK with suspending instead of hibernating, you can try this:

  1. Before you click "Power Button" - press "Alt"

    OR

  2. Click "Power Button" and hold it.

Solution 2:

sudo systemctl hibernate

This did not work for me. I try pm-hibernate which did not work for me either until I added missing package uswsusp

sudo apt install uswsusp  

Solution 3:

Use this, it is more recent. It worked for me with a new 18.04 install on my laptop. http://ubuntuhandbook.org/index.php/2018/05/add-hibernate-option-ubuntu-18-04/

Also, check that you have a swap file before you start. You should have one by default. Run

swapon --show

to check.