Debian GNU/Linux on the Dell Latitude D820

Created on: May 5, 2006
Last modified on: Mar 18, 2010
© Numerical analysis team

This page offers some guidelines to install Debian GNU/Linux on a Dell Latitude D820. If you would like to share advices or pinpoint mistakes, send me an email.

Configuration

Hardware components Status under linux Notes
Intel Core Duo T2500 (2.0Ghz 667Mhz FSB) Works Recompile the kernel with SMP.
Nvidia Quadro NVS-120M Works The nv driver works out of the box.
15.4'' WUXGA (1920 x 1200) LCD Screen Works Native resolution works out of the box. NVIDIA driver to talk to a data projector.
100GB IDE (7,200rpm) SATA Hard Drive Works libata driver in SCSI.
8× SONY DVD+/-RW Drive DW-Q58A Works boot parameter required.
ACPI Works More investigation is needed for memory and disk suspend.
Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 02) Works module tg3 (included in the 2.6 kernel).
Intel PRO/Wireless 3945 802.11a/g Mini Card (54Mbps) Works Install driver by hand, requires kernel 2.6.13 or newer.
Internal V.92 Modem Works Requires proprietary Linuxant driver and kernel version at least 2.6.16.
Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller Works (including recording) Requires latest alsa drivers (or Linuxant driver).
D820 Bluetooth Card Works Tested with a mouse.
USB Works  

Basic installation

Due to the SATA hard disk and the Broadcom NIC, a recent kernel version is required.   I decided to go for the netinstall β2 release of the Debian Installer which comes with a 2.6.15 kernel.  However, if you burn it on a CD and boot from it, you get the message "No common CD-ROM drive was detected" which makes it impossible to go further.  The workaround I used is to boot from a USB stick (don't worry you will get your CDROM working later).  This procedure requires that you have access to a running Linux system.  As my stick contained other data , I used the following procedure to set it up.  From the "other images" hd-media directory, download vmlinuz, initrd.gz (for the 2.6 kernels).  You also need an ISO image; I chose debian-testing-i386-netinst.iso. Assuming the device of your usb stick is /dev/sdb1, issue, with the device unmounted,

syslinux /dev/sdb1
Then mount it (say with mount /dev/sdb1 /media/usb) and copy the above three files to it. You also need to add a syslinux.cfg file containing:
default vmlinuz

append initrd=initrd.gz ramdisk_size=12000 root=/dev/ram rw
Insert the USB stick in your D820, power it pressing F2 to enter Setup and modify the boot sequence to start with USB. The installation is then standard, the NIC is automatically detected so you can perform a netinstall and even the video card ends up properly configured!

According to Stephen P. Williams, you can append libata.atapi_enabled=1 to the install or expert command lines at the boot prompt to get your cdrom detected and then be able to install from it. However, as Ryan Langseth pointed out to me, this only works for the daily builds of the installer; for the β2 version, see this page.

Compiling a custom kernel

The procedure is standard: download the kernel source, unpack it in /usr/src/, install kernel-package, configure your kernel (with e.g. make menuconfig), build it with

make-kpkg clean
make-kpkg --revision=custom.1.0 kernel_image
and finally install it with dpkg -i ../linux-image-2.6.20.4_custom.1.0_i386.deb.

Note that, since the disks are SATA, you do not need the ATA modules but instead build in the kernel the SCSI ones with the libata driver (see my .config). As a consequence, your disks are not labeled anymore /dev/hda1,... but /dev/sda1,... The kernel root parameter in /boot/grub/menu.lst must be set accordingly  (do not modify the boot section directly, set the kopt comment):

title Debian GNU/Linux, kernel 2.6.20.4
root (hd0,5)
kernel /boot/vmlinuz-2.6.20.4 root=/dev/sda6 libata.atapi_enabled=1 ro
savedefault
boot

The file /etc/fstab must also reflect this.  For example, mine reads

/dev/sda6 / ext3 defaults,errors=remount-ro 0 1
/dev/sda10 /home ext3 defaults 0 2
/dev/sda7 /usr/local ext3 defaults 0 2
/dev/sda9 /var ext3 defaults 0 2
/dev/sda8 none swap sw 0 0
# etc.

DVD+/-RW

In order for the CDROM to be detected, you need to pass the libata.atapi_enabled=1 parameter at boot time. If you use GRUB, add it to the # kopt=... line in the file /boot/grub/menu.lst so that for example it reads
# kopt=root=/dev/sda6 libata.atapi_enabled=1 ro
(leave the comment sign!) and run update-grub. After that, there is not problem to read audio CD (say with xmms) or video CD (say with xine).

However, I found that in order to burn CDs with xcdroast, you need to specify the device manually.  Just run xcdroast as root, enter Setup, go to the Device-Scan tab and click on Manually add device. Then enter the path of you CDROM drive — personally I use /dev/cdrom which is a symbolic link to the real device.  At the end of the CD burning, I got a message saying there was an error (which never showed up in the log) but everything seems well burned.

Burning CD and DVD works seamlessly with k3b.

Nvidia Quadro NVS-120M TurboCache graphic card

The open source driver nv works out out the box at the correct resolution (in my case 1920 × 1200). BTW, ignore the people who tell you 1920 × 1200 will make everyting too small.  I personally love the sharp and fine details — and you can always make your font larger anyway (and many applications allow you to zoom in if so you wish). I recommend you to set the DPI to 120 — if you use gdm, lauch gdmsetup as root, go to the "security" tab, click on "Configure X Server..." and replace the command with /usr/bin/X -dpi 120 -audit 0.  It is recommended to use the device /dev/input/mouse1 instead of /dev/psaux for the synaptics driver.

One important feature I need is to be able to make presentations.  For the VGA port to work correctly, you need to download the NVidia proprietary driver installer and run it.  Alternatively, you can do it the Debian way: install nvidia-glx, nvidia-kernel-source (at the time of this writing, these packages are in unstable, so you need to add a line like deb http://ftp.fr.debian.org/debian/ unstable main non-free contrib to your /etc/apt/sources.list to get them), nvidia-settings and kernel-package.  Then follow the instructions in /usr/share/doc/nvidia-kernel-source/README.Debian to build the kernel module.

Then enable twinview — in clone mode if you also like to see your presentation on your laptop screen. Details are in my xorg.conf file (in the Device section). I use xrandr to select dynamically which mode I want among the followings:

Getting OpenGL to work was a bit tricky.  For a start, the server and client libraries vendor did not match:

$ glxinfo | egrep "glx (vendor|version)"
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
client glx vendor string: SGI
client glx version string: 1.4

Following Andrew E. Schulman advice (and the NvidiaGraphicsDrivers page of the Debian wiki), I issued:

export NVVER=`dpkg -s nvidia-glx|grep Version|cut -d ' ' -f2|cut -d '-' -f1`
ln -fs /usr/lib/libGL.so.$NVVER /usr/X11R6/lib/libGL.so
ln -fs /usr/lib/libGL.so.$NVVER /usr/X11R6/lib/libGL.so.1
ln -fs libGL.so.$NVVER /usr/lib/libGL.so.1.2

The command glxinfo | grep "direct rendering" now says I have direct rendering.  Something must be missing however because the performance of glxgears is extremely poor (and the CPU usage goes to the sky).

I recommend you try the crystalcursors package.  After installing it, run update-alternatives --config x-cursor-theme and choose, for example, /etc/X11/cursors/crystalblue_classic.theme. The cursors are nice looking and big enough for the WUXGA resolution.

Remark: Jeffrey Hundstad who has "Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller" told me that in order to make it work you need to use the i810 driver in your xorg.conf file and to set up the file /etc/default/915resolution of the 915resolution package to get it to work at the correct resolution.

Sound

Playing sound is working out of the box with the latest alsa modules (≥ 1.0.13) — there used to be a bug that required to set the option position_fix but it is now resolved.  (Well, maybe you need to run alsamixer and unmute some channels.)  As suggested by Übergeeky YidMo and thanks to the kernel documentation Documentation/sound/alsa/ALSA-Configuration.txt, for recording through the built-in microphone, create a file /etc/modprobe.d/00alsa to set the option model=ref and restart ALSA (/etc/init.d/alsa reload).  You can then select Front Mic with your favorite mixer application (say kmix or gamix).

If you want to use the modem, just create /etc/modprobe.d/00alsa but do not compile newer ALSA module.  The Linuxant driver comes with a snd_hda_intel module of its own.

Keyboard & audio buttons

I have a french keyboard. However, for programming or for LaTeX math typesetting dead keys are not convenient at all. On the other hand, for French texts, accented letters and guillemots ('«' and '»') are a must! To have both together, I have written a .xmodmap file which, by default, makes all accents non-dead and combined with AltGr or AltGr+Shift enable the dead one. Guillemots '«' and '»' are given by AltGr+< and AltGr+> respectively. These modifications are activated at login time by the following lines in ~/.xsession (you will notice that I use .xmodmap_$HOSTNAME instead of .xmodmap; this is because I synchronize my files between several machines at different locations — also plays the role of a backup — with different keyboard layouts):

XMODMAP=`which xmodmap`
XMODMAP_FILE=$HOME/.xmodmap_$HOSTNAME
if [ -x "$XMODMAP" ] && [ -f "$XMODMAP_FILE" ]; then
$XMODMAP $XMODMAP_FILE
fi

In the .xmodmap file, I also assign keysyms to the audio buttons (you can check the keycodes of these buttons by launching xev, moving the cursor above its window and pressing them):

keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute

As I use fluxbox, I only needed to put

None XF86AudioLowerVolume :ExecCommand amixer -q set Master 2- unmute
None XF86AudioRaiseVolume :ExecCommand amixer -q set Master 2+ unmute
None XF86AudioMute :ExecCommand amixer -q set Master toggle

in ~/.fluxbox/keys for the buttons to actually perform their function. For other window managers, see e.g. here.

Wireless

This section is for the Intel PRO/Wireless 3945 wireless card.  The D820 is also available with other wireless cards (notably the Broadcom Wireless 1390 WLAN Mini-PCI Card).  To make sure you have the right one for the instructions below, look at the output of lspci, it should contain a line like:

0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

A driver for the  Intel PRO/Wireless 3945 is available.  Install te packages ipw3945-source (I run version 1.2.1 without problem), ipw3945d and firmware-ipw3945. Compile the ipw3945 module with m-a. The iee80211 in the kernel 2.6.20.4 is recent enough otherwise you must start by compiling a recent ieee80211 subsystem (see below). You then need to reboot — or to insert the module manually (modprobe ipw3945). You should now be able to see your interface with iwconfig under the name eth2.  How to launch the interface is standard in Debian: you setup an entry like

allow-hotplug eth2

iface eth2 inet dhcp
        wireless_essid accesspointname
        wireless_key off
        wireless_rate auto
        wireless_mode managed
        wireless_channel 6
in the file /etc/network/interfaces and invoke in a shell ifup eth2. If like me you prefer naming wireless interfaces with wlan0,..., it is possible to rename an interface with udev.  First check your device with udevinfo -a -p /sys/class/net/eth2/ and pay attention to the line SYSFS{address}=="mac address" or ATTR{address}=="mac address". Then create a file in /etc/udev/rules.d/, say /etc/udev/rules.d/010_netinterfaces.rules, with a line
SUBSYSTEM=="net", SYSFS{address}=="mac address", NAME="wlan0"
(with the SYSFS{address} part copied verbatim from the information gathered with udevinfo). Then restart udev (with /etc/init.d/udev restart) and reload the ipw3945 module. Of course, you need to change /etc/network/interfaces accordingly.

If you want to disable the wifi (say to save power), just remove the module (modprobe -r ipw3945).

Page to watch: iwlwifi project.

Installation by hand:

Modem

The modem is a Conexant HDA D110MDC.  You need the HSF driver from linuxant; there is a Debian package, so use it.   Remember not to intall the newer alsa modules.

On a 2.6.18 kernel, you must download the tar.gz version, unpack it, go into the hsfmodem-7.47.00.03full directory, and follow the following procedure: first install it with make install.  Then run hsfconfig --patch (you must be connected to the internet) and select the snd_pcm_hw_param_set and read_size patches — ignore the errors.  Install again the patched driver with make install.  Finally run hsfconfig!

ACPI

ACPI is woking fine as far as I can tell.  Install the powersaved daemon and the kpowersave GUI.  As said in /usr/share/doc/powersaved/README.Debian, in order to be able to use the powersave or kpowersave commands as a user you need to add it to the powerdev group and tell dbus to use the new group memberships with /etc/init.d/dbus reload. For Gnome, you have gnome-power-manager but I have not tested it.

I need to investigate further for memory and disk suspend.

Bluetooth

You obviously need to compile your kernel with bluetooth support (the .config above does). The device is dected and the modules are loaded. To use it, install the bluez stack: aptitude install bluez-pin bluez-utils bluez-hcidump. To discover blutooth devices (you need set your devices to be discovered — for example on the mouse you push a "connect" button):
hcitool scan
It will print something like
Scanning ...
        00:0C:55:19:D1:03       Targus Bluetooth Mini Mouse
Then, as root, issue
hidd --server
hidd --connect 00:0C:55:19:D1:03
That's all — you can play with your mouse now! If you do not remember which devices you connected, issue
hidd --show
The output will look like:
00:0C:55:19:D1:03 Bluetooth HID Boot Protocol Device [0461:4b01] connected [boot-protocol]

Saving power

PowerTOP (package powertop; see also the web site) is a tool that shows you software component(s) that make your laptop use more power than necessary while it is idle. A kernel ≥ 2.6.21 compiled with 

As reported by powertop, CONFIG_HPET is important because "without HPET support the kernel needs to wake up every 20 miliseconds for some housekeeping tasks".

Useful Software

Here are a few links to Debian packages that I use. I list them here with the hope you may make an interesting discovery or that they may ease your life! Enjoy!

Links & Files

 
Linux On Laptops TuxMobil - Linux on Laptops Iceweasel Get Firefox