Linux (Gentoo) on an HP ZV5000

I have installed Gentoo on an HP ZV5000 laptop. Many of the components work. Some do not. If any part of this is confusing, realize that I started with a 2.4 kernel and upgraded to 2.6 as soon as the showstopper bug with the touchpad was solved. Some of the notes may have stale 2.4-style info in them. You can contact me using the methods listed near the end.

Hardware Components Status under Linux notes
video
GeForce4 440 Go 64M
15.4" WSXGA 1680x1050 flat panel, svideo, composite, & VGA output
working.
emerge nvidia-drivers
I even have TV out functioning in a multi-screen (not twinview, not xinerama) configuration. xorg.conf is available for download below. As of 2006-10 I am using 1.0.8776.
USB
nForce3
working modprobe ohci-hcd
I tested it with a 512M flash drive. I have also used one of those multi-format memory card readers. Don't panic if it seems to render your system unresponsive for 30 seconds. I haven't figured out if that's the driver, or some weirdness elsewhere.
audio
nForce3
working Use ALSA.
ALSA_CARDS="intel8x0"
modem
nVidia, unknown device 00d9
not working emerge hcfpcimodem was suggested, but it did not work the first go 'round, and I gave up. I have not used a modem in years, so I have more important things to do.
IDE
nForce3
working
firewire / IEEE 1394
TI TSB43AB21
working modprobe ohci1394 raw1394; dvgrab --format dv2;
I have captured video from a Sony Handycam and a Canon ZR60 A. I have received a report from a user running Knoppix 3.8.1 with kernel 2.6.11 that firewire drives can be mounted using a combination of the ohci1394 and sbp2 modules.
ethernet
Realtek RTL-8139*
working. I chose to enable the Realtek RTL-8139 PCI Fast Ethernet Adapter support in the kernel. (I did not choose the 8139 C+)
WiFi
Broadcom BCM4306
working using ndiswrapper
emerge ndiswrapper 
 ndiswrapper -i bvmwl5.inf 
While ndiswrapper is ideologically distasteful, it beats spending extra money to get a supported card.
To get the needed driver files I had to download an .EXE from HP and run it on a windows box at work. I aborted the installation after it had extracted the files, and I copied them back to the laptop. I am running using the bcmwl5 driver, not the bcmwl5a. The device, as is typical of ndiswrapper, appears as wlan0.
Gentoo notes on how to configure your WEP keys for the assorted access points you regularly visit.
Bluetooth
shows up on the USB bus, part of the Broadcom BCM4306
working I have successfully transmitted and received files between my laptop and both an apple laptop and a couple of different models of phone. I have not yet used a bluetooth-capable phone as a modem to access the internet via GPRS. Gentoo Bluetooth HOWTO. Some interesting tools include gnome-obex-server, gnome-bluetooth-manager, and gnome-obex-send. Relevant modules include bluez, hci_usb, and l2cap.
digital media card reader
SD.MS/Pro.MMC.SM
unknown.
DVD/CD-RW working If you are using a 2.6 series kernel, do not use ide-scsi. I use cdrecord dev=/dev/hdc, but I think I am supposed to use another syntax.
PCMCIA broken Enable pcmcia in the 2.6 kernel (yenta_socket) and "emerge pcmcia-cs". Use "lspci -v" or "cat /proc/pci" to find the memory windows and I/O windows for your "include memory / port" lines in /etc/pcmcia/config.opts.

kernel 2.6.12

Now I use 2.6.12 (.config).

xorg.conf

Supports 1680x1050 resolution, and optionally 640x480 on a separate screen for the svideo out. The TV connector is actually a 7-pin connector which can accept an SVideo cable directly. Somewhere in the 3 pins not used by SVideo is a composite signal. It appears to be pretty standard, because I borrowed a Dell adapter and with an adjustment to the TVOutFormat in my xorg.conf, I was able to get a composite signal.

You will also notice screen layouts for use with a 1024x768 VGA monitor.

Recent nVidia drivers changed the way you choose what port to associate with what screen (UseDisplayDevice instead of ConnectedMonitor). I have seen it refuse to fire up a second screen if the device is not plugged into the port.

My ZV5000 has 6 special keyboard buttons. The three above the regular keyboard have icons of a camera, film&music note, and WWW on them, respectively. The remaining three are volume buttons (with icons for less, mute, and more) on the front edge of the laptop "below" the touchpad.

When I upgraded to kernel 2.6.12 the camera and music buttons stopped working. They don't even show scan codes in showkeys. Fortunately Fábio C. P. Navarro gave me the following script which should be run before you start X:

#!/bin/sh
setkeycodes e008 237
setkeycodes e00a 127
setkeycodes e00b 159
setkeycodes e031 177

I have mapped those buttons to keycodes R1-3 and R4-6 by passing the following input to xmodmap:

keycode 233 = R1
keycode 242 = R2
keycode 178 = R3
keycode 174 = R4
keycode 160 = R5
keycode 176 = R6
This clause in my .fvwm2rc binds them to actions:
Key R1  A       A       exec $HOME/bin/toggle-eth0.sh
Key R2  A       A       exec xmms
Key R3  A       A       exec firefox
Key R4  A       A       exec $HOME/bin/volume-control.sh decr
Key R5  A       A       exec $HOME/bin/toggle-mute.sh
Key R6  A       A       exec $HOME/bin/volume-control.sh incr
You can download the three scripts, although they depend on sudo privs, and the cmix tool:

* I have not updated these scripts for ALSA

toggle-eth0.sh - volume-control.sh - toggle-mute.sh*

The light behind the mute button appears to automatically come on when you mute the master volume (set it to 0) either as a function of ALSA or the cmix tool.

touchpad

emerge synaptics
Under 2.4.x kernels you can not disable the tap-to-click that drives many people insane. 2.6.12 finally fixed the speed (or slow) bug that was plaguing the touchpad. See my xorg.conf for the parameters I use on the touchpad.

fbsplash

The kernel config above has all the settings for the kernel.
 emerge splashutils bootsplash-themes splash-themes-gentoo splash-themes-livecd
In my /etc/lilo.conf I have
        append="video=vesafb:1400x1050-16@60 splash=silent,theme:kennesaw-mountain quiet CONSOLE=/dev/tty1 "
        initrd=/boot/initrd-fbsplash
I generated the initrd using the command
splash_geninitramfs -v -g /boot/initrd-fbsplash  -r 1280x1024 Emergance
I have yet to figure out how to get the kernel frame buffer to run at 1680x1050 resolution (the native resolution of the flat panel). This is not particularly important since no one creates splash themes for that resolution yet.

Ctrl is stuck?

I think there's some bug related to frame-buffer console and switching virtual terminals in X. To reproduce: Ctrl-Alt-F1 away from X, and then Alt-F7 back. Any keystrokes you make will act as if the Control key were still held down. You can unstick it by pressing the control key. I didn't have this problem till I installed bootsplash.

My previous laptop had the same problem, and it used a vga= to set the console video mode.

autofs

I like to be able to access flash drives without having to su. Therefore, I emerged the autofs ebuild and put the following lines in /etc/autofs/auto.misc
usb             -fstype=vfat,uid=69     :/dev/sda1
flash           -fstype=vfat,uid=69     :/dev/hde1
The uid=69 means that user #69 (me) owns every file on those vfat filesystems. (USB thumb drives and media card readers show up as SCSI drives like sda; compact flash -> PCMCIA adapters show up as IDE devices like hde)

CD-RW burning

I use sudo to get write access to the device and use the following command line:

sudo cdrecord -tao dev=/dev/hdc speed=4 blank=fast -v -eject ~/music.iso

DVD drive

ogle fails to play some encrypted DVDs because it's not smart enough.

dvdbackup appears to be smart enough to decrypt all DVDs as long as you don't compile it with ogle's dvd access library.

lspci

0000:00:00.0 Host bridge: nVidia Corporation nForce3 Host Bridge (rev a4)
0000:00:01.0 ISA bridge: nVidia Corporation nForce3 LPC Bridge (rev a6)
0000:00:01.1 SMBus: nVidia Corporation nForce3 SMBus (rev a4)
0000:00:02.0 USB Controller: nVidia Corporation nForce3 USB 1.1 (rev a5)
0000:00:02.1 USB Controller: nVidia Corporation nForce3 USB 1.1 (rev a5)
0000:00:02.2 USB Controller: nVidia Corporation nForce3 USB 2.0 (rev a2)
0000:00:06.0 Multimedia audio controller: nVidia Corporation nForce3 Audio (rev a2)
0000:00:06.1 Modem: nVidia Corporation: Unknown device 00d9 (rev a2)
0000:00:08.0 IDE interface: nVidia Corporation nForce3 IDE (rev a5)
0000:00:0a.0 PCI bridge: nVidia Corporation nForce3 PCI Bridge (rev a2)
0000:00:0b.0 PCI bridge: nVidia Corporation nForce3 AGP Bridge (rev a4)
0000:00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
0000:00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
0000:00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
0000:00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
0000:01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 440 Go 64M] (rev a3)
0000:02:00.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)
0000:02:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
0000:02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)
0000:02:04.0 CardBus bridge: Texas Instruments PCI1620 PC Card Controller (rev 01)
0000:02:04.1 CardBus bridge: Texas Instruments PCI1620 PC Card Controller (rev 01)
0000:02:04.2 System peripheral: Texas Instruments PCI1620 Firmware Loading Function (rev 01)

