HP Compaq nc8000

My experience with Debian GNU/Linux on a HP Compaq nc8000 laptop.

In December I got a new computer, an HP nc8000. I've been running Debian on it since then without any major problems. But I managed to break dpkg somehow, so I felt it was time to give the people working on the new Debian Installer some feedback when installing on a laptop.

I started writing this document in December, but I never completed it then. I finished it off when I installed Debian again. I hope this will be helpful for you. Feel free to mail me comments and suggestions.

link to nc8000.jpg, 100Kb

A photo on the nc8000

link to ss20040414.png, 512Kb

Screenshot of my desktop

This is a photo of my nc8000 along with a Logitech MouseMan traveler. To the right there's a screenshot of my desktop running Gnome 2.6 along with gvim and irssi. Just a try to make the page perty. ;)

Content

  1. Quickspecs
  2. Installing Debian
  3. Installing Linux 2.6
  4. Installing ATI's drivers
  5. Wireless
  6. Mouse and Touchpad
  7. Keyboard special keys
  8. Not working
  9. Not tested
  10. Links and Resources
  11. Changelog

Quickspecs

Here's the output from lspci

lspci
00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 03)
00:01.0 PCI bridge: Intel Corp. 82855PM Processor to AGP Controller (rev 03)
00:1d.0 USB Controller: Intel Corp. 82801DB USB (Hub #1) (rev 03)
00:1d.1 USB Controller: Intel Corp. 82801DB USB (Hub #2) (rev 03)
00:1d.2 USB Controller: Intel Corp. 82801DB USB (Hub #3) (rev 03)
00:1d.7 USB Controller: Intel Corp. 82801DB USB2 (rev 03)
00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 83)
00:1f.0 ISA bridge: Intel Corp. 82801DBM LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corp. 82801DBM Ultra ATA Storage Controller (rev 03)
00:1f.5 Multimedia audio controller: Intel Corp. 82801DB AC'97 Audio Controller (rev 03)
00:1f.6 Modem: Intel Corp. 82801DB AC'97 Modem Controller (rev 03)
01:00.0 VGA compatible controller: ATI Technologies Inc: Unknown device 4e50
02:04.0 Ethernet controller: Unknown device 168c:0013 (rev 01)
02:06.0 CardBus bridge: O2 Micro, Inc.: Unknown device 7223
02:06.1 CardBus bridge: O2 Micro, Inc.: Unknown device 7223
02:06.2 System peripheral: O2 Micro, Inc.: Unknown device 7110
02:06.3 CardBus bridge: O2 Micro, Inc.: Unknown device 7223
02:0d.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)
02:0e.0 Ethernet controller: Broadcom Corporation: Unknown device 165e (rev 03)

Installing Debian

Since this computer comes with a CD-reader, and I wanted to try the new Debian Installer out, I downloaded the beta 3 iso from www.debian.org.

The good thing about doing this is that the tg3 module is available to get the network card up and running. With an earlier installation I did with Woody I started out by using Broadcom's own Linux drivers. But in recent 2.4 kernels there's no need to.

I really enjoy the new Debian Installer! They now also included support for XFS, which made me convert my old reiserfs partitions to XFS. I really like reiserfs on my server, it's fast and never had any problems. But I've had quite a few corrupted files when my laptop crashed. (Blame canada, ATI and maybe XFree86!) Up to this moment I don't regret choosing XFS instead of reiserfs. Time will tell.

Will try the laptop mode patches later. But I'm waiting until 2.6.7 to make sure I don't loose too much data. :)

Installing Linux 2.6

There's lots of good arguments to upgrade to 2.6 if you're using Linux on the desktop. I haven't seen any arguments why you shouldn't. I use 2.6 atleast. :) Observe! To be able to extract/build in the /usr/src directory, you first need to add yourself to the group src and relogin! This is probably a good thing since you're not required to be ROOT to build!

# Replace X with the current version of 2.6 in your branch choice
sudo apt-get install kernel-source-2.6.X libncurses-dev kernel-package fakeroot
cd /usr/src
tar jxvf kernel-source-2.6.X.tar.bz2

