Resume from Hibernate Fails After Image Restoration on Kubuntu

hibernatekubuntupm-utils

I've been trying to get hibernation to work, and am having problems. The system seems to go into hibernation just fine, but when I try to restore from disk, the process stops just after a message saying "Image restoration successful". This is before I'm able to switch to a new tty. Ctrl-alt-del works. SysRq commands seem to work, although I'm not sure what to do with them.

Suspend (to RAM) works fine when I close the lid or use s2ram or pm-suspend. If I use s2both or s2disk, I see the messages about the image being written to disk; if I treat s2both (or
pm-suspend-hybrid) as a suspend (eg, restore without cutting power), it works. But if I cut power and do a cold boot, after the progress indicator seems to say the image is done loading, the process just stops.

Does anyone know how I can fix this? Or at least what my next debugging/troubleshooting steps should be?

I'm using (K)Ubuntu 12.04, kernel 3.2.0-38-generic. I have 2GB of RAM and 4GB of swap.

This (month-old unanswered forum post) looks very similar to my situation (except for the message about user id – which he gets but I don't)
http://forum.linuxmint.com/viewtopic.php?p=708058&sid=e8bd8eba8fad0b25597209e365d6edf4

-Thanks

Edit: Update

So, this is now kinda 'half-solved'. Gilles' answer got me past the place where I was stuck, but I still don't know what caused the problem. I am now having further problems, so I will need to keep debugging this, in case they are related – and would very much welcome further tips on what might have caused this problem in the first place.

(New problem seems to be a more severe lock-up (that 'magic SysRq' doesn't help) when I try to hibernate/s2disk with more than ~500MB of memory used. Didn't think to test w/ a high memory load, ouch …)

Best Answer

I've observed the same problem, also on Ubuntu 12.04. After resuming, the system is displaying a text mode console and looks frozen, but magic SysRq responds.

I've found that Alt+SysRq+E (which kills all the programs on the current virtual console) works for me. This doesn't kill any of my programs, it's only killing processes on the temporary console used during hibernation preparation.

I have no explanation, I just found that this worked for me and didn't investigate any further.

Note for laptop users:

  1. Press and hold Alt and Fn.
  2. Press and release SysRq (which may be on Pause or PrintScreen or some other function key depending on your model).
  3. Release Fn (but keep Alt down).
  4. Press and release E.
  5. Release Alt.
Related Question