My efforts with getting Debian GNU/Linux on the HP Pavilion ze4125 (HOWTO):
Last updated: 7/8/2003
Executive summary.
The laptop is available from HP Shopping but I bought it from Circuit City.
In summary: Most things work, the suspend-to-disk, AMD PowerNow & hardware-accelerated graphics being the notable exception. It is quick and snappy if you choose the right software. Basically the laptop is really too new to be fully supported under Linux, so you have to be prepared to do some work and messing around to get as many of the features working as you can.
Installation details:
-
I installed Debian on it, I use a mixture of mainly testing (Sarge) for the core stuff and a bit of unstable (SID) for extraneous packages (i.e. version >3.0r1, note that "stable" (Woody) *should* work - "potato" didn't work so well for me, I forget why - I think it was X-related), and lilo is my boot manager (oh - my "lilo.conf" for your info.). (This installation is completely hand-done, I didn't use tasksel or dselect (I actually hate dselect). Tip: Don't waste your XP installation like I did, because if you want to re-create the hibernate partition, re-install the diagnostic tools you'll have to use a useless HP tool that can re-install them, just it wastes your partition table... I did a boo-boo here! Ooops... :)
-
I use GCC v3.2.3 (basically from Debian testing) for all my compilation.
-
Graphics details:
-
The window manager I use is Blackbox. (Life is too short for GNOME, KDE or Enlightenment - they are too bloated for me... But then - this is the way - you aren't forced to have one, you can choose!)
-
XFree results:
Executive summary: They're getting there...
-
I tried the CVS versions of XFree86 (i.e. version >4.2.99 && <4.3.99) and DRI, but gave up on them for the reasons below, but mainly that I hate the "silken" mouse pointer. So I now use XFree v4.2.1-5 from unstable, v4.2.1-3 was o.k. too, but I went back to 4.2.1-5 to flush out the CVS XFree.
-
The ATI Northbridge (an "ATI Technologies Inc U1/A3 AGP Bridge [IGP 320M]") has the graphics chip (an "ATI Technologies Inc Radeon Mobility U1") built-in. (IGP=Integrated Graphics Processor.) Hence there is a lot of confusion regarding the actual type of the graphics chip. The kernel guys seem to call it an IGP320M the XFree/DRI guys call it an ATI Radeon Mobility U1 (for that is also what it is). Whatever it is called the AGP processor (thus PCI or AGP-based graphics processing) is unsupported in the kernel which means that DRM doesn't fly... (My guess is that the DRM plops commands into the memory fifos, but the graphics chip hasn't been programmed to pick up those commands, so the fifo fills, and is never emptied, so fifo timeouts occur, as the DRM can't find a free slot in the fifo. Result: X collapses in a big heap.)
-
Note that these DRM/DRI/kernel/etc woes only affect: the speed of X, thus gameplay and hardware video-scaling for full-screen DVD replay. If none of these are important to you, X rocks on the ze4125!
-
I recently tried the CVS version of XFree86 >=v4.3.99.8 (downloaded on 5th Aug 2003) and this supports the ATI IGP320M graphics chip (also known as an ATI Radeon Mobility A3/U1). This version of XFree86 also doesn't have the nasty silken mouse, which is bliss (my previous web pages bemoaned the point of the silken mouse). If you find you have problems with Opera when using this, I found they went away after applying the XFree ATI AGP patch.
-
So now I get hardware scaling of DVDs in ogle and mplayer! :) (Indeed I've had reports of newer (>4.3) versions of XFree86 supporting hardware scaling of DVDs with kernel versions as old as v2.4.20 (with patches)[2,3].
-
Unfortuneatly I don't get full AGP support (mis-matched kernel DRM vs XFree required versions), thus no full DRI support.
-
Kernel versions 2.4.21pre2 and above don't officially support the IGP320M in the ATI Northbridge is largely unsupported (see below for more info). Because of the unsupported Northbridge, it is unlikely that you'll get AGP support, but see below for a kernel patch to get AGP support.
-
You could try the GATOS drivers, but I've never got them to compile in the past so gave up on them. Maybe they are o.k. now, I can no longer be bothered with them.
-
I also apply various patches: an apm patch, and the Radeon AGPGART patch.
-
My "XF86Config-4" can be found here.
-
Kernel details:
-
The kernel I use is 2.4.22pre8 (note that versions higher than 2.4.21pre4 version have UDMA 5 support for the ATI Northbridge, earlier versions only support a maximum of UDMA 3). (I use this kernel, as I use the modem a lot.)
-
The 2.5.75 kernel is good - the AMD PowerNow works, the pre-emptive stuff, module unloading, etc, etc. (Make sure you get the latest version of "modutils" to support the new kernel module features. (If you get responses like "QM_MODULES" undefined when you type "lsmod", you'll need to update.) The only thing that doesn't work is software suspend to disk, a shame. I'd use this kernel, but the modem drivers are v2.4-only (they will support v2.6 kernels, once they are out), and I use the modem a lot, so that's a show-stopper for me.
-
To get AGP support for the 2.4.22pre8, 2.5.75 and 2.6.0-test2 kernels apply the appropriate kernel patch[3]. Kudos to the guys who developed these!
-
I had to use the ACPI patch to get ACPI working on the laptop for kernel versions <v2.4.22 & <v2.5.75. (Use this patch to get battery, mains and processor-temperature monitoring.)
-
Support of AMD PowerNow for Athlon processors is not yet available in the 2.4.x series kernels. This would be supported by the CPUFreq project. So expect your chip to run hot on ac power! (I average 80oC, peak at 86oC!) The support is mainly targetted in the 2.5.x series kernels, so look forward to when that becomes stable at 2.6.x! Other 2.6.x goodies: pre-emptive kernel, software suspend built-in, better ATI Northbridge support, amongst others.
-
I got the modem working - check out this page it works with the Connexant HSF modem drivers. Unfortunately you won't get sounds from the modem as it connects, but compared to WinXP I get at least 10% faster connection speed and software compression enabled... Heh heh....
-
For kernel 2.4: Sound was easy - follow the excellent ALSA link, configure the kernel for sound, but don't compile any OSS or ALSA drivers in the kernel source. (It is an "[ALi] M5451 PCI AC-Link Controller Audio Device" chip.).
For kernel 2.6: Just compile in the sound support in the kernel options.
-
The network chip is a "National Semiconductor Corporation DP83815", just compile that into the kernel and it works a treat.
-
USB works too - this is an ALI OHCI controller, just compile in the appropriate kernel driver. (And enable PCI hotplug support in the kernel and install the "hotplug" package for easy "plug & play".) For USB floppy support, see below. Also compile in VFAT support for connecting to many USB digital cameras. See this site for more information.
-
Note that if I attempt to use the boot paramters "single" or "init=/bin/sh", everything appears to boot as expected, but unfortunately I get no response from the keyboard. I've tried the boot parameter "kbd-reset" to no avail and tried mucking with my kernel options, again with no joy.... This can be a real swine if you f**k up your init scripts or "XF86Config" (excitement thanks to move to XFree86 v4.2.1-5)... As the ext3 partitions aren't mountable by my Debian Woody CD-ROM, it gets exciting...
-
Solution: (Yay!:) There is a bug in USB-OHCI support such that if it is loaded (in any way) this causes the keyboard not to respond. (I checked and it was that portion - USB core is fine, because I compiled the kernel with it compiled in, but not the USB-OHCI module.) So you need two kernels - one with USB support, the other "emergency" one without, for getting you out of trouble. NOTE: Compiling all of the USB support as modules doesn't help, as you're likely to be using hotplug support. This will cause the compiled USB modules to load, and thus no keyboard, just before you get the boot prompt, when used with the "single" kernel boot-parameter. Compiling USB-OHCI support (at least) as a module may work for the kernel boot-parameter "init=/bin/sh", but I wanted "single" to work too.
-
A better solution emailed to me by Stefan Johnson is to disable USB Legacy support in the BIOS. I've tested this, and it seems to work, so I've ditched the "emergency" kernel that I had compiled.
-
For CD-ROM & DVD support & USB floppy support: this should be managed by the SCSI sub-system, so enable "IDE/ATAPI CDROM support", "IDE/ATAPI FLOPPY support", "SCSI emulation support", enable "SCSI support", "SCSI disk support", "SCSI CD-ROM support", "SCSI generic support" and the appropriate file systems (ISO-9660 & Joliet) also "USB Mass Storage support".
-
I got PCMCIA/Cardbus working (it's an "O2 Micro, Inc. OZ6912 Cardbus Controller" chip) by enabling "Cardbus" support and installing the "pcmcia-cs" package. (On earlier kernel versions this caused a kernel panic - perhaps the improved ATI Nothbridge support in 2.4.21pre4 fixed that problem.) Note that I've not really tested it, as I only have a "J.C. Designs", "Gamecard II", which doesn't seems to work, despite trying this link.
Note that I had a kernel panic if I used the vesa framebuffer support and older Radeon AGP patches.
Debian package: pcmcia-cs.
-
To enable screen brightness control via Fn-F1 & Fn-F2 select "General Setup/ACPI Support/Toshiba Laptop Extras"[1]. This works for both v2.4.21pre4 (the version I use) & v2.4.21pre6 (the version Virgil uses) kernels. Virgil's explanation: As Compal make the ze4125 & ze4145 (amongst others) for HP and some, if not all, Toshiba laptops, this may be the reason why this works.
-
I get kernel panics if I enable APIC support or anything vaguely SMP related. (Hardly surprising on a uni-processor laptop...)
-
Also note that I disable the "Tagged Command Queuing" code - this is not supported on my motherboard/hdd controller.
-
Framebuffer support (this gets you the funky little penguin at boot (for real boot-hacking try here, but I don't use it... yet) and proper full-screen usage of your terminal, with proper fonts, not some "BIOS resolution expansion" kludge): The Radeon IGP320M is not yet supported in either 2.4.22-pre8 nor 2.6.0-test2. But you can use the VESA framebuffer:
-
Compile in VESA framebuffer support to the kernel.
-
Modify your "/etc/lilo.conf":
-
The line like "vga=..." is replaced with "vga=ask".
-
Make sure you have the newer Radeon AGP patches applied to the kernel, otherwise once X starts, you'll not be able to get a comprehensible screen when you switch to a virtual terminal (switching back to X is o.k. though).
-
I'm testing "-O3" for my kernel builds. No problems so far... Yes - I like to live dangerously!
-
A dump of "lspci -v" on my machine. (Tip - make sure your "pci.ids" file is up-to-date, as the chipset is new and I use the "unstable" "pcitools" package to get a newer version of this file, as the testing version doesn't have the graphics chip entry.)
-
My ".config" for compiling my current kernel. (Note that this is likely to be out of date as I move to v2.4.21-pre4 (for UDMA-5 support) when the ACPI and SWSUSP patches are available for it... Note that on Sourceforge you can monitor packages, so you get emails when new versions are released. Very handy!)
-
Disk drive & file system stuff:
-
The hard drive supports S.M.A.R.T. - I use this package to enable and use it.
-
I changed the DVD from RPC 2 to RPC 1 (i.e. region-free) by downloading the firmware for the Toshiba RD-2212 DVD-ROM drive and re-flashing it from this site. Note that you need a boot floppy for this, so a Windoze box is vital for making the floppy disk. I use Ogle for playing DVDs.
Debian packages: ogle-mmx & ogle-gui.
-
I use ext3 for all of my file systems and USBDEFS & TMPFS. ("parted" is excellent for managing your partitions, a text-based free "Partition Magic"-like utility.)
-
IR gripes:
-
It is frustrating not having IRDA built-in. (Oh - and having the IR port (if it were installed, that is where it would be) on the front of the laptop is very stupid design - think about it - hmmm, I want to print - so aim the port at the printer - i.e. turn the laptop around, so that you have to operate it upside-down... DUHHH!!!!!) HP are fools for not having this installed - the Intel version of the laptop has IRDA - why not the AMD? Grrr...!!! >:(
-
An IR port would mean that I could connect to my Sony-Ericsson T68i and download images without trouble... (Clearly a vital thing for any self-respecting geek to do.) Unfortunately I bought an original Sony-Ericsson (actually made by Susteen) DCU-10 USB cable (Vendor ID/Product ID:0x731/0x528) to connect my phone to my laptop. DON'T!!!! Buy the serial cable instead - it will work (it's also cheaper... huh, grumble, just not "USB"-apparently cool - I'm irritated with myself over this foolish oversight). The USB cable is a USB to serial converter (the phone has a serial port not USB port built-in) that has apparently got support in kernels 2.4.21rc1 and 2.5.66, it has been added to the "Prolific 2303 Single Port Serial Driver". I say apparently as v2.4.21rc1 hangs on boot, and X doesn't start with v2.5.66. Oh - I got some nice pictures from Christian Cogny & naturally my fractals!
-
Note that there exist USB cables for the T68i that will work with linux (model no. MA 8910c), check out this site. This cable has another advantage over the SonyEricsson one I got: it can re-charge the phone over the USB bus, and it is cheaper. Grrr... Should have looked more carefully - $40 wasted on the DCU-10.
-
Software I use and recommend (!):
-
For automatic ethernet cable plugging & unplugging detection I use the "unstable" "ifplugd" package. I've got the ethernet driver (the chip is a "National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller") compiled into the kernel. The only bug is that the init script links are inaccurate. The daemon is started before the mixer settings are loaded by "aumix", so when it beeps, they are too loud. Just make sure that the "S20ifplugd" links are changed to "S22ifplugd" and the "K20ifplugd" links are changed to "K18ifplugd". That will make the daemon start after the mixer settings are loaded, and shut down before the sound system is unloaded.
Debian package: unstable/ifplugd.
-
I have the "hotkeys" working:
- I use a mixture of omke.pl to enable them at boot-time (I have a Debian init script, linked as "S20omke" in "/etc/rc[3|4|5].d/.").
-
And the "hotkeys" package to control them. Hotkeys configuration:
-
I spawn it from my ".xsession".
-
Here's my .def file, note that I use Opera and Sylpheed, which you people out there may not like, but you can edit it!
-
I also added "Kbd=ze4125" to the "/etc/hotkeys.conf" file.
Note that the "mute" key seems to lock up the keyboard, to unlock it, try unmuting with the "other" mute key...
Debian package: hotkeys.
-
I connect my Palm m505 to my laptop. Just compile the USB-serial converter driver, "USB Handspring Visor / Palm m50x / Sony Clie Driver". I use "Jpilot" on my laptop to sync. with my Palm, and "Sylpheed" as my email client. (Sylpheed can also read the Jpilot address database - cool huh?!)
Debian packages: jpilot, sylpheed.
-
My web browser is Opera - Mozilla (v1.0) is just too slow for my liking. I'll die before Mozilla actually does anything - it is just too frustrating. (I did a test on my modem - Opera vs. Mozilla - it turned out that Mozilla was slower than a 56k modem link...!!!) Oh - and contrary to popular opinion, the email client in Mozilla stores the email in "mbox" format, so Sylpheed can import your Mozilla-based emails (sorry - can't remember where I found that tip -search The Font of Much that is Apocryphal or at least Wildly Inaccurate). Goody - now I get to use my faster laptop for speed, not waiting for slow software...
-
For CVS access I actually like "LinCVS". (Which doesn't seem to like to use ssh as opposed to rsh...)
Debian package: lincvs.
-
For debugging I currently use "Data Display Debugger". (Cygnus "Insight" was just too buggy...)
Debian package: ddd.
-
Software I use (but occasionally really winds me up due to pathetic bugs):
-
For burning CDs I use "X-CDRoast", note that Linux does not yet support "packet writing" or UDF writing to CD-RWs, so you just have to pretend they are re-writable CD-ROMs and use them in multi-session mode. A hack...
Debian package: xcdroast.
-
For source code development I use "Source Navigator". (Which has a number of irritating bugs, but newer versions >5.1.3 are supposed to have fixed many of them!)
Debian package: source-nav.
-
Some configuration pointers and suggestions that I have done:
-
I don't like the way the Debian by default has everything starting at run-level 2, i.e. "init 2". The run levels are there to be used. So I've deleted some of my "/etc/rc?.d/S*" links for a more progressive start-up. (And edited my "/etc/inittab" too.) This means that if I mess up xdm, it starts at run-level 5, so I just boot to run-level 4 instead (networking kicks in ar run-level 3, so I can connect to the net). Don't even need to "single" boot. The Joy of Linux: you can do this stuff! Not like Windoze: one size fits all.
-
I downloaded the "Synaptics Touchpad" driver from TuxMobil (the web site formerly known as "MobiliX"), followed the installation instructions, and "it just worked". The Synaptics touchpads rock, and they deservedly are in many laptops, now we Linux users have the fuctionality of them that Windoze users take for granted. Top work guys! (P.S. Can you make that cool, but pointless utility that Windoze users have in their task tray for monitoring the pressure and button presses? Oh - and the "Theremin" would be a top idea too! Something I sorely miss from my old Windoze 95 days... It bugged the hell out of the managers where I worked! >:)
-
I've got "ntp" installed. Now as I use a laptop, & I'm not always connected to a network & I've got "hotplug" installed, why have it running always? So I edited "/etc/hotplug/net.agent" to start it on link registration and stop it on link unregistration. So fewer daemons running means longer battery life, fewer problems,more free RAM. Yeah right. I'm a geek and like it to be tidy!
Debian packages: ntp-simple & ntpdate.
-
I also use this technique to start up and shut down xinetd. I'd use it for sshd, but for some reason it doesn't work, so that has to stay running. I guess that could be handy if there are problems on boot and ifplug & hotplug fail for some reason...
-
"dnetc client" hacking:
-
I used "/etc/hotplug/net.agent" to control the access to the network interfaces of the dnetc client, after suitable modification to "/etc/init.d/dnetc" to allow for extra command-line parameters. (Largely pointless, dnetc can handle this for you, but remember I'm a geek, I can get a tiny bit extra work-load throughput!)
-
The dnetc client knows nothing about ACPI for power management, it only knows about APM. As I've installed the "battery" script from the ACPI Sourceforge site and then I modified it to start and stop the dnetc client on battery detection.
-
I've installed acpid, my configuration (which basically starts the battery daemon on discovering a battery insertion - the batery daemon automatically exits if the battery is removed) and added a custom battery event to start up the battery script (below).
-
"Battery" script hacking (not all of these are completely successful... ;) :
-
My modified script sets the power saving for the processor and the hard drive whilst on mains and battery power. A handy little script! I set my hard drive to maximum power saving whilst on battery power, pause &dnetc&, and attempt to set the processor sleep state. Also if the battery level gets too low, it attempts to show a dialog (which doesn't work well - oops) and play a sound, every few seconds. If the battery gets really low, it runs &shutdown -h 1& to gracefully shut the machine down. It could run the suspend-to-disk script if software suspend worked in the linux kernel....
-
I've added an init script to start the battery script into my system start-up, so I get automatic battery power monitoring from system start-up to shut down.
-
I also use it to attempt to set my X display power-management whilst on mains or battery power. Note that to do this and have the script running as a daemon, you'll need to modify you "/etc/X11/xd/xdm-config" file and add:
! We use a named authfile for :0; this allows root to take this
! authorization and provide funny services.
DisplayManager._0.authFile:/var/lib/xdm/authdir/authfiles/the-console-xauthority
I also "chmod"ed it to 640, because I am paranoid. Then in the battery script add the following:
if [ -r /var/lib/xdm/authdir/authfiles/the-console-xauthority ]; then
export XAUTHORITY=/var/lib/xdm/authdir/authfiles/the-console-xauthority
fi
Which will allow the daemon-ized script access to the current X-session, but only if you start it from you X-session. If it is started before your X-session, it won't be able to change the X-settings.. (N.B. I've no idea how many security holes this opens up, so don't come crying to me if, after you've done it on the main data-base server at the bank at which you work, you find crimials have broken in to it and taken all the loot...!)
-
Note also that the version of the script that I use exits if the battery is removed, and you have to manually re-start it on re-insertion of the battery, but see above to get it to automatically re-start using acpid.
-
I've also done other customizations, but I've forgotten them! If you have tips and suggestions, I'd love to know!
-
Closing comments:
-
Alarmed at a loss of 1/2hr in my battery life over 3 months, I decided to check what was going on. Here's my findings:
Battery life, extra tips:
-
The Window Maker app. "wmnd" really chews through battery power. So remember: click it into the "off" setting or better still shut it down altogether! You'll get at least another 10-15 mins out of your battery with it off and more with it shut down! After less than a minute of running it, no network on the battery, monitoring eth0, the battery life dropped by 5 mins! Turned off the monitoring, battery life increased five mins after less than a minute of monitoring.
-
It turns out the battery was a dud - it burnt out a few months later... I phoned HP, and after waiting ages on hold[1] after speaking to a support representative, they sent me a better replacement in a few days. Top marks!
([1] The machine he was using had to be rebooted twice, as it crashed... No prizes for guessing which OS was running on his machine... ;)
-
Web sites of other people who guided me on the path to Linux-on-HP-ze4125 nirvana:
-
Credit also goes to (in no particular order) Virgil[1], Kurt Bechstein[2], Matthew Adams[3], and any others whom I've forgotten - sorry! Big kudos to those people for helping me to make this page better!
Go back to the list of pages.
Please e-mail broken links to me here.
Copyright © Jason M McGuiness, webmaster at hussar dot demon dot co dot uk, 2003.
Note: All logos and company images are copyright © their respective companies, and are possibly trademarked.