Installing Red Hat 7.3 on a Compaq Presario 711CL Laptop
The Compaq Presario 711 is a nice upgrade from my 475MHz AMD desktop system. The configuration I recently bought from Costco.com includes too many features to list here, but it has more than two times the power that my desktop system has and includes a FireWire port and an 8x DVD drive. The pre-installed version of Windows XP wasn't a big selling point for me, though; I wanted to use Linux on my new laptop.
Linux has made great progress on desktop systems. Installing a modern operating system like RH 7.3 on a desktop is almost easy enough for Aunt Minnie, as Jerry Pournelle likes to call the everyday computer user. But laptop installs are a different matter. The hardware on laptops is less generic than what's on the desktop, but with the move to ATX-style motherboards with integrated peripherals, this has become less of a problem.
The first step toward Linux freedom on my new Presario was a basic install of Red Hat 7.3. For me this consists of selecting a laptop install from the friendly GUI installation manager, and then going through the package list to remove everything but the bare essentials needed to get X and the development tools up and running. The only real issue with the installer is that it doesn't auto-detect the video chipset the Presario has, which is a variation of the Savage chipset called Savage Twister K. So you have to manually select “Savage” from the list of video drivers presented during the install.
Once I have the basic setup installed and running startx from a shell prompt, giving me a nice plain X screen, I copy over all the Red Hat CDs to a new directory named /RPMS/. I find this makes life much easier when I discover something missing from the system. I can install it in a few seconds, and I don't have a lot of the extra baggage that modern distributions bring to clutter up the hard drive. With a 20GB drive available, there is no reason not to install 2GBs of RPM packages so that you will always have them available.
I use Window Maker as my window manager, and I don't install GNOME or KDE and their associated load of cruft. This has become somewhat of a crusade for me lately; when I upgrade my hardware I actually like to see my applications run faster instead of running bigger applications at the same speed as before (or, in some cases, slower). I see a strong trend in the GNOME and KDE communities toward feature bloat, which ends up negating the increases in processor speed and available RAM.
But that doesn't mean you have to follow my heretical habits. One of the greatest benefits of using a liberating operating system such as Linux, and all of the associated programs, is you can mix and match the packages to suit your tastes. The changes I am going to describe will work equally well on a stock GNOME- or KDE-based Red Hat install, if that's what you use. So, on to the tweaks we need to make to get your Linux laptop up to snuff.
One of the first things I'll cover is the fact that the basic Red Hat 7.3 will install and run on the Presario, but the correct power management system isn't enabled. The Presario, as well as an increasing number of newer laptops, uses the ACPI power management interface instead of the older APM system. Because of this, you will notice the processor and fan run at full blast, trying to do their own version of the Chernobyl disaster while sitting on your lap.
As I write this on my Presario, it is running X, OpenOffice.org, the xine DVD player and a number of Window Maker docking apps. The CPU usage is hovering around 30%, the fan is on low and the laptop is a comfortable temperature. Without ACPI working it can get very hot, to the point where it's uncomfortable to hold it on your lap.
In addition to power management, the sound card has to be dealt with, as does one of those wonderful LinModems and the lack of RS-232 serial ports. As an added bonus, I'll tell you how to play your favorite DVD movies while still getting work done.
One subject that I won't cover is software suspend. Patches are available that are reported to work for some people. I didn't have any success when I tried applying them to my kernel, and there were too many differences for me to attempt to hand-patch. Because of the nature of software suspend, I am reluctant to try and shoe-horn it into my kernel myself; I'd rather wait until a well tested version makes its way into the kernel tree.
The most important of the modifications outlined above is power management. Modern laptops depend on the operating system to correctly interface with the hardware power management system. Older laptops used a system called APM, while newer laptops are starting to use the ACPI system instead. As I mentioned before, the default Red Hat 7.3 install has APM power management enabled instead of the ACPI power management system that the Presario uses. There is an ACPI system included in the 2.4.18-4 kernel, but it is somewhat outdated and doesn't provide the /proc/acpi interface required by wmacpi. The latest ACPI patch as of this writing is acpi-20020726-2.4.18.diff. It provides a better /proc/ interface to the status of the machine and the state of the battery. This patch is available from acpi.sf.net, but read on before you run off and try to patch your kernel.
As luck would have it the new ACPI patch doesn't apply cleanly against the Red Hat kernel-source-2.4.18-4 RPM packaged source tree. A considerable amount of hand-tweaking is needed to get the kernel to compile correctly after applying the patch. You also need the kacpi patch, which fixes a problem the Presario has with losing track of ACPI interrupts. This patch is available from Juliusz Chroboczek's excellent web page (see Resources). If this patch isn't included, the kernel will miss interrupts and ACPI power management will be disabled. I modified the kapcid patch a bit so that it wouldn't report the missed interrupts—there were so many of them that it was filling up my logs.
Instead of talking you through all the tweaks I made to get the new version of ACPI working, I have provided a complete patch that handles all of the issues I cover in this article, which can be downloaded from my web site at www.brianlane.com. This patch will apply cleanly against a standard Red Hat 2.4.18-4 kernel tree, so here is how to patch your kernel (it isn't as hard as you may have been led to believe).
Let's get started by installing a clean RH 7.3 kernel with the following commands:
rpm -Uhv kernel-source-2.4.18-4.rpm cd /usr/src/linux-2.4/ cp configs/kernel-2.4.18-athlon.config .config
Then apply my patch to the kernel tree:
patch -p1 < /tmp/2.4.18-4presario.patch
And configure the kernel for ACPI support with make xconfig.
Go to general setup, deselect APM support and select ACPI support and type y for all the ACPI options except “CPU Enumeration Only”. Save and exit the kernel configuration, and then build and install the kernel:
make dep; make clean; make bzImage make modules make modules_install make install
This will create the new kernel, called 2.4.18-4acpi, install it into /boot, create an initrd and update the bootloader (Grub in my case).
If you are feeling adventurous, you can edit /etc/grub.conf (or LILO, if that's what you're using) and select the new kernel as the default. But always keep a spare around, just in case. Reboot your machine, and make sure that there is now a /proc/acpi directory tree. Look at /proc/acpi/battery/BAT0/state to see the current state of your battery. Mine, for example, looks like this when running from the battery:
present: yes capacity state: ok charging state: discharging present rate: 12565 mW remaining capacity: 47463 mWh present voltage: 16145 mV
- The kernel doesn't really
11 hours 55 min ago
12 hours 26 min ago
12 hours 26 min ago
14 hours 31 min ago
- This should be very helpful
15 hours 45 min ago
- As much as I share your point
18 hours 4 min ago
- So girls had it better ?
21 hours 36 min ago
- Reply to comment | Linux Journal
21 hours 56 min ago
- why is GNOME 3 in the fifth position at 14.1 %?
1 day 3 hours ago
- Sublime Is Brilliant!
1 day 8 hours ago