Debian GNU/Linux Etch on a Dell Latitude D420

This is a log of my pleasant experience setting up Debian GNU/Linux Etch on a Dell Latitude D420 laptop.

The aim is to collect all the information required to optimally configure all the software required to make full use of the all hardware mounted on the D420.

The D420 is a very slick and powerful laptop, packing lots of devices and performance in a very compact and lightweight body.

Here you will find all the information needed to unleash it the power of Debian GNU/Linux on your Dell Latitude D420.

Touchpad

The AlpsPS/2 ALPS GlidePoint touchpad is recognized and configured automatically by X.

However, I found that pointer movement was very "slow" (i.e. dragging the finger across the touchpad corresponded to a minimal pointer movement).
Since ALPS touchpads don't have the same resolution as Synaptics touchpads, you probably have to change some parameter values. Here is an example InputDevice section for the X configuration file.

This can be corrected by setting the MinSpeed, MaxSpeed, and AccelFactor options. See the documentation installed in /usr/share/doc/xserver-xorg-input-synaptics for more details.

Adding the SHMConfig option allows for tweaking the synaptics driver parameters from utilities such as qsynaptics, gsynaptics, and ksynaptics.

Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
        Option          "HorizScrollDelta"      "0"
        # allow tweaking of option
        Option          "SHMConfig"             "on"
        # following three lines work around a bug in synaptics driver
        Option          "MinSpeed"              "0.2"
        Option          "MaxSpeed"              "1.2"
        Option          "AccelFactor"           "0.05"
EndSection

Display

X

The Mobile 945GM/GMS/940GML Express Integrated Graphics Controller works right out of the box, thanks to the open source Intel Linux Graphics Drivers, recently released by Intel.

However, by default only a suboptimal 1024x768 resolution is enabled. Perform the following actions to enable full 1280x800 resolution:

apt-get install 915resolution

and restart your X server.

Taking full advantage of the highest resolution really makes the display come to life. The native 1280x800 resolution looks much much better than the lower 1024x768 resolution.

Simply killing the X server (CTRL + ALT + BACKSPACE) and waiting for gdm to restart it enabled the higher resolution.

If this is not enough for you, check that your /etc/X11/xorg.conf has a section setting the desired resolution:

Section "Screen"
        Identifier      "Default Screen"
        Device          "Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
        Monitor         "Generic Monitor"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                Modes           "1280x800"
        EndSubSection
        # you can add additional depths here
End Section

and read /usr/share/doc/915resolution/README.Debian for further instructions on how to set the 915resolution package up, including using it in conjunction with hibernate.

3D / OpenGL

Not much work to do here, here we go...

Just ensure that you have the mesa libs installed:

apt-get install mesa-utils xlibmesa-dri xlibmesa-gl xlibmesa-glu

Everything works great, here is the output from glxgears:

matt@burrow:~$ glxgears -printfps
libGL warning: 3D driver claims to not support visual 0x5b
4037 frames in 5.0 seconds = 807.213 FPS
4071 frames in 5.0 seconds = 814.127 FPS
4130 frames in 5.0 seconds = 825.978 FPS

Depending on the version of glxgears, you might also run the following:

matt@burrow:~$ glxgears -iacknowledgethatthistoolisnotabenchmark
libGL warning: 3D driver claims to not support visual 0x5b
4116 frames in 5.0 seconds = 823.053 FPS
4079 frames in 5.0 seconds = 815.799 FPS
4093 frames in 5.0 seconds = 818.596 FPS

which I found very funny indeed.

Compiz

Installing compiz is as easy as:

apt-get install compiz

and (excerpt taken from /usr/share/doc/compiz-core/README.Debian) add the following to you server configuration file (/etc/X11/xorg.conf):

  + Enable the composite extension: locate the section named "Extensions" and
    add the following line:

        Option "Composite" "enable"

    If there is no section "Extensions" yet, you should add one that looks
    like this:

        Section "Extensions"
            Option "Composite" "enable"
        EndSection

  + Make XAA not hold any pixmaps in offscreen memory. This slows down compiz
    in many configurations. You can disable this by adding the following line
    to your "Device" section:

        Option "XAANoOffscreenPixmaps" "true"

Now restart your X server and login to your favorite session. After the
session has loaded completely, open a terminal window and type the following
command:

    $ compiz --replace &

Which will start compiz, make it replace the current window manager and
background the process so you can safely close the terminal again. If all went
well, compiz should start up and enable a whole bunch of desktop effects.

Console

This took some time and hacking to figure out...

First of all, we need to fire up our kernel building engines, gentlemen. Configure the kernel (a spiffy linux-2.6.18) so that the following drivers are compiled in:

  • Device Drivers->Graphics Support->Support for
    framebuffer devices->Support for frame buffer devices
  • Device Drivers->Graphics Support->Support for
    framebuffer devices->Intel 810/815 support (EXPERIMENTAL)

The latter option will only be available if Code maturity level options->Prompt for development and/or incomplete code/drivers is enabled.

Please note that these drivers need to be compiled into our kernel. Building them as modules resulted in my console going blank. I think it is possible to get them to work as modules (possibly using an initrd image containing the module), but I decided not to bother.

Also ensure that
Device Drivers->Graphics Support->Support for
framebuffer devices->VESA VGA graphics support
is not enabled, as this will cause the vesafb driver to take over the console, rendering the intelfb driver unable to control the framebuffer device.

The next step is to instruct your bootloader to activate the intelfb framebuffer driver.

If you are using grub, edit your menu.lst (/boot/grub/menu.lst) so that the kernel entry reads something like:

title           Debian GNU/Linux, kernel 2.6.18
root            (hd0,0)
kernel          /boot/vmlinuz root=/dev/hda1 ro video=intelfb:mode=1024x768-8@75 vga=773
savedefault

Note that I appended "video=intelfb" to the kernel statement and added a specific display mode using a "mode=" option.

Adding video=intelfb option should be enough to activate the default display mode. However, the intelfb driver seems to have some problems driving flat panel displays.

The specified display mode is not activated, unless the vga=773 option is used to force the display to be set to 1024x768-8@60 mode.
To use the vga= option, enable Device Drivers->Graphics Support->Support for
framebuffer devices->Video mode selection support (CONFIG_VIDEO_SELECT).
I am working with the intelfb and fbcon developers to try to fix this problem and get a higher refresh rate working.

If you are using lilo or want more information about the available options, please refer to Documentation/fb/intelfb.txt in kernel source directory.

Finally, install the console-tools package and the console-terminus font for the ultimate console viewing pleasure:

apt-get install console-tools
apt-get install console-terminus

Add the following lines to /etc/console-tools/config to enable terminus font on all virtual consoles:

SCREEN_FONT=Lat15-Terminus14
SCREEN_FONT_vc2=Lat15-Terminus14
SCREEN_FONT_vc3=Lat15-Terminus14
SCREEN_FONT_vc4=Lat15-Terminus14
SCREEN_FONT_vc5=Lat15-Terminus14
SCREEN_FONT_vc6=Lat15-Terminus14

Wireless

You should be able to obtain the ipw3945 driver, governor and firmware through apt:

apt-get install ipw3945 ipw3945d firmware-ipw3945

However, I had issues using the ipw3945 source package and the firmware package.
I recommend downloading the source and firmware package from the official driver development site.
I also recommend checking that the version of the governor installed by package ipw3945d is the latest version available. If not, get the latest and greatest from the official site.

Then build the driver module with the following commands:

cd /usr/src
tar jxvf ipw3945.tar.bz2
cd /usr/src/modules/ipw3945
make

Finally, copy the driver to the modules directory and refresh the module dependencies:

cp ipw3945.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/
depmod -a

Now the ipw3945 module can be loaded with the following command:

modprobe ipw3945

The ipw3945 governor will be automatically started and stopped each time the kernel module is loaded and unloaded, thanks to some modprobe hooks magic.

Manual loading of the module is not required; the /etc/init.d/ipw3945-daemon script will take care of loading the ipw3945 module and starting the governor.

That's it! The driver is up and running and your ipw3945 wireless card ready to use. Use the wireless tools to set your wireless connection up as normal.

As WEP security is fundamentally flawed, usage of WPA encryption is recommended. This requires setting up wpasupplicant, which is fully integrated in ifupdown interfaces scripts.

Edit /etc/network/interfaces and add the following section:

iface eth2 inet dhcp
    wpa-driver wext
    wpa-ssid your_base_station_ssid
    wpa-bssid 00:11:22:33:44:55
    wpa-psk myverysecretpassphrase

and bring the interface up with

ifup eth2

.

External DVD+-RW drive

Just plugging in the external DVD+-RW drive results in the kernel promptly recognizing the device:

usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
  Vendor: Optiarc   Model: DVD+-RW AD-5540A  Rev: 102C
  Type:   CD-ROM                             ANSI SCSI revision: 00
usb-storage: device scan complete
sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 1:0:0:0: Attached scsi CD-ROM sr0
sr 1:0:0:0: Attached scsi generic sg0 type 5

Use your favourite tool to burn CDs and DVDs. K3b is a great graphical user interface. I prefer using wodim (a fork of the venerable cdrecord tool).

wodim -scanbus

will tell you where to where your burner lives (let's say 1,0,0),

wodim dev=1,0,0 driveropts=help -checkdrive

will report what driver options are available,

Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : 'Optiarc '
Identification : 'DVD+-RW AD-5540A'
Revision       : '102C'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Driver options:
burnfree        Prepare writer to use BURN-Free technology
noburnfree      Disable using BURN-Free technology

and

wodim dev=1,0,0 driveropts=burnfree image.iso

will burn the iso image using burnfree for ya. Sweet!

If you just wanted to mount a DVD/CD and were wondering what device maps to your drive, chances are it is going to be /dev/scd0. Enjoy!

Modem

slmodem

apt-get install sl-modem-daemon sl-modem-source

module-assistant

PC speaker

The built-in PC speaker works right out of the box. This is a problem that needs to be fixed. The PC speaker is so annoying that it is considered harmful to mental health.

Fortunately, one does not have to go to the extreme length of performing a speakerectomy to permantly disable the speaker.

The PC speaker is driven by the kernel module pcspkr. Disable loading the module by running:

# echo "pcspkr" > /etc/hotplug/blacklist.d/pcspkr

Alternatively, disable building the module when configuring the kernel configuration:

CONFIG_INPUT_PCSPKR
Device Drivers -> Input Device Support -> Miscellaneous Devices -> PC Speaker Support


Dell laptop specific tools

apt-get install i8kutils

Install the i8kutils package if you want to turn the fan on and off, to read fan status, CPU temperature, BIOS version and to handle the volume buttons and Fn-keys.

The package includes also a small Tk applet, designed to be swallowed in the gnome panel, which monitors the CPU temperature and controls automatically the fans accordingly to user defined thresholds.

The programs require kernel option CONFIG_I8K to be compiled into the kernel or built as a module i8k.

Performance tweaks

Hard drive

Edit /etc/hdparm.conf to taste.

I recommend enabling direct memory access (DMA) and reading hdparm manpage for further performance enhancing settings.