Note: Kernel prior to 2.6.5 you will need to patch your kernel to get better support for ACPI! To do this you go to acpi.sf.net and get a matching patch. You will also find a helpful README.

If you're intrested in using my kernel config you probably would like to copy it to the kernel-source directory as '.config'. Don't forget to do this step:

cd kernel-source-2.6.X/
make oldconfig

CPU

This is the easiest part of all, just choose the Pentium-M. You should enable "Machine Check Exception", tho I'm not sure this works for Pentium-M (dmesg says it's ok atleast). Preemtion is a good thing aswell.

Power Management

With the ACPI support bundled with versions prior to 2.6.5, battery and fan status won't work. This is fixed in 2.6.5. Read above if you missed how to patch your kernel with a newer version of ACPI4Linux or just download a newer Linux kernel.

I haven't gotten all the different sleep states ACPI offers to work nicely yet, but it seems to work with some tricks. Don't forget to remove the default shutdown procedure from /etc/acpi/, else when your laptop has been put to sleep, it will try to shutdown when you want to resume. I will update this section when I've played some more with it, right now I see no use for the standby mode.

If you're still using APM you will probably find Michlmayr's and Bob's pages about Debian on nc4000 interesting. For more information about ACPI you can read the documentations here or a nice HOWTO here.

CPU Frequency scaling is a good way to save some battery. Enable it for Intel Enchanced SpeedStep (CONFIG_X86_SPEEDSTEP_CENTRINO) and choose the userspace as default governor. If you do this you can control the CPU-speed in userspace (easiest with programs like powernowd, cpudyn and cpufreqd).

Motherboard

To enable the ICH4-M chipset on the motherboard you enable the Intel PIIXn chipsets support (CONFIG_BLK_DEV_PIIX) in ATA/ATAPI/MFM/RLL. This makes the UDMA-mode work for your IDE-devices. I've also enabled the Use PCI DMA by default.

sudo hdparm -t /dev/hda
/dev/hda:
Timing buffered disk reads:  76 MB in  3.07 seconds =  24.78 MB/sec

In the Character devices you can enable the AGP-support by choosing the corresponding module for I855PM (CONFIG_AGP_INTEL).

Network

To get the Broadcom NetXtreme to work you just choose the Broadcom Tigon3 (CONFIG_TIGON3) under Ethernet (1000 Mbit). Unfortunately there's no support for the Atheros WLAN adapter in the Linux kernel. Tho, you will find information on how to get it up and running below.

If you plan to use the internal modem, don't forget to choose the PPP options you will need.

Update: The tg3 module has been stripped from the kernel source in Debian. Therefor you probably want to use Broadcom's own GPL driver (apt-get install bcm5700-source) or download the kernel source from kernel.org. Thanks goes to Roland Lammel for enlighten me that these works for 2.6 too. And for those who doesn't use Debian, Broadcom has them on their page too.

Bluetooth

If you want to enable the internal Bluetooth device you need to choose the HCI USB driver (CONFIG_BT_HCIUSB). Then choose the appropriate protocols you're planning to use. I've played around abit with my Ericsson T610 with gnome-bluetooth and multisync and it seems to work nicely!

Note: If you expierence kernel panics that are caused by the ohci_hcd driver, you should really read what Scott James has written about this!

Infrared

To get this working you need to active IRDA in your kernel (found under the Network part) and select the smsc-ircc2 module (CONFIG_SMC_IRCC_FIR). Then get the irda-utils and you should be good to go. Use the irdadump command to see all devices. Thanks to Luca Di Stefano for this information.

FireWire (IEEE 1394)

I don't own any device that uses FireWire, so I haven't had the chance to try it out. But to enable it you can find a section called IEEE 1394 (FireWire)" and choose the OHCI-1394 (CONFIG_IEEE1394_OHCI1394).

Sensor (i2c)

