FEDORA CORE 3 AND SOFTWARE SUSPEND
ON DELL LATITUDE D600 LAPTOP

This is an addendum (30th May 2005, further modified 5th and 7th Jun 2005, then 1st July 2005) to my notes on Linux on my D600

BACKGROUND

In August 2003 I installed RedHat 9 on my Dell D600, and over a period of several months gradually found how to get software suspend (SWSUSP) working to my satisfaction as described here, eventually using an upgraded kernel (version 2.4.26) and upgraded XFree86 installation (version 4.4) which overcame various problems related to the radeon graphic card.

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.

Installing FC 3: If possible avoid 'upgrade' option

The FC 3 installation CD gave me the option of an upgrade or a fresh install. I decided to try the upgrade, though on reflection a fresh install would have saved a number of minor problems. The upgrade went very quickly because I was asked no questions about required packages: the installation program merely decided what to install on the basis of what had previously been installed, which I think is a bad design decision. E.g. as a result it wasted my time installing an out of date version of OpenOffice which I later removed, and I still do not know if there were any new packages that I would have selected had I seen the list.

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'.

Getting SWSUSP to work on FC 3

After solving the problems of upgrading to FC 3, getting sofware suspend to work was very much easier than it had been with RH 9 and the 2.4 kernels. I did not even need the kernel source, because a pre-built kernel available in rpm format, along with a few other utilities, could be downloaded and installed from Matthias Hensler's web site.

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

Test it

After all that you should be able to shut down and reboot, then test the above by running the 'hibernate' command on the console, or in an xterm window. In case of problems restoring X, you may prefer the first time to test this in a plain text console. E.g. if you are running X log in on console 2, by doing this to get the console login prompt:
    CTRL+ALT+F2
You 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.

My experience so far: Fixing two minor annoyances

After doing the above, everything seemed to work fine: after suspend and resume USB devices including a mouse, external memory devices, and web cams just worked as expected.

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.gz
I 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=834
at 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=834
and 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-eth1
My conjecture is that the cause of this was having the line
    DownInterfaces eth0 eth1
in /etc/hibernate/hibernate.conf
I now have only
    DownInterfaces eth1


Note on upgrade on 5th June 2005

I originally fetched the kernel package including SWSUSP version 2.1.8.9
http://mhensler.de/swsusp/download/kernel-2.6.11-1.27_FC3_cubbi1_swsusp2.src.rpm

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.

NOTE on Philips Web Cam (pwc) driver

After installing a 2.6.11 kernel I had to fetch a new version of the philips web cam driver (PWC) as described in http://www.cs.bham.ac.uk/~axs/threecams.


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 Frames-free web site
Last updated: 1 Jul 2005