Gentoo Linux on a Dell Inspiron 9200

Inspired by several excellent guides on getting GNU/Linux up and running on an Inspiron 8600 and the absolute lack of a guide for the 9200, I've thrown this together to help people with the same questions I had get their systems up and running. It also might be good for putting any prospective buyers' minds at ease.

The good news is that practically everything works practically perfectly. The 9200 doesn't have any "new" hardware in it, so it can take advantage of all the pain endured by 8600 users while the ACPI, Broadcom, and ndiswrapper drivers matured. I'm using Gentoo, but as long as you're using 2.6.9+ you should be good to go. If you're using SuSE or FC3, some of this is probably already taken care of for you.

Device Status Last Update Comments
Pentium M Perfect Jan 8, 2005 "Enhanced SpeedStep" with on demand scaling
ATI Mobilty Radeon 9700 Good Feb 5, 2005 X.org's radeon driver can't do DRI, but ATI's fglrx driver can't handle suspend.
80GB Ultra ATA Hard Drive Perfect Jan 8, 2005 hdparm claims ~33MB/s
24X CD-RW/DVD Perfect Sept, 2005 DVD plays fine with Kaffeine, K3B burns at 24x
Intel 2200BG Perfect Jan 8, 2005 Intel's drivers work great with ndiswrapper
Broadcom 10/100 Near Perfect Jan 8, 2005 Occasional link drop, but quite usable
Bluetooth Perfect Jan 17, 2005 Logitech MX900 mousing away
Audio Perfect Jan 8, 2005 Great sound for a laptop
Special keys Perfect Jan 8, 2005 Working with khotkeys
ALPS Touchpad Perfect Feb 5, 2005 Scrollbars and all
Modem Untested Jan 8, 2005 Haven't tried it, don't really need it
USB Perfect Jan 8, 2005 USB 1.0 (back) and 2.0 (left side) work great
PCMCIA Perfect March 19, 2005 No tricks, just works
Firewire Untested? Jan 8, 2005 Seems OK (driver loads), but I don't have any way to test it
SD Card Reader Doesn't Work Sept 4, 2005 I can't find any leads on this and no one I've talked to can either. If yours works, let me know how you did it!
ACPI Good Jan 8, 2005 Suspends to memory (with trick), can make fans even quieter than MS Windows

Kernel Configuration

If you like to build your own kernel, feel free to use or check my .config. It's enough to get you going on the hardware end of things and you probably won't be done any harm by just using it straight (as long as your distribution uses udev); all the same, you might want to look it over if you're used to doing it yourself.

Pentium M with cpufreq

The Pentium M processor has "Enhanced SpeedStep," a feature which allows it to change speeds more or less instantly. This is in contrast to the original P!!! or P4 version that only switched when you asked it to, or when you plugged it into the wall. Anyway, the idea is that the CPU only goes fast when it has something to do.

Enable CPU Frequency scaling, Intel Enhanced Speedstep, and the ondemand governor in your kernel. Unfortunately, you can't make the ondemand governor your default, perhaps because it's not supported by all processors. Make performance your default so you're not bogged down at boot. Then you just need switch to the ondemand governor at boot. This is done through the /sys file system, I just added a line to my /etc/conf.d/local.start file like

echo 'ondemand' > /sys/devices/cpu/cpu0/cpufreq/scaling_governor

There's a userspace daemon called cpufreqd that you can throw in as well, but since the ondemand stuff has made it into the kernel proper there isn't as much of a need for it. They are still improving it, adding crazy things like varying your cpu speed by the date. If that appeals to you, check it out.

Mobility Radeon 9700 and X11

You've got two options for getting X to work with the ATI card. The first is X.org's driver, which displays 2D very nicely and generally works perfectly except that it has no support for 3D hardware acceleration. The second option is ATI's own drivers, which work with X.org 6.8 as of driver version 8.8.25 released Jan 17 2005 (thanks for the notice, Michael-John Anthony). The ATI drivers support 2D and 3D with hardware acceleration (alas, not nearly as well as the Windows drivers), but they can't suspend! The good news is that you can pick both options by configuring both in your xorg.conf file and then picking which one you want at X startup. Make one Device section for each driver, make one Screen sections for each Device section, and then make two ServerLayout sections, each using one of the Screens. Take a look at (or use) my xorg.conf file and you'll see what I mean.

Of course, that won't work if you don't have the drivers installed. I got them from Portage's ati-drivers, but since they and the opengl-update version they depend on are still masked, you'll need two lines in your /etc/portage/package.keywords file like this:

media-video/ati-drivers ~x86
x11-base/opengl-update ~x86

Once opengl-update's support of whatever is new about these ati-drivers is stabilized, you should be able to remove that line. I would plan on keeping the ati-drivers line since it seems like they wait a long time to unmask them and each version does tend to provide improvements. Once the drivers are installed, setup your xorg.conf file with mine or with the bundled fglrxconfig program (which will only set you up for ATI's drivers, not X.org's drivers with it). For the record, I'm using the external (kernel) agpgart, AGP Locked User Pages, and "fast storage" (which seems to work fine with VMware).

If you're using the dual-driver setup like me, you can pick which one you want when you run startx by using the -layout argument. Since my ServerLayout identifiers are "ati" and "xorg" for the ATI drivers and X.org drivers respectively, I can start X with the X.org drivers like this:

startx -- -layout xorg

If I want to use the ATI drivers, I startx like this:

startx -- -layout ati

And yes, thats "startx space dash dash space dash layout." If you run startx without any arguments, the ServerLayout listed first is the one that will be used. Since I want to be able to close the lid of my computer and have it suspend more often than I play games, I've listed the "xorg" ServerLayout first. Note also that if you use a display manager like xdm or kdm, you won't be able to pick which ServerLayout it uses, it will just use the first one. You'll need to shutdown the xdm service (in Gentoo) or switch to run level 3 (in FC or SuSE) to get a straight console where you can login and run startx yourself.

If you have any problems with the ati-drivers, check out this page. It's Gentoo specific, but the troubleshooting sections are extraordinarily thorough. Remember that glxgears is not a benchmark, but I get around 1600 fps. Also, I'd be interested to see the glxinfo output from some other people. Mine lists only 16 visuals compared to the 64 listed with the 9500Pro in my desktop. Performance is kind of odd, too: tuxracer is unplayable, but America's Army runs is almost playable even at 1920x1200. Let me know how you do.

Console-wise, the ATI Radeon framebuffer driver (not the "old" one) works great with I2C/DDC but ATI's drivers don't like it much. If you never switch between an X session and a console (with Ctrl-Alt-F1, for instance) you won't care. If you do console switch when X is running, try the vesa-tng framebuffer. It doesn't use the widescreen, but at least it doesn't bork the ATI drivers. Also, unless you're an eagle or similarly bestowed with inhumanly perfect sight, I highly recommend the Sparc console 12x22 font as your only compiled-in font. It looks great and is easy to read.

Hard Drive (DMA)

Nothing magical here, just make sure you've got Intel PIIxn chipset support compiled into your module. hdparm benchmarks my drive at 33 MB/s if I use the following at boot:

hdparm -d 1 -A 1 -m 16 -u 1 -S 24 /dev/hda

Oh, just for the record, that last option (-S 24) tells the drive to spin down after 24 * 5 seconds = 2 minutes of inactivity. Adjust to taste. In Gentoo you just edit /etc/conf.d/hdparm as follows:

hda_args="-d 1 -A 1 -m 16 -u 1 -S 24"
cdrom0_args="-d 1"

24xCD-RW / DVD

Nothing really special here. I can burn CDs with K3B and watch DVDs with Kaffeine with no tricks. I've heard from others with the DVD writer option (thanks, Mathieu!) that it also works fine, albeit only at around 2.4X. I don't have a lot of experience with DVD writers, but I've rarely gotten the full advertised speed CD writing on most computers and I imagine that this is just more of the same.

Intel Wireless 2200BG

You've got some options here. The first is ndiswrapper, a clever kernel module that actually lets you use Microsoft Windows wireless drivers. The second is a commercial version of the same thing from Linuxant. The last is the ipw2200 driver, a native Linux driver effort with some limited help from Intel. I've not tried it, but the ipw2200 does not seem to be all that stable yet. Unless you're a hacker who can help the guys out, I recommend you go with ndiswrapper.

ndiswrapper is of course not without its own problems. The default Linux kernel stack size is 8kB per process/thread (you can wind it down to 4kB if you want). In Microsoft Windows it's 12kB. It seems that the Intel driver writers went a little crazy with their stack usage and the driver won't actually fit in the Linux 8kB stack. Linuxant provided a patch to kick Linux's stack size up to 16kB, so you'll need to apply that. The kernel patch can be downloaded from Linuxant's Driverloader download page, under "Note about kernel stack size." Save it wherever you like, then:

