Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I own a ThinkPad X60, hibernate used to work on 10.04 Lucid Lynx, but no longer works correctly on 12.04.

I am aware of how to enable hibernate in Power Manager.

The problem here is, in the default configuration, pm-hibernate works, but the system fails to resume correctly. There is no video glitch, black screen or other. The resume process just freezes on the Ubuntu splash boot after a few seconds of disk activity.

Is there a way to fix the system configuration so hibernates works again?

share|improve this question
add comment

6 Answers 6

Dell Latitude E6500 here. I had the same problem. Here's what fixed it:

sudo apt-get purge uswsusp

SLEEP_MODE is in default kernel mode. Now it hibernates like a champ. Apparently, uswsusp works imprecisely with the Precise Pangolin.

share|improve this answer
add comment

Similar problem here, using HP FOLIO 13 and Ubuntu 12.04. pm-hibernate power off but when I power cycle, it acts as cold boot. I tried echo disk > /sys/power/state and it does not hibernate. Tried both kernel and tuxonice on sleep_mode with no success.

Since initially looking at this, I've discovered what was wrong: swap space was encrypted, thus hibernate doesn't know how to resume.

Solution here and here.

share|improve this answer
add comment

Since the solution I found for this is not trivial, I wanted to post it here for the record.

I read the man page for pm-hibernate, and in the section on the HIBERNATE_MODE configuration option, I saw a mention of the /sys/power/disk file. I remembered that a few years ago I used to debug suspend and hibernate by writing to /sys/power/state. The possible values can be seen by reading the file.

I tested kernel-level hibernation with sudo sh -c 'echo disk > /sys/power/state'. The system suspended and resumed correctly.

So the problem was that pm-hibernate was doing something wrong.

I tried setting the SLEEP_MODULE option by creating a file /etc/pm/config.d/sleep_module with the content:

SLEEP_MODULE=tuxonice

And that fixed resuming after pm-hibernate.

Then, I needed to create a file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla as explained here.

And I had a fully working hibernate feature for my ThinkPad X60.

There is probably a bug to be filed in Launchpad about this, but I do not know what it would be.

I have had some stability issues with hibernate since applying this fix. So far, it has failed to resume once, and it failed to hibernate once. So be careful. Another sleep module might be more reliable, but I cannot test that until I can reproduce the problems.

share|improve this answer
    
I do have some stability issues with hibernate after this fix. So far, it failed to resume once, and it failed to hibernate once. So be careful. Another sleep module might be more reliable, but I cannot test that until I can reproduce the problems. –  ddaa May 8 '12 at 19:51
add comment

Following ddaa's advice, I set SLEEP_MODULE=tuxonice on my Lenovo T420s. That improved matters: sometimes my computer comes back from hibernation properly, sometimes the screen remains half grey, half black. It's only the display that fails since I can still log on blindly with ctrl+alt f1, then do a pm-suspend, and after the computer wakes up the display is back.

As a workaround, do a 'sudo pm-hibernate' to hibernate without locking the screen. When the display doesn't wake up, simply press the suspend button Fn-F4 (the half moon) and switch the computer back on. This resets the screen.

share|improve this answer
    
No fix, but a workaround. Been able to hibernate for a week now :) –  Maple Tuffy May 20 '12 at 3:32
    
I simply type sudo pm-hibernate to prevent locking the suspend key. If the display fails on wake-up I press Fn-F4 (suspend) and switch the computer back on. Until now, always worked. –  Maple Tuffy May 20 '12 at 3:46
    
OK, thanks for the clarification (and +1 for the workaround). Can you edit your answer to include the info in your comments in the actual answer (since comments here have second-class status, and are always in danger of disappearing)? Thanks for the info. –  belacqua May 20 '12 at 17:21
add comment

I had a similar problem with my Thinkpad T400 and Precise: After going to hibernation, the system would do a cold boot rather than resume from disk.

After playing with the solutions proposed here I found that all I had to do was add the kernel option

resume=UUID=9e9418e7-25fc-49eb-8200-e8921a91a0cb

to the list of options under GRUB_CMDLINE_LINUX_DEFAULT in the file /etc/default/grub. 9e9418e7-25fc-49eb-8200-e8921a91a0cb is the UUID of my swap partition, (where the hibernation data is saved to). Needless to say, you have to change this according to your specific system!

Subsequently the bootloader configuration needed to be updated with

sudo update-grub

After that hibernation worked on the level of the kernel (i.e. using pm_hibernate or other CLI-tools). To enable triggering of hibernation from the user interface (KDE in my case) I had to install the policy-override as mentioned before and explained here.

Like Stephen, I use the kernel-side suspend function, as uswsusp does not work for me (freezes on resume). Up to now my Thinkpad has always resumed correctly with this configuration.

share|improve this answer
    
resume=UUID=9e9418e7-25fc-49eb-8200-e8921a91a0cb this UUID is specific to your machine only, it should be resume=UUID=<UUID of swap partition>. you can get the correct value by doing sudo blkid /dev/sdxyy where sdxyy is your swap partition –  mzzzzb Sep 8 '13 at 6:33
add comment

This is how I fixed it for me -

To hibernate, run

$ sudo pm-hibernate

However, if resuming fails after hibernation, then

in /etc/default/grub file, replace the line

GRUB_CMDLINE_LINUX=""

with

GRUB_CMDLINE_LINUX="resume=/dev/sdaX"

Where, /dev/sdX is the swap partition.

After this, run

$ sudo update-grub

and hibernation should work now.

However, using this method, the screen doesn't lock after resuming, for which I've asked a question here.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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