This page is a copy of c640 maintained here for historical reasons.

Debian GNU/Linux 3.0 on the Dell Latitude C640

Author: Olivier Cappé <comcap at free dot fr>Date: January 2, 2003Revision: November 24, 2003

Thanks to Minh Ha Duong (author of this page on the C640), Mark Furst, Alessandro Suardi, Petter Urkedal and Hans Vaith for updates to the initial version (which are shown in red). Also take a look at this page by Koos van den Hout for more information on advanced network and modem issues [November 24, 2003].

System overview The Dell Latitude C640 is replacing the older C610. The battery life is good (about 3-4 hours) and the weight is very reasonable given the size of the screen (2.5 Kg). Overall, I am quite happy with the way it works under Debian GNU/Linux although I sometimes wish it was 100% silent (from time to time the fan starts and can be disturbing). The main limitations so far are power management and the internal (win)modem.

My hardware settings are

# BIOS Version
# Display
14.1" XGA (1024x768 pixels) TFT LCD
CPU: Intel Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz stepping 07
# Disk
hda: HITACHI_DK23DA-30, ATA DISK drive
# Removable CDRW
# USB (only one port!) (usb-uhci module)
USB Controller: Intel Corp.: Unknown device 2482 (rev 02) (prog-if 00 [UHCI])
Subsystem: Intel Corp.: Unknown device 4541
# Sound (i810_audio module in 2.4 kernels)
Multimedia audio controller: Intel Corp. AC'97 Audio Controller (rev 02)
Subsystem: Cirrus Logic: Unknown device 5959
# PCTel modem (unsupported winmodem, couldn't get it to work with the pctel driver)
Modem: Intel Corp.: Unknown device 2486 (rev 02) (prog-if 00 [Generic])
Subsystem: PCTel Inc: Unknown device 4c21
# ATI radeon video (supported in XFree 4.2)
VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LW (prog-if 00 [VGA])
Subsystem: Dell Computer Corporation: Unknown device 012a
# Network (3c59x module)
Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 78)
Subsystem: Dell Computer Corporation: Unknown device 012a
# PCMCIA (2 slots)
CardBus bridge: Texas Instruments PCI1420
Subsystem: Dell Computer Corporation: Unknown device 012a
CardBus bridge: Texas Instruments PCI1420
Subsystem: Dell Computer Corporation: Unknown device 012a

Note that the system also comes with a floppy drive which may be used instead of the CDRW driver but I never used it.

Partitioning the hard diskThe computer comes with Windows XP Professional installed on a single 28 Gb NTFS partition. At the time of writing, the only tool which claims to be able to resize such a partition is Partition Magic version 7 at least (non-free).

I decided to do it the hard way and reinstalled Windows from the provided CD-ROMs. Believe me: if you are heading for a Debian/GNU Linux install (especially after all the FUD you have heard of about Linux and Debian), you should not be afraid of reinstalling Windows. After inserting the Windows install CD, you are guided to a partition screen (which looks very much like fdisk) where you are asked to press S to delete existing partitions and C to create new ones. I deleted the Windows partition and created a new smaller one (8 Gb) at the beginning of the available space. As NTFS support under Linux is currently limited to reading, I created the new partition in FAT32 (or vfat as it is known in Linux) format. Note that if you change your mind on that, the partition can be converted to NTFS format from within Windows XP with the command convert c: /fs:ntfs (don't loose your time though, the converse is not available).

Note that there is a small (32 Mb) partition labelled "Dell Utility" at the beginning of the disk which I did not suppress (there are thus only two primary partitions left). I don't know what this partition is used for and have read on the web that it was just used for recovery of the original Dell factory install (and could be deleted). After installing Debian/GNU Linux, my partition table looks like this

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1         4     32098+  de  Dell Utility
/dev/hda2   *         5      1024   8193150    b  Win95 FAT32
/dev/hda3          1025      1146    979965   82  Linux swap
/dev/hda4          1147      3648  20097315    5  Extended
/dev/hda5          1147      1268    979933+  83  Linux
/dev/hda6          1269      1754   3903763+  83  Linux
/dev/hda7          1755      3648  15213523+  83  Linux
where hda5, hda6, hda7 are mounted, respectively, on /, /usr, /home and hda3 is the swap (should be four times smaller).

When you are done with the Windows install, insert the Dell drivers CD and install the drivers one by one (NIC, Graphics, Sound and Internal modem).

Installing the system I used the first Debian CD (for release 3.0, aka woody) and the network to install the system. The first step consists in partitioning the space remaining on the hard disk (remember that you only have two primary partitions left, so at least one of them has to be an extended one unless you want to install all the files on a single partition, which is not recommended). After this, there is a menu for installing additional modules, if you plan to use the network card to install some packages (not all packages are present on the first Debian CD), go in the network interface section and selects the 3c59x module (which works despite some warnings). The rest of the install is remarkably easy (there are many questions that are asked upon installing the modules but the default answer is generally safe, use this especially in cases where you don't know what the question is about). This leaves you with a system equipped with a 2.2.20 kernel where everything works (including USB, PCMCIA an the like) except the sound (for which you need the ALSA modules or a 2.4 kernel) and Xfree. You may want to install a more recent kernel like kernel-image-2.4.18-686. If you do so, note that PCMCIA support is not compiled anymore in the kernel (but as modules) which means that you will need to make sure that the modules pcmcia_core and ds get loaded before using PCMCIA cards.

Some tips and tweaking:

With a 2.4 kernel, add
alias sound-slot-0 i810_audio
to /etc/modutils/aliases and run update-modules afterwards. You should
chmod go+rw /dev/dsp; chmod go+rw /dev/mixer
if you want normal users to be able to play sounds.
Hard drive
he best transfer rate I got was using
hdparm -d1 -c1 /dev/hda
which give you 23.5 Mb/s (with hdparm -t).
To burn CDR or CDRW, the CD driver (/dev/hdc) needs to be seen as a SCSI device: do the following (as root), which has been tested on the 2.4.18 kernel:
  • Add append="hdc=ide-scsi" to your /etc/lilo.conf file and run lilo,
  • make sure the ide-scsi module gets loaded (for instance by adding it to /etc/modules)
The CD driver is now at /dev/scd0 which you can check by running cdrecord -scanbus. Additional things you can do are liking /dev/scd0 to /dev/cdrom (required by some programs) and
chmod go+rw /dev/scd0; chmod go+rw /dev/sg0
as without this normal users won't be able to use programs like grip and cdrecord (cdrecord allows for a cleaner way to do the same but grip does not, in addition, as this is a laptop, you will probably be the only user ever logged in so security is not a problem).
PCMCIA modem cards
I tested the following PCMCIA cards 3Com modem/ethernet Megahertz 3CCFEM556 (modem appears as /dev/ttyS1) and Xircom RealPort2 Modem 56 Globalaccess (R2M56GA) (modem appears as /dev/ttyS3) which are both detected correctly by pcmcia-cs. On the second one however (Xircom one), the transfer rate is about half what it should be and you need to run
setserial /dev/ttyS3 spd_vhi
before using the modem to obtain corrects rates.
XFree I did not even try installing the Xfree 4.1 package from the stable (woody or 3.0) Debian distribution since it is reported not to work: You need XFree 4.2. I fetched the Debian package xserver-xfree86 (4.2.1-3 at the time of writing) from the testing (aka sarge) distribution, to fix dependencies problem I had to install a few additional package like libc6 from the same archive. For the configuration, I choose the debconf-managed option which produce a working XF86Config-4 file (the driver is ati, for the monitor sync, I choose 30-60 and 50-75 and the display won't do more than 1024x768), except that you need to make sure NOT to use the frame buffer, you can also comment the
# Option "UseFBDev"
line in the /etc/X11/XF86Config-4 file afterwards. DPMS works fine (and should be used to blank the screen as explained below) and I don't know about DRI (not a gamer).
Power management I only tested the use of APM but the system also supports ACPI (which is used by Windows XP). I have been told that ACPI fails to suspend or even display the battery state [Petter Urkedal with SuSE 8.2, June 25 2003]. APM on the other hand works fine (battery, suspend, cpu speed), except in two respects:
  • When APM blanks the display and the computer is in high-resolution mode (ie. not console), the display gets garbled and the consoles are also affected. Only the display is lost when it happens (which you can check by the network connection, if you have one). It happens in XFree but also when using the frame buffer (radeon_fb module in 2.4.18 kernel) on console (it does not happen with the basic VGA console). You should disable screen blanking in all modes (battery and AC) in the BIOS (in addition, you don't need this because it is done by the X server). Unfortunately, there is no way to prevent screen blanking when closing the lid (the only options offered by the BIOS are suspend or screen blank). Thus, YOU MUST switch back to console before closing the lid (but you don't need to shut down the X server).

    If the screen gets garbled, you should switch back to console (Ctrl-Alt-F1), close the lid and open it again and then switch back to X (Ctrl-Alt-F7, usually). Alternatively, when on console, you can type Fn-D which blanks the screen and then any other key to bring the screen back up (taken from this page).

  • Suspend from the keyboard (Fn-Esc) works fine (including in X) but on resume, the BIOS thinks that the cpu temperature is 85 C and the fan spins out at maximum speed. Whatever you do, the noise will soon drive you crazy and you will have to reboot (which makes suspend not a very attractive option). This is a problem encountered by other users on other Dell (recent) models which is well described here (the same source also mention the keyboard repeat rate problem which I also encountered but this is a minor issue fixable with kbdrate or xset, also you may need to re-run the pcmcia scripts if you have pcmcia cards).

    The Dell support site has a version A07 of the BIOS which makes the problem less frequent but does not completely solve it (still happens after very long suspends). The A08 which is the latest available BIOS upgrade from Dell does not improve on this [Minh Ha Duong, March 17 2003].

    However, the problem IS SOLVED SIMPLY BY TYPING Fn-Z on resume (which makes the BIOS re-read the temperature).

It is nice loading the i8k module and using the tools provided by the i8kutils package which give you information on the system state (cpu temperature, fan speed, etc.) and may be used to turn the fan on and off (but it doesn't provide a solution to the suspend problem mentioned above).
Internal (win)modem The main message here is I could not get it to work. The first trouble is identifying the modem: the Dell drivers CD identifies this as Actiontec MD56ORD V92 MDC Modem Rev. A01, PCTel MDC Rev. A05 and lpsci as Subsystem: PCTel Inc: Unknown device 4c21. I found several sources (eg. this one and also in the pctel compatibility data base) on the web reporting successful use of the pctel drivers for similar devices (I first thought about using the conexant hsf drivers but apparently they are not appropriate for this model). I installed the pctel-0.9.6 drivers as explained here, including the suggested patch (#define PCI_DEVICE_ID_I810_MR_LAPTOP 0x2486 / laptop / in pctel-0.9.6/ptserial/ptserial.c) and with the command
./configure --with-hal=i8xx --with-kernel-includes=/usr/src/kernel-headers-2.4.18/include

I could load the pctel and ptserial modules:

Dec 31 09:10:05 soma kernel: PCTel driver version 0.9.5 [5.05c-4.27.215 (09-14-2001)]
Dec 31 09:10:05 soma kernel: PCTel driver built on [Linux 2.4.18 i686 unknown
"2.4.18 <132114>"] with gcc-2.95.4.
Dec 31 09:10:05 soma kernel: ttyS15 at 0xd400 (irq = 11) is a PCTel
Dec 31 09:10:05 soma kernel: PCI: Found IRQ 11 for device 00:1f.6
Dec 31 09:10:05 soma kernel: PCI: Sharing IRQ 11 with 00:1f.5
but the modem would not dial (it is not a ppp config problem since the same chat script works with the PCMCIA modems). It doesn't sound exactly like and instance of this bug, but anyway that is where I stopped.

There are some reported successes of using the modem with the PCTel drivers, for instance, with RedHat 8.0 and kernel 2.4.21-pre4 [Alessandro Suardi, February 17 2003] (note that the same user reports troubles with IrDA).