As all laptops with the Intel 855PM chip, there is an ADM1030 sensor on the south bridge. Alas, HP has apparantly done like ASUS and made it hidden in the BIOS. Rumors says that the motherboard found in this laptop is an ASUS motherboard in disguise. From the kernel source you can read "The myth is that Asus said that they do not want the users to be irritated by just another PCI Device in the Win98 device manager.".

Updated: My patch has been accepted upstream and is now include since 2.6.8-rc2 kernel source. The good news is that adm1031 is also included in 2.6.8-rc2. 2.6.8 will hopefully be a good release for us nc8000 users. ;) I would greatly appriciate it if nc6000 users try it out and mail me if it works, since I haven't tried it myself.

Anyway, to our problem is that the fix for this in 2.6 (up to 2.6.7) doesn't include HP nc8000. So the SMBus will still be hidden for us. For the brave souls, I've made a patch for 2.6.7 and for 2.6.8-rc1 to the quirks.c file in the kernel source (thanks goes to Khali and ruik for their help!). Patch it and when you've rebooted later you will notice that you get another line in lspci like this:

0000:00:1f.3 SMBus: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)

You will also need to download the patch for the ADM1030 sensor, you can find a link to it here. When you've patched your kernel, choose the modules for i2c-i801, adm1031 and eeprom. The result will be this:

sensors
eeprom-i2c-0-51
Adapter: SMBus I801 adapter at 1200
Memory type:            DDR SDRAM DIMM
Memory size (MB):       512

adm1031-i2c-0-2c
Adapter: SMBus I801 adapter at 1200
CPU Fan:  1323 RPM  (min = 1323 RPM, div = 2) 
Case Fan: 1323 RPM  (min = 1323 RPM, div = 2) 
SYS Temp:  +42.8°C  (low  =    +0°C, high =  +127°C)   
SYS Crit:   +127°C 
CPU Temp:  +42.5°C  (low  =  -128°C, high =   +45°C)   
CPU Crit:   +103°C 
AUX Temp:  +54.8°C  (low  =  -128°C, high =  +105°C)   
AUX Crit:   +116°C

You can also get the current tempratures from ACPI.

acpi -tB
Thermal 1: ok, 42.0 degrees C
Thermal 2: ok, 61.0 degrees C
Thermal 3: ok, 30.0 degrees C

Graphic

To get the resolution of 1400x1050 in the console you should enable frame buffer and the ATI Radeon display support (CONFIG_FB_RADEON). Next time you reboot, Linux will automatically find the best resolution by examining the BIOS.

Observe: Using radeonfb together with ATI's proprietary drivers will make your system freeze, if you got DRI enabled and change from X to console. I recommend you to use vesafb, or maybe the old radeonfb that still lurks in the kernel.

If you'd like to use X you have three ways to get your graphic card running:

  • Use ATI's Proprietary drivers. This will enable DRI and accelrated graphic. Good if you plan to play games and such. Binary and closed source.
  • Use the Linux kernel's own driver. No DRI and 3D accelration. (Doesn't work?)
  • Use the DRI-snapshots of xfree86. DRI and 3D accelration is not supported yet, but open drivers. More up-to-date than the ones in the kernel.

You should probably choose Direct Rendering Manager for all of the options.

Note that I'm not really sure that Radeon 9600 is supported by the kernel's (older) drivers. I didn't get it to work but I didn't really try since I want DRI and 3D accelration.

Sound

The onboard audio chipset is supported by ALSA. Look for "Intel i8x0" (CONFIG_SND_INTEL8X0). Since most applications are still using the OSS-layer, it's a good thing to enable the OSS API emulation for the Mixer and PCM.

In case you fail to get any sound when starting ALSA, please make sure you've unmuted the sound and toggled the 'External Amplifier' on. For more information, read the ALSA FAQ.

Update: A fix for this problem is under way and will hopefully be fixed in ALSA, thanks to Linus Walleij.

Internal Modem

Since kernel 2.6.5-rc1 and up you will find support for the internal modem out of the box. Just choose the CONFIG_SND_INTEL8X0M (below the sound card) when configuring ALSA. You should also install the sl-modem-daemon that exists in Debian unstable. Remeber to set the SLMODEMD_DEVICE to hw:1 in /etc/default/sl-modem-daemon if you use the ALSA driver. ATM, it seems that you won't have any sound for this modem.