cd /usr/src/linux
patch -p1 < [path to patch file]

Thanks to Yann d'Halluin for providing the remedial patch usage instructions I needed. :-) Next, reconfigure your kernel for 16k stack size (under Kernel Debugging) and rebuild it.

Next you need to install ndiswrapper. Some distributions already include it (SuSE does, I think), but you probably want to uninstall the version it came with and get a fresh one since they're making improvements all the time. Also, there's a good chance you just broke the version you already had by building your own kernel with this patch. Anyway, from this point on you can just follow the ndiswrapper install instructions. You can download the soon-to-be-wrapped drivers straight from Intel here. You'll need to run that thing in MS Windows and it will drop all the files you need (default path) in C:\Intel\wireless 8.1.1.0 - generic TIC 88663\PROW2200\WIN2K_XP\ without actually installing anything, so don't worry about the machine you run it on.

Broadcom 10/100

Simple, just enable Broadcom 4400 support in the kernel (CONFIG_B44). It's marked experimental and (according to dmesg) does drop the link for a brief moment once in a blue moon. Totally unnoticable.

Bluetooth

The Bluetooth module works with kernel module bcm203x. I have a Logitech MX900 mouse that runs directly from the laptop's module instead of through the base's (the base isn't plugged into anything except the power adapter). Charles Bueche has a good run down of how to do this, the only difference for me being that I already had the hidp as part of the kernel (2.6.7 vs 2.6.9) and the Bluez programs are no longer masked in Portage.

Audio

The intel8x0 ALSA drivers worked for me. The mixer's kind of odd; the "Master" control doesn't affect the subwoofer's volume. A second "Master Mono" takes care of that. So it's really more like a Treble/Bass equalizer, just confusing. If you want to control both in one swoop, use the PCM control.

I'm no audiophile, but the sound from this thing is really quite remarkable considering it's a laptop and the speakers have got to be about 1/2 of an inch across each.

Multimedia Keys

This isn't too big a deal since all the keys already generate keycodes. The easiest way to get it all working is with xmodmap. I wrote a /etc/X11/Xmodmap file like this:

keycode 160 = XF86AudioMute
keycode 174 = XF86LowerVolume
keycode 176 = XF86RaiseVolume
keycode 162 = XF86AudioPlay
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 164 = XF86AudioStop

Some distributions will automatically load up that file for you if it's there (Gentoo doesn't). If you find that yours does not, all you need to do is run the command xmodmap /etc/X11/Xmodmap at some point during X startup, like in the session script or with a little script in ~/.kde/Autostart. From there you can use hotkeys or khotkeys (in KDE Accessibilty) to make the keys whatever you want.

ALPS Touchpad

Much thanks to Derek Vandivere for pointing out that there's a touchpad driver! SuSE users like Derek already have the driver installed, check out this formum page for tips on getting it to work.

Gentoo users, start here. The driver is the "Synaptics" driver, but the 9200 has an ALPS touchpad. There's a kernel patch that lets the driver work with the ALPS as well, so we'll need to apply it. Here's all you need to do to install:

# emerge synaptics
# cd /usr/src/linux
# zcat /usr/share/doc/synaptics-0.13.6/alps.patch.gz | patch -p1

Depending on the version of the synaptics driver available when you install it, the patch to the patch may change. Now make sure that your kernel is configured to include the Event interface (under input device support) and rebuild your kernel. You also need to modify your xorg.conf file to use the driver by adding a Load line for the synaptics module and adding an InputDevice section. Again, look at my xorg.conf file for an example.

