Aug 1, 2009

Ubuntu's Hibernate Won't Wake Up

UPDATE (Feb. 14, 2010): This is not a way to get hibernate working on Ubuntu. This is a way to make your computer able to boot after you've accidentally put it into hibernate and it won't wake up anymore.

So I made the mistake today of clicking "Hibernate" from the shut down menu. It went into hibernate just fine, just a few hours later when I wanted to reboot it didn't work. I just got to a black screen with a flashing cursor in the top left. I figured it was just being slow, so I went to make breakfast. Came back, still in the same state.

After digging through forums under Windows and trying to find a good way to fix my problem, I ended up with the following solution, if you ever find yourself in this situation:

If you're using GRUB1 (if you haven't installed Ubuntu from scratch since Oct. 09)
1) Hit Esc if you need to access the boot menu, otherwise it should pop up normally.
2) Go to the normal Ubuntu item (usually the one that is selected by default) and press "e".
3) Go to the line that starts with "kernel" using the arrow keys and press "e".
4) Remove the "quiet" and "splash" from the end, and add "no_console_suspend".
5) Press Enter, and then "b".

With GRUB2:
1) Hit Esc if you need to access the boot menu, otherwise it should pop up normally.
2) Go to the normal Ubuntu item (usually the one that is selected by default) and press "e".
3) Go to the line that starts with "kernel" using the arrow keys and press "End".
4) Remove the "quiet" and "splash" from the end, and add "no_console_suspend".
5) Press Ctrl+x to boot.

This should get you back into Ubuntu, however it will not be resumed from the previous state.

Do not use hibernate with Linux unless you're either certain it will work, or you know how to fix it if it doesn't work. I personally have never seen it work on any distribution in the 5-6 years I've been using Linux. You'll end up with far more headaches than it's worth.

UPDATE (Sept. 5, 2009): I have used suspend, it works fine.

19 comments:

0x89 said...

Recommending not to use hibernate is a bit harsh.
I'd recommend to try it out once, from a session that is not valuable to you (e.g., save all your data, close all your apps), and see if hibernate works. If it does, fine, if not, disable it.

Hibernate works fine on my Thinkpad T400, Ubuntu 9.04 (jaunty). When using uswsusp as hibernate method, it even supports suspending to an encrypted swap partition, and "suspend to both" aka suspend-hybrid. How cool is that?

Rob Britton said...

Yeah that's true, it was a bit harsh. I made a small edit to that sentence.

It's not good if your system is valuable to you, because if hibernate doesn't work it's possible your system won't wake up at all (unless you find some way like I did).

Thinkpads are known to work well with Linux, I think IBM purposely makes them work.

AnnaZed said...

I can't thank you enough for posting this. My boy friend snagged a retired HP computer for me from his job and set it up for me with Ubuntu. I was (and am) so thrilled. I have a Linux machine, yeah!

So, after having it for about an hour (yes, just one lousy hour!) and messing around with various features I decided to put it on hibernate. Bad idea, as you said. I was convinced that I had somehow destroyed the whole thing after only owning it for less than a day (this is the way that my mind works).

Fortunately, I was able to Google "Ubuntu Hibernate Won't Wake Up" (my exact words) from my Think Pad and found your blog. Whew!!!

If you wondered if you were doing a service to the world I am here to tell you that you are.

Thanks!

Rob Britton said...

AnnaZed: Glad to have been of service :)

Derek Odom said...

HEY, thanks, your advice worked. I always heard not to hibernate, but figured I'd give it a shot anyhow. Yea, that went well.

Won't try THAT trick again! :)

Benlog said...

I found something that worked perfectly while looking up how to disable hibernate/stand-by - it fixed the problem (I had a blank non-responsive screen when I returned from hibernate and suspend), and I can use stand-by now.
"Step One

Press Alt+F2. A dialog box will come up entitled ‘Run Application’. In the text entry field, type:

gksu gconf-editor

…and click ‘Run’. You may be prompted with your password, in which case, enter your password.
Step Two

