PDA

View Full Version : [SOLVED] Resume doesn't work after hibernation in 10.04 (but does w/suspend)



mike-g2
July 11th, 2011, 03:03 AM
Hi,

I've got a ThinkPad X201 tablet that's running 10.04. Everything works fine except resuming after hibernation. I've tried the 'standard' hibernation via the menus and issuing s2disk from the command line. Either way, the machine simply reboots. Note it restarts from suspend to RAM without a hitch.

I've seen lots of discussion about hibernation issues, but they don't seem to address this issue. Does anyone have any suggestions on where to start diagnosing and/or solving this problem?

Mike

lmarmisa
July 11th, 2011, 03:34 AM
I suppose the size of the swap partition will be correct. Your swap partition should be at least as big as your RAM size.

mike-g2
July 11th, 2011, 03:38 AM
Hi lmarmisa,

Thanks for the reply. You suppose correctly

RAM = 8GB
SWAP = 19GB

Mike

mike-g2
July 15th, 2011, 07:35 PM
Anyone have any suggestions? I suspect that I may be able to solve this by setting the boot parameters correctly, but that's just a guess.

Toz
July 15th, 2011, 09:27 PM
According to https://bugs.launchpad.net/ubuntu/+source/linux/+bug/577916, make sure that the UUID of your swap partition matches the value in /etc/initramfs-tools/conf.d/resume. I don't have a 10.04 install to check, but in 11.04, that file doesn't exist (for me at least)

mike-g2
July 17th, 2011, 08:57 PM
Thanks for the suggestion. I do have that file already in my system and the UUID matches the swap partition, so that's not the problem.

I'm wondering if there's anything I should be looking for in /var/log/messages or using dmesg that might provide some insight.

Toz
July 18th, 2011, 03:25 AM
Is your $HOME encrypted? (you would have choosen it during setup). Mine is and I can't hibernate because of that. See: https://wiki.ubuntu.com/DebuggingKernelSuspendHibernateResume#Failure_due_ to_encrypted_swap

mike-g2
July 18th, 2011, 07:21 PM
Thanks for the link! It seems useful.

When I did the install I had my home encrypted but had some issues so I unencrypted it and removed the relevant libraries. But perhaps that's the root of the problem. Will try to trouble shoot based on the info in the debug link.

Thanks!

Toz
July 19th, 2011, 01:49 AM
Sorry, I wasn't totally accurate with my previous statement. Allow me to clarify. It is the encryption of the swap partition that causes the problems. The hibernation image is written to an encrypted swap partition and unfortunately, during the resume, the system cannot access the encrypted partition and the system reboots. In ubuntu, when you choose to enrypt your home parition/directory during setup, by default it also encrypts the swap partition.

mike-g2
July 19th, 2011, 05:53 PM
Thanks for the clarification. I don't believe that my swap is encrypted but I'm not sure how to determine this with 100% certainty.

Here's my /etc/fstab entry for my swap

UUID=98b...faf none swap sw 0 0

Does this have the required info?

Toz
July 20th, 2011, 11:41 AM
What does:

dmesg | grep swapreturn?

mike-g2
July 23rd, 2011, 06:36 PM
I get

[ 21.364899] Adding 18980756k swap on /dev/sda6. Priority:-1 extents:1 across: 18980756k

Toz
July 24th, 2011, 02:11 AM
No, your swap is not encrypted. Try another hibernate & resume. After it reboots, post back copies of /var/log/pm-suspend.log and /var/log/dmesg.0 and the results of:
lspci -vnnLets see if there's anything in there that helps.

EDIT: Another thing you could try is to remove the tpm module prior to hibernating to rule it out as a cause. Run a:

sudo modprobe -r tpm_tis prior to hibernating.

mike-g2
July 26th, 2011, 07:23 AM
Hi Toz,

Thanks for your help with this.

Removing the tpm module as you suggested had no effect. I still could not resume from hibernate. The system just rebooted.

I've attached copies of the files and output you've requested. I see lots of 'success' notes and instances of failures when trying to activate the display in the lspci output. Pretty cryptic to me, overall. I appreciate you taking a look.

Best,

Mike

Toz
July 26th, 2011, 08:35 PM
Maybe worth giving uswsusp a try.

1. Install the necessary packages:

sudo apt-get install hibernate uswsusp

2. Try the command:

sudo s2disk

If you get an error about the machine not being in a whitelist (or something like that), try the command:

sudo s2disk -f

mike-g2
September 29th, 2011, 08:39 PM
Hi Toz,

Excuse the long pause and thanks for the suggestions.

I had actually tried these options before posting here and they didn't help.

I have finally solved the problem which, like most solutions, is embarrassingly obvious in retrospect. I modified my /etc/default/grub by adding "resume=UUID=89...." (where the UUID was for my swap partition) to the GRUB_CMDLINE_LINUX_DEFAULT option line.

I've tried it 3 times now and it seems to work fine. Yippie!

Thanks to everyone for their help and suggestions.