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.


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

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


  2. Click "Power Button" and hold it.

  • 2
    Why was this reply down voted? I "plussed" it because it is the simplest answer and it answers the question. By pressing Alt the Power button changes to a "Pause" button; click it again, the computer goes into hibernation. – Norm C. May 13 '18 at 16:39
  • 36
    This is a good trick to know, but this does not hibernate (suspend to disk) but instead puts the computer to sleep (suspends to RAM) – btalb May 27 '18 at 4:02
  • 2
    This may not answer the question as asked, but compared to the true answers (enabling hibernate in Ubuntu 18.04 is complicated!) it's a partial solution and it's simple. – robm Jun 1 '18 at 23:40
  • 2
    you should add as part of the answer that this solution does not hibernates the system, suspends it to avoid confusions. – Facundo Colombier Jan 22 '19 at 12:58
  • 10
    This answer doesn't even remotely try to answer this question. Q: "I want to hibernate but I can only suspend" / A: "Here is an alternative way to suspend". Why would anyone vote that up?? – Nye Mar 11 '19 at 14:43
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  
  • What did not work? The blogpost suggestion? If you meant this, then I can confirm it didn't work, though I followed the procedure. Any idea, what went wrong? – Semo Jun 14 '18 at 4:55
  • 8
    hibernate command was acting like shutdown for me, no windows restored. Then I installed uswsusp and hibernate worked for me just once. Now I see the option in action for power button press and set it too. But now again hibernate acts like shutdown. – Mr.Hunt Nov 11 '18 at 8:40
  • I had the same problem, the hibernate command was acting like shutdown. I followed this answer and now it works! – lucidbrot Mar 14 '20 at 14:15
  • I fond other solution it this thread which leads to solution – Pa Weł Mar 16 '20 at 17:56

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.


Not the answer you're looking for? Browse other questions tagged or ask your own question.