/proc/bus/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB OHCI Root Hub
S:  SerialNumber=f90c6000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=03f0 ProdID=011d Rev= 0.06
S:  Manufacturer=Broadcom
S:  Product=HP integrated Bluetooth module
S:  SerialNumber=0010C6681DFE
C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  32 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  32 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  64 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  64 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  64 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  64 Ivl=1ms
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=84(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms
I:  If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB OHCI Root Hub
S:  SerialNumber=f90c4000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

Contact the author

If you would like to communicate with the author, either with suggestions or questions, pick one of these:

zv5000@thoth.purplefrog.com
AIM: mutantbob666
IRC: purplefrog@irc.freenode.net
jabber: thoth@prometheus.purplefrog.com

links

Linux on laptops

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones

TIP HP Pavilion ZV5000 Notebook wiki

Obsolete complaints

In this section you will find things that were broken at one time, but I have since found fixes for.
obsolete complaint

NULL pointer dereference in kernel

Something triggers a kernel NULL pointer dereference when mplayer exits sometimes. After that I can't get any audio, the device is wedged

Apr 20 10:33:43 nile kernel: Unable to handle kernel NULL pointer dereference at
 virtual address 00000054
Apr 20 10:33:43 nile kernel:  printing eip:
Apr 20 10:33:43 nile kernel: f8dd8796
Apr 20 10:33:43 nile kernel: *pgd = c0302ed300000000
Apr 20 10:33:43 nile kernel: *pmd = c100002000000000
Apr 20 10:33:43 nile kernel: Oops: 0002
Apr 20 10:33:43 nile kernel: CPU:    0
Apr 20 10:33:43 nile kernel: EIP:    0010:[hci_usb:__insmod_hci_usb_O/lib/modules/2.4.28-gentoo-r7/kernel/drivers/bluetooth/hci_usb.o_M422FA5FA_V132124+-436330/96]    Tainted: P 
Apr 20 10:33:43 nile kernel: EIP:    0010:[]    Tainted: P 
Apr 20 10:33:43 nile kernel: EFLAGS: 00010246
Apr 20 10:33:43 nile kernel: eax: f08e4db4   ebx: f7e1d400   ecx: f7e1d400   edx: 00000034
Apr 20 10:33:43 nile kernel: esi: f7ef0960   edi: de8c9f20   ebp: dba29f8c   esp: dba29f38
Apr 20 10:33:43 nile kernel: ds: 0018   es: 0018   ss: 0018
Apr 20 10:33:43 nile kernel: Process mplayer (pid: 13026, stackpage=dba29000)
Apr 20 10:33:43 nile kernel: Stack: f08e4d80 00000001 00200086 00000034 00000000 f08e4db4 00000000 f08e4d80 
Apr 20 10:33:43 nile kernel:        00000000 00000000 e15a7000 e15a70c0 c0214097 e15a70c0 e15a7000 bfffcda0 
Apr 20 10:33:43 nile kernel:        00005401 e1164a10 00000007 00005001 ffffffe7 de8c9f20 c016184d f7937630 
Apr 20 10:33:43 nile kernel: Call Trace:    [tty_ioctl+607/1156] [sys_ioctl+221/668] [sys_close+82/128] [system_call+51/56]
Apr 20 10:33:43 nile kernel: Call Trace:    [] [] [] []
Apr 20 10:33:43 nile kernel: 
Apr 20 10:33:43 nile kernel: Code: c7 42 20 00 00 00 00 e9 d5 0f 00 00 8b 45 14 e8 ba 77 51 c7 
Once this happens, you can't rmmod the audio driver. The only strategy I've been able to find is to reboot.

It wasn't crashing when I used xmms (which is configured to use esd). So I adjusted /etc/mplayer.conf to have "ao=esd".

nforce-audio 0292 ebuild is bad

Use ALSA. The rest of this section is only of historical interest.

One freaky feature of this laptop is that plugging in headphones does not mute the speakers under the nforce-audio drivers. Recent nforce-audio drivers eliminate the ability to control speaker volume independently of headphone volume.

The 0261 driver had separate parameters for vol (could mute the speakers) and pcm (controlled speaker and headphones). 0292 has only vol which controls speakers and headphones. There is no way to turn off the speakers while leaving the headphones working. 0301 is similarly defective, so I have masked both of them using /etc/portage/package.mask. I had to retrieve the purged 0261 nforce-audio from the viewcvs.gentoo.org portage attic and install it in a PORTDIR_OVERLAY to get things working the way I wanted.

ndiswrapper-1.1-r1 crashes my 2.4.* kernel; It works with 2.6.12.
(the touchpad is no longer broken in 2.6.12)

Since the touchpad is flush with the wrist rest I am continually triggering mouseclicks with inadvertent touches by the palm of my hand. This is absolutely maddenning, and in order to do any quantity of touch-typing, I have to use the built-in button HP has included to disable the touchpad.

(My previous Dell laptop didn't have this problem because its touchpad was recessed, and my palm never touched it while typing.)

The documents I have read imply that to disable the tap functionality of the touchpad I have to use a 2.6 kernel. When I installed a 2.6 kernel, I was unable to adjust the touchpad to have a usable velocity. It was way too slow, requiring many strokes to move from window to window. Under 2.4 I could travel all 1680 horizontal pixels with two strokes across the touchpad. No adjustments I made to the touchpad parameters had any noticable effect, and I found no documents to even explain which ones I should modify, and in which direction (larger/smaller) to achieve the desired effect.

I have reverted to the 2.4 kernel, and the generic mouse driver for now.

bootsplash

(bootsplash is not supported by gentoo in recent 2.6 kernels. The new toy is splashutils.)
 # emerge bootsplash bootsplash-themes 
The bootsplash patch is applied with the gentoo-sources (2.4 linux kernel source) ebuild so that eliminates some of the hassle. My kernel config (downloadable above) also has all the prerequisites (initrd, etc) enabled.

I flailed around with the instructions at bootsplash.org. I boot with "video=vesa splash=silent vga=0x31a" . The biggest hurdle is that many of the themes included in the bootsplash-themes ebuild just don't work. You can check if a theme works using

splash -s -u 0 /etc/bootsplash/THEME/config/bootsplash-WIDTHxHEIGHT.cfg
I currently use Emergance.

I also have no idea what to pass to "vga=" to make it use a 1680x1050 resolution instead of 1280x1024. Neither does any other document I can find with google. I'll have to live with a slightly fuzzy console, which barely matters, because I usually start X immediately after I log in.

PCMCIA

I flailed around with PCMCIA getting errors like
cs: warning: no high memory space available!
cs: unable to map card memory!
until I found a reference that told me I could use "lspci -v" to figure out the parameters for "include port .. memory" lines in /etc/pcmcia/config.opts . I now have this in my config.opts
include port 0x6000-0x6fff, port 0x5000-0x5fff, memory 0xe1000000-0xe13ff000, memory 0xe0c00000-0xe0fff000 
and I no longer get the "unable to map card memory" errors. Then I got
kernel: ide-cs: ide_register() at 0x100 & 0x10e, irq 11 failed
kernel: Trying to free nonexistent resource <00000100-0000010f>
cardmgr[17376]: get dev info on socket 0 failed: No such device
errors. Once I disabled every other include line in config.opts, then it worked, and I was able to mount my CF card.
excerpt from lspci -v with pcmcia-relevant portions highlighted
0000:02:04.1 CardBus bridge: Texas Instruments PCI1620 PC Card Controller (rev 01)
Subsystem: Hewlett-Packard Company: Unknown device 006d
Flags: bus master, medium devsel, latency 64, IRQ 10
Memory at e0107000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=02, secondary=07, subordinate=0a, sec-latency=64
Memory window 0: e1000000-e13ff000 (prefetchable)
Memory window 1: e0c00000-e0fff000 (prefetchable)
I/O window 0: 00006000-00006fff
I/O window 1: 00005000-00005fff
16-bit legacy interface ports at 0001

More recently I had trouble using my Compact Flash/PCMCIA adapter. It worked one time, and not the next.

May  5 10:34:52 nile kernel: ide-cs: RequestIRQ: Resource in use
I found an article that mentioned a CF adapter that worked when the laptop was powered on with the card inserted, but not when the card was inserted after boot-up. Since this corresponded with the the behavior of the last two times I tried to use the card, I took its recommendation and added pci=usepirqmask (An option for broken Compaq BIOS) to my append= in lilo.conf. It worked. However, ``The plural of anecdote is not data'', so I'll need to try it a 4th time before I'm confident this solves my problem.

kernel 2.4.28

I used to use 2.4.28 (.config)s.