Technical info
Base installation
Kernel compilation
Network card
CVS XFree86
DRM driver
XFree86 config
ACPI driver

Welcome to the page about Linux on HP N5495

On this page You'll find the description of my experiences with installing and running Linux on the HP N5495 laptop. I also briefly outline steps I took to get various pieces working. Also, at the end, I present the list of remaining unresolved issues.

Some technical info

The HP Pavilion N5495 has several hardware pieces that we have to be aware of. It has an Intel 830MG integraed chipset, that determines most of its specifications, most notably it takes care of the graphics capabilities. Other hardware present is:
Intel USB controller (rather standard)
Intel IDE controler (no surprises here)
FireWire (IEEE 1394) controler from Texas Instruments
ESS Technology ES2838/2839 SuperLink Modem
ESS Technology ES1988 Allegro-1 sound card
Intel Corp. 82801CAM (ICH3) Chipset Ethernet Controller
and a O2 Micro, Inc. OZ6933 Cardbus Controller (PCMCIA)
(all the info from Linux PCI scan.)
The laptop is also equipped with LCD screen with 1400x1050 maximum resolution, HITACHI_DK23CA-30 ATA DISK drive and TOSHIBA DVD-ROM SD-R2102 ATAPI CD/DVD-ROM drive.

Base Linux installation

As a base of my Linux installation I chose (out of personal preference) Linux Mandrake 8.1. Before proceeding with the installation itself, we have to make some space for Linux. HP N5495 comes with a single partition devoted completely to Windoze. You'll need a special software (for example Partition Magic 7.0) to repartition the drive, or You'll need to delete the partition completely, then repartition the drive and install Linux and Windoze from scratch. Anyway we need a clean, empty partition just for Linux. It is even better to have at least two - we'll use the second for the swap space.
As my Linux distribution I used Linux Mandrake 8.1. I booted the installation CD from a built-in DVD drive. The installation went smoothly, without any apparent problems. At the end the installer porposes to use only XFree 3.3.6. We'll have to accept that for the moment, but we'll change it soon.
At his point most of the essential hardware should be working. This includes: network, DVD/CD reading, CD writing etc

Custom kernel compilation

