Linux on Dell Inspiron 5100

Author: Bryan Moffit
My Main Webpage
Last modified: Tue Feb 27 20:20:25 EST 2007
Mid-June of 2003, I became the proud receiver of a Dell Inspiron 5100 Laptop. It was the second laptop I'd ever had the experience of enjoying (the first was a Zenith Z-Note 433Ln+), and the Nth (forgot exactly how many) machine for which I've had the privledge of installing Linux. Because this laptop will eventually be shared with other members of my group, I left the installation of Windows XP on its own hard drive partition, and created a FAT32 partition and Linux Partition (ext2) using Partition Magic. The details of this process will not be presented here... because I felt there was a bit of Voodoo involved in creating the finished product. What will be shown here is a breakdown on the components that I was able to make work in Linux, and a bit on how I did it. I'm primarily a Debian user, but ended up installing RedHat 9 (which uses a 2.4.20 kernel). This document was/is originally meant to provide myself with a means of retracing my steps in the event of a disaster. If it helps you... great.

Redhat 9 Installation

Redhat has really made installation a snap. One added feature that proved useful was the method of checking the Installation Media before the actual installation. Turns out one of my CD-RWs was bad! The graphical installation had no problems detecting the correct video card (Mobility Radeon 7500). The only specific information that is required, regarding the Inspiron 5100 (with 14.1 XGA) is that the Display should be set as "Dell 1024x768 Laptop Display Panel". Other than that... make sure to include the Kernel Development packages.

Fedora Core 3 Installation

Fedora was even easier than the Redhat 9 Installation. Mostly because there was much less to twiddle with ACPI to make sure interrupts are received correctly by the acpid (see the Fedora Core 3 update in the ACPI section below). Instead of going through an upgrade process... I decided to go with the evil "Wipe and Load" operation (copying my /home directory to another machine, and doing a complete and clean Install).
When I first set this machine up... I was using BootMagic, which required it's own partition. The FC3 install overwrote this bootloader in favor of GRUB. Took my a bit to find out how to get my WinXP partition to be loaded correctly. Here's my grub.conf, to give you an idea on how I hid that old BootMagic partition so WinXP wouldn't be confused.

Multi-Monitor

Got an extra monitor lying around and you want some more desktop space? Try using that monitor and the LCD on the laptop! I have a spare Leo ComfortView 17cx from a few years ago... and am able to use this configuration to have separate/xinerama desktops (with different resolutions!). Use this XF86Config as a guide. My XFree86 version (using Redhat) is 4.3.0-2.90.43 (rpm). There may be problems using this in earlier versions. Also see this link. Depending on your tastes/needs... you may opt to change this line:

Option "Xinerama" "off"

to:

Option "Xinerama" "on"

TVout (attempted only with FC3)

I have had a small amount of success with the SVideo-Out. It works great with Windows XP, but there is some hacks to get it to work in Linux. First item, is to get ahold of the atitvout utility (available as a package for several different Distributions...e.g. RPM for Fedora/Redhat... or from source). For me, this utility doesn't seem to work well with the XOrg 6.8.* radeon driver. It works fine using the vesa driver (this is the Driver line in the Section "Device" of xorg.conf).
Unfortunately, the SVideo out Linux support is not hot-swappable (as it is, in Windows XP). This just means that the SVideo cable must be plugged into the computer and TV when the laptop is booted up. To cure the headache of having to change the Driver line so many times I decided to make runlevel 4 as the TVout runlevel (vesa driver), and keep runlevel 5 as the normal runlevel (radeon driver). Here's what I did:
  • Using system-config-services, made sure that all of the services for runlevel 4 matched those of runlevel 5.
  • Copied my default xorg.conf (using the radeon driver) to
      /etc/X11/xorg_radeon.conf
    Also changed the line
      Driver "radeon"
    to
      Driver "vesa"
    and copied this to
      /etc/X11/xorg_vesa.conf
  • Opened up the /etc/inittab and made these modifications:
      Changed this line
        x:5:respawn:/etc/X11/prefdm -nodaemon
      To this
        x:45:respawn:/etc/X11/prefdm -nodaemon
      And added these lines, just before the prefdm line
        # Link the vesa config to runlevel 4
        lnk4:4:wait:/bin/ln -sf /etc/X11/xorg_vesa.conf /etc/X11/xorg.conf
        # Link the radeon config to runlevel 5
        lnk5:5:wait:/bin/ln -sf /etc/X11/xorg_radeon.conf /etc/X11/xorg.conf
  • Added another boot option to my bootloader, with the name "TVOut Configuration"... copying the exact lines that were used before, and just adding a 4 to the end of the kernel line. Confusing? Here's my grub.conf.
Once the laptop has been rebooted using the TVout Configuration (with the SVideo Cable plugged in) and X has started, now type (may need to be root):
    atitvout -f t
And the X display should now appear on the TV. This is great if you just want to use the laptop as a MythTV Frontend!

Network Card

The Integrated Network Card in this laptop is a Broadcom 4401. Support for this card is not found in the Linux kernel and must be found elsewhere. Why not from Broadcom itself? (http://www.broadcom.com/docs/driver-download.html). Make sure to grab the BCM4401 Driver for Linux. What now? Follow the directions (or just read the README.TXT):
    unzip linux.zip
    rpm -ivh bcmCD_4401_v{vers.num}/Drivers/linux/bcm4400-{version}.src.rpm
    cd /usr/src/redhat
    rpmbuild -bb SPECS/bcm4400.spec
    rpm -ivh RPMS/i386/bcm4400-{version}.i386.rpm
    modprobe bcm4400
If you end up compiling a new kernel, you'll need to remove the old package (rpm -e bcm4400) and follow these instructions to create a new driver.

Update - for Kernel 2.4.24... with BIOS updates (from A06 to A23)
I've compiled in support for the EXPERIMENTAL Broadcom driver b44 into my new 2.4.24 kernel, and have removed the bcm4400 module completely using rpm -e bcm4400. It seems stable so far... i.e. I haven't noticed any problems.

Audio Card

The audio was actually configured during the Redhat 9 and Fedora Core 3 Install. But for good reference, the kernel modules used:
    i810_audio.o
    ac97_codec.o
Or, compile them both into the kernel with:
    CONFIG_SOUND=y
    CONFIG_SOUND_ICH=y
Update: One day, my sound turned way down in volume and sounded quite distorted (in Windows XP, as well). It was fixed after Dell Support had me download and install the newest (A28 from A23). Get it here. I'm not sure exactly why this fixed the problem... The release notes say nothing about the audio.

ACPI

This was actually the toughest thing about this laptop. It's quite useful to have some sort of way to determine much Battery life is left. APM will not work, and the ACPI support in 2.4.20 will not cut it. Don't give up. You can make it work. Here's what I did:
  • Download the 2.4.20 kernel from ftp.kernel.org
  • Unpack the kernel, and make mrproper
  • Copy over the config used to create the Kernel used for the Redhat 9 Install (because I know it works)
      cp /boot/config-2.4.20-8 .config
  • Download the acpi kernel patch, and use it:
      gunzip acpi-20021212-2.4.20.diff.gz
      patch -p1 -i acpi-20021212-2.4.20.diff
  • Patch the drivers/acpi/osl.c with dsdt.patch:
      patch -p0 -i dsdt.patch
  • Download and unpack the Intel IASL-compiler (it contains the iasl binary).
  • Find the DSDT for the Dell Inspiron 5100 ACPI Sourceforge site. I picked the most recent.
  • Compile the DSDT Table:
      iasl -tc Dell-Inspiron_5100_new-A02-custom.asl
      cp Dell-Inspiron_5100_new-A02-custom.hex {kernel source dir}/drivers/acpi/tables/acpi_dsdt.c
  • Configure the kernel (make config/menuconfig/xconfig)
      Under "General Setup", find the "ACPI Support" Menu. I compiled all of the ACPI stuff into the kernel, rather than modules (strange effects when modules were loaded, then unloaded).
  • Finish kernel and modules installation (see README in Kernel Source Directory)....(make dep, make clean, make bzImage, yada yada yada). Dont forget about Boot Disks, Boot Loaders, mkinitrd, and Backups.
With the drivers installed, a new directory (/proc/acpi) should appear. The files within this directory a read from applications like acpid (see Software, below).
Note: Using these instructions leads to a kernel that is not entirely stable. I've noticed that my laptop will freeze up after some amount of time (between 30 minutes and 4 hours or so) with the lid closed.

Update - for Kernel 2.4.22
Using kernel 2.4.22 (as downloaded from ftp.kernel.org) allows one to skip the fourth item above (skip the download and install of the acpi kernel patch). One does however have to use a modifed version of my dsdt.patch. Make sure to follow all of the rest of the instructions.

Update - for Kernel 2.4.24... with BIOS updates (from A06 to A23)
Using kernel 2.4.24 with the A23 BIOS allows one to forget about all of these pesky ACPI patches. Just follow these steps. Unfortunately (with this BIOS) one seems to lose ACPI interrupts, rendering the acpid useless.
  • Download and install the A22 BIOS from Dell.
  • Download and install the A23 BIOS from Dell
  • Download the 2.4.24 kernel from ftp.kernel.org
  • Unpack the kernel with (as root, or sudo):
      cp [wherever]/linux-2.4.24.tar.* /usr/src
      cd /usr/src
      tar jxvf linux-2.4.24.tar.bz2
        OR
      tar zxvf linux-2.4.24.tar.gz
      rm linux linux-2.4
      ln -s linux-2.4.24 linux
      ln -s linux-2.4.24 linux-2.4
  • Configure the kernel
      cd linux-2.4.24
      make mrproper
      make config
        OR
      make menuconfig
        OR
      make xconfig
    Under "General setup", go into the "ACPI Support" tab and select all of the ACPI goodies you want. If you'd like... use this configuration file as a guide (there's probably quite a few modules that don't need to be included). Copy it as .config to the /usr/src/linux-2.4.24 directory.
  • "make" (compile) the kernel
      make dep
      make bzImage
      make modules
      make modules_install
  • Move everything to a "nice" location... here's what I did:
      cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.24custom
      cp System.map /boot/System.map-2.4.24custom
      cp .config /boot/config-2.4.24custom
  • Finish up with the other important stuff:
      cd /boot
      ln -sf System.map-2.4.24custom System.map
      ln -sf vmlinuz-2.4.24custom vmlinuz
      mkinitrd initrd-2.4.24custom.img 2.4.24
  • Modify and update your boot-loader... don't get rid of entries for a working kernel (just in case)!
  • Reboot... and cross your fingers.
Update - Using Fedora Core 3 and Kernel 2.6.10 (-1.741_FC3 from the DAG repo) with A28 BIOS. No kernel patches required
I was not receiving events from acpid, and this caused the LID event to not turn off the backlight when the lid was down. Here's what I did to cure it.
Here's what my interrupt table looked like originally (cat /proc/interrupts):
               CPU0       
      0:      99259          XT-PIC  timer
      1:        154          XT-PIC  i8042
      2:          0          XT-PIC  cascade
      7:        788          XT-PIC  Intel 82801DB-ICH4, eth0
      8:          1          XT-PIC  rtc
      9:          0          XT-PIC  acpi
     11:       1620          XT-PIC  ehci_hcd, uhci_hcd, uhci_hcd, uhci_hcd, yenta, ohci1394, radeon@pci:0000:01:00.0
     12:         77          XT-PIC  i8042
     14:        386          XT-PIC  ide0
     15:       6805          XT-PIC  ide1
    NMI:          0 
    ERR:          0	
Adding this to my bootloader (as an option on the kernel commandline.. see grub.conf)
    acpi_irq_balance
changes my interrupt table to:
               CPU0       
      0:     812341          XT-PIC  timer
      1:        117          XT-PIC  i8042
      2:          0          XT-PIC  cascade
      7:      26732          XT-PIC  Intel 82801DB-ICH4, eth0
      8:          1          XT-PIC  rtc
      9:      45374          XT-PIC  acpi, radeon@pci:0000:01:00.0
     10:          0          XT-PIC  ehci_hcd, uhci_hcd
     11:          3          XT-PIC  uhci_hcd, uhci_hcd, yenta, ohci1394
     12:         77          XT-PIC  i8042
     14:       6794          XT-PIC  ide0
     15:      13549          XT-PIC  ide1
    NMI:          0 
    ERR:          0
Making sure that you have DRI working with XOrg (FC3 comes with v6.8.1), also seems to be important. Check out my xorg.conf. Both of these appear to have helped to restore acpi interrupts. Now one doesn't need to watch the file
    /proc/acpi/button/lid/LID/state
to see if the lid is up or down. The acpid should now receive interrupts from
    /proc/acpi/event
and you should see received and completed events in
    /var/log/acpid

Software

Below is a list of software that I use (as well as where to find it).
WindowMaker rpmfind.net A simple, non-hog of a Window Manager
unclutter rpmfind.net Make the mouse disappear after inactivity
wmnet rpmfind.net Monitor network devices, in WindowMaker
tpconfig Touchpad Driver Disable tapping on the touchpad (Only useful for Redhat 9?)
Use the synaptics driver with FC3
wmacpi Timecop
Patch
Monitor the laptop battery, in WindowMaker
wmwave Dockapps Info about Wireless Connection, in WindowMaker
apt APT4RPM Use the Debian style package management tool to take care of rpms.

Disclaimer:
These are NOT expert instructions, and I do not claim to be a professional. Do not blame me for screwing up your machine.


Total Visits since June 20th,2003: