What do i need to get hibernation working

Asked by Daniel


I tries hibernation the last few days, but it silently does not work. That means:

1. The option "Hibernate" is there in the Shutdown popup
2. When clicking, I see the screensave for some seconds and then my computer turns off
3. When powering on again, it starts completely normal at it had never hibernated.

What is wrong? Do i need special boot options? I have:
# cat /proc/cmdline
BOOT_IMAGE=/boot/lucid/vmlinuz root=/dev/vg00/lv_system_lucid ro quiet splash

i also tried hibernation with hibernate package installed and not (but the Hibernate button was always available)

# free
             total used free shared buffers cached
Mem: 2058056 1529192 528864 0 294676 437848
-/+ buffers/cache: 796668 1261388
Swap: 2097144 0 2097144
# uname -a
Linux legolas 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86_64 GNU/Linux
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid

Where is the problem?

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Tom (tom6) said :

Hi :)

Generally hibernate means your system is left in a very vulnerable state as all hardware and everything must be exactly the same when it switches on. During normal boot-up a number of safety checks are made but hibernate avoids these. Some people think that it is "more environmentally friendly" but all the figures i have seen to prove this fail to properly include the time it takes to "shutdown" and shutdown to hibernate on most OSs takes a lot longer than a normal boot-up and uses more battery power.

So, it might be annoying that hibernate doesn't work but really it is a blessing in disguise.
Regards from
Tom :)

Revision history for this message
Daniel (hackie) said :

Thanks Tom, but I already know what Hibernate is about its risks. I also know that a failing start out of a saved disk state is like pressing the reset button when in a session.

But this does not solve the problem: the function is here and i just wanted to try it :) And even its only to compare if i can save some time when booting that way...

Btw. I do not use any third party drivers for my graphics card..

Revision history for this message
Tom (tom6) said :

hi :)

You seem to have everything sorted for hibernate so i don't know why it is not working. Hopefully someone else will pop-in and help soon but i wouldn't wait around for them, answers can take a day or so to arrive sometimes! I was hoping it was just because your swap was lees than ram which is usually the case but you seem to have that comfortably sorted already!

Good luck and regards from
Tom :)

Revision history for this message
Daniel (hackie) said :

Now it works: I had to add resume=/dev/vg00/swap to the boot line.

One question remains: did i need the installation of the hibernation package, when the hibernate option in the shutdown menu existed already before installing it?
And which commands are actually called when hibernating?

I could not find any documentation locally which told me to use resume=. Only google helped. So did I just look at the wrong place or is there a lack of documentation?

Revision history for this message
Best Tom (tom6) said :

Hi :)

Probably a lack of documentation! I tried looking up Community Documentation but couldn't find much. I had hoped someone else would help with this question tbh.

Anyway by using the search-tool at the top of a Community Documentation page i found these pages any of which you could usefully edit a bit now you probably know more about this issue than most people

It also gave me this manual about the hibernate package, which you can't edit but might be useful! (maybe)

Congrats and regards from
Tom :)

Revision history for this message
Daniel (hackie) said :

Thanks Tom, that solved my question.

Revision history for this message
Daniel (hackie) said :

Thx. So i could remove the packages hibernate and uswsusp again - i only need the already installed pm-utils.

About your links:
- SuspendHowto is marked als old and does not say anything about packages
- PowerManagement/Hiberate is only about uswsusp
- PowerManagement/Overview is ok
- HibernateWhatHappens the only one which names the commands used by gnome

no one of them tells about the boot option, not even the man page.

Revision history for this message
Tom (tom6) said :

HI :)

Yeh, it's quite bad isn't it? Even if you just edited to add links to where you found the info in google it might improve one of those pages a lot! There is a tracking thing to check the latest edits so it could encourage someone else to re-write the out-of-date one to bring it right up to 10.04. Perhaps they might be able to use your links to copy in the ideas into the documentation itself. Personally i would start by just adding in the links. Note that you can use your normal Launchpad login to edit, the login thing is at the top right of the page, just under the search tool. I found that headings needed an empty line after them and then the index magically found and included them!

= Main heading =

== sub-heading ==

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :

Hi again :)

Err sorry if i seem to be forcing you into this. It's just that i found getting involved in stuff like that was great fun. It's not for everyone tho!

Regards from
Tom :)

Revision history for this message
Daniel (hackie) said :

You are right, there is no reason to say sorry :)

Here is the link:

And for the other people looking for a solution, I already posted the solution "resume=/dev/vg00/swap"

I personally think the documentation in /usr/share/doc should be more helpful.

For problems with commands there are man pages.
For installation problems there should be /usr/share/doc.
And only for really non-common-problems (not like this one) it should be necessary to use one of the 1000 forums and wikis in the world...

Revision history for this message
Tom (tom6) said :

hi :)

I rather messilly added an "External Links" section to the end of 3 of those pages and put the link so perhaps maybe someone might tidy it up a bit!

Thanks and regard from
Tom :)

Revision history for this message
Artemy Vysotsky (artemyv) said :

I'd like to make a small update that could be useful for users of Ubuntu Lucid 10.04 with grub2

I had the same problem - computer goes to hibernate ok. But after power-on it is loading as if no hibernate state was saved.

Solution is the same add resume=... (path to swap partion like /dev/sda6 in my case) to boot options.

In case of grub2:
- open /etc/default/grub
- find GRUB_CMDLINE_LINUX_DEFAULT= line - these are the option added to the regular boot menu choices
add the resume=/dev/sda6 option to the list (with correct swap partition path) like this:
GRUB_CMDLINE_LINUX_DEFAULT="nosplash enable_mtrr_cleanup=1"
GRUB_CMDLINE_LINUX_DEFAULT="nosplash enable_mtrr_cleanup=1 resume=/dev/sda6"

- Save file
- in the terminal call
sudo update-grub2

to actually enable the new configuration settings

For me - it solved hibarnating problem

Revision history for this message
Tom (tom6) said :

Hi Artemy :)

Thanks for the comment in here, it should help people using the search "Solved Answers" feature but really it would help a lot more if you could edit 1 or 2 (or all 3) of those Community Documentation pages. Even a kludgy messy edit would be more helpful as someone else invariably tidies it after a while, sometimes quite soon after editing in the useful info.

Many thanks and regards from
Tom :)

Revision history for this message
Artemy Vysotsky (artemyv) said :

I'm not upto task of editing these pages. But I have copied my post into the Troubleshooting section of the Hibernation page. I hope - I have selected the correct entry (at least it talks about default Gnome choice, which I haven't changed, and kernel mode support - so it is logical that this variant requires messing with the kernel options).

It could be useful addition - if the page would specify the quick way to learn which of the 3 methods is used when user presses Hibernate button in his GUI. I - for example have no idea where to start looking for the actual command been called behind the bars...

Revision history for this message
Tom (tom6) said :

Hi :)

Good work there :) Thanks :) We can see from the "Recent Changes" page that you made 4 edits
but you missed the opportunity of adding a comment so we can see why or what you would like to see next. However the red&green glasses show the before and after so nosy people such as me can work out what sort of thing you were doing :)

I re-edited the page a little to gather the links to a new section at the end and also made a TroubleShooting section just before that to try to cover both options on the page but i didn't know enough to do that properly so i just gave links to earlier parts of the page! How does it look now? You can change it if you don't like something, no worries :)

Regards from
Tom :)

Revision history for this message
Artemy Vysotsky (artemyv) said :

For me it looks ok. Now it is up to people who actually maintain this page, if there are such.

Revision history for this message
Tom (tom6) said :

Superb, thanks :)
Err it is called "Community Documentation" for a reason! As we are both members of the community we are maintainers. So if some of this documentation doesn't seem right then you are welcome to roll-up-your-sleeves and fix whichever problem you found, as you just did. Hopefully ebcause the community is so large and people like to improve things this should eventually lead to those pages looking a lot better, perhaps like this one

Good luck, thanks and regards from
Tom :)

Revision history for this message
George Politis (gpolitis) said :

@hackie thanks for sharing your fix, it works flawlessly for me.

I took the initiative to report this issue as a bug in pm-utils (https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/939805)