Linux on a Laptop: Compaq Presario 725US (700 series)

Summary

Linux works fine. Windows doesn't.

What works in Linux

XGA Yes
Touch mouse Yes
CD-ROM Yes
CD (music) Yes
CD-RW Yes
Sound Yes
Ethernet Yes
DVD (movies)Yes
DVD (data) Yes
USB Yes
Firewire Not yet tried
Modem Not yet tried
Power Management
Battery status Yes
Battery charges when onYes
Screen sleeps when idleYes
HD spins down when idleYes
Throttle CPU Yes

Specs

  • 1.4 GHz AMD Mobile Athlon 4 (1600+)
  • VIA Apollo Pro KT133 chipset
  • 256 Mb 133 MHz SyncDRAM
  • 20 Gb HD, Fujitsu MHR2020AT, 2 Mb cache
  • DVD-CDRW TEAC DW-28E
  • RealTek RTL8139C Fast Ethernet 10/100
  • VIA 82cxxx Audio card (VIA 686A driver)
  • JBL Pro Audio speakers built in
  • VIA ProSavage KN133 graphics card
  • 14.1" TFT XGA display
  • 56K ITU V.92 modem

O.S.

Details

Getting Linux mostly working was fairly painless. Just booted from the RedHat installation disc (downloaded from LinuxISO.org) and chose the "Laptop" default configuration.

During the installation, I partitioned the 20 Gb drive into an 8 Gb partition (for Windows), a 0.5 Gb swap partition, and an 11 Gb Linux partition.

The kernel that comes with RedHat 7.2 may cause the computer to hang on shutdown. I had to unplug the computer and remove the battery. But take note that I was unaware at this time that you have to hold down the power button for 6 seconds to turn off the laptop (see below). Maybe that is all you have to do.

After installation, I downloaded and installed all the latest relevant patches to RedHat 7.2 from updates.redhat.com. I burned them onto a CD using another machine, and installed them from the disc. I probably could have gotten the network up and running first, but that's just what I did. I was watching the NHL playoffs as I updated things, so it was good to not be attatched to the network.

The biggest challenge was getting the machine to power off when shut down. The best I could do for the first few days was get it to the "Power down" stage. At that point, I had to physically unplug all power supplies. The power button didn't seem to do anything. That was my first mistake, so here's a tip: To turn the machine off, hold the power button for 6 seconds or more.

The ultimate answer came from the newsgroup alt.os.linux.mandrake and Santiago Nullo and his reply to another post just days before. The upshot is to build the kernel with ACPI support but without APIC support. I had tried several times earlier to recompile the kernel with ACPI support, with and without APM support, but it always hung on boot-up when it got to the ACPI stage. Since APIC really has nothing to do with power management, the need to disable it is something I would never have thought of.

Compiling a new kernel

I had to compile a new kernel to get the power management working. Fortunately, compiling kernels is something I enjoy doing. But there were a few special things to do.

First, I had to make the machine capable of compiling. The default laptop installation of RedHat 7.2 is understandably sparse. It comes with only GCC-3.0.4, which is fine. But they have it named gcc3. Rename it to gcc.

Download the latest kernel from www.kernel.org. I used 2.4.18.

Get the latest patch for ACPI, which is unfortunately still very developmental, from sourceforge.net. I'm not convinced this was necessary, but do it anyway.

Unpack the linux kernel in /usr/src.

The patch utility doesn't come with the default Laptop installation of RedHat 7.2. So I copied patch from another system (Slackware-based home-grown, so it doesn't have to be RedHat 7.2).

Ungzip the ACPI patch and apply the patch by changing to the /usr/src/linux directory and executing patch -p1 < ../acpi-20020404-2.4.18.diff .

Build the kernel as you normally would and install the bzImage in /boot/vmlinuz-2.4.18. Note to me: included my .config here and maybe expand on the build process.

Now continue with the next section.

Setting up the boot loader

RedHat 7.2 does two things differently during boot-up from what I am used to.

  1. It uses grub as the bootloader. I'm used to lilo.
  2. It used an initial ramdisk image (initrd in the lingo) to boot to first.

The use of grub instead of lilo slowed me down for all of 5 minutes. If you understand lilo, grub will seem pretty similar. Just note that the configuration files are in /boot/grub instead of /etc.

The use of an initrd slowed me down more. The initial ramdisk image provides a temporary environment from which all discs can be checked and modules can be loaded before the system discs are mounted. I imagine the point of this is that you can boot up, then fix a bad disc if need be, then mount it as root. I've never heard of this before, so I'm certainly not an expert.