As the HP N5495 is a fairly new laptop, support for its features is constantly being added to Linux. That's why it is probably most wise to use the latest available stable kernel. As a time of this writing it is 2.4.17. There is no Linux distribution that uses this kernel. Also, there are some special quirks specific to this laptop, that have to be taken care of. This means we are forced to do the custom compilation of the kernel.
The procedure of kernel compilation is not very complicated, but does require some skill. I'm not going to describe it in detail, as this has already been done many times. I'm just going to give a list of options that have to be selected for variuos functions of the laptop to be activatred:
Developement drivers - y
Procesor family - Pentium III
MTRR - y
Power Management Support - y
ACPI support + all ACPI modules - y
Advanced Power Management BIOS support (and all its modules) - n - we have to use APCI and NOT APM!
PCMCIA/CardBus support - y
CardBus support - y
Parallel port support - m
Use PCI DMA by default when availabe - y
Intel PIIXn chipsets support + Tuning support - y
SCSI modules for the writer support: SCSI support, SCSI disk, SCSI CD-ROM SCSI generic - y, but turn off probe all LUNs
IEEE 1394 + modules - m (I never had a chance to test, so I even don't know if it works)
Network device support - nothing here, we'll have to use Intel drivers.
IrDA support + Infrared-port devices - m
Input core support - all to m
In Character devices:
Intel i8x0 Random Number Geberator - y
Enhanced Real Time Clock - y
/dev/agpgart (AGP Support) - y
Intel I810/I815/I830 (on-board) support - y
All other AGP modules and DRM - n (IMPORTANT!)
Filesystems: You have to decide for Yourself (I am using ReiserFS)
Video mode selection support - y
Frame-buffer support and VESA VGA graphics console - y
Sond card - m
ESS Maestro3/Allegro and Intel ICH - m
Support for USB and most of the modules (depending on Your needs) - m
After tailoring the kernel to Your needs You can compile, install and reboot the machine with it.

Network card driver from Intel

As You'll quickly learn after the recompilation the network card does not work properly (if at all). You'll need an Intel supplied e100 driver for this card - go to ..., get it and compile according to instructions. You'll have to recompile and reinstall it every time You recompile Your kernel.

CVS XFree86

Before we start playing with graphics there is one important thing to note: it is absolutely neccessary to install the latest laptop BIOS from HP - at least version 1.02 from 12-12-2001! UPDATE: The newest BIOS as of now is 1.04 from 11-01-2002 If You don't do this, You'll experience weird behaviour and lots of bugs! All the following is written with the assumption that this upgrade has been done.
The support for Intel I830M chipset installed in HP N5495 has just recently been added to XFree86. Actually no official X release contains it - so we are forced to use the CVS XFree86 version. (UPDATE: Actually XFree86 4.2.0 has recently been released - it should contain I830 support, but I didn't have time/incentive to test it). In order to do that, You'll have to go to and download the latest version of XFree86 from anonymous CVS. However before we proceed with installing it, we have to make sure some other thing are taken care of.
As You might remember - when installing Mandrake we had to install XFree86 version 3.3.6. Now it is neccessary to manually install XFree86 4.1.0, before installing the CVS version. This way we make sure that all the neccessary supplementary programs for XFree86 4.x are installed.
After upgrading X and downloading CVS XFree86, we proceed with installing compiling and installing XFree with the help of a included README file. When the compilation is done (it takes some time) we may reboot and start configuring X. Note that this process overwrites a lot of old Mandrake XFree86 files, so some strange things may happen later.

DRM driver

The one thing we'll have to do before proceeding with the configuration is to install the kernel DRM driver. We have to into <your CVS source directory>/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ directory and issue a 'make -f "Makefile.linux" command. This should produce (among others) the i830.o file. We just copy this file into /lib/modules/<your kernel version>/kernel/drivers/char/drm directory. Then do a 'depmod -a' command and the module should be in place.

XF86Config configuration file

Now we proceed with configuring X. Assuming You installed the X Font Server - Your XF86Config file should look similar to this file. Just copy it into your /etc directory and You should be good to go. Special features includede there, that You should be aware of:
The primary mouse is the laptops touchpad, which is supported as a regular PS/2 mouse - no "scroll-bar buttons" suport though.
There is a secondary mouse (that does not have to be present) - a USB mouse.
The keyboard layout is polish - as I am a polish speaking person - change to suit Your own needs.
Two graphic cards are defined but so far such a configuration is not supportedby the driver.
You can change the screen resoultion and/or color depth by chnaging the last two sections of the file. I still have no idea how to make the graphics driver switch to 1400x1050 resolution though.

ACPI driver

The one thing that is not that clear at the beginnig is the power mangement options. It turns out that the HP N5495 does not support the widely used older APM interface. Instead it's BIOS is compatible with a newer, but not that well supported under Linux ACPI specification. The driver for this specification is actually developed at Intel, and is available from there. I am not exactly sure what is the relation between this driver and the official Linux kernel.
Anyway the driver from Intel is supposedly newer and better, and You can choose to use it. But personally I didn't see that much diffrence between thw two, from a point of view of the end user.
The down side of this of course is, that no software relying on APM will work on the laptop.

Remaining issues (Call for help)

The remaining issues with the HP N5495 laptop and Linux are listed below. If You happen to know something more about this or maybe even have a solution of the problem, please let me know. I'll be glad to include Your advice here.
There is no way so far to get the XFree86 driver to display the screen in 1400x1050 resolution. This means we are stuck to a slightly smaller area of 1280x1024. I did some digging into this problem and lokks like it is a combination of a faulty BIOS and a driver written to rely on VESA specifications only. The solution would require some major additions to the XFree86 i830 driver.
The ACPI battery status - so far the attemp to read a battery status using ACPI results in an ACPI error. This means there is no way to get the battery charge level in Linux.
The laptop modem is a "Winmodem", and I have been unable to run it. I haven't found any mention about Linux drivers for it.
I didn't have a chance to test the FireWire or the Infrared port. There is o good change they both run perfectly though.
The XFree86 driver does not support the TV-Out feature of the I830 chipset.

Final words

If You read this page, I hope You found it usefull. If You have any specific questions, doubts or new ideas, please let me know. And some words for the desperate:
Don't give up! Linux can be installed and works perfectly on this laptop - the best proof of that is the page You are reading, which has been completely prepared on this laptop :)

Written by Adam Kisiel, All rights reserved.
Last modification 4 Feb 2002