Thursday, December 28, 2006

Kubuntu Breakthrough

EUREKA! (No I'm not talking about Vacuum Cleaners). Anyway, I found a combination of software, and settings that appears to have fixed my hibernate problems with Kubuntu and my Toshiba Laptop. (HINT: NEVER buy a toshiba).
Anyway, a hint came from Elijah's Website. I didn't use the software he mentions, but it did bring to mind something I remember from way back. You need a "resume=" line on your kernel load command to enable it to read the old RAM contents back into RAM. Linux uses your Swap file by default. The problem had been that every time I did a hibernate with the powernow or klaptop daemons they would blow away my swap file. Well, Guidance does a nice job hibernating, however, I couldn't get it to resume.
So, here's what I did:

First, I modified the fstab file to do away with those stupid UUID labels (who thought that was a good idea anyway?):
change your fstab from:

# /dev/hda4
UUID=4e7536dd-d4d7-4338-9344-1bb9ae43ed4e / ext3 defaults,errors=remount-ro 0 1
# /dev/hda2
UUID=7792b1a8-17dc-4e15-8232-a2ff3f93a507 /boot ext3 defaults 0 2
# /dev/hda1
UUID=AC07-770A /winxp vfat defaults,utf8,umask=007,gid=46 0 1
# /dev/hda3
UUID=0a208f65-e0ca-4fd2-a298-8bb1824d19cf none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
To:

/dev/hda4 / ext3 defaults,errors=remount-ro 0 1
# UUID=4e7536dd-d4d7-4338-9344-1bb9ae43ed4e
/dev/hda2 /boot ext3 defaults 0 2
# UUID=7792b1a8-17dc-4e15-8232-a2ff3f93a507
/dev/hda1 /winxp vfat defaults,utf8,umask=007,gid=46 0 1
# UUID=AC07-770A
/dev/hda3 none swap sw 0 0
# UUID=0a208f65-e0ca-4fd2-a298-8bb1824d19cf
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
NOTE: I didn't delete the UUID stuff I just commented it out, in case I needed it later.

Then edit your /boot/grub/menu.lst file and add "resume=/dev/hda3" (If /dev/hda3 is your swap partition) to the end of your kernel load line as follows:

title Ubuntu, kernel 2.6.17-10-generic
root (hd0,1)
kernel /vmlinuz-2.6.17-10-generic root=/dev/hda4 ro quiet splash resume=/dev/hda3
initrd /initrd.img-2.6.17-10-generic
quiet
savedefault
boot
Notice the line that starts with "kernel"? Thats the line you append the resume statement to. To find out which partition is your swap, if you don't already know, go back to your fstab and look for the line that looks similar to this:

/dev/hda3 none swap sw 0 0
the first section (/dev/hda3 in mine above) will give you the device id of the swap partition. By the way, hda is your first IDE drive, sda would be your first SCSI drive (or USB mass storage device if you use one of them). Then the number at the end is the number of the partition in particular. So, /dev/hda would be my first IDE drive, /dev/hda3 would be the third partition on that drive.

Anywhoo, I was able to hibernate successfully once with this setup, but have hence had IO problems. So, consider the above volatile at the moment. I'll keep working on it. I'll test it again here in a little while and make sure it wasn't a fluke.
OH, you may also want to note that I'm working in Edgy, not Dapper or Breezy. (that's version 6.10)

I'm seriously considering going to the next version already. I couldn't have as many problems with that version as I do this one. Whatchya think?

No comments: