August 11, 2006

Linux on an HP Compaq NC6400

Update: I've started an HP Wiki, dealing with Linux on HP notebooks

A week ago I bought myself an HP Compaq NC6400 notebook, with the express purpose of running Kubuntu Linux on it. Whilst it includes a couple of features that are definitely not supported, I don't need them anyway.

Overall, it works very well - just about all hardware works out of the box, with only some minimal tweaking required for some. About the only current issue is related to suspend/resume..

This page documents my experience in getting Kubuntu working on this notebook, and I hope that this is useful to anyone else trying to do the same. Specifically, this model is an RA270AA.


The HP NC6400 is a thin and lightweight 14.1" widescreen notebook, and is business grade judging by the three year warranty. The notebook features the following hardware:

  • Intel Core Duo T2400 processor
  • 512Mb DDR2 RAM
  • 80Gb SATA disk
  • Intel 945GM integrated graphics
  • 1280x800 widescreen TFTP LCD
  • IDE DVD-ROM/CDRW removable drive
  • Synaptics touchpad / Pointing stick
  • SD/MMC cardreader
  • Intel PRO3945 802.11a/b/g wireless
  • Integrated Bluetooth
  • PCMCIA slot
  • Intel audio
  • Fingerprint reader
  • Smartcard reader
  • HP Mobile Data Protection Sensor
  • Tigron 10/100/1000 ethernet
  • 56Kbps modem
  • TPM module
  • VGA/S-Video out

My research indicated that all of it except the fingerprint/smartcard would work under Linux. Which was great - I don't need those anyway so in theory everything should work. I fired up the laptop, stuck in the Dapper CD and installed. After installing and checking/tweaking hardware, I came up with a list of how well things work on this. The following table lists the compatibility of various features:

Intel Core Duo CPU Works Dual core functionality needs the -686 kernel
SATA disk/controller Works perfectly, except suspend/resume (See below) Preliminary S3 resume works
Intel i945 graphics Works perfectly, including DRI -
1280x800 TFTP LCD Works, but tweaks needed for 1280x800.
Brightness + Ambient sensor work, but not visible to OS.
See below for getting 1280x800
VGA/TV out Working, tweaks needed Console mode is perfect
CD/DVD Drive Works perfectly -
Synaptics touchpad Works perfectly, including scrolling, 2 finger 3 button, etc -
Pointing stick Works out of the box -
SD/MMC cardreader Detected, needs a small tweak to work Use "setpci -s 02:06.2 4c.b=02" to get it working
Intel PRO/3945 Wireless Works out of the box Kill switch works, can't re-enable though
Bluetooth Works out of the box Detected a Nokia phone even in the installer
Intel Audio Works out of the box -
Fingerprint reader Doesn't work Seen as USB device, but no driver
Smartcard reader Doesn't work Seen as unknown PCI dev
Ethernet port Works out of the box -
PCMCIA slot Works perfectly Tested with CF adapter and an old Lucent wavelan card.
56Kbps modem Untested/unknown -
TPM module Detected, but not tested -
VGA/S-Video out Monitor switch to VGA from softkey, works. -
Audio/Presentation/etc softkeys Mute works immediately. Volume, presentation, etc work with 'lineakd'. -
Mobile data protection sensor Doesn't yet work ACPI driver could be written

Details on specific features are as below:


To get the full 1280x800 resolution, it's necessary to install the 915resolution package from the universe repository, then set the following in /etc/default/915resolution:
After this, it works perfectly.

The VGA and TV out ports work, via the Func-F4 softkey, but tweaks to the Xorg config are necessary for dual head Xinerama, etc.


With the ipw3945 driver that comes with Ubuntu, the kill switch is a bit funny. If you use it, it will happily disable the wireless, but then when attempting to re-enable it, nothing will happen. It seems a reboot is needed to get it going again. I'll try a newer driver to resolve it. Otherwise, the driver works very well - and even knetworkmanager scans and connects to, wep and wpa enabled.

Synaptics touchpad and pointing stick

These both work out of the box, including the buttons above the touchpad. If you want to configure the touchpad on the fly, then the lines Option "SHMConfig" "on" and Option "UseShm" "true" need to be added to the Synaptics device section in /etc/X11/xorg.conf. This will allow ksynaptics to give a little icon where you can change things. Also, I couldn't get tapping working on the pointing stick, but it might not be supported in this hardware anyway.

SD/MMC cardreader

This is detected by the kernel, but by default it won't work. The trick to getting it working is to add the command setpci -s 02:06.2 4c.b=02 to the startup scripts. This will get it reading cards fine, though you'll need to mount them manually.


The softkeys above the main kayboard keys all can be made to work. By default, only the 'wireless' and 'mute' buttons work - they seem to be tied to the relevent hardware directly. Update: The latest edgy KDE made most of the hotkeys "just work" - what follows is no longer required. The other buttons all just create keyboard scancodes, but they can easily be enabled and programmed to do anything else. I used 'lineakd', and through its configuration file you can set the buttons to do anything, as well as show up on a nice OSD. I added the following to /etc/lineakkb.def:
  brandname = "Hewlett Packard"
  modelname = "Compaq NC6400"
    Information      = 245
    Wireless         = 133
    Presentation     = 205
    Mute             = 160
    VolumeDown       = 174
    VolumeUp         = 176
[END HP-NC6400]
And the following (non-default) additions to ~/.lineak/lineakd.conf:
KeyboardType = HP-NC6400
MixerDevice = /dev/mixer
RAWCommands = 
Screensaver = 
conffilename = /home/bb/.lineak/lineakd.conf
keystate_capslock = 
keystate_numlock = 
keystate_scrolllock = 

Information = KONQUEROR
Presentation = 
VolumeDown = EAK_VOLDOWN
VolumeUp = EAK_VOLUP
Wireless = 


Now it gets tricky. The notebook uses the newer ICH7 AHCI SATA chipset, and Linux kernel support for S3 (suspend to ram) resume for AHCI chipsets is still in its early stages. Thus, by default, the notebook will happily suspend, but resume will fail as the SATA drivers will fail to bring the disk back online. It turns out that there are patches available to get this going, and after much trial and error, I've found that it works with 2.6.18-rc3-mm2, so there's definitely progress. Unfortunately this kernel would cause processes to randomly crash, as well as have a faulty keyboard driver, so I've basically proven to myself that the laptop will have good suspend/resume, but I have to wait a bit before it's perfect. I'm still experimenting with manually adding patches to working kernels, so I'm confident to have this working well very soon. Update Aug 13: Using 2.6.18-rc4-mm1, reverting an i8042 patch, and adding the "irqpoll" boot option, I'm able to get suspend and resume working! More tweaks will be required, but the core of it's there.

Buttons, sensors, batteries, etc

Lid/power - these work perfectly, and you'll just need to configure klaptop/whatever to set the appropriate actions for when they're pressed. One thing I noticed is that unlike my fujitsu/siemens, the laptop wont resume when the lid is opened, you need to hit the power button for that.
Temperature - "acpi -v" shows 4 working temperature variables. A fifth appears but stays at 0C. I'm not sure what these sensors are each tied to, I can only guess that the hottest is the cpu :)
Batteries - The main battery and its charge status is detected, and AC power status is detected. I haven't got a multibay battery so can't test that, however Linux does detect an empty second battery slot.
Fans - the kernel detects 4 fans, though I think it's only got one. One fan sensor does show something happening, but it seems to only show as on when it's at full speed.
The Mobile data protection sensor seems to basically be an accelerometer, similar to what's in Macbooks and Thinkpads. It shows up inside the machine ACPI internals, and in theory should be quite easy to get a driver working for it. The ACPI DSDT is largely self documenting, so I'd like to try getting this going at some stage.
Posted by Ben at 10:37 PM | Comments (0)