An application named ‘Configuration Editor’ will come up. This program is for editing fine-grained details about your desktop. GNOME contains a database for storing your preferences called ‘gconf’. Configuration Editor is an application which edits the gconf database. Windows users may be familiar with the registry, which is a similar database.

In the Configuration Editor, navigate through the tree (located on the left-hand pane in the window) to:

/ → apps → gnome-power-manager"
(from http://ubuntuforums.org/showthread.php?t=440225 )

Step 3:
from there there should be a couple folders one called Lock and one called General

to disable hibernate/suspend goto the folder named General and deselect can_hybernate and can_suspend
-or-
to make hibernate/suspend work goto the folder named Lock and deselect Hibernate and Suspend.

The second selection allowed me to use my suspend feature with a closed lid. The first simply disabled it.

Anneke said...

Thanks, first time ever I used Ubuntu on a office left over PC, got stuck on the password, and guessed that a green button would be the right one... and got completely stuck. Thanks to your advise I'm in!

Anneke

Millz said...

Thanks alot mate, this happened to me this morning after a hibernation last night, i'm 9.10 karmic and the weird thing is, this worked but not only that it boot up the saved session aswell so i couldn't be happier lol even though i didn't havd any really important data saved in the session, so i guess they must have changed/updated something in karmic to end up with the results that i have, and lastly this the first time i've ever had a problem with hibernate on my samsung r610.
Anyway thanks again for the fix.

wpoely86 said...

Use Tux on Ice ( http://www.tuxonice.net/ ). It's stable, fast and works almost on any machine. I've used it for the past 5 years and never had a problem with suspending my laptop.

Rob Britton said...

Nice, TuxOnIce looks pretty good! I'm slightly hesitant to use it though, with this kind of stuff I'm always paranoid I'm going to destroy my computer.

Carloa_nav said...

I used Benlog's advice on fixing the hibernate feature and it worked great. If you've tried it and can't get it to work then use the disable hibernate or suspend in his post. Thank you Benlog and thank you OP

markogts said...

Great advice, but I still have a problem: when I am in the editing of the grub (after hitting "e") I just can't figure out how to save the modifications. Hit enter just adds another line to the edited configuration file. Hitting ctrl-x starts the boot, but if I reboot again, the grub file is still with "splash" and "quiet".

PS tried also the benlog solution, but nothing changed.

Rob Britton said...

markogts: You want to keep the quiet/splash stuff. The method I described is simply for making Ubuntu wake up. This is not a way to make hibernate work in Ubuntu, I don't know how to do that (if I did, I would post about it!). Right now the solution is: don't use hibernate.

Anonymous said...

My laptop hs Ubuntu + LXDE and hibernate works perfectly when noresume is removed in /boot/grub/menu.lst


kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=2d00b4c9-2c3e-4761-be39-42586b8cdf63 ro quiet splash rootflags=data=writeback divider=10

Cheers,

VĂ­ctor Hugo said...

Man, you are my life saver!! Yesterday my laptop go out of battery and I was in the brink of a fresh install, tired of trying to fix this. Thanks a lot!

markogts said...

Unfortunately, Karmic 9.10 installed from scratch as mine works with grub2 and no menu.lst in the grub directory.

Anonymous said...

Hey, I would like to say I am so thankful for posting this in such a way that the search engines find the right page pronto. I would also like to add that on my laptop hiberate and suspend work perfectly fine, however it is running xubuntu. How come Xubuntu has a working hibernate mode and the Ubuntu which is original has never found the fix? Does that have to do with installing under Windows or Something? I sure hope some guru finds a fix and helps out the whole world of Ubuntu!! For now I don't need Hibernate on my desktop.

Fayad Fami said...

Rob

Thanks for the solution. I am using karmic koala and is this problem still around? cause i am having problems waking up after system goes for a suspend or hibernate. Like, when my battery power is 0, it goes to hibernate and later when i power ON, it will give a blank screen sayin something like waking up, please wait. And this wait is like forever.

By your post if i am right, the hibernate feature can be disabled in kernel. is there any other solution for this?

Rob Britton said...

Fayad: I'm not sure if there is a solution or not since I haven't actually checked in a while.