Adventures in Linux Installation on Dell Latitude D620

Initial installation: Jan 21, 2007

Last update: July 8, 2007

I bought a Dell D620 in 1/2007, with the hope that installing Linux (specifically, Ubuntu) would be as uneventful as the earlier Dell Latitudes I have had. For instance, recent installation of Edgy Eft on Latitude D600 was a breeze, with practically every thing working out-of-the-box. Installation on D610 last year (Breezy Badger) went relatively smoothly as well. But not this time. To make matters worse, I made the task more complex this time by insisting on external monitors, printers, docking station, and so on. After spending a significant amount of time, I have finally got almost every thing to work.

Plusses:The dual-core 2GHz (4MB L2 cache) processor is real fast, as compared to the D610 I bought just about a year ago. Battery life is great -- the 6 cell battery lasts for 3 to 4 hours and the larger 9-cell battery lasts for almost 5 to 6 hours, when the LCD brightness is turned all the way down.

Minuses:Other than basic system operation, most things need tweaking, and don't work out of the box with Edgy Eft. But they can be made to work, and hopefully this will be relatively easy to do with the information comntained in this page.

On upgrading to 7.04 I started doing some research on it, but read some postings about possible problems with Xinerama, which I am using in my dual monitor setup. Decided not to risk it. Will wait until I get more definite information. The current setup is almost fully functional, and I have no appetite for another adventure.

The Hardware

My machine has a T7200 processor (2GHz, dual core, 4MB L2 cache), 2GB memory, 120GB disk, and DVD writer. It has a WXGA panel at 1440x900 resolution, and uses Intel chipset (i945) for its video controller. It has built-in blue-tooth, 802.11 a/b/g and cellular (verizon) network support built-in. Unlike D610, D620 has a built-in microphone.

I also have a docking station (actually, a port replicator) to which I have connected an external keyboard, mouse, a Dell 2470 LCD panel (1920x1200), a HP Laser printer (LaserJet 6MP Postscript) and a HP multi-function device (OfficeJet G85xi).

lspci output is as follows:

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 02)
0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

Steps in Installation

Before you start: make sure that the swap partition is at least as large as your main memory, preferably 1.5 to 2 times larger. The default partition used by Dapper allocated only a 512MB swap for a 2GB main memory machine, which leads to problems with hibernation.

Initial installation of Edgy (Ubuntu 6.10) fails due to X failure. I had to install Dapper (Ubuntu 6.06), that too in safe mode. Then I upgraded to Eft --- this upgrade was ill-advised, and I regretted it many times afterwards. Nevertheless, I did not want to start reinstalling from scratch, so I proceeded with the next steps on Edgy.

This page covers more of post-installation steps rather than the basic installation itself. (It assumes basic familiarity with Ubuntu systems, e.g., how to use apt-get or synaptic to obtain and install all the software you need.) The instructions below are known to work with Edgy. Various steps involved in installation were:

Shut off that annoying beep

Unfortunately, this machine beeps at full volume, regardless of the volume setting. The beep can be turned off inside gnome, but this is of no use if you ever reboot your machine in a conference or a meeting, and it starts beeping at full volume.

I turned off the beep by adding the line "blacklist pcspkr" in /etc/modprobe.d/blacklist

Getting X to work

The version of X that comes with Edgy seems to be the most unstable part of this Ubuntu release in terms of its support for Latitude D620 hardware, since it does not even allow installation of Edgy (even in the safe mode), while installation succeeds with the older version (Dapper). Nevertheless, the problems can be fixed (or worked around) relatively easily. (Keep in mind that these instructions are for the Intel video hardware.)

The complete xorg.conf file that I use with the LCD panel is available here

Audio problems and partial solutions

Audio support for this laptop seems to be a work in progress. Every time you resume (or reboot), the microphone may not be properly configured, and the speaker volume is set to zero. Microphone is particularly problematic, as it seems to require you to "jiggle" various controls on the mixer before it starts working. Here is a shell script that automates this "jiggling" process. Things that don't work:

Worse, there is no output on the audio out jack on the port replicator -- this is true even on a reboot.

Built-in wireless

Unfortunately, the ipw3945 driver did not work for me. The interface would come up, and I could scan available networks and so on, but packets would not get through. The best I was able to do was to get back 60% of ping packets back, but typically, it would be much worse (20%). iwconfig would report a very high number of "invalid misc". Several others reported the same problem, but I did not find any solutions. May be a complete reinstall would have helped, but I did not see any one reporting a resolution of this problem through such a reinstall.

For a while, I plugged in my old 802.11b PCMCIA card, and it worked like a charm. But it was awkward, projecting about an inch on the side of the laptop. So, after two days, I started looking at ndiswrapper.

With Edgy, you can run into a couple of problems with ndiswrapper. First, you need to get version 1.8 of ndiswrapper-utils package. You can find the details here. However, the instructions did not work right away. Here were the main differences:

After installing, there were times when the wireless would die within a few minutes. But of late, the connection has stayed up for days. Not sure as to the reason for inconsistency. There seems to be some correlation between this failure and that of enabling cups and hplip services (with 2 HP printers enabled, one of them being an USB scanner/printer). Of late, I have been turning those services off, and this seems to have largely fixed the problem. But a conclusive finding will require more investiation.

