Dell + Ubuntu + Hibernate
July 3, 2007 . Posted in ubuntu.
My Dell Inspiron 6400 running Ubuntu used to fail to resume from Hibernation
I say “used to” because thanks to some googling and some fiddling now I am finally able to resume my session after hibernating. Here is the whole story: I installed Ubuntu 7.04 Feisty Fawn and I made pretty much everything work:
- s-video out
- wireless
- widescreen display
- beryl
- bluetooth
- webcam
but after a while I decided to change my partitions. So I removed a former FAT32 partition and moved my SWAP around a little and then created a new ext3 partition to replace the FAT32 one. I included the new partition in the /etc/fstab and everything seemed to be fine. Until I realised that Hibernate stopped working. I would be able to Hibernate but on resume I would get a new log in screen instead of the lock screen password prompt.
I thought it was because I installed 915resolution, then I thought it was because I was running beryl or compwiz. Eventually I realized all my problems came from the fact that my swap partition was no longer available. Running
$ sudo free | grep Swap would return something like Swap: 2096472 0 2096472 which was a clear sign that my swap partition was not OK. Also
$ sudo swapon -a would return swapon: cannot stat /dev/disk/by-uuid/<SomeUUID>: No such file or directory
This was actually good for me because I knew right then what I needed to do: confirm that the UUID in the /etc/fstab did not match the one in the /etc/initramfs-tools/conf.d/resume
BINGO! They were different.
So here comes the solution:
1. find the swap partition
$ sudo fdisk -l | grep swap
/dev/sda5 1919 2049 1052226 82 Linux swap / Solaris
2. get sda5′s UUID
$ sudo vol_id /dev/sda5
ID_FS_USAGE=other
ID_FS_TYPE=swap
ID_FS_VERSION=2
ID_FS_UUID=09149dfb-7a3d-4276-a944-418a75d9490c
ID_FS_LABEL=
ID_FS_LABEL_SAFE=
3. update the /etc/fstab to use the 09149dfb-7a3d-4276-a944-418a75d9490c value instead of the one that was there for the swap partition
$ sudo gedit /etc/fstab
4. update the /etc/initramfs-tools/conf.d/resume and replace the existing uuid with the same value as above
$ sudo gedit /etc/fstab
5. update the initial ramdisk with the new uuid. If you want more info on initrd check out http://en.wikipedia.org/wiki/Initrd
$ sudo update-initramfs -u
6. Reboot (although probably it probably wasn’t necessary)
Now HIBERNATE works!
I hope this helps, if not feel free to post questions.
Cheers…

Post a comment