Search:  
Gentoo Wiki

HP_Compaq_nc6220

This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related
A guide to using Gentoo on the HP Compaq nc6220


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

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.

Currently Supported/Working Hardware

Currently Unsupported/Not Working Hardware

Output of lspci

You can download the output of lspci here (updated version while plugged into the port replicator)

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.

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).

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 Fbsplash/bootsplash with the nc6220.

Processor

See this guide.

Graphics

See this HowTo.

PC Card

See this guide. The socket ist yenta-compatible.

Onboard Gigabit Ethernet

See this guide.

WLAN

See this guide.

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.

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!

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.

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:

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

ACPI Configuration

ALWAYS LOAD THERMAL SUPPORT!

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:

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

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.

Suspend to RAM

>= 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])

< 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).

Multimedia Buttons

The kernel needs to be told what the heck to do with your keys. Fortunately it already knows about some of them.

Keys the kernel knows by default

Keys the kernel doesn't know

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:

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+

Gentoo Specifics

Configuration Files

Below is some of my configuration files you might find useful:

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

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.gztitle Gentoo Linux (Riskable sources) root (hd0,2) kernel /boot/vmlinuz root=/dev/hda3 reboot=b

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

Retrieved from "http://www.gentoo-wiki.info/HP_Compaq_nc6220"

Last modified: Fri, 29 Aug 2008 08:21:00 +0000 Hits: 56,871