The trick with the initrd image (/boot/initrd-2.4.x-y.img) is that it contains kernel modules that must mesh with the kernel itself. In particular, the correct versions of the modules ext3.o and jbd.o are needed in the initrd image. (They are used to mount the root partition as an ext3 file system, which is something else new with RedHat 7.2).

Here's one way to create an initrd image with the proper kernel modules.

  1. cd /boot
  2. cp initrd-2.4.7-10.img tmp.img.gz # Or whatever image you know works
  3. gunzip tmp.img.gz
  4. mkdir mnt # create a place to which to mount the ramdisk
  5. mount /boot/tmp.img /boot/mnt -o loop # mount the ramdisk image
  6. cp /lib/modules/2.4.18/kernel/fs/ext3/ext3.o /boot/mnt/lib/
  7. cp /lib/modules/2.4.18/kernel/fs/jbd/jdb.o /boot/mnt/lib/
  8. umount /boot/mnt
  9. gzip tmp.img
  10. mv tmp.img initrd-2.4.18.img

Now you have an initrd image that is compatible with your new kernel.

Edit /boot/grub/grub.config to add an entry for the new kernel and the new boot image. Leave the entry for the original kernel, since we know it works enough to boot up the machine.

Run grub-install /dev/hda to update the kernel loader locate in the MBR.

Reboot and test your new kernel. Good luck!

XFree86

A few tricks optimize XFree86 for the Presario.

One is to edit /etc/X11/XF86Config to select the proper mouse driver: MouseManPlusPS/2. Note that as a matter of course, I always rename the primary XF86Config file to /etc/X11/XF86Config. Sometimes, it is stored as /etc/X11/XF86Config-4.

Installing Windows XP in the first partition

Ultimately, I'd like a dual-boot machine for those rare occasions that I need a Windows environment.

I have not been able to get Windows to re-install on the machine. Maybe the machine is finally blissful and refuses to submit to such abuse again. ;)

The Presario comes with (only!) a QuickRestore CD. In principal, you stick this in the CD drive, boot up from the CD, and it restores your HD to the state it was when it left the shop. Good idea. But it doesn't work for me. The machine goes through all the machinations of restoring the disc image, but it spends only about 2 seconds 'restoring' the disc image. AFAIK, nothing happens.

WORD OF CAUTION: by default, the QuickRestore wipes all partitions before the re-install.

  • Walter Price's Linux on a Compaq Presario 710 page has a work-around for this, which I first tried. Unsuccessfully. The work around is to copy some files to a floppy. Edit them. And then boot from the floppy and run the restore routines from the CD, using some editted scripts. When that didn't work, I resolved myself to lose my Linux installation and tried a basic restore. But that didn't work either.

    Maybe the disc is bad.

    A note about partitioning. I've always used FIPS.EXE to shrink the sizes of Windows partitions when setting up dual-boot machines. This doesn't work with Windows-XP partitions. FIPS doesn't recognise the partition type.

    OpenOffice

    OpenOffice hangs during the installation and occasionally during operation. The reason for this is the Savage video card. It has a bug. Many years ago (5? 6?) I had an S3 which did the same thing with StarOffice.

    The fix is pretty easy. Just set this environment variable in your .cshrc or .bashrc file:
    SAL_DO_NOT_USE_INVERT50=true

    DVD for Movies

    Use Ogle.
    Download the necessary files including a modified driver for the Savage Video card.
    The necessary Ogle packages are:
      libdvdcss
      libdvdread
      ogle
      ogle_gui
      xvattr
    

    Add the symbolic link /dev/dvd to /dev/scd0.

    APM

    This computer used ACPI for power management, not APM. Don't use it.

    Thanks to:

    Kenneth E. Harker for linux-on-laptops. Without this site, I likely wouldn't have bought a laptop.

    Other sites with useful information are:

    1. Walter Price's Linux on a Compaq Presario 710
    2. Cem Servantie's Linux on the Compaq Presario 715US

    Last updated: 04 04 13

    Eric Tittley

  • HMET

    HMET Webmail
    Photo Gallery
    Wiki
    WhIsKI

    About Eric
    Research
    Teaching
    HOWTOs
    Software
    Play

    Contact Info


    Links:
    Astronomy
    Weather
    Surfer's Paradise

    DNS
    MPI
    Presario_725