An alternative approach is to install the sl-modem-source and install the kernel module. If you're not using Debian, you can find the source on smartlink.com.

USB

To get USB 1 working you need uhci-hcd and ehci-hcd for USB2. USB Human Interface Device too if you use an USB mouse and the like. Don't forget to enable the USB device filesystem (CONFIG_USB_DEVICEFS) aswell. I also need the USB Mass Storage for my iRiver iFP-195TC. In case you have such a device you also need to patch your kernel for now.

PCMCIA

One of the reasons why I got this laptop was that I didn't want alot of PCMCIA-cards or USB-devices. On the nc8000, everything I need is already integrated! But you should probably go with the yenta module if you'd like to enable it.

Compiling

By default, kernel-package runs a 'make clean' when it's done building. This is a great feature to save some space on your drive. But as noted on mawifi's wiki, to build madwifi you need some built executables for compiling. Therefor you either need to use the enviroment variable CLEAN_SOURCE or add "do_clean := No" to ~/.kernel-pkg.conf to be able to build madwifi later.

There's plenty of ways you can build your own kernel on Debian. You should read the Debian and the kernel to get an understanding about it. This is probably the easiest way:

fakeroot make-kpkg --revision 1.0 kernel_image

Feel free to install the newly generated .deb that can be found on level up in the directory structure (if nothing failed). Note that before you reboot your computer, make sure that you install module-init-tools and probably udev.

This is how long my machine takes to compile, under normal load (browsing and so on).

real    8m56.850s
user    7m45.730s
sys     0m37.349s

Installing ATI's drivers

As with everything, there's many ways of doing the same thing. This is a comfortable way of installing ATI's Linux drivers on Debian. Download flaviou's fglrx installer and follow the instructions on that page if you're unfamiliar with building kernel modules with make-kpkg. If you want you can install the prebuilt once, I haven't tested those myself tho.

Wireless

There's an Atheros chipset on the 802.11a/b/g(/super g?) card in the nc8000. Therefor we need to download and build madwifi to get it working. Thanks to Martin, you can find a madwifi package for debian.

Apparantly, some versions of this laptop (the one with 1.5Ghz CPU?) are shipped with an Intel based chipset instead of an Atheros. Check Jeff Saucier's page for more information on this chipset.

Note: I've recieved reports that the madwifi drivers doesn't work for everyone. I have no clue why. If you know anything about this or has problems, feel free to share! A very good start to solve your problem is by reading the madwifi FAQ.

One of the brave, Jay Johnson, had problems with madwifi but later managed to get it up and running and has shared his experience with me.

If you install the wireless-tools package you can easily configure your network device in Debian. If you always use the same AP and/or the same ESSID/WEP, you will not have any problems with the hardcoded values for iwconfig.

Here's a very simple /etc/network/interface

auto ath0
iface ath0 inet dhcp
wireless_essid X

A little more advance /etc/network/interface

auto ath0
iface ath0 inet dhcp
wireless_mode Managed
wireless_key1 YOUR_WEP_KEY
wireless_defaultkey 1
wireless_ap XX:XX:XX:XX:XX:XX
wireless_channel X
wireless_essid X
wireless_rate XXMB

With wireless-tools, you can add wireless_COMMAND to your /etc/network/interface -- which will get translated to 'iwconfig ath0 COMMAND' on execute. In case you're not using wireless-tools, you will need to do something like this.

iwconfig ath0 mode Managed
iwconfig ath0 key YOUR_WEP_KEY
[...]
iwconfig ath0 rate XXMB
ifconfig ath0 up

Kimmo Veijalainen reports that he has successfully used his WLAN adapter with the ndiswrapper. Suprisingly he used Dell's WinXP drivers. Tho, his computer got a kernel panic later that day. :)

Using waproamd

Recently waproamd includes support for the Atheros chipset! This is how my setup looks today. First of all, I use a D-Link DI624 at home which supports 802.11b/g/super-g. I connect to it using ESSID sky.fobie.net and a 128bit WEP-key (hex-valued). Secondly, sometimes I bring my laptop to school where I use ESSID 101 without any WEP-key. To be flexible and not needing to reconfigure the connection manually each time you can use waproamd (you could also specify any as the ESSID, and just shift the defult key). This is my current /etc/network/interface file:

# /etc/network/interfaces -- configuration file for ifup, ifdown

# Loopback
auto lo
iface lo inet loopback

# Broadcom NetXtreme - handled by ifplugd
iface eth0 inet dhcp

# Atheros AR5212 (HP W500) - handled by waproamd
iface ath0 inet dhcp

As you can se there's no auto configuration in the file for neither ath0 or eth0. I'm using two nice programs; ifplugd which automatically tries to set the network up when it feels that a network cable is plugged into eth0 and then waproamd for ath0. waproamd tries to scan the network for suitabe AP's it can connect to.

To specify which ESSID's you would like to connect to, and how you are supposed to connect to them, the easiest way is just to use the default script shipped with waproamd.

cd /etc/waproamd/scripts/
ln -s default essid:sky.fobie.net
ln -s default essid:101

And for me, since I want to use a WEP-key for sky.fobie.net, I need to associate the WEP-key with the corresponding AP. (Robert Waldner didn't manage to get his computer connect using a WEP-key. I've never had any problems so far and I've been using it for months. Both with a D-Link router using a Texas Instrument chip and one with an Atheros chip. So if you have problem connecting with a WEP-key, try it w/o first!)

cd /etc/waproamd/keys/
echo YOUR_WEP_KEY > 00:0D:88:85:3A:E5.wep

If you missed it, 00:0D:88:85:3A:E5 is the address to my access point. You should also make sure that you configured waproamd to use your ath0 as a static interface. I haven't played that much with this, but it seems that you cannot just push the button on the keyword to disable/enable the wireless network and have waproamd to automatically reconnect. I couldn't get it to work if I added ath0 to the hotplugged interface. waproamd doesn't depend on ifplugd anymore, so you should remove any trace of ath0 from that configuration

dpkg-reconfigure waproamd
dpkg-reconfigure ifplugd

More about the chip

If you read about the Atheros AR5212 chipset, you will notice that it mentions "Super A/G mode includes dynamic 108 Mbps capability". It's weird that HP doesn't mention anything about this, cause it looks like the nc8000 includes that chipset. I have a router that has support for the Super G technology, would be nice to get it working.

When testing the maximum speed of this card, I was able to get it up to roughly 20Mbps under Windows XP. Unfortunately, under Linux it seemes to stick with 11Mbps. Strange that it's exactly 11, or? :)

Mouse and touchpad

It's really easy to get the touchpad working. In fact, I had more problem turning the annoying "one-finger-tap" feature off. That's probably a nice feature if you learn to use it. Anyway, to get the synaptics touchpad driver for X you apt-get the xfree86-driver-synaptics package and make then necessary changes to XF86Config-4. Here's my XF86Config-4 if you're intrested.

I spend some of my time running console, so I installed gpm aswell. The amazing thing is that both the touchpad, the stick and my USB mouse works. I just can't seem to get the mousewheel to work on my Logitech MouseMan Traveler. Here's my gpm.conf:

device=/dev/psaux
responsiveness=
repeat_type=ms3
type=exps2
append="-3 -S \"\""
sample_rate=

Keyboard special keys

There's four keys above the main keyboard; power, lock, wireless and presentation. The power button works nice with ACPI. The 'wireless' key seems to do it's job. It closes down bluetooth and WiFi, but I think also USB. The 2nd time I tried it the whole computer just froze, so I haven't tried it out more. The lock and presentation buttons doesn't work by default, you will get a message like this when pushing the lock key:

atkbd.c: Unknown key released (translated set 2, code 0x8a on isa0060/serio0).
atkbd.c: Use 'setkeycodes e00a <keycode>' to make it known.

Take a look in /usr/include/linux/input.h for a suitable value. I've used these:

sudo setkeycodes e00a 151 # lock key to KEY_COFFEE
sudo setkeycodes e008 148 # presentation key to KEY_PROG1
sudo setkeycodes e009 149 # battery key (fn-F8) to KEY_PROG2

The sleep (fn+f3), volume up/down and mute buttons has the right keycodes for right scancodes out of the box. Suitable to bind your keys in Gnome using ACME or the like. You could also check out the manpages for loadkeys.

If you're intrested in getting that red led lightened up/down when you push the mute button you should try this script I wrote. It's just a script that toggles the state of the 'External Amplifier' in the ALSA mixer. Somehow this toggles the led too.

In case you're a GNOME user and your keybinding for 'Print Screen' doesn't work, it's because of a bug in GNOME/X.

Update: To make these values permanent from reboot to reboot, add the above to eg. /etc/init.d/nc8000-tweaks.sh (can omit sudo). A good start might be to use the /etc/init.d/skeleton as a start point for your file. To add this to the bootup sequence, the debian way, we do this:

sudo update-rc.d nc8000-tweaks.sh defaults # man update-rc.d for more info

If you're intrested in knowing how you can bind the alsa-mute script, if you're using GNOME and Metacity, read on. Launch the gconf-editor, goto /apps/metacity/global_keybindings and assign one of the run_command_N to one of your keys. (Use the normal GNOME Keyboard Shortcuts editor to find out which one. Please observe that there seems to be a problem in Metacity with hex-valued bindings.) Next thing is to enter the keybinding_commands and enter which command should be run for the associated command_N. Done.

Not working

Pretty much everything I need works fine on my laptop, here's some known hickups.

DRI

This isn't really laptop specific. But in case you use ATI's proprietary drivers and radeonfb, you're computer will probably crash and just freeze up when you change from X to console. I'm using vesafb now and it's working like charm. In case you wish to use radeonfb, you need to disable DRI in XF86Config-4.

[..]
Driver    "fglrx"
Option    "no_dri" "yes"
[..]

Not tested

I haven't tested everything on the laptop. Here's some of the things.

TV-out

Hopefully no problems, but I have not tested it.

Secure Digital

The nc8000 comes with an integrated sd-slot. I don't own any sd-cards, so I haven't tested it. But apparantly with the nx7010 you can get it working with MMC-cards. I would be amazed if the same drivers wouldn't work with the nc8000. Download the Winbond SD card interface driver and follow the HOWTO. Be sure to e-mail me a small report if it (doesn't) work. :)

