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 noticed that my 11.10 does not hibernate. When I hibernate, and starts PC, it doesn't restore all my open apps etc. Its like a shutdown ... why might that be?

UPDATE

  • Output from gsettings http://pastie.org/2926504
  • Using a vanilla Ubuntu Desktop 11.10 installed yesterday (no more from alternate CD, but problem still persists)
  • I dont see any options in BIOS for S1, S3 or ACPI, are they hidden somewhere? I am using ASUS H67 Evo, I entered the Advanced mode of the BIOS, I still dont see those stuff
  • ps-*.log files: http://pastie.org/2922774
  • GRUB entry: http://pastie.org/2922781
share|improve this question
1  
Are you sure it's actually hibernating and not shutting down (or further, perhaps it is not coming out of hibernate and instead starting fresh). What is the output of uptime in a terminal? Does it coorispond to how long it has been since the last hibernate or from the total system uptime? –  tgm4883 Nov 1 '11 at 22:50
    
@tgm4883, yes, I am hibernating. It doesn't even hibernate, everytime I start, all my open apps are gone. Its probably doing a normal startup –  Jiew Meng Nov 26 '11 at 2:51
    
@jiewmeng - please update your question with any bios options you may have that deal with power management (S1/S3/ACPI/APM or similar terms you should look out for) together with their current values. Also confirm, is this a vanilla Ubuntu install or a minimal install built up by yourself (from your previous questions :) ) - what is the output of gsettings list-recursively org.gnome.settings-daemon.plugins.power –  fossfreedom Nov 26 '11 at 21:08

3 Answers 3

You've not given an awful lot of information so we'll have to start with the basics I guess.

Check that your swap partition at least as big as the amount of RAM you have.

Check that there is any obvious messages in /var/log/pm-*

Ensure your grub configuration has resume=/dev/sdX where sdX matches your swap partition. (or resume=UUID=x perhaps)

EDIT: hm just had a little test myself and resume= might not be necessary (any more). If you follow the directions on this page, does it work: https://help.ubuntu.com/community/PowerManagement/Hiberate#swsusp

ie:

sudo -s
echo platform > /sys/power/disk
echo disk > /sys/power/state

The system should immediately start the process after the second echo.

share|improve this answer
    
I just tried hibernating, and got the last few lines of pm-powersave.log and pm-suspend.log pastie.org/2922774, if more is info is needed let me know. Could it be that my hardware doesn't support hibernation? I think it worked in 11.04 b4 ... grub.cfg -> pastie.org/2922781. I have 8GB RAM, swap 21GB –  Jiew Meng Nov 26 '11 at 6:26
1  
@jiewmeng Please update your question to include what you've tried so far. That way newcomers to the question won't have to hunt down what you've done since you asked –  Marco Ceppi Nov 26 '11 at 19:03
    
This answers contents really look more like comments then an answer: have you tried this? what is the output of... does your file have this? are comments, not answers and should be posted as such. –  Bruno Pereira Nov 30 '11 at 11:43
    
The line that says at Nov 26 14:18:06 SGT 2011: performing hibernate is the real deal. If it's not returning zero then you have a problem. It appears to be a consequence of do_hibernate in /usr/lib/pm-utils/pm-functions. If you could add some additional logging to show the return value that would really be useful. Thanks. –  ppetraki Dec 1 '11 at 19:38
    
Still doesen't work –  Amith KK Feb 18 '12 at 5:13

If you are using ecryptfs, that's an expected behavior.

https://bugs.launchpad.net/ecryptfs/+bug/432785

When you choose to activate Home directory encryption, ubuntu will configure your swap space to be encrypted too for additional security. The cryptographic key used for the swap is random, so after an hibernation is not possible to restore the session (that get saved on the swap partition).

Probably, the best solution for you (if you aren't paranoid), is to disable the swap encryption so you can use hibernation correctly:

http://www.logilab.org/29155

share|improve this answer
    
Is encryption enabled by default? I remember I was asked for it (but it way be when I am using alternate CD, now I am using vanilla Ubuntu Desktop). Isit Default in Ubuntu Desktop? I tried the code in the link and cryptsetup is not found, so I think its not even installed? –  Jiew Meng Nov 27 '11 at 14:03
    
cryptsetup and ecryptfs are different things. You can check if you are using it issuing a "mount|grep Private" from terminal after logging in with your user account. However, please post on your initial message the result of: cat /etc/crypttab cat /etc/fstab –  Giovanni Toraldo Nov 29 '11 at 9:42

I'm on ubuntu 11.10 and what solved the hibernate problem you described was to put resume=/dev/sda2 in /etc/default/grub at the end of GRUB_CMDLINE_LINUX_DEFAULT variable, so I got a line like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux pcie_aspm=force resume=/dev/sda2"

after that I did: sudo update-grub2

PS: make sure your swap partition has enough size to acomodate your RAM

PS2: make sure your swap UUID is correct at /etc/fstab (use blkid to discover it)

share|improve this answer

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.