20

There are a bunch of questions on here about suspend resume error.

The same question appears in: suspend/resume failure but I don't understand any of the responses. We are using different laptops (mind is Lenovo) so there may be different types of hardware that are effected.

I tried reading this tutorial. In my case sudo pm-hibernate does not work in the Terminal, and the configuration steps does not fix this.

I am trying to understand why Hibernate is going wrong, including the discussion power management/hibernate from the Ubuntu manual. They suggest there is a problem with swsusp but I am not sure how to tamper with that section.

I found GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" in my /etc/default/grub file.

Did anyone get this to work?


In fact head /var/log/pm-suspend.log leads to

Running hook /usr/lib/pm-utils/sleep.d/000kernel-change hibernate hibernate:
/usr/lib/pm-utils/sleep.d/000kernel-change hibernate hibernate: success.

Running hook /usr/lib/pm-utils/sleep.d/000record-status hibernate hibernate:
/usr/lib/pm-utils/sleep.d/000record-status hibernate hibernate: success.

Running hook /usr/lib/pm-utils/sleep.d/00logging hibernate hibernate:
Linux jdm-Lenovo-B570 3.13.0-46-generic #76-Ubuntu SMP Thu Feb 26 18:52:13 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

3 Answers3

16

I was having the same problem.

sudo pm-hibernate

...nothing.

>~$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Hibernate
> method return sender=:1.44 -> dest=:1.303 reply_serial=2

...nothing.

Looking around, I found a suggestion to check the pm-hibernate log:

>~$ head /var/log/pm-suspend.log
> Initial commandline parameters: 
> Wed Apr 29 22:38:06 PDT 2015: Running hooks for hibernate.
> Running hook /usr/lib/pm-utils/sleep.d/000kernel-change hibernate
>  hibernate: kernel update inhibits hibernate (/var/run/do-not-
>  hibernate present)

Ah! So the system needs to be rebooted because there was a kernel update. It would be great to get some kind of notification of the fact, instead of ...nothing.

BTW, to tell if you need to reboot:

>~$ ls -l /var/run/reboot-required
> -rw-r--r-- 1 root root 32 Apr 29 18:28 /var/run/reboot-required

Basically, if that file exists, a reboot is required. I can't tell you what will happen if you put the system into hibernation if you need to reboot due to a kernel update, but I was able to hibernate immediately when I did this:

>~$ sudo rm /var/run/do-not-hibernate
Bungler
  • 261
2

did u try to specify correct swap partition as mentioned in swsusp troubleshooting in PowerManagement/Hibernate? it fixed pm-hibernate for me. also, i use shutdown mode. I have lenovo z50-70.

My grub file has "quiet splash" too but I simply appended my swap partition beside it.

sbharti
  • 266
1

As you put the link here, swsusp troubleshooting part of this worked for me.

First method

First, you need to check if your swap partition configured correctly. To perform this, initially, run sudo blkid and copy the UUID of the partition which has the type of swap (maybe it's /dev/sda6), I'll call it <swap uuid> from now on. Before continuing, you should make a copy as a backup from /etc/fstab:

sudo cp /etc/fstab /etc/fstab.back

Now open /etc/fstab file using such a file editor as nano (run it as root). Then, comment every line you see swap phrase in it by adding a # at the beginning of the line. Here, add this line to the end of file, where <swap uuid> is the value you found with sudo blkid above:

UUID=<swap uuid> none swap sw 0 0

Save the file. Maybe the problem with swap partition was fixed.

Note: Your swap partition size should be greater than your RAM size; unless you may have problems with hibernating.

Second method

From the link above, the quoted description, with some changes (see above for using sudo blkid to find the value to use for <swap uuid> below):

Problem: The computer goes to hibernate, OK. But after power-on it is loading as if no hibernate state was saved.

In the case of grub2:

  1. You should make a backup. Run:

sudo cp /etc/default/grub /etc/default/grub.back

  1. Open /etc/default/grub;

  2. Find GRUB_CMDLINE_LINUX_DEFAULT= line. These are the option added to the regular boot menu choices;

  3. Add the resume=UUID=<swap uuid> option to the list like this:

Before:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

After (note the quotations):

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=<swap uuid>"

Note: You might not want to change any options before adding resume (e.g. changing nosplash option to splash). However, I recommend you to use both quiet and splash options.

  1. Save the file.
  2. In the terminal, execute the following command (to actually enable the new configuration settings)

sudo update-grub2

Now, try sudo pm-hibernate command to hibernate your computer, then try booting again. Your problem may be fixed.

Hope it helps someone!

ntc2
  • 700