Using Software Suspend 2 on a Fedora Core 3 2.6.9 Kernel

Patches:

Instructions:

From a post on the linux-thinkpad list:


OK, a couple of patches to apply to the Fedora Core 3 kernel to allow
the Suspend2 patches to apply cleanly.  I'm not taking any credit for
these, other than being the guinea-pig for Bernard from the Suspend2
project and being prepared to go through a dozen or so fsck cycles
and a lot of trial and error to fix them.

Here's a recipe for compiling Suspend2 support in for those Fedora
users who haven't before.  Download the patches [above]
- just two very small patches to prepare the FC3 kernel source tree
for the standard Suspend2 patches.  These don't remove any of the
Fedora patches, they just do some jiggling so that the Suspend2 patches
apply cleanly.

Then download the standard Suspend2 2.6.9 kernel patches, version 2.1.5
(the latest) from:

http://www.tuxonice.net/

Having unpacked them, just add the two patches above to the directory
of Suspend2 patches.  Follow the instructions on the Suspend2 site above
by running the ./apply script to apply them to your FC3 kernel source
tree.

Note that, for new FC3 users, FC3 doesn't come with a kernel-sourcecode 
RPM anymore - you need to install the kernel-<version>.src.rpm and then:
# rpmbuild -bp --target=i686 /usr/src/redhat/SPECS/kernel-2.6.spec
- the kernel source will then be in 
/usr/src/redhat/BUILD/kernel-<version>/linux-<version>

Having applied the patches above, which should apply cleanly, supply
your .config (see caveat below) and compile your Fedora kernel in the 
normal way:
# make oldconfig
# make
# make modules_install
# make install
If you didn't change Makefile, your kernel will be installed at
/boot/vmlinuz-<version>-prep.  Check you have a grub entry for this
kernel.

Finally you need to do a little magic to your initrd image to make it
work with initramfs in FC3 - see:
http://www.tuxonice.net/FAQ-6.html#ss6.8
I found I needed to add this line after mounting /proc and /sys in init.
Download the hibernate script from the Suspend2 site, and try it out.
Then you can tie this to a key combination with ibm-acpi, etc.

Kernel config caveat: so far, it seems that you need to unset
CONFIG_X86_4G in your .config.  The FC3 kernel seems to set this on
by default and it seems to stop the machine properly resuming.

As mentioned before, FC3 contains enhanced 3D support for some
thinkpad ATI cards, and they'll stop resume unless you turn on a
couple of options in /etc/hibernate/hibernate.conf:
LeaveXBeforeSuspend yes
nVidiaHack yes

Bernard has some confidence that these patches will last some time,
or need only a little tweaking for future FC3 kernel release and
Suspend2 releases - they're quite simple.  They might even work with
the FC2 2.6.9 kernel - I've not tried.  Remember Suspend2 is a work in
progress, so you may want to test mounting / readonly at first from
singleuser for safety first.  Works for me.

Hope this helps someone.
Honey