There seems to be a trick here, because the Synaptics driver won't work with non-touchpad mice. So if you have an external mouse that you plug in (literally or bluetoothically) once in a while and had just one InputDevice section using /dev/input/mice, that won't work anymore. You need one InputDevice for the touchpad reading /dev/input/mouse0 (the first mouse, since it's already there) and then a second InputDevice reading /dev/input/mice for your external mouse. You could use /dev/input/mouse1 instead, but if you don't have your mouse plugged in when X starts, that file won't be there and X will ignore the device until you restart it. You'd think using /dev/input/mice and /dev/input/moise0 at the same time would cause interference, but it doesn't. In your ServerLayout, you can declare both as mice with the touchpad being the CorePointer and the second one just as "SendCoreEvents". That means "Just as good as a core pointer, but X will still start if it isn't there."

Horizontal scrolling doesn't work in everything because not all applications support it, but it does work with KDE programs and I hear it works in GTK as well.

USB

You'll want ehci_hcd and uhci_hcd and everything works fine. Almost. ehci_hcd doesn't seem to care for suspend to memory, so it must be unloaded before you suspend or it won't wake back up. Details below in ACPI.

PCMCIA

The card slot works just fine with a Quatech serial adapter I tested it with. There were no tricks getting it up, just make sure you enable PCMCIA in your kernel, the Yenta socket driver, and install PCMCIA services (Gentoo Portage package pcmcia-cs, set to run at boot with `rc-update add pcmcia default`).

Firewire

I'd be willing to bet it works, as the the device is detected by hotplug and the modules ieee1394, ohci1394, and even eth1394 (providing another ethernet device eth1) get loaded up automatically. I have no devices to test it with, so you're on your own. If you'd like to report success (or failure), let me know.

ACPI

Suspend to Memory

As I mentioned above in USB, the ehci_hcd module will cause the laptop to not wake up if you do a suspend to memory. If you don't happen to have any devices/modules loaded in that rely on ehci_hcd, you can remove it pretty easily before suspending and then stick it back in when you wake up. I also like to take down my network interfaces before sleeping and then restart them when waking up just in case I'm in a new location. All that is taken care of in the following script:

#!/usr/bin/perl
# Suspends the computer to memory
system('logger ACPI Suspend to Mem Starting');
if (0 eq system('rmmod ehci_hcd'))
{
 if (-e '/var/lib/init.d/started/net.eth0')
 {
  $restartEth0 = 'yes';
  system('/etc/init.d/net.eth0 stop');
 }
 if (-e '/var/lib/init.d/started/net.wlan0')
 {
  $restartWlan0 = 'yes';
  system('/etc/init.d/net.wlan0 stop');
 }
 system('logger ACPI Suspend to Mem NOW');
 system('echo "mem" > /sys/power/state');
 
 # Farewell...
 #
 # Wake up!
 
 system('logger ACPI Suspend to Mem UP');
 system('modprobe ehci_hcd');
 
 if ('yes' eq $restartEth0)
 {
  system('/etc/init.d/net.eth0 start');
 }
 if ('yes' eq $restartWlan0)
 {
  system('/etc/init.d/net.Wlan0 start');
 }
}
else
{
 system('logger "ACPI Suspend to Mem: ehci_hcd unload FAILED"');
}

Just a note, the network stuff (/var/lib/init.d/started/* stuff) may be a little Gentoo specific; be sure to change it or take it out depending on your needs. It's in Perl because I just happen to hate shell scripting, but you could probably make it a lot slimmer if you wanted to. I don't think it's a big deal because it only gets run when you want to suspend, not something that should happen very frequently. Anyway, set up acpid to call this script when you shut the lid.

Yanking the ehci_hcd module will "unplug" your Bluetooth module, but it seems to pop right back up just fine on the reinsert.

Battery Status

Not much to say, works just fine. You can tell if it's plugged in or not and acpid picks up related events if you want to do something with them.

Fan and Temperature Control

The ACPI thermal zone is readable in /proc/acpi/thermal_zone/THZ/* so any applets you have should read temperature just fine. If you don't do anything, the fans will automatically speed up and slow down depending on how toasty the processor's getting, but never quite turn off. Temperature at idle is around 36 degrees Celsius, which is really quite cool and would even be comfortable to put on your lap if you didn't block the air intakes. This performance is identical to what you experience with MS Windows.

If you prefer, you can build the i8k module ("Dell laptop support" under Processor type and features) and get the i8k tools to control your fans yourself. With the default i8kmon settings, the fan doesn't turn on AT ALL until 65 or 70 degrees Celsius. With fans off, the processor idles at about 60 degrees making it pretty much silent for casual use. That's pretty neat, but you'll definitely be feeling some warmth through the keyboard and your pants may catch on fire with extended lap usage. The Pentium M is rated for 100 degress C.

WARNING!!! If you start up i8kmon, the BIOS will no longer handle fan control. So if you turn off i8kmon while the fans are off, they will stay off. That could be very bad if you decided to go compile something big and walk away. The processor is supposed to realize it's about to catch fire and shut itself down, but I'd rather not test that feature out myself.

Comments

I hope this has been helpful to you. If you have any questions or would like to add any information, do throw me a line. Good luck.

Valid XHTML 1.1! Valid CSS! TuxMobil - Linux on laptops, notebooks, PDA and mobile phones