HARDWARE HP Compaq nc6220
From Gentoo Linux Wiki
| Laptops • TV Tuner Cards • Wireless • Servers • Storage • Other Hardware • Motherboards • Related |
Helpful Note: This information is also likely to be useful for nc6120, nc8200 and nc4200 series users as the these laptops share similar/identical components.
Author: Riskable (riskable@youknowwhat.com or Riskable.com). Feel free to contact me with any info/questions.
Contents |
[edit] Introduction
The Compaq nc6200 series is one of HP's first line of Sonoma laptops which utilize the newer/faster 533MHz bus and integrate PCI Express (among other things). The nc6200 series consists of the nc6220 which comes with an Intel Graphics Media Adapter (GMA) 900 PCI Express graphics chip and the nc6230 which comes with an ATI Mobile Radeon X300 chip.
Novell certified the HP Compaq nc6220.
[edit] Currently Supported/Working Hardware
- Intel Graphics Media Adapter (GMA) 900. Full DRI/DRM Working!
- Synaptics Touchpad
- HP's Integrated Bluetooth
- Intel PRO/Wireless 2200BG 802.11b/g
- Texas Instruments Cardbus (PCMCIA) Bridge
- Broadcom NetXtreme BCM5751M Gigabit Ethernet
- Intel ICH6 AC'97 Audio Controller
- Intel ICH6 AC'97 Modem
- Texas Instruments 7x21 SD Card Reader (works as of 2.6.17 see note below)
[edit] Currently Unsupported/Not Working Hardware
- Texas Instruments Smartcard Reader (not tested)
[edit] Output of lspci
You can download the output of lspci here (updated version while plugged into the port replicator)
[edit] Configuration
Most of the nc6220 hardware doesn't require any special configuration but there are some bits that need extra love (especially if you want to take advantage of all this laptop has to offer). The sections below cover the hardware configuration and include example config files.
[edit] Kernel .config
Update (07/25/2006): Kernel 2.6.17 added support for the SD card reader, but it requires the setpci command. See note below for details.
Update (01/04/2006): Kernel 2.6.15 fixed the "won't boot" problem present in 2.6.13 and 2.6.14. Also note that it includes an updated ipw2200 driver.
My kernel .config from 2.6.17-gentoo-r4 (gentoo-sources).
Kernel notes: The standard kernel vesafb (not vesafb-tng) driver is configured in this .config and can be enabled by appending "video=vesafb:ywrap vga=792" to your boot line (vga=792 is for 1024x768). It looks gorgeous and does not corrupt your consoles when switching from X (like vesafb-tng).
Also note that 2.6.12 or newer is required if you want full DRI/DRM acceleration with the GMA 900 in X. I have agpgart and 915 chipset support set to compile into the kernel in the above config. DRI/DRM support will not work if it is compiled as a module (don't know why).
Note: The thermal/fan/usb problems with software suspend appear to have been fixed as of 2.6.14. My latest kernel .config has these drivers compiled into the kernel.
Question: Why not use the intelfb driver? I'm running it on nc6120 without problems... Answer by Riskable: Hey, whatever works =). Post the config! Answer by escool: Wasn't able to get intelfb to work with gensplash/bootsplash with the nc6220.
[edit] Graphics
See this HowTo.
[edit] PCMCIA Configuration
The default Gentoo config for PCMCIA support works perfectly with this laptop using the yenta_socket module. Just...
emerge pcmcia-cs rc-update add pcmcia default
...and you're done
[edit] Onboard Gigabit Ethernet
The nc6220 comes with a Broadcom NetXtreme (what a stupid name) BCM5751M gigabit ethernet adapter connected through the PCI Express bus which uses the tg3 driver. I have this driver set to compile into the kernel in the .config listed above.
I use ifplugd to automatically configure the ethernet port when it is plugged in/unplugged (pretty sweet). I have ifplugd configured to automatically control both eth0 (ethernet) and eth1 (wireless):
| File: /etc/conf.d/ifplugd |
INTERFACES="eth0 eth1" AUTO="yes" BEEP="yes" IGNORE_FAIL="yes" IGNORE_FAIL_POSITIVE="no" IGNORE_RETVAL="yes" POLL_TIME="1" DELAY_UP="0" DELAY_DOWN="0" API_MODE="auto" SHUTDOWN="no" WAIT_ON_FORK="no" MONITOR="no" ARGS="" MONITOR_eth1="yes" DELAY_UP_eth1="5" DELAY_DOWN_eth1="5" |
Also make sure that /etc/init.d/net.eth0 and /etc/init.d/net.eth1 are symbolic links to /etc/init.d/net.lo:
tomo init.d # ls -l net.* lrwxrwxrwx 1 root root 6 Jun 8 06:17 net.eth0 -> net.lo lrwxrwxrwx 1 root root 6 Jun 8 06:18 net.eth1 -> net.lo -rwxr-xr-x 1 root root 24402 Jun 7 21:22 net.lo
...and add ifplugd to your default runlevel:
rc-update add ifplugd default
(Note that if you do this you do not need to add net.eth0 or net.eth1 to any runlevels)
[edit] Onboard Wireless (802.11)
My configuration of the nc6220 came with an Intel PRO/Wireless 2200BG 802.11b/g wireless card. The driver for this card is now included in the Linux kernel (as of 2.6.14), but you will still need to emerge the ipw2200-firmware package:
emerge ipw2200-firmware
If you compiled the driver in as a module (as my .config does), you'll need to load it at boot:
echo "ipw2200" >> /etc/modules.autoload.d/kernel-2.6
(this should also load it's dependencies such as ieee80211)
Also, to ensure optimal operation, add the following line to /etc/modules.d/ipw2200
options ipw2200 hwcrypto=0 led=1
This turns off the hardware encryption function of the card (causes problems and slows transfers) and enables the indicator light.
Note by JY: The ipw2200-firmware 3.0 gave me trouble with the 2.6.16-gentoo kernel which has version 1.0.8 of the ipw2200 driver. After checking the kernel documentation and looking at the project homepage, I used ipw2200-firmware-2.4 and it worked fine.
Note by myhaThe ipw220 compiled into kernel 2.6.17-gentoo didn't work for me in combination with the ipw2200-firmware 3.0, it worked after I recompiled it as module.
[edit] Onboard Bluetooth
I'm pretty sure the "HP Integrated Bluetooth" module is some sort of Broadcom variant. I'm currently using it with a Kensington PilotMouse Bluetooth Mini without any problems.
If you're using the kernel .config from above, just
echo "bluetooth" >> /etc/modules.autoload.d/kernel-2.6 emerge bluez-libs bluez-utils bluez-bluefw bluez-firmware rc-update add bluetooth default
...and edit your /etc/conf.d/bluetooth
| File: /etc/conf.d/bluetooth |
HCID_ENABLE=true HCID_CONFIG="/etc/bluetooth/hcid.conf" SDPD_ENABLE=true HIDD_ENABLE=true HIDD_OPTIONS="" HID2HCI_ENABLE=true RFCOMM_ENABLE=true RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" DUND_ENABLE=true DUND_OPTIONS="--listen --persist" PAND_ENABLE=true PAND_OPTIONS="--listen --role NAP" |
That should set you up for however you would want to use bluetooth. Note that this chipset does not appear to work with headsets (at all). Broadcom is not very friendly to the open source community so keep that in mind next time you see their brand name on a product you're thinking about purchasing.
If you're adding a new bluetooth mouse or keyboard to your system, you can enable it really quick by becoming root and typing:
hidd --search
Just make sure the device in question is in discover mode and that bluetooth is enabled.
Note: Once your device is paired, it will be automatically enabled by the hidd daemon the next time you turn it on.
Note: The bluetooth issues with Software Suspend appear to have been fixed as of 2.6.14.
[edit] Onboard Sound
This laptop is just like so many other Sonoma/Centrino laptops (uses the snd_intel8x0 driver). Here's my alsa config:
| File: /etc/modules.d/alsa |
alias char-major-116 snd alias char-major-14 soundcore alias snd-card-0 snd_intel8x0 alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss options snd cards_limit=1 |
Note that I don't have the modem configured. I don't ever plan to use it so I won't bother configuring it. I'd rather sit idly off the Internet than deal with the agony of dialup!
[edit] Onboard Modem
So you want to use the modem despite the fact that stress causes cancer and modems cause stress? Supposedly it works fine with the Smart Link driver...
emerge slmodem
...and follow some instructions.
[edit] Onboard SD Card Reader
As of kernel 2.6.17 the SD card reader works fine. You need to do two things to use it:
- Enable the driver (already enabled if using my 2.6.17+ config): In the kernel menu config enable, "Device Drivers-> MMC/SD Card Support-> Secure Digital Host Controller Interface support" (MMC_SDHCI=y)
- Use the setpci command to disable the SD support built into the device (thus, passing control to the kernel): "setpci -s 02:06.3 4c.b=02"
You can have your system run the setpci command on boot:
echo "setpci -s 02:06.3 4c.b=02" >> /etc/conf.d/local.start
More information on the driver can be found here
[edit] ACPI Configuration
ALWAYS LOAD THERMAL SUPPORT!
[edit] ACPI Configuration
In the .config above I have the ACPI fan and thermal drivers compiled into the kernel. Without these your system could overheat and crash (or corrupt your hard drive, not that I know anything about that ;).
ACPI works wonderfully. You have a couple options as to what you can do... I personally control ACPI through KDE's klaptop interface, but you can emerge acpid and control it at the system level if you want.
If you want to use acpid for controlling hibernate (on the lid- or power-button), don't put acpid into the boot runlevel, instead put acpid to the default runlevel, add it to the RestartServices-line (or if you have it seperated into StopServices and StartServices add acpid to these both lines) in /etc/hibernate/hibernate.conf and set an "&" to the hibernate command in /etc/acpi/default.sh (this step is most important!! - hibernate must be sent to the background !). Else acpid will be blocked on wakeup (because hibernate is still in action) and acpid will fail to reload. From now on pressing the button should properly hibernate your laptop and acpid will be restarted fine on wakeup.
For reference, here's what I've confirmed works fine:
- Suspend-to-disk (using Software Suspend 2)
- Suspend-to-RAM (Need to patch your kernel with this
- Fan control
- CPU throttling
- Battery monitoring (and it's accurate too!)
- Intel Speedstep
To save battery life you can turn on ondemand CPU scaling (CPUFreq aka "performance profiles"). This feature is built into the 2.6 kernel and it is enabled in my kernel .config. To turn it on you need to do the following:
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Or alternatively, if you'd like to run with it on all the time (like me), add that line to your /etc/conf.d/local.start:
| File: /etc/init.d/local.start |
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor |
[edit] Suspend-to-Disk
Suspend-to-disk works very well with Software Suspend 2. I recommend using it with the swap writer but do note that this will require a larger swap partition than you might normally build your machine with. My swap partition is 1.5GB. For reference, my nc6220 resumes from hibernate in about 28-32 seconds (depending on how much crap I had running when I suspended =).
Files
Here is my hibernate.conf file. My kernel .config does not have software suspend 2 enabled (any more) so your kernel needs to be patched before it will work.
Also, here's a newer version of the xstatus scriptlet that fixes the kde status problem with Gentoo. Place it in /usr/share/hibernate/scriptlets.d/ if you use "Xstatus kde" in your hibernate.conf (like I do).
Don't forget to add "resume2=swap:/dev/hda2" to your kernel boot line (use your actual swap partition).
Using Software Suspend 2 with fbsplash
If you'd like to have a pretty GUI when you're suspending/resuming you need to use the userui program. Just emerge it:
emerge suspend2-userui
Alternatively, download it here and install it using the standard:
make sudo make install
This will place the two programs (suspend2ui_text and suspend2ui_fbsplash) into /usr/local/sbin. Once they're installed, you can use them by either adding...
ProcSetting userui_program /usr/local/sbin/suspend2ui_fbsplash
...to your hibernate.conf (mine already has this). Or by simply executing...
echo /usr/local/sbin/suspend2ui_fbsplash > \ /proc/software_suspend/userui_program
Lastly, select which fbsplash theme you'd like userui to use by making a symbolic link in /etc/splash to your splash screen of choice:
lrwxrwxrwx 1 root root 9 Jun 23 20:45 suspend2 -> emergence
Testing it
To make sure userui will work you can test it with the following command from a tty console:
/usr/local/sbin/suspend2ui_fbsplash -t
If you get an ugly/garbled screen then your framebuffer is not setup correctly. Make sure you're using vesafb and not vesafb-tng (which is the gentoo-sources default) and you have "video=vesafb:ywrap vga=792" on your boot line.
[edit] Suspend to RAM
[edit] >= Kernel 2.6.22
Using Kernel 2.6.22 and later there isn't any patch needed anymore. Just activate ide-acpi-support:
Symbol: BLK_DEV_IDEACPI [=y]
Prompt: IDE ACPI support
Defined at drivers/ide/Kconfig:275
Depends on: IDE && BLK_DEV_IDE && ACPI
Location:
-> Device Drivers
-> ATA/ATAPI/MFM/RLL support (IDE [=y])
-> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support (BLK_DEV_IDE [=y])
[edit] < Kernel 2.6.22
Suspend to RAM works fine on this laptop but it requires a kernel patch which can be downloaded here. Just place the patch in your /usr/src/linux directory and
cat ide-acpi-support.patch | patch -p1
Then recompile your kernel and suspend-to-RAM should work without a hitch. Like suspend-to-disk above, you'll want to install the hibernate script in order to use this method.
emerge hibernate-script
...and then you can suspend using the command, "hibernate-ram" (the defaults should work).
[edit] Multimedia Buttons
The kernel needs to be told what the heck to do with your keys. Fortunately it already knows about some of them.
[edit] Keys the kernel knows by default
- Mute
- Volume Down
- Volume Up
[edit] Keys the kernel doesn't know
- Info
- Wireless
- Presentation
To get the kernel recognizing your keys, add the following to your /etc/conf.d/local.start:
| File: /etc/conf.d/local.start |
setkeycodes e059 128 setkeycodes e078 129 setkeycodes e008 130 |
Once that's done, you can use them however you like. Some suggestions:
- Bind the info key to an application like 3ddesktop
- Don't touch the Wireless key since it seems to screw with the ipw2200 driver
- Bind the presentation key to launch amaroK
- emerge lineakd and use the multimedia keys as they were intended!
To save you some time, perhaps you could use my lineakd.conf and my lineakkb.def.
Note by Myha: upper lineakd config file didn't work for me, I had to specify diffrent commands for volume keys and the mixer device... I guess it is because I use the alsamixer...
lineakd -c HP-NC6220
selects the correct keyboard type, than I modified the bellow in my /home/$USER/.lineak/lineakd.conf:
MixerDevice = /usr/bin/alsamixer AudioLowerVolume = amixer set Master 2- AudioMute = amixer sset 'Master' toggle AudioRaiseVolume = amixer set Master 2+
[edit] Gentoo Specifics
[edit] Configuration Files
Below is some of my configuration files you might find useful:
- /usr/src/linux/.config
- /etc/make.conf
- /etc/conf.d/local.start
- /etc/conf.d/hdparm
- /etc/conf.d/bluetooth
- /etc/conf.d/ifplugd
- /etc/hibernate/hibernate.conf
- /boot/grub/grub.conf
[edit] Essential Emerges
Below is what I would consider essential for using this laptop:
emerge udev dbus hal dhcpcd ifplugd hdparm cupsd \ pcmcia-cs lineakd bluez-libs bluez-utils bluez-bluefw \ bluez-firmware rss-glx win32codecs vbetool ipw2200-firmware
[edit] Additional Notes
In order for the nc6220 to reboot properly you MAY need to add reboot=b to your kernel boot line like so (try without it though, works fine without it for me):
| File: /boot/grub/grub.conf |
|
default 0
timeout 5
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
title Gentoo Linux (Riskable sources)
root (hd0,2)
kernel /boot/vmlinuz root=/dev/hda3 reboot=b
|
[edit] Kismet Info
Kismet works fine with the Intel 2200BG card. Here's the relevent config line:
source=ipw2200,eth1,2200BG
--- ACPI-problems on debian ---
(not gentoo, but maybe someone with gentoo will experience this problem to, so here I go)
Running a vanilla 2.6.13 kernel on an debian "testing" machine hangs the kernel hard somewhere after PCI detection.
The proposed drivers/acpi/scan.c modification didn't help.
pci=noacpi as boot argument didn't help.
Turning of everything connected with acpi in th kernel didn't help.
A vanilla 2.6.6 kernel with the pci=noacpi boot argument DID boot but had no drivers for the netextreme card.
Solved it by patching 2.6.14 with 2.6.15-rc6. Computer booted fine without parameters and network card seems to work.
/Ulf Ljungdahl ulf.ljungdahl@ssabox.com