I compiled and installed it myself, just for fun since I can't test it -- and the only output that came was this.

wbsd: wbsd loaded
wbsd: wbsd_probe()

Links and Resources

Here's some of the settings and scripts I think could be helpful for you.

This is some resources related to this laptop.

Changelog

I will try to add the changes I make to the page here.

2005-05-08
   * Link to Matt Taggart.
2005-01-20
   * Updates to the ALSA-section.
   * Added IRDA information.
2004-10-07
    * Updated the 'Keyboard special keys' section.
2004-10-03
    * Some resources added to the Secure Digital-section.
2004-09-29
    * Added more information to the wireless section. Thanks to Jay Johnson.
2004-07-19
    * Updated the sensors section, my patch is merged upstream in 2.6.8
2004-07-13
    * Updated the sensors section, it now works nicely
    * Added a patch to get unhide the SMBus
2004-07-10
    * Redesigned the page.
2004-05-18
    * Added some information about waproamd since it now supports the
      Atheros chipset.
    * Update for the bluetooth section, looks like it is causing kernel
      panics. Thanks to Scott James about this.
    * Added a link to Scott James Remnant
2004-04-14
    * Updated information about the mute-button.
    * Added a link to Robert Waldner
2004-04-12
    * Updated information about the NIC, since tg3 has been stripped 
      from Debian's source.
    * Updated ACPI, seems to work nicely with 2.6.5
    * Updated the 'Internal modem' section since kernel 2.6.5 includes
      support for it.
2004-04-05
    * Initial release.