Update It seems that wireless dies very shortly after a reboot. So, either you have to turn it off immediately on reboot (or preferably, before you reboot), and then wait for 5 minutes or so before bringing it up. If this does not work, just hibernate and resume, and it works like a charm.

Suspension, hibernation and power save modes

CPU frequency throttling works out of the box on Edgy. Suspend-to-memory used to work fairly reliably at some point, but as I was loading more software and experimenting with various aspects mentioned on this page, it stopped working. But thankfully, suspend-to-disk (hibernation) works well.

The default installation of Ubuntu screwed up hibernation --- for a 2GB main memory, it only allocated a 512MB swap. This caused hibernation to hang when too much main memory was used.

You may need to tweak /etc/default/acpi-support -- the file I use can be found here. This is usually the most important step to get hibernation to work.

Boot options can be important in getting hibernation to work well --- I had occasional problems (maybe 20% of the time) in resumption until I used the following options:

ro noapic vga=791 resume=/dev/sda3
Here /dev/sda3 is my swap partition. I did not use the splash option as it led to occasional problems in resumption. Someone had suggested nolapic option, but this seems to cause the second processor to be disabled. I am not entirely sure if the noapic option is needed --- this point needs further investigation.

UpdateResumption fails once in a while -- may be once in 20 times. It is rare enough that it does not seem to bother me. In fact, it seems no more frequent than random lockups I experience once in a while that require a reboot. (May be once in 10 days.) I wonder if these lockups have any thing to do with bugs reported in Core 2 duo processors --- I bring this up because the lockups leave absolutely no error messages or indication of any thing at all going on at the time of lockup.

When running in dual head mode, if I always resumed with external monitor in place, things work fine. If I resume without an external monitor, it works fine, but there is only a 50% likelihood (or may be less) that dual-head will work properly if you hibernate again and resume with external monitor. However, if this worked once, then it tends to continue to work until the next reboot or next restart of X.

Docking station (Port-replicator)

The port replicator works like a charm. Its presence or absence does not seem to make much difference to the OS, so I can suspend while on a docking station and resume off the docking station and vice-versa. Presumably, this is because the port replicator itself does not have much (any?) hardeware that the OS has to manage, but appears as a passive entity. Your mileage may vary with a more intelligent dock.

External monitor and Dual-head X configuration

This is the step that I spent the most time on, and it may turn out to be the most useful part of this page, and may be applicable to other hardware as well. The problems encountered and the fixes used were as follows. I will first start with steps for getting external digital flat panel to work, and then move on to dual-head operation.

The xorg.conf file that I used successfully with Dell 2407 DFP is available here. If you are lucky, this will work right away for you, but if not, you will need to look through the Xorg's log file for trouble-shooting. The first thing you want to look for is whether your video hardware detected the presence of the external monitor (called CRT for a monitor connected on the analog video port and DFP for a digital flat panel connected using a DVI). Then check the DDC interactions with the monitor. Finally, check to see that the video BIOS reports the resolutions you need, and whether X is able to find the right combinations of dot clock and horizontal scan frequencies to drive your monitor.

Proceeding on to dual-head operation, there are, in general, three options: TwinView, MergedFB, and Xinerama. See the following links that provide a good background on these options: http://gentoo-wiki.com/HOWTO_Dual_Monitors and http://www.ubuntuforums.org/showthread.php?t=221174. I used the Xinerama option since it was the one that was known to work with most hardware.

Here are the problems I encountered and the fixes. My xorg.conf for dual-head operation is available here.

Printer and Scanner

I connected my old parallel port laser printer (HP LaserJet 6MP Postscript) and a USB multi-function device (HP OfficeJet G85xi) to my docking station and expected it to work. I tried with the gnome printer configuration tool as well as the web interface provided by CUPS, but I could get only the laser printer to work, not the officejet. Next, I tried installing the hpoj package. But this messed up my system, making it unstable, so I promptly uninstalled the package. Then I found the instructions for getting it to work here. I summarize the basic steps below:

If you don't follow the last couple of steps, you may get into a situation where the print jobs seem to go through, but nothing is actually printed.

Once set up, the printer seems to show up properly after hibernate resumption and reboots. I can use xsane for scanning, and lpr for printing. I am not able to use the faxing functionality of G85xi, but don't consider it to be a high enough priority.

Update It seems that the G85xi printer/scanner is not recognized if I rebooted the system off-dock (i.e., when G85 is not connected) and resume on-dock. Things are fine if I reboot on-dock and then hibernate/resume on or off the dock.

One more issue with xsane --- somehow the scans from xsane had very poor quality and I could not figure out the reason for a long time. It turns out that a "JPEG compression factor" under "advanced options" menu was set too high -- at 90 or so. This leads to very poor scans. Setting the compression factor to 10 seems to lead to fine images. Or even better, you can set "compression" to "NONE" -- acquiring scans takes a bit longer, but the quality of output is as best as it can get.

Other problems

There are still some issues that need to be addressed, but most of them minor enough that I may never get to them.

References