I was then reluctant to upgrade to a 2.6 kernel until I was certain that SWSUSP was working on 2.6, as I used suspend all the time, hardly ever rebooting the laptop since it was so much more convenient and time-saving to suspend and resume without losing state.
I finally decided in May 2005 to upgrade to Fedora Core 3 partly because I found that some software I needed (e.g. the new 'pwc' driver for Philips webcam and related cameras required a 2.6 kernel), and partly because the information at Matthias Hensler's web site made it look easy and safe to do. I now have a very satisfactory configuration running Fedora Core 3, with upgrades described below.
Nevertheless the installation gave me a mostly working FC 3 installation in about an hour. Even the linuxant driverloader package made my built-in wireless card work with the new kernel to my surprise, because linuxant had installed a boot script which checked whether the module needed to be rebuilt for the current kernel. It slowed down the first boot a little, but then just worked.
The new installation only 'mostly' worked, because a number of things no longer worked (including pine, man, xine, mplayer, and a few others) which I had to fix by removing things that had been left by the `upgrade' installation and then install new versions. I think this arose because I did not have a pure RedHat 9 installation: I had been installing various things which I guess the FC 3 CD could not upgrade to the new environment. Next time I'll do a fresh install, not an upgrade.
Fixing problems was was simplified after I installed the 'apt-get' utility. This made installing and upgrading many things much easier than I had ever found it before. Not everything is available that way, as there are still things that have to be fetched and installed 'manually'.
In particular installing SWSUSP is dead easy now. I used 'wget' to fetch the files listed, as follows (thanks to the instructions on http://mhensler.de/swsusp/index_en.php
Install using 'rpm -i', to make the 'hibernate' command available.
As instructed on the download page, install (as root) with the appropriate command of the form
'rpm -ivh XXXXXXXXX.rpm'The download page states:
Please install the kernels with 'rpm -ivh kernel_version.rpm'. This will install the kernel without deleting the old one, so you can go back to a working kernel in case of problems.
After installing you'll see the new kernel along with older ones, in the '/boot directory. You should also check the contents of your grub.conf file (see below);
/boot/grub/grub.conf
If you use grub (as I do) edit /boot/grub/grub.conf, adding
resume2=swap:/dev/???to the kernel command line, where ??? is the name of your swapdevice.
If you use lilo, edit /etc/lilo.conf in the same way and then run lilo.
See below for further modifications to grub.conf
Install using 'rpm -i'
As instructed in the SWSUSP 'Setup' page you can either modify the appropriate initrd img file in your /boot directory 'by hand' or do it by running the above script with the initrd path name as parameter, e.g.
./swsusp2initrd.sh /boot/initrd-KERNEL_VERSION.imgAs a precaution you could save the initrd file first. But in my experience so far the shell script just works.
ALTERNATIVELY: fetch and install the modified mkinitrd now available on http://mhensler.de/swsusp/
CTRL+ALT+F2You can then log in and run 'hibernate'. You should get what looks like the beginning of a normal shutdown, followed by a display of progress writing to the swap device. Then the machine shuts down. This is much faster than a normal shutdown.
Then when you reboot, if you run the new kernel it should detected the saved state on the swap device, and go into resume mode, including showing the progress.
Warning: if you hibernate using one kernel, then later try to reboot another kernel, then the next time you try to run the first kernel it will complain about a corrupt file store.
So if you wish to run another kernel, do not hibernate: use the normal shut down procedure.
However if you have windows installed, you can hiberate while running linux, then run windows, then later reboot and resume the suspended linux process.
When running a 2.4 kernel (based on Redhat 9) I sometimes found that if I tried to play a video file after resuming with the external power supply disconnected, sound and video did not work properly. I then had to suspend again, connect the charger, then resume. But I no longer have that problem.
Two annoyances remained, that were easily overcome, though finding out how took a bit of time. First of all the text displayed during boot and resume was unreadable: something was corrupting the display during most of the process. I tracked that down to this entry in the /boot/grub/grub.conf file:
splashimage=(hd0,5)/boot/grub/splash.xpm.gzI don't know how it got there but after I removed it booting and resuming worked without problems. I could see all the text displayed.
The second annoyance was font size in the text console. The screen is capable of 1400x1050 resolution and when I ran 2.4.26, that resolution had been used when rebooting or resuming, giving me many more lines of text when working in console mode. With the help of google I found that I could tell the boot process to use that resolution by adding
vga=834at the end of the 'kernel' line. So I now have the following
kernel /boot/vmlinuz-2.6.11-1.27_FC3_cubbi3_swsusp2 ro root=LABEL=/12 resume2=swap:/dev/hda3 pci=noacpi vga=834and everything is fine.
I think resuming is a little faster since the upgrade to FC3, but it is hard to be sure, as I don't have a test configuration that could be timed using 2.4.6 and the new kernel.
NOTE ADDED 26 Jun 2005 [UPDATED 1 Jul 2005]
The fault reported in this section has disappeared. At first I thought
it was because I upgraded
the linuxant.com driverloader
(www.linuxant.com/driverloader)
but I now think there is a different explanation, below.
This following paragraph is now out of date:
Since the upgrade mentioned below on 5th June 2005, everything works
perfectly except for one small irritation. Whenever it resumes, the
wireless card (Dell Trumobile 1300, using linuxant driverloader)
switches between eth0 and eth1. If before suspend eth1 was the wireless
interface, then after resume eth0 is and vice versa. Since I am not
using the ethernet interface I have made these two files identical:
/etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1My conjecture is that the cause of this was having the line
DownInterfaces eth0 eth1in /etc/hibernate/hibernate.conf
DownInterfaces eth1
This mostly worked, but I had noticed a couple of times that there was a problem with resume, though sometimes a failed resume could be repeated successfully. However noticed that there was an upgraded kernel package dated 2005/06/02 for kernel 2.6.11-1.27_FC3 including SWSUSP version 2.1.9, with the comment:
"This new kernel fixes some security issues and includes recent software suspend with fbsplash patch. It also should fix the issue with a panic on resume some reported for the previous kernel."So I downloaded and installed it as above and so far (7 Jun 2005) everything seems to be OK.
I hope this information is of use to someone.
I am very grateful to all the people who have done the work from which I can now benefit. Every time I struggle to help my wife extricate herself from a mess on her Windows PC I wish she could migrate to linux. Unfortunately she uses a superb orienteering map-making package (OCAD) which (at present) runs only on windows.
Maintained by
Aaron Sloman
A.Sloman@cs.bham.ac.uk
Last updated: 1 Jul 2005