Arzie's site

Introduction

And here's another page on how to run GNU/Linux on a Dell Latitude C640 laptop. I'm using Gentoo Linux, but most of the information below can be used with other distributions as well.

I tried to be as comprehensive as possible, gathering information from other pages about running Linux on the C640.

If you need info about running Linux on laptops in general, have a look at Tuxmobil.

Update: I've sold the laptop, so there won't be any new information on this page.

Specifications

My system is configured as follows:

Kernel (2.4)

Almost all the time I recommend compiling your own kernel, because then you'll only have the necessary parts built in. It saves space and is a tad faster, because it can be compiled optimized for your CPU.

My kernelconfig is included below, at the Files section. You can use it as a basis and customize it to suit your needs. To name some of the options I use (this is not a verbose list of everything needed, just some unusual choices and tips):

Kernel (2.6)

At the moment I'm using the 2.6 version of the kernel, which works very well with the C640. I even removed the 2.4 kernel (so I probably won't update information about it anymore)!

I did change some options, like using ATAPI CD-burning instead of using SCSI-emulation.

Framebuffer console

Because on TFT's only the native resolution looks beautiful, we want to use it in the console. To do this we can use the framebuffer. As you can see in the kernelconfig, I've compiled in support for the VESA framebuffer.

To get the framebuffer to use to correct mode (1400x1050 in our case), we need to supply it some arguments via the kernel-line in the Grub configuration file:

vga=0x343 video=vesafb:mtrr,ywrap

The first parameter is the modenumber to be used, 0x343 is 1400x1050 at 24-bit color. If you want 16-bit color, the number is 0x342. The second parameter specifies some extra options for the VESA driver, mtrr adds some speed, ywrap gives smooth scrolling, which looks pretty ;-).

Sound

The default soundsystem in the 2.6 kernel series will be ALSA. In 2.4, it was a separate package, in 2.6 the drivers come with the kernel.

The Crystal CS4205 soundchip will work as an Intel 810-compatible AC97 soundcontroller, the ALSA-module for it is called snd-intel8x0. There are no noticeable differences between the drivers, they both work fine. Unfortunately, it's still not possible to play multiple soundstreams simultaneously (maybe the hardware just isn't capable of it), so there still is need for a software mixer (like aRts or eSounD).

Modem (2.4)

After reading some other sites about this laptop I got the impression that it would become hard to get the modem running. It's a PCTel 2304WT V.92 Winmodem and after some searching I came across the Unofficial PCTel Winmodem under Linux site. It contained a pctel-0.9.6 driverpackage, which I downloaded and compiled. You have to supply the type of chip used, in this case the i8xx version:

./configure --with-hal=i8xx
make
make install

Everything compiled correctly, but I ran into problems, because Gentoo uses the GCC 3.2 compiler. When trying to insmod the pctel-module my system complained about the module being compiled with a GCC 2.x compiler, whilst the rest of the system was compiled with the 3.x version of it. I'm sure the modules were also compiled with the 3.2 version, but my system kept complaining, so I had to use the -f switch:

insmod -f pctel
modprobe ptserial

Now the modules were inserted correctly. I then set up a PPP connection, which after some fiddling worked great. Connect speeds of nearly 56k bps, so I'm happy! One note though: the soundcard cannot be used while using the modem. After unloading the abovementioned modules, I have to play with the volume levels to get sound working again.

Modem (2.6)

For the 2.6 kernel, you need the modem driver from SmartLink, which is available at their site. After compiling and installing the driver, you have to "modprobe slamr". This inserts the module into the running kernel. Now you have to run the slmodemd program, which came with the SmartLink driver. In my case it's "slmodemd /dev/slamr0". It'll create a /dev-entry, which you can specify as the modem device in the software using the modem.

I tested it without having a cable plugged into the modem and got a "NO CARRIER", so I suppose it works ;-).

XFree86 (2.4)

As stated in the kernel section I compiled modules for DRI-support. These were overwritten by a newer version contained in the xfree-drm package. In my XF86Config I chose the radeon-driver, which works nicely. I get around 530 fps in glxgears with this configuration.

The second important thing is the configuration of the pointer devices. The external USB mouse is added with the AlwaysCore option, so it works whenever it's plugged in. For the touchpad/-stick combo the standard mousedriver can be used, but to get some more advanced features you have to use the synaptics driver. It can be downloaded from the Synaptics Linuxdriver page. I just copied the given options, as they work about the same as the default configuration of the Windowsdriver:

Section "InputDevice"
	Identifier	"touchpad"
	Driver		"synaptics"
	Option		"Device"		"/dev/psaux"
	Option		"Edges"			"1900 5400 1800 3900"
	Option		"Finger"		"25 30"
	Option		"MaxTapTime"		"20"
	Option		"MaxTapMove"		"220"
	Option		"VertScrollDelta"	"100"
	Option		"MinSpeed"		"0.02"
	Option		"MaxSpeed"		"0.18"
	Option		"AccelFactor"		"0.0010"
EndSection

XFree86 (2.6)

In the 2.6 kernel support for the Synaptics touchpad is built-in. When I started X without changing my XF86Config, it acted totally screwed-up (scrolling the wrong way, drawing circles with your finger resulted in elliptical mouse-movement, et cetera). So I modified it a little and now it works fine:

Section "InputDevice"
    Identifier	"Touchpad"
    Driver	"synaptics"
    Option      "Device"        "/dev/input/mouse0"

    Option      "LeftEdge"      "1900"
    Option      "RightEdge"     "5400"
    Option      "TopEdge"       "3900"
    Option      "BottomEdge"    "1800"
    Option      "FingerLow"     "25"
    Option      "FingerHigh"    "30"
    Option      "MaxTapTime"	"180"
    Option      "MaxTapMove"	"220"
    Option      "VertScrollDelta" "100"
    Option      "MinSpeed"      "0.02"
    Option      "MaxSpeed"      "0.10"
    Option      "AccelFactor" "0.0010"
		 
    Option	"SHMConfig"	"off"
EndSection

The trackpoint is seen as a separate device, it works when configured as a normal PS/2 mouse:

Section "InputDevice"
    Identifier	"Trackpoint"
    Driver	"mouse"
    Option	"Device"		"/dev/input/mouse1"

    Option	"SendCoreEvents"	"true"
    Option	"Protocol"		"IMPS/2"
EndSection

In order to get X to use 100 dpi, the screen geometry has to be entered manually:

Section "Monitor"
    Identifier	"TFT"

    HorizSync	30-75
    VertRefresh	60-75
    
    Option	"DPMS"
    DisplaySize	357 267 # override values for 100 dpi
EndSection

Have a look at the complete XF86Config file in the Files section for more information. It's also more up to date.

DVD

I added DVD-support to my USE-flags, so every package which supports DVD in any way is compiled with DVD-support. To test it I threw in the 'Lord of the Rings - Fellowship of the Ring' DVD and fired up gmplayer. It worked instantly, so I now have a use for my laptop while travelling!

CD-R/-RW burning

The software I installed for this purpose is k3b, it looks a lot like Ahead's Nero for Windows, which I like. The Audio CD I burned with it worked perfectly.

i8kutils/i8krellm

The i8kutils and i8krellm are utilities designed to make use of some features of Dell laptops. They need the i8k kernel module to be loaded. i8kutils consists of the following programs:

Below is the i8kbuttons-command I use at startup. The mute-command isn't very elegant (it just lowers the volume to 0), so unmute doesn't work yet.

/usr/bin/i8kbuttons -u "aumix -v+10" -d "aumix -v-10" -m "aumix -v-100"

i8krellm monitors the two fans and the CPU temperature and lets you change the fan-policy.

Power management

After hearing that the ACPI-subsystem was improved a lot in the 2.6 kernel, I tried it, but unfortunately it still doesn't work completely. The main issue is it not being able to enter and resume a standby/suspend mode correctly, and this is pretty imported for a laptop. On the other hand, ACPI gives a lot of information in the /proc/acpi filesystem, which is very interesting to look at ;-).

So I switched back to APM, which works fine. It enables the Fn-keycombinations (you can get a list of them with Fn-F5).

For suspending to disk, I use Software Suspend 2. It works fine.

Normally I compile as many drivers into the kernel as possible, but the USB-driver started spewing errors after a resume, so I compiled it as a module instead. When unloaded before a suspend and loaded after resuming it continues working correctly, so I wrote a script for that as well. It also takes care of restarting PCMCIA, so my network connection is automatically restored after a resume. The script is called devices and can be found in the Files section as well.

Author: Robert Zwerus, arzie at dds dot nl