53

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.

5
  • Follow this guide- ubuntuhandbook.org/index.php/2017/10/… May 3, 2018 at 18:01
  • 18
    Voting to reopen since in 18.04 things have changed. The pm-utils package is obsolete and power management is now handled by systemd.
    – psusi
    Jul 11, 2018 at 20:50
  • 2
    @psusi and doesn't the linked post have the systemd solution as well?
    – muru
    Jul 12, 2018 at 4:10
  • answer in: askubuntu.com/questions/1056326/…
    – Ferroao
    Jun 28, 2019 at 23:00
  • @Ferroao seems to have been removed, the only remaining answer is now another link.
    – mckenzm
    Mar 26, 2021 at 19:54

3 Answers 3

25

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.

9
  • 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, 2018 at 16:39
  • 37
    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, 2018 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, 2018 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. Jan 22, 2019 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, 2019 at 14:43
20
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  
4
  • 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, 2018 at 4:55
  • 9
    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, 2018 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, 2020 at 14:15
  • I fond other solution it this thread which leads to solution
    – Pa Weł
    Mar 16, 2020 at 17:56
12

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.

0

Not the answer you're looking for? Browse other questions tagged .