Home Linux on an HP ze4100
Red Hat Linux on an HP Pavilion ze4100 Notebook Print E-mail
Written by Bruce R. Copeland   
Wednesday, 07 January 2004 22:12
Article Index
Red Hat Linux on an HP Pavilion ze4100 Notebook
Hardware Configuration
Building a 2.4.23 Kernel
Graphics Configuration
Other Useful Links
All Pages

This page started as "Red Hat 8 Linux on an HP Pavilion ze4100 Notebook". In August of 2003, the system was upgraded to Red Hat 9. Most of what appears here is applicable to both Red Hat 8 and Red Hat 9. I have attempted to indicate any known differences between Red Hat 8 and 9.

The Hewlett-Packard Pavilion ze4100 (KB series) is a built-to-order notebook with the following specifications:
  • 1.6 GHz Intel Mobile Celeron Processor
  • ATI chipset using ATI Northbridge (agpgart) and ALI 1533+ Southbridge
  • 512 MB DDR SDRAM at 266 MHz (1024 MB maximum)
  • Removable 40 GB IBM Travelstar Ultra-DMA 100 hard drive
  • Quanta Storage 24x16x8x internal CD/CDRW/DVD drive
  • 15" XGA (1024x768) display
  • ATI Radeon IGP 340M video with 32 MB onboard RAM and sharing of system RAM (see below)
  • Conexant v.90/v.92 56 Kbps software modem
  • National Semiconductor NS83815/816 10/100 Mbps ethernet controller
  • Altec Lansing 16-bit Sandblaster Pro-compatible sound with two speakers, headphone jack, volume, and mute buttons
  • IEEE 1394 Texas Instruments TSB43AB22 firewire controller
  • National Semiconductor embedded 87/88 key (101/102 key emulation) keyboard
  • O2Micro 6912 CardBus/PCMCIA (2 slots)
  • Synaptics touch pad with scroll pad, left and right buttons, on-off button, and indicator
  • 5 user-programmable one-touch multimedia keys
  • external HP USB floppy drive
  • Rechargable 14.8 Vdc lithium-ion battery
  • Universal AC adapter (100-240 Vac, 50-60 Hz input; 75 W, 19 Vdc output)
This is similar to a prebuilt model ze4125 (KB Intel series) with 256 MB additional RAM, but substantial portions of this page should be relevant to any HP ze41xx or for that matter other models in the ze4000/ze5000 series.

Preparation for Linux

Windows XP Home edition comes preinstalled on the ze4100. Many Linux users remove Windows before installing Linux. However my company still supports several products on Windows platforms, and I often find it convenient to have Windows loaded on a Linux computer--especially during the initial phases of Linux installation and configuration. I therefore used PartitionMagic (in Windows) to repartition the hard disk for a dual boot system as shown below:
 Partition  Start(MB) End(MB)   Type    Filesystem   Purpose 

1 0.0 23.5 primary fat HP utils
2 23.5 7522.7 primary ntfs Win XP
3 7522.7 38154.4 extended
6 7522.7 7569.7 logical ext2 /boot
7 7569.7 32192.8 logical ext2 /
8 32192.8 33149.8 logical linux-swap SWAP
5 33149.8 38154.4 logical vfat /dos
This arrangement places the Linux /boot partitition below cylinder 1024 (8003.5 MB). While not strictly necessary on newer computers, I have found this to be a generally useful disk arrangement for dual boot Linux systems. The /dos vfat partition is accessible to both Windows XP and Linux, and it can easily be made accessible via Samba to other Windows machines on a heterogeneous LAN.

[BTW PartitionMagic is a great tool, but most people who run Linux use it only once. So for those of you who prefer to save some money, it IS possible to do equivalent repartitioning using a Linux rescue disk and the Linux ntfsresize and parted utilities.]

Installation of Red Hat 7.2

On computers used for production work, I generally run Red Hat Linux because this operating system is widely used throughout the bioinformatics and IT industries in which I work. On the other hand, I try to avoid dot-zero (major version) releases of Red Hat because they tend to be buggy (effectively beta) software. At the time this computer originally arrived, Red Hat 8 had just been released, and Red Hat 7.3 media wasn't easily obtainable. I therefore initially installed 7.2 on this notebook using a notebook installation.

During installation, I selected grub as the boot loader with Linux as the default boot option and Windows as an alternate option on the grub boot menu. Under this arrangement, grub appears at boot with Linux as the default boot option and Windows as another option that can be selected. If the user chooses to boot Windows, then the Windows XP boot menu appears next (if there is more than one boot option for Windows).

The Red Hat 7.2 installation went smoothly up to the point of XWindows graphics configuration. The install program was then unable to identify either the display or a graphics driver. This left me with a Linux installation that would boot successfully into console mode but was incapable of running XWindows. A little research on the internet quickly convinced me that in order to run XWindows on this hardware, I needed at least XFree86 4.1 and a more recent kernel than is easily supported on RedHat 7.2. That wasn't too surprising. The very latest hardware usually requires the most recent Linux (and then some).

Installation of Red Hat 8

I therefore decided to to go ahead and install Red Hat 8 from CD. I used the upgrade option with custom selection of packages. The installation was straightforward, and this time the configuration of X graphics was partially successful. I was able to boot into XWindows with 800x600 resolution. A little quick editing of the /etc/X11/XF86Config file produced an acceptable 1024x768 XWindows display in VESA framebuffer mode. (See lspci output and XF86Config-vesa file.) Red Hat 8 was up and running, and I was ready to configure and test the rest of the ze4100 notebook capabilities under Linux.

Installation of Red Hat 9

The Red Hat 8 installation was upgraded to Red Hat 9 in August of 2003. The upgrade process was straightforward, and Red Hat 9 booted successfully into X/Gnome after the upgrade was complete.

CD/CDRW/DVD Drive

CD writers require SCSI emulation under Linux. This means the kernel needs SCSI support, and the parameter hdc=ide-scsi is required for booting. The CD/CDRW/DVD drive on this notebook reads CDs and DVDs quite well. It also writes CDs successfully, although I had trouble getting it to write a Memorex CD-RW disk a second time (eventually I had to blank the disk on another machine before I could write it again with this drive). DVD capability was tested using xine after making a /dev/dvd symlink (ln -s /dev/sd0 /dev/dvd).

Ethernet Controller

This notebook spends most of its time connected to the company LAN. The embedded National Semiconductor ethernet controller has performed flawlessly.

Modem

The Conexant 56 Kbps ACLink modem is a winmodem. Binary drivers and compatibility test utilities are available for Linux from the MBSI HSFLinmodem Site. I downloaded and installed the rpm package hsflinmodem-5.03.27lnxtbeta03042700-1.i386.rpm. The modem works quite well using this driver. The hsflinmodem package compiles the driver based on whatever kernel is currently in use. If you change or add a new kernel, you need to run the installed hsfconfig program again.

The MBSI site is now charging for the full 56 kbps ACLink modem drivers. I understand their need to recover development costs in this fashion. It is unfortunate that hardware manufacturers/vendors which benefit from open source operating systems (including HP) are not supporting companies like MBSI.

Sound

Sound worked immediately upon installation of Red Hat 8, although I had to increase the volume quite a bit using the Gnome volume control. The onboard Altec Lansing speakers are a bit weak and tinny, but the sound through a pair of headphones is excellent!

Touchpad/Scrollpad

The Red Hat installation program produced an initial /etc/X11/XF86Config file configured for a standard 2 button PS/2 mouse. Although the ze4100 touchpad and buttons worked fine with that configuration, the embedded scrollpad did not work. To achieve full functionality, I therefore downloaded and installed synaptics-0.11.3.tar.gz and modified the /etc/X11/XF86Config file to use the synaptics driver with appropriate options. (See XF86Config-vesa file.)

One-Touch Multimedia Keys

Some of the one-touch multimedia keys were enabled initially, and all of the keys had mappings to function keys in /etc/X11/Xmodmap as follows:
    236  F13  (mail key)
    243 F14 (TV output key)
    178 F15 (browser key)
    241 F16 (system lock key)
    240 F17 (help key)
    174 F19 (sound mute button)
    176 F20 (sound increase button)
The omke.pl script from the Omnibook Project can be used to enable ALL the one-touch keys. To do this at startup, I added the omke.pl script to the /etc/rc.d directory, then created an executable file /etc/rc.d/enable_keys with the content
    # Use omke script to enable one-touch keys
    #!/bin/sh
    #
    # enable the multimedia keys on HP notebooks

    /etc/rc.d/omke.pl -k 1
and finally added the following two lines to the end of the /etc/rc.d/rc.local file
    # Use omke script to enable one-touch keys
    /etc/rc.d/enable_keys
[On Compaq and HP notebooks using the AMD athlon instead of the Intel pentium, it appears that the omke.pl script doesn't do anything meaningful. However, you can achieve the same functionality by getting and installing the omnibook kernel module and then replacing the /etc/rc.d/omke.pl -k 1 line above with insmod omnibook.]

Even if the multimedia keys are enabled, they won't do anything meaningful unless they have actions assigned to them. In a login with Metacity as window manager, use the gconf editor to assign actions under Apps/metacity. For example, to make the browser button functional, assign the value F15 to run_command_3 under global_keybindings. Then assign the value mozilla to command_3 under keybinding_commands. Alternatively with Sawfish as window manager, select the Keybindings menu option and then use the Sawfish configurator to add keys and link them to the appropriate 'run shell command: ...'

USB Floppy Drive

Although this notebook doesn't have a built-in floppy drive, I was able to obtain a USB floppy drive from HP for free (after rebate). The device location for the USB drive is /dev/sda. To make mounting easier, I defined the symlink /dev/floppy (using the command ln -s /dev/sda /dev/floppy) and added the line
    /dev/floppy  /mnt/floppy  auto  noauto,users,exec  0 0
to my /etc/fstab file. With these modifications, the USB floppy drive works just fine under Linux. However, for some reason I am unable to boot into Linux with a boot disk on this drive. I get a "Boot Failed" message no matter how I set up the boot disk. Judging from posts on various online forums, this is a timing problem in the kernel. (The USB floppy drive boots into Windows XP just fine.) This doesn't pose a serious problem, because I have used the CDRW drive to create several different boot and rescue CDs. These are generally more convenient anyway.

PCMCIA and WiFi

I tested PCMCIA under Red Hat 9 with a NetGear MA401NA wireless 802.11b network card. I chose the 16-bit MA401 (Prism2 chipset) in preference to the 32-bit MA521 (Realtek 8180 chipset) because the Prism2 chipset has excellent open source support under Linux. Recent stock Linux kernels contain an Orinoco driver that will work with Prism 2 chipsets. However, I do not recommend this driver because it supports only limited speed and WEP features. Instead, the linux-wlan-ng project provides a really good driver for the Prism2 chipset. To use this driver with a custom kernel, follow these steps:
  1. Make sure your kernel supports 16/32-bit PCMCIA and hotplugging (CONFIG_PCMCIA, CONFIG_CARDBUS, CONFIG_ISA, and CONFIG_HOTPLUG). Support for a Prism2 wireless driver isn't necessary.
  2. Download the pcmcia-cs source and build it.
  3. Download the most recent linux-wlan-ng source and build it.
  4. Configure /etc/pcmcia/network.opts with appropriate network settings. Look at the Networking HOWTO if you are unsure what settings to use.
  5. Edit the /etc/wlan/wlan.conf file for your intended WiFi use. If you intend to connect to any available network, there isn't much to do. If you plan to connect to a specific wireless SSID, then you need to change the line

    SSID_wlan0=""

    to

    SSID_wlan0="yourSSID"

    You also need to copy /etc/wlan/wlancfg-DEFAULT to /etc/wlan/wlancfg-yourSSID and set any appropriate paramaters (WEP, etc.) in the new file.
  6. Change /etc/sysconfig/network-scripts/ifcfg-eth0 to have ONBOOT=N.
  7. Reboot and verify desired network functionality with ifconfig, route, and ping commands.
If using a stock Red Hat kernel, you should download and install the linux-wlan-ng packages (make sure you also have the appropriate kernel-pcmcia-cs package installed), and then carry out the configuration steps 4-7 above.

The NetGear MA401 WiFi card and linux-wlan-ng driver have worked flawlessly.

Building a 2.4.23 Kernel (Red Hat 9)

A notebook computer is not much use without power management. Newer notebook computers use ACPI instead of APM for power management, and the HP ze4000/ze5000 series is no exception. Unfortunately several of the major Linux distributions (including Red Hat) provide prebuilt kernels that do not support ACPI (nor do they have any facililty for suspending a notebook which uses ACPI). A kernel build is required to implement ACPI and suspend capability.

To build the 2.4.23 kernel, I obtained vanilla 2.4.23 kernel source from the Linux Kernel Archives and applied the following patches: acpi-20031203-2.4.23.diff.gz (see also the ACPI Project), software-suspend-2.0-linux-2.4.23.bz2 and software-suspend-2.0-core-rc3A.bz2 from the SourceForge Software Suspend site, and linux-2.4.23-ntfs-2.1.5a.patch.gz from the Linux NTFS file system support project. (See current kernel configuration.) For those of you unfamiliar with kernel building or patching, I recommend the excellent discussions at digitalhermit.com and kernelnewbies.org. After building the kernel, I configured and built pcmcia-cs and linux-wlan-ng as described in the section on PCMCIA and WiFi above.

ACPI and Software Suspend

With ACPI support built into the kernel, many of the ACPI power management capabilities of this notebook become accessible. The kernel puts information about the current ACPI state in /proc/acpi. Examining the files and directory structure under /proc/acpi is a good way to gain familiarity with the ACPI capabilities. Currently information about AC adapter, battery, lid position, power button, fan, cpu, and temperature are available.

Most notebook users want some mechanism to monitor battery state. There are several ACPI battery monitors available. I personally like the GKrellM monitor with the gkacpi plugin. The GKrellM monitor itself is available as an rpm package on the Red Hat installation CDs. I built gkacpi from the gkacpi2-0.4 source code, and then added the gkacpi2.so file to the appropriate user .gkrellm/plugins directories. The Gnome panel battery charge monitor also works quite satisfactorily with ACPI in Red Hat 9 (but not in Red Hat 8).

The ACPI daemon project (acpid) offers another way to make use of the ACPI information produced by the kernel in /proc/acpi. This daemon implements an event/action system under /etc/acpi and logs acpi information to /var/log/acpid. There are various scripts around the web for responding to power related events (such as closing the notebook lid or pressing the power button). I use a powerbtn event file (located in /proc/acpi/event that contains the lines
    event=button[ /]power
    action=/etc/acpi/powerbtn.sh
where the powerbtn.sh script simply calls
    shutdown -h now
to do an orderly shutdown whenever the power button is pressed.

Software suspend works well with the 2.4.23 kernel after some careful configuration. I currently use the suspend-0.18 script from the SourceForge Software Suspend site. I have /etc/suspend.conf configured to run a script that uses cardctl eject to stop the WiFi card before suspension begins. On this notebook it is essential that the suspend script load the keyboardev and mousedev modules after resume. Even so, the scrollpad occasionally doesn't respond after resume. [This is easily remedied by using <Ctrl-Alt-F1> to switch to a text console and then <Ctrl-Alt-F7> to come back to XWindows.] It is also necessary to run the omke.pl script after software suspend/resume in order to enable the multimedia keys (see above). I have configured acpid so that closing the notebook lid suspends the system, and so that the system suspends automatically whenever battery power drops below 6%. [NOTE that there are serious computer security issues associated with leaving a notebook in the unresumed state after suspend!!!] You can get my acpid event/action scripts and suspend configuration.

ATI Radeon XFree86 Graphics

The HP ze4000/ze5000 notebook series uses an integrated ATI Radeon graphics system (Radeon IGP 340M for the Intel processors or Radeon IGP 320M for Athlon processors). These systems (collectively called radeonIGP) have Radeon mobility video adapter characteristics. However, the AGP for all these notebooks is provided by an ATI Northbridge that is part of the main system chipset (also ATI). Until recently the AGP has been unavailable because Linux kernels didn't recognize the agpgart provided through the ATI Northbridge.

Versions of XFree86 prior to 4.3.0 have difficulty recognizing the Radeon graphics chips on the ze4000/ze5000 series notebooks. XWindows will however run at 1024x768 resolution with 24-bit color on the ze4100 using the VESA framebuffer driver. (See XF86Config-vesa file.) This gives acceptable graphics performance for routine work, but nowhere near the performance available from the ATI driver under Windows XP, and nowhere near the performance I would want for serious molecular visualization. It is also possible to force any of the XFree86 4.x versions to use the radeon driver by setting the ChipID to a standard Radeon Mobility M6 chip in the /etc/X11/XF86Config file:
    Section "Device"
    Identifier "ATI Radeon Mobility M6"
    Driver "radeon"
    VendorName "ATI Radeon Mobility M6"
    BoardName "Radeon Mobility M6 LY"
    ChipID 0x4c59
    VideoRam 32768
    BusID "PCI:1:5:0"
    Option "AGPMode" "4"
    Option "noaccel"
    EndSection

A better solution is to patch XFree86 4.3.0 with the experimental radeonIGP driver patch and then rebuild XFree86. This gives significantly improved performance (see 4.3.0 XF86Config file).

Recently patches have become available to allow working hardware 3D acceleration on Radeon IGP 320/330/340M systems. The procedure for doing this is somewhat complicated, but the results are very satisfactory. For a 2.4.23 kernel, the necessary steps are as follows: Configure and build the kernel with radeonIGP agpgart support. Then patch and build a recent branch of the XFree86 cvs tree (4.3.99.9 or later). Next transfer the radeon.o module from the XFree86 build to the kernel modules tree. Finally alter the /etc/X11/XF86Config file to use the radeon driver with acceleration (see current XF86Config file). A slightly more detailed description of this procedure can be found in comment 260 at the patch site above. This is the X setup I now use.

Gnome 2 Menus

In general I have found both Red Hat 8 and 9 to be productive working environments. However, the absence of a menu editor for Gnome 2 combined with quirky locations for menu files in Red Hat 8 and 9 make for a big headache! For those of you still in the dark about how to edit Gnome 2 menus under Red Hat 8 or 9, the *.menu (menu architecture) files are located in the /etc/X11/desktop-menus directory; the *.directory (individual menu) files are located in the /usr/share/desktop-menu-files directory; and the *.desktop (menu item) entries can be found in several different directories that are listed as includes in the *.menu files. You can edit these files or create new ones using any text editor. The Gnome 2.0 Desktop System Administration Guide also helps.

Other Useful Links

A number of other sites provide useful information about hardware similar to the HP ze4100:

Last Updated on Tuesday, 28 October 2008 17:56
 
Copyright © 2010 CyberSym Technologies, Template designed by SiteGround web hosting