I have a fresh install of 16.04.1 on a Lenovo T450s that always worked fine with respect to suspend/hibernate on Ubuntu (previous version I used was 14.04.5). Swap is comfortably bigger than RAM on this install.

As I am used to now, after the install I tried to go on with the usual hack for hibernation activation. However, things seem to be different this time as sudo pm-hibernate does not seem to do anything.

As far as I understand, now that ubuntu has switched to systemd, the correct command would be systemctl hibernate which returns

 Failed to hibernate system via logind: Sleep verb not supported

I tried the solutions mentioned here, but they are mostly aimed at re-enabling pm-hibernate and making it an entry in the logout menu. I also saw that one possible solution is to install the Tuxonice kernel, but did not try as I am not very keen on tampering with the kernel in general and using a PPA kernel in particular.

So, is there a way to reactivate hibernation on the last, systemd-based versions of Ubuntu? Preferably using systemd, and avoiding potentially system-breaking hacks. Or do I just have to wait and hope until the next update?

  • Yes, I tried. The thing is it is not that hibernation fails, say the system hangs while shutting down or fails to thaw. It is just that nothing happens when I fire systemctl hibernate (with or without sudo), except this message Failed to hibernate system via logind: Sleep verb not supported. – Marc Jan 6 '17 at 23:24
  • Swap is up and working well, no problem there. I tried the grub thing anyways just to be sure. No luck. – Marc Jan 8 '17 at 8:55
  • FWIW, sudo pm-hibernate still works on 16.04... usually. From your answer below, It seems that hibernating doesn't really work with Secure Boot, but if it did, pm-hibernate would definitely work as expected. Of course, you could also use the systemctl command as well. – TSJNachos117 Sep 17 '17 at 5:13
up vote 25 down vote accepted

I was finally able to solve my own problem following some topics on Fedora (they made the switch to systemd a while ago so there's more material there).

It turns out that I had secure boot enabled (I recall being asked about that during 16.04 install, and that I kept it on without giving it much thought) and that caused the output of cat /sys/power/disk to be:

 [disabled]

Indeed not a very good sign. So I rebooted and went searching in my BIOS settings, disabled secure boot there. Now cat /sys/power/disk gets me:

 [platform] shutdown reboot suspend 

which looks better. And indeed calling systemctl hibernate results in a successful hibernate/thaw sequence.

Moreover, the option to hibernate now shows up in the graphical interface without the need for any hack (at least on my computer).

  • Thanks man. You saved my day. I really thank you. Thank you thank you. – Khamidulla Feb 27 '17 at 1:39
  • 2
    This should be added in the Ubuntu documentation here: help.ubuntu.com/stable/ubuntu-help/power-hibernate.html – Joaquín Aramendía May 12 '17 at 15:18
  • Thanks. It worked for me as well with Ubuntu 16.04 on asus zenbook apart that menu option for hibernating in graphical interface still is missing. – Wojteks Jun 6 '17 at 6:37
  • Just FYI, if your disk setting is not the reason or the answer doesn't fix your error, try enabling your swap space and make sure it is reasonably sized over your total installed physical RAM. That did it for me! – der_michael Aug 15 '17 at 5:20
  • Thanks for the comment, but the swap was on and generously sized in my case. – Marc Aug 16 '17 at 5:42

This can also happen when your swap is too small to hold your RAM contents (e.g. when you added more RAM to your computer after setting up the OS).

Check e.g. in htop, then Mem number should be <= the Swp number.

See https://github.com/systemd/systemd/issues/6729

  • 1
    Thanks for your suggestion, but this was not the problem in my case. It was discussed in the comments. I will update the main text to make it even clearer. By the way, I do not understand why this is always the first thing people suggest regarding fixing hibernation, while the standard ubuntu install will usually come out with the right amount of swap, unless you voluntarily tampered with it. – Marc Sep 17 '17 at 4:24
  • @Marc Like I said in the answer: Even if the Ubuntu install picks the right amount of swap at the time of the installation, it is very common for people to just buy another RAM stick and plug it into the computer after the installation (e.g. upgrade from 8 GB to 16 GB RAM a year after you bought and installed the machine). – nh2 Sep 17 '17 at 14:08

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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