Ubuntu Linux on a Dell Latitude D400

  1. Installing Ubuntu
  2. Kernel
  3. Wireless Networking
  4. X
  5. ACPI Power Management
  6. Other Hardware
  7. Dock

Note: I originally wrote this article some time ago, but I have tried to update it to how things work on this laptop now (June 2006). I no longer use this particular laptop, so it is unlikely I will update this further.

I have a Dell Latitude D400 laptop, provided by an employer. It is a fairly decent machine; a bit larger and heavier than what would be ideal to me in a machine that does not have an integrated CD drive of some sort, but it's rather fast and the price (free) was certainly right.

I briefly tried Debian Sarge (several months before it was released as stable) and FreeBSD on there, but had some issues right off the bat with hardware that Ididn't want to spend much time trying to fix. Ubuntu 5.04 (Hoary Hedgehog) mostly "just works," so that's what I use and that's what I will talk about on this page. I had some problems with Ubuntu 4.10 (Warty Warthog), namely that suspend to RAM didn't work, and I had to use 855wrap before starting X. Both of these problems were resolved with an upgrade to 5.04, though. Further upgrades to 5.10 and 6.06 didn't seem to cause anything to break, either.

Installing Ubuntu

I dual boot the machine with Ubuntu Linux and Windows XP, though fortunately I very rarely need to boot Windows. If you do this, install Windows first. My machine came with a Windows 2000 image pre-installed (that's what my employer uses), and an XP CD. I booted the XP CD from the USB CD-RW/DVD drive that came with the machine, created two partitions, and installed Windows XP on the first one. I didn't want Windows 2000 anyway.

Next I booted Ubuntu off the USB CD drive. I was installing 4.10 at this point, since that was what was out (I apt-get dist-upgraded later to 5.04), but 5.04 should also boot just fine off of the CD. The installer is fairly self explanatory, and you really don't even have to tell it very much. It's mostly automatic. At first, I had the installer just create a 5GB / partition for everything because I planned to create encrypted swap and /home partitions later. 5GB seems to be enough for my purposes, but if you want to install a ton of extra stuff you might want to make it bigger (or create other partitions, like /usr, which are large).

Kernel

I ended up just using one of Ubuntu's kernels. When first experimenting with the machine, I built my own, but when I settled on Ubuntu I found that its included kernel did the job nicely. It is built with support for pretty much anything you could ever want, as modules (like recent Debian kernels). Ubuntu comes with hotplug, and that seems to work fantastically for loading all the modules needed for your hardware.

I did install the 686 kernel though, thinking that'd probably be a bit faster than the default 386 one. If you apt-get install linux-686 you should automatically get the latest kernel version with 686 optimizations.

Wireless Networking

My particular D400 came with a Broadcom BCM4309 802.11a/b/g wireless ethernet adapter built in. This does not work automatically in Ubuntu. Because Broadcom sucks and doesn't seem to provide Linux drivers, or hardware specs needed by Linux kernel developers to write the drivers themselves, we have to use something like ndiswrapper around the proprietary Windows drivers to get this card to work in Linux. I messed around with this for awhile, and got it to the point that I saw the network interface with ifconfig and similar utilities, but I could not get the thing to talk to any access point. I eventually just gave up and plugged my old Orinoco Silver PCMCIA card in, and everything worked fine.

Later, with Dapper, I tried again. Dapper has a package called bcm43xx (it mightbe in multiverse, and it might be in Breezy too) that I also could not get to work. The package's documentation tells you how to load get the firmware loaded for the card, and when I did so loading the bcm43xx module would seem to work and create a device. But, I could not get it to connect to any wireless networks. I set the ESSID with iwconfig and ran dhclient on the interface, but the base station's MAC address wouldn't even show up when listing the interface with iwconfig, and dhclient couldn't get a DHCP lease.

Hopefully some day this card will function properly. Maybe with the built in Broadcom driver in Linux 2.6.17 it will, but I have not tested it.

X

Ubuntu 5.04 comes with Xorg instead of XFree86. It seemed to mostly automatically configure it properly, but I tweaked my config a bit to make it better suited to what I want. Here is my xorg.conf file. This config file should work in XFree86, too. In fact, it started as a config for XFree86 4.3, when I was using Ubuntu 4.10. Note, however, that if you're not using the version of Xorg I am from Ubuntu, it may very well be that you need the 855wrap utility mentioned above.

Note how I have it set up for multiple pointers; I use the trackpad sometimes, and a USB mouse when my laptop is sitting on my desk. I also have added a ton of options for the Alps touchpad on the D400, which I copied and pasted from somewhere else and modified slightly. I did this mostly so I could disable tap to click, which I can't stand. Putting this stuff in my config unfortunately didn't solve the problem--tapping on the touchpad still causes clicks. Hopefully some day I'll be able to fix that. Also note that I disabled caps lock in the keyboard section--it becomes a control key instead (caps lock is dumb).

Finally, there is a bunch of stuff I added in the various video related sections to enable 3d acceleration (DRI) and dual head by plugging my 17" Neovo LCD in. Right now this isn't turned on (I stopped plugging the monitor in all the time), but you can enable it by just uncommenting the Screen "Screen 1" LeftOf "Screen 0" (edit to your needs) line, and the Xinerama line if you want that. The commented stuff in the device sections is just from my experimentation--maybe you'll get cool stuff to happen if you uncomment some of those lines. Then again maybe you'll just make X break. As a side note, for some mysterious reason I seem to get faster framerates in glxgears when I have both screens enabled. Very weird.

ACPI Power Management

I was pleased that with the various software included with Ubuntu 5.04, suspend to RAM actually works on this laptop! I think all the functionality I wanted came with the Ubuntu kernel, and the scripts from the acpid and acpi-support packages. I may have modified one or two of the files slightly, though, so the contents of my /etc/acpi directory are here. When you hit the suspend key combination (fn + esc), the machine will suspend to RAM after a short delay. I generally unplug my PCMCIA card and USB devices before doing this, so the machine doesn't get too confused when I wake it up and those aren't there. Resume from suspend by opening the lid (if you didn't close it, I think you have to close it and open it up again to get it to wake up). Just closing the lid does not cause the machine to suspend, but does enable xscreensaver. This is useful if you want to,say, configure xscreensaver to lock the screen whenever it comes on. The screensaver will also be engaged when the machine wakes from sleep. I don't wantmy laptop to suspend whenever I close its lid, but I imagine you could configureit to do so easily by tweaking with the files in /etc/acpi.

With Ubuntu 6.06, there is now a Gnome Power Manager you can use to configure much of ACPI's functionality with a nice GUI. I have not used it too much, as I like the behavior that my existing scripts already gave me.

Other Hardware

All the other hardware in the D400 seems to work without a hitch, or I haven't tested it. The wired onboard Broadcom gigabit ethernet, USB (including USB 2.0), external CD-RW/DVD drive, sound, and PCMCIA all seem to work well. The modem is a winmodem, so you will need proprietary drivers to get it to work. I used the Linuxant drivers and they worked fine, though you are limited to a pathetically slow speed unless you pay them money.

Dock

For awhile, I used a Dell D/Dock Expansion Station docking station at work for my D400. I wasn't sure if it'd work, but I decided to just plug it in, and it seemed to. dmesg just showed the presence of some new USB hub stuff, and I have verified that USB, ethernet, and power all seem to work. When I hit the undock button it started flashing, but never turned off. Undocking the laptop while this was flashing didn't seem to hurt anything, though.

Problems with the dock: strangely, the dock seems to do something weird to my D400. Once it has been docked, I can no longer use suspend to RAM, even after undocking, until I reboot. Also, I have noticed that while docked, my load average is much higher--it usually hovers around 2-3 while my laptop is otherwise fairly idle. I cannot determine what is causing this high load average. I decided to stop using the dock.

Archives