Fedora Core 4 on HP/Compaq nx6110 Notebook


Version

This document has been changing quite a bit as new information is discovered. The latest version can always be found here

updated Jan. 8 2007: made FC6 version here
updated May. 18 2006: made FC5 version here
updated Feb. 11 2006: removed warning on 2.6.15 kernel with suspend
updated Feb. 9 2006: warning on 2.6.15 kernel with suspend
updated Jan. 13 2006: notes on wireless button, new ifup-local
updated Dec. 29 2005: changed to sysfs suspend
updated Dec. 29 2005: changed to more stable ndiswrapper and broadcom wifi
updated Dec. 28 2005: put vbetool stuff back in; it's necessary!
updated Dec. 23 2005: fixed chmod args, removed unnecessary vbetool stuff
updated Dec. 22 2005: more info about getting video i810 driver to work
updated Dec. 18 2005: new info about hibernate (to RAM with default kernel)
updated Dec. 3 2005: new files and config for hibernate (suspend)
updated Dec. 3 2005: added fix to ethernet not DHCP-ing default route
updated Nov. 22 2005: noticed that PCMCIA insert events now work
updated Nov. 15 2005: added NFS and network stoppage to hibernate.conf
updated Nov. 13 2005: added note about BIOS-locked mini-PCI cards
updated Nov. 13 2005: fixed swsusp kernel links to newest versions
updated Oct. 25 2005: fixed swsusp kernel links to newest versions

Contents


System Tested

The system tested is mostly a bare-bones HP Compaq Business Notebook nx6110 configuration PR124UA#ABA.

The specifics of my system are:


Summary of What Works

Here's what works, what doesn't, and what I haven't tested as of my last update (see above for last update date):

Notebook Feature Status
Feature Status Configuration Work Necessary
video : basic X display
video : 3D acceleration
video : xv acceleration
video : external monitor control
audio
CD/DVD/ROM
10/100 onboard ethernet
wireless : WiFi
wireless : infrared
modem
touchpad
USB
firewire
PCMCIA : basic functionality
PCMCIA : hotplug event notification
Suspend : to RAM
Suspend : to disk

FC4 Installation and Configuration

Any standard Fedora Core 4 install method should work fine. Note that on the last config screen instead of clicking you sometimes have to hit the Enter key (why doesn't clicking with the mouse work here sometimes?)

I highly recommend disabling SELinux. One day it will hopefully be a transparent feature when enabled, but at present it can and does cause problems with some software.

The machine will not reboot properly unless the argument reboot=b is passed to the kernel. This is done by editing /boot/grub/grub.conf and changing the line that starts with kernel. For example, here's mine:

kernel /vmlinuz-2.6.14-1.1653_FC4 ro root=/dev/hda3 rhgb quiet resume2=swap:/dev/hda6 reboot=b

Finally, I highly recommend following the setup notes given at fedorafaq.org, especially regarding yum repository setup. Specifically, unless you do a yum update, the video driver (and maybe other things) will not work.


Video

Upon initial install of FC4, it will use a generic VGA driver. This is proper, as the i810 driver that it should ultimately use did not work right when FC4 was created. So, after FC4 is installed and a full yum update is performed (see fedorafaq.org if you don't know how to do this) you need to specify the proper driver. Bring up Desktop -> System Settings -> Display. Click the Hardware tab. For Video Card, choose the Intel 810 and for Monitor choose a generic LCD display of 1024x768. Once this is in place, you have accellerated 2D and 3D graphics (but slow, nothing like an ATI or NVidia card) and xv (for playing movies) support.

The video hotkey (Fn+F4) works to switch between LCD and external displays. It toggles between LCD only, both LCD and external displays, and external only. It only functions when a monitor is plugged into the external video port.

When the lid is closed and the lid switch activates, the video display turns off, and when it opens, it turns back on. Seems reasonable to me. If you want it to do other things, I've read that there are ways to get these events from acpid and attach your own actions.

The only other setup you need to do is necessary if you do suspend. If so, you need to add this line:

Option "VBERestore" "1"

to the /etc/X11/xorg.conf file somewhere in the section that starts with Section "Device" and ends with EndSection. You should also make sure that the vbetool binary is in /usr/sbin. It is usually included as part of the FC4 pm-utils package. Failure to do this will cause some video driver failures after a suspend/resume. More about suspend later.


Audio

The audio works fine by default with FC4, but watch out for this gotcha. When my machine first started, all external audio was muted. To unmute it, run alsamixer in a terminal, hit right-arrow until you get to item "External Amplifier", and type "m" to toggle the mute setting. Also, bring up the Sound & Video -> Volume Control application and check for proper settings.


Ethernet

The onboard ethernet mostly works, though I've noticed that sometimes it doesn't set a default route properly with dhcp. To fix this, just put this file into /sbin/ifup-local and it will establish the default route if it didn't get set properly. Make sure the file is executable. It logs to /var/log/ifup-local if you want to see what it does each time.

I've heard that switching to the broadcom provided driver (gpl) for the bcm4400 can help, but I haven't tried it.


Wireless

Originally I purchased an Intel Pro Wireless 2200 from HP so that I could use the native linux drivers as opposed to using the ndiswrapper stuff with the provided Broadcom device. Loading them up is simple, just run yum install ipw2200-firmware to get the firmware from livna. However, after much experimentation, I have determined that the linux drivers for the ipw2200 just aren't yet stable. Any large volume transfer kills them, including the newest driver (1.0.8 as of this writing), although the newest driver does get the wireless radio LED working.

Warning: the HP BIOS locks out non-HP mini-PCI cards, so don't expect a non-HP mini-PCI card to work. Someone claims there is a workaround.

Trying another approach, using ndiswrapper with the 2200 fails on the default fedora kernel because of stacksize limitations. One could get a non-standard kernel from here, but I decided that this was too much trouble going forward.

So, I'm back to using the supplied Broadcom mini-PCI card. Using ndiswrapper with it doesn't exceed the fedora standard kernel. Here are the steps to setting up ndiswrapper for the Broadcom card:

  1. Install ndiswrapper and cabextract by running:
    yum install ndiswrapper kernel-module-ndiswrapper-$(uname -r) cabextract
  2. Download the WinXP driver from HP's web site
  3. Unpack the .exe file by running cabextract on it
  4. From the directory where it got unpacked, run:
    ndiswrapper -i bcmwl5a.inf
  5. Place a line in /etc/modprobe.conf by running:
    ndiswrapper -m

Now you can reboot to have it activate, or you can run depmod -a followed by modprobe ndiswrapper if you want to get it running immediately. Use the Desktop -> System Settings -> Network application to create a new device for the wlan0 ndiswrapper device.

This driver appears to be fairly stable, and able to do large volume transfers with no trouble. It even makes the blue wireless LED work. But, do NOT press the button containing the blue wireless LED. For me it works once or twice, but I always get a kernel crash shortly after doing it.


Touchpad

The synaptics touchpad works fine by default in FC4, but I find the use of tap-to-click awkward and error-prone. I put the line

Option "MaxTapTime" "0"

between the

Section "InputDevice"

for the Synaptics device and the subsequent

EndSection

By default the right side of the pad does vertical scrollwheel action, and the bottom edge of the pad does horizontal scrollwheel action. I found that the horizontal scroll in firefox took me forward and back whole pages, which was disconcerting, so I changed firefox to turn it into a true horizontal scroll by doing the following. First, bring up firefox, and visit about:config. Now right click on mousewheel.horizscroll.withnokey.action and set it to 0.

If you really want to get fancy with the Synaptics touchpad configuration, look at the synclient command.


PCMCIA

The PCMCIA slots work fine for me now, including insert and eject events. With the original release of FC4 the insert and eject events didn't fire, but sometime around the updates including the 2.6.14-1.1637_1 kernel it started working.

Another Fedora annoyance is that compact flash memory cards will not get mounted up automatically the way that USB memory devices will. A fix for this is to replace /etc/pcmcia/ide with the version here. Make sure the permissions and ownership get set to the same values as the original.

With un-upgraded FC4, the PCMCIA insert and eject events don't fire. You can still have the card recognized by doing a manual cardctl insert after the card is inserted and a cardctl eject before the card is removed. So, no loss of functionality of PCMCIA slots results, but it was an annoyance.


Suspend

Good news / bad news time. The good news is that suspend to disk and suspend to RAM work fine. The further good news is that suspend to RAM works with the standard kernel, requiring only the proper hibernate.conf file, and can be activated by the Fn+F3 (moon) key fairly easily. The bad news is that it takes fair effort to get suspend to disk to work, including installing a non-standard kernel. It also is lots more work to get the Fn+F8 key to work to activate it. For my purposes, I find that suspend to RAM works so well that I never need suspend to disk. This allows me to use the standard Fedora kernel. I will discuss how to make suspend to RAM work first, then describe how to make the Fn+F3 (moon) key activate it, then describe the steps necessary to get suspend to disk to work, then describe how to get the Fn+F8 (batt) key activate it.

For either type of suspend, the user-space hibernate package must be installed by running rpm -i file on the hibernate rpm file (this one is version 1.12).

Next, copy my hibernate.conf file into /etc/hibernate. This file does suspend to RAM. Also copy my ifup-tryall file into /sbin and make it executable. The ifup-tryall brings network interfaces eth0 and wlan0 back up on resume after the hibernate.conf file brings them down on suspend. If you don't want that, comment out the DownInterfaces line, and they will come back up fully connected if the network is still there. I also have it kill NFS mounts on suspend and restart the autofs service on resume with lines OnSuspend and OnResume in the hibernate.conf file. I find few things more annoying than a process that hangs waiting for a non-existent NFS location if I've moved to a different network. Also, watch out for encrypted loopback filesystem mounts. Suspend will not work if any of these are present, so remove them before suspending if you have them.

This will be enough to get the machine to suspend to RAM by manually running the /usr/sbin/hibernate command as root. When you do so, the system suspends in about 3 seconds, and the power LEDs blink slowly. In this low power state, I find that my nx6110 drains about 1.5% of the standard internal battery per hour. To bring it out of suspend, just press the power button, and in about 10 seconds you will be right where you were when you suspended.

Everything appears to survive just fine through a suspend/resume, including the ethernet, wireless, display, and sound. I haven't tried keeping a USB or PCMCIA device attached through a suspend cycle, though. The suspend documentation says that you shouldn't change any peripherals (even batteries) while the machine is suspended.

Occasionally, the suspend doesn't suspend, but resumes immediately. When this happens, I just suspend again, and it seems to work. I don't know why this sometimes happens - it seems that some processes can't be stopped or something.

While this all works fine, I find that it's much more convenient to use the Fn+F3 (moon) button to suspend than to type a command as root. I will describe how to do this next.

In order to use the moon key easily, I did a hack. I realized that Gnome calls the /usr/bin/apm command when you press the key associated with the "Sleep" function under Desktop -> Preferences -> Keyboard Shortcuts. So, we fake it out by replacing that command with one that calls hibernate. First, make sure that the real /usr/bin/apm command is not present by removing the apm package. You won't need the apm package as it is completely superceded by the ACPI tools. Run as root:

rpm -e apmd

Replace /usr/bin/apm with my apm binary which simply sets userid to 0 and calls /usr/sbin/hibernate. The source is this, if you want to compile it yourself:

#include <sys/types.h>
#include <unistd.h>
int main (int argc, char **argv)
{
    setuid (0);
    execl ("/usr/sbin/hibernate", "/usr/sbin/hibernate", NULL);
};
  

Now, you have to make it suid root by running, as root:

chmod u+s /usr/bin/apm

This makes Gnome's invocation of it as a regular user end up running hibernate as root. Finally, bring up Desktop -> Preferences -> Keyboard Shortcuts and for the "Sleep" line, highlight it and hit the moon key Fn+F3. Thereafter, anytime you hit the moon key, the system will suspend to RAM.

For me, suspend to RAM is sufficient suspend capability. However, if you want to be able to do suspend to disk, read on.

For now we Fedora users have to use an alternate kernel for suspend to disk with software suspend patches added in. Hopefully by FC5 we won't have to do this anymore, as either the patches will be in the standard kernel, or suspend to disk will function through the ACPI or sysfs interfaces (suspend to RAM works right now via the sysfs interface). We are actually much better off than merging patches ourselves, as Matthias Hensler has done most of the dirty work for us. He maintains versions of the Fedora kernels with the software suspend patch included on his website. So, for us it's a simple matter of downloading and installing; no patching necessary.

Ready to begin? All of the following must be done as root. First, copy my hibernate-disk.conf file into /etc/hibernate.

Now it's time to install the patched kernel and its associated packages. NOTE: the links provided here were the latest versions as of early December 2005. Because I no longer use this alternate kernel, you should check the website yourself to see what the latest versions are. You will need:

Each of these should be installed with rpm -i file.

Next, we need to pick a swap partition that will hold the system image on suspend-to-disk. In /boot/grub/grub.conf, add the argument resume2=swap:/dev/hda3 substituting your swap partition for hda3. This allows the kernel to know where to look for the system image on restore from suspend-to-disk. As an example, my old kernel line in my grub.conf file looked like:

kernel /vmlinuz-2.6.14-1.1644_3.rhfc4.cubbi_swsusp2 ro root=/dev/hda3 rhgb quiet resume2=swap:/dev/hda6 reboot=b

You can now reboot, and the system will suspend to disk when you run

/usr/sbin/hibernate -F/etc/hibernate/hibernate-disk.conf

as root. It takes a lot longer to suspend and to resume when you hit the power button, but it doesn't take any battery when suspended.

To use the Fn+F8 (batt) button for suspend to disk, you need to follow the following steps.

To map any special function keys (like Fn+F8) to actions, the lineak package must be built. This seems like a big hammer to use for such a simple job, but I couldn't find any easier way to accomplish it. Download the lineak source, and unpack it into a temporary location with tar xzvf file. Now, go into the directory just created, and as root, do:

Then, place the following in /usr/local/etc/lineakkb.def:
    [CP-NX6110]
      brandname = "HP Compaq"
      modelname = "HP NX6110"
      [KEYS]
       Wakeup           = 227
      [END KEYS]
    [END CP-NX6110]
    
And place the following in /etc/lineak/lineakd.conf:
    # Global settings
    KeyboardType            = CP-NX6110
    CdromDevice             = /dev/cdrom
    MixerDevice             = /dev/mixer
    # Specific keys of your keyboard
    Wakeup      = "/usr/sbin/hibernate -F/etc/hibernate/hibernate-disk.conf"
    

In /etc/rc.local put the line

setkeycodes e009 143

so that the Fn+F8 key gets recognized by the kernel (the Fn+F3 key comes through OK already).

At this point, /usr/sbin/lineakd is ready to start as root whenever X windows comes up. I will leave it as an exercise for the reader how to get this to happen, as there are many ways of starting X.

Once this is done, you can use the Fn+R8 key to suspend to disk.


Links

The following links I've found helpful in nx6110 configuration.

Other user experiences with the nx6110:

Info about suspend/hibernate:

HP linux support forums:


Contact Me

I welcome corrections and additions to this page. You can email me at my email address soup at my company email domain ampersand.com.