Linux on a Dell Latitude CP M233XT

RedHat 7.0, kernel 2.2.16-22, XFree86 4.0.1

Steve D. Sharples

Fedora Core 2 brief details added 6 Sept 2004
Thanks to John Veysey for Fedora Core 2 install details

Last update: 6 September 2004... see note below for what's new...

Random link: Communicating with VXI11 Ethernet Devices from Linux (How to talk to your Agilent or Tektronix Scope from Linux over LAN)
Random link: Linux Drivers for Agilent Infiniium Oscilloscopes (built on the VXI-11 protocol and user library)
Random link: Linux Drivers for Tektronix Oscilloscopes and Arbitrary Function Generators (built on the VXI-11 protocol and user library)
Random link: TCP/IP Control of a LeCroy DSO with Linux
Random link: Agfa Snapscan 310 Scanner with Linux
Random link: strip_nl: newline (CR) stripper
Random link: Eagle PCB -> LPKF Milling Machine Mini-How-To
Random link: Installing PCI230/PCI260 Comedi driver on a RedHat 9 system (PDF)
Random link: The steve (a new unit of measurement)

Update: Fedora Core 2 installation

I was contacted by email by a nice bloke called John Veysey who wrote to thank me for this website, and to give me details of installation of Fedora Core 2 on his Dell Latitude. Although I no longer have the laptop (it's still being used somewhere, I think it has Debian on it) I'm very happy to pass on his installation experience. Here's a copy of the email he sent me (reproduced with his permission):


Hi Steve,

You're more than welcome to put the contents (w/o the address :) of my email up on your site. Basically, my Fedora Core 2 experience can be summed up in three points:

(1) It's generally easier than it used to be.
(2) To get the "fn" key to work, you need to pass "acpi=off" to the kernel at boot
(3) The sound is a bear, but works when you use the following modprobe.conf file:

---------------------------
alias char-major-116 snd
alias snd-card-0 snd-cs4236
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
options snd snd_major=116 snd_cards_limit=1 snd_device_mode=0660
snd_device_gid=29 snd_device_uid=0
options snd cards_limit=1
options snd-cs4236 index=0 id=CARD_0 port=0x530 cport=0x210
mpu_port=0x330 fm_port=0x388 irq=5 mpu_irq=9 dma1=1 dma2=-1 isapnp=0

----------------------------------

Thanks for keeping the site up as a public service!

John Veysey


So there you go!

What follows is the original (old) site, concerning install of Redhat 7.0, which was last updated 23 July 2001.


Click here if you just want the XF86Config-4 file: it's for XFree86 4.0 (won't work on 3.x)

Pre-amble: skip this if you like

Introduction

There seems to be lots of info about putting old versions of Linux (earlier than 2.2) on old laptops (circa '96 - '99), or new versions on new laptops, but not many about putting new versions on old(er) laptops. Not that the Dell Latitude is very old (mine was built in '99, I think). I've previously successfully put RedHat 6.2 onto an IBM ThinkPad 760EL, and I'm very sorry I didn't write a web-page about it. But by the time I came round to thinking about it, I'd forgotten what I did. I think everything I needed was available via the Linux on Laptops site though.

It seems quite logical to want to put a new Linux release onto an older machine, because for a lot of people it's either an old second-hand machine or nothing. Or you might just want to experiment with Linux if you're unfamiliar with it. Problems arise when your old hardware is no longer supported by default in the latest distribution. This hasn't happened yet for the Dell Latitude.

I bought my laptop off ebay.co.uk... it was sold with a faulty screen, which I managed to "fix" by taking it all appart, blowing on it, running a pen top along some of the components, and putting it back together again. Fingers crossed... I use it for writing up reports (it has a great keyboard) and I needed a laptop because I live on a narrowboat without any mains voltage... and on that note, www.battery.co.uk is the place to go for batteries, mains chargers and, importantly for me, car adapters (allows your laptop to run off 12 volts). I wanted to have a dual-boot system... the possibility of playing games against friends appealed to me, maybe one day I'll buy that network card...

Me and Linux - Background

I've been using Linux for about a year now at work, in the School of Electrical and Electronic Engineering in the University of Nottingham, UK. I'm partly self-taught, and had quite a bit of help from my colleague Matt, who's been using Unix for a bit. We originally used Linux on an old Pentium P90 computer that was controlling lots of expensive hardware in a large optical experiment. Data had to be read in in real-time, whilst also controlling moving stages and doing some computation. It was very important for the machine not to slow down if, say, a screen saver appeared, or a virus checker decided to pop up. You can imagine the fun we had with Windows. DOS served us well for a bit, but we wanted to display the data as it came in, and control the experiment from another room and... well, Linux seemed the obvious choice. Linux is now used on all the machines that I work on.

I mention all this because I want you to be aware that, as a relative novice, I'm not completely genned up on all the intricacies, or even the proper way of doing things... but I'm willing to edit just about any config file just to have a go. If I describe anything here that's fandamentally wrong, or there's a much better way of doing it, then email me, and I'll correct it: "Steve Sharples" steve.no.spam.sharples@no.spam.nottingham.ac.uk (remove the no.spam). Another thing to mention is that I only have experience of RedHat Linux (versions 6.0 through to 7.0) and I'm never completely sure if something is a Linux thing, or a RedHat thing. Again, let me know.

Laptop Specifications

The specs for the Dell Latitude CP are available at the Dell support website . My machine is not much different from the basic spec:

Pentium I 233MHz MMX
64Mb RAM
13.3" XGA (1024x768) TFT screen
4Gb HD
NeoMagic 2160 128-bit video controller
Crystal 4237B audio controller
American keyboard
CD ROM or floppy (don't have a lead to attach both at once)
 

Pre-Install

The machine came with Windows 98 already loaded on it, and I thought I might as well keep it. The aim therefore was to make a dual-boot machine.

It's a little confusing how to do this, but I think I've got it sussed now. The idea is to create another partition, the size you want your Linux partition. But when you create it, It's not actually a Linux partition, so during the install you delete it, and put your Linux partitions (swap, root, and /boot) in the space it leaves behind.

So within Windows, I ran Scandisk, then de-fragmented the drive to shuffle everything to the start of the HD (about 600Mb). I then made a DOS boot disk, and copied FIPS, a DOS partitioning utility, onto it, from the Redhat 7.0 CD (/dosutils/fips20/....). If you've only got your laptop (no other computers) this involves a bit of shuffling the CDROM and floppy bays about. Apparently they're "hot-swappable," but I'm not brave enough to try. I then rebooted the machine into DOS using the floppy I'd just made, and ran FIPS.

Information on how to use FIPS is available in the RedHat Reference Guide (Appendix D... funny place to look for the first thing you need to do, but hey) available from the Red Hat support site. I'll include it here later when I've time, for completeness. Myself, I split the HD down the middle. Perhaps I'm being a bit generous to Windows... that leaves 2Gb available for Linux. I'm generally of the opinion that you should install everything you think you could possibly need at the start, and delete stuff you don't need later when you're short of space. The rpm system allows you to do this relatively safely.

Once FIPS had created the 2nd partition, I turned the machine off and plugged in the CD ROM drive. I had to go to the BIOS setup page (Fn-F1) to set the boot order to boot from the CD before the HD, but once this was done, I was ready to boot from the RedHat CD.
 

Installation (RedHat 7.0)

A text screen appeared, giving options about methods of install. I thought I'd try my luck and go for a GUI install and just pressed enter... joy of joys, after a little while, a welcome screen appeared!

Language: English

Keyboard model: Generic 101-key PC
Keyboard layout: U.S. English w/ deadkeys, and deadkeys enabled (*** SEE NOTE LATER ON ABOUT THIS)

Mouse: Generic 2-button mouse (PS/2), and Emulate 3-buttons

Install-type: custom system

Manual-partition with Disk Druid

I then deleted partition hda2 (the extra one made with FIPS) and added the following:

/boot, linux native format, asked for 16M (got 19M)... became hda2
<swap partition>, linux swap format, asked for 128M (got 129M)... became hda5
/ (root), linux native format, asked to fill the rest of the disk, got 1854M

Chose to format both /dev/hda6 (/) and /dev/hda2 (/boot) but didn't bother to check for bad blocks when formatting (Scandisk and de-fragmenter, bless 'em, did this)

Lilo config: chose not to create boot disk (don't have floppy drive at this point) but kept all the other options the same

Time: chose London, didn't use "System clock uses UTC".

Made a root password, and a couple of users (myself and a guest)

Authentication Configuration: I left this alone, since I didn't know what it was, and I don't have a modem/network card (yet)

Package group selection:

... all came to 964M !!!

... think I'll probably delete some of that later...

X configutation:
Redhat 7.0 comes with Xfree86 4.0.1 Previously I'd used 3.3..., but upgraded to 4.0.1 on my computer at work, since the ATI Rage 128 wasn't very well supported below 4.0.

Monitor: chose Generic: Generic LCD Panel 1024x768
(horiz sync: 31.5:48.5 (kHz); vert sync: 40-70 (Hz) )

It then recognised I had a Neomagic (laptop/notebook), and I selected 2048k of video memory. I then clicked "Test this configuration" and wehey! it worked! Since I was quite confident of it working, I selected "Use graphical login" and "Customise X Configuration"

In this screen I selected (in 16 bits per pixel) 640x480, 800x600 and 1024x768 ... you never know, I might need low res one day (for projectors etc)

And that was it!

Install took about 40 minutes.
 

Post-Install

Well, the laptop rebooted beautifully. There's still a few things to sort out, though.
 

Hostname

Even though the laptop isn't connected to anything, I still think it's useful to give it a hostname. I decided to call mine pillow. I did this by editing/creating the following files (as root)

/etc/hosts
previously said:
127.0.0.1    localhost.localdomain    localhost

I changed this to: (*** SEE NOTE LATER ON ABOUT THIS)
127.0.0.1    pillow    localhost.localdomain    localhost

/etc/HOSTNAME
new file, just says:
pillow

/etc/sysconfig/network
previously said:
NETWORKING=yes
HOSTNAME=
GATEWAYDEV=
GATEWAY=

I changed the second line to (can you guess?):
HOSTNAME=pillow

... then I rebooted.
 

Sound

The "quick-n-easy-but-not-very-good" method...

I ran sndconfig (as root). It's a terminal-based program, but seems to run ok from within a terminal window within X (though it advises you not to)

It does not automagically detect the sound card, but that's ok. From the list, select
Crystal CS423x sound chip
and select the following magic numbers: (obtained from another "Linux on Dell" site, http://www.acqualan.com.br/misc/cs4237b.html)

I/O PORT:    0x530
IRQ:         5
DMA 1:       1
DMA 2:       0
MPU I/O:     0x330
MPU IRQ      7

Ok, well now I can hear the sound, but there's a very annoying click at the start of every sample, as noted in the link above. Not very satisfactory, and I'd like to get it working without any kind of kernel configuration.
 

The "actually works" method...

The link above apparently gets it working, or there's http://www.pihl.org/linux/linux-dell.html (this link is now broken).
I'm going to have a go at this myself when I get time.


9th March 2001: Ok, that's it for now, other stuff I'm gonna look at is the APM thing (currently I can't recover from shutting the lid), customising the graphical login page (not really Latitude-specific) and maybe adding a network card if I ever get round to getting one. Early days...



 

Network

I bought an ethernet card! It's a PCMCIA 3COM Eltherlink 3 10 Base-T and coax. I just plugged it in, and hey presto! At the boot-up stage, when it got to "initialising PCMCIA" the laptop went "beep" and the little green light on the cable lit up! Well impressed. Once booted, as root I ran linuxconf, and set the host name from just pillow to pillow.my.work.domain (under "basic host information") also in the Adapter 1 section. Also in that section I gave it an IP address and a netmask, which I just copied from my desktop machine. "Net device" is set to eth0, and there is nothing in the "Kernel module" section, which I was a bit surprised about. Still within linuxconf, I told it the IP adressed of our local DNS servers, and the default gateway. Then I quit linuxconf, activating the changes as I went. I think at that point I could telnet, ftp, and browse the web... it really was that simple!

The next time I turned on the laptop when it wasn't connected to the network, it failed at initialising the line printer daemon, lpd... I think it was having trouble finding the IP address of localhost (though I could be wrong). I edited /etc/hosts, which had changed from what I had written above, presumably by linuxconf, so there was now no entry for localhost. the new /etc/hosts file now reads:

127.0.0.1     localhost.localdomain         localhost
xxx.xxx.xx.x  pillow.my.work.domain         pillow

This seemed to keep lpd happy the next time I rebooted.
 

Keyboard

When I first installed, I selected an "international keyboard" and "enabled dead keys." This had the effect of having to press certain keys (eg ' and ` ) twice before they appeared, which I didn't like at all. It took a little while to work out what to do to change this, but it was quite easy in the end, I simply altered a line in /etc/X11/XF86Config-4: it used to say:

    XkbLayout   "us_intl"

I changed this to read:

    XkbLayout   "us"

This did the trick, once I had restarted X (ctrl-alt-backspace)
 

Closing the lid

Hmmm, never got the suspend thing to work, but as a half-way solution, I altered BIOS settings in the laptop (Fn-F1, 4th page). For both AC and Battery, I changed the "Display Close" option from "Suspend" to "Active"---this has the effect of turning off the screen when you close the lid. Not nearly as much battery-saving as suspending, but I think it helps a little bit.
 

Memory

The maximum amount of memory in the machine is 128Mb, on two 64Mb cards. After a little finding out, the machine takes 66MHz EDO SODIMMS; SDRAM SODIMMS just will not work. Am still looking for another 64Mb card.


11th April 2001: That's it for now. It's been quite encouraging seeing the number of people who've looked at this site since it was added to the "Linux on Laptops" site---I hope it's useful to some people. I'll try and get the sound and APM thing working properly at some point. Cheers!  Steve.



"New" stuff (oops)

Well, not very new actually... I'm a bit embarrassed about this, I should've put this info on here ages ago.... sorry!

Back in April I got a couple of emails of a very helpful bloke called Trevor Powell. Although I haven't gotten round to checking out the things he suggests, the information might be useful to other people. His emails are as follows:


First email

Hi, Steve -- I'm another Latitude CP M233XT owner running Linux; I thought I'd share some of my discoveries with you. Feel free to add any of these thoughts to your web page.

On disk partitioning:
Dell likes to use a hidden partition for 'suspend to disk' mode. If you remove that partition, then you won't be able to suspend to disk. So if you're doing a full re-format and re-partition of your hard disk in preparation for a full Linux install, don't touch that 'hidden' partition!
On APM:
I've never gotten 'suspend to RAM' working, and did the same thing you did -- I switched the BIOS setting from 'Suspend' to 'Active' when the display closes. (I find the display never turns back on after a suspend to ram.. if you hear from anyone who's managed to get this to work, I'd be quite interested to hear what they've done!)

On the other hand, I _did_ get 'suspend to disk' working without any trouble whatsoever. The command is 'apm -s', if you have apmd installed and apm support compiled into your kernel. After suspending, close the laptop's lid. When you open the lid again, it should resume. Sometimes, though, the laptop doesn't resume properly when the lid is opened (I'm told that this has to do with the delay between the resume event and the contacts in the laptop's catch that determine whether or not the screen is closed). In any case, if the computer doesn't resume simply by opening the lid, you can force a resume by touching the power button above the keyboard. (A quick tap -- Holding it down for too long will cause a restart!)

On sound:
As you point out on your website, the only real solve for sound on this make of laptop is ALSA. The Crystal Semiconductor chipset does have a SoundBlaster emulation mode (which I briefly got working), but it's emulating a SoundBlaster 8 (!), so the sound quality is very low.

Unfortunately, ALSA cannot autoprobe the CS chipset to determine DMAs, IRQs, and those other magic numbers required to produce sound natively. This means that you need to go searching around in Windows, or on the web to try to find these numbers. In my case, I had removed Windows and so couldn't do that. And my search on the web was made more difficult by the sheer number of different configurations that the CS chipset was distributed with even on different makes of the Latitude CP line! However, after about two weeks of searching and trial and error, I found settings that work flawlessly for me.

I'm running ALSA version 0.9-ish, which is probably more recent than whatever you'd get from RedHat packages, but the setting names should be similar or identical. Hopefully, since we're using the same model computer (although your screen is larger than mine -- I didn't spring for the 13" model, but got the 12" instead, and am now kicking myself and thinking about buying a new laptop with 1024x768 resolution capability), these numbers will work for you when you decide to take the plunge and give ALSA a try.

(Notice that the numbers I have are subtly different from the ones published on the CPi D266XT configuration page that you reference.. his configuration didn't work for me, but I'd be curious to know how you go with it!)

Hope all this helps!

Trevor Powell

--- begin quoted modules.conf

#ALSA portion
alias char-major-116 snd
#OSS portion
alias char-major-14 soundcore

#MORE ALSA
alias snd-card-0 snd-card-cs4236
options snd-card-cs4236 snd_index=0 snd_id=CARD_0 snd_port=0x530 \
snd_cport=0x210 snd_mpu_port=0x330 snd_fm_port=0x388 \
snd_irq=5 snd_mpu_irq=9 snd_dma1=1 \
snd_dma2=-1 snd_isapnp=0
#MORE OSS
alias sound-slot-0 snd-card-0

#YET MORE OSS
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

options snd snd_major=116 snd_cards_limit=1 snd_device_mode=0660 \
snd_device_gid=29 snd_device_uid=0

--- end quoted modules.conf


Second email

I don't recall exactly what I said in my initial comments, but in case I didn't mention this issue, I'll do so now (since it may cause trouble for you when you do experiment with APM).

If you go into 'suspend to disk' mode while a network interface is up, you're liable to run into problems -- either you won't be able to resume, or the network interface won't work after you've resumed. This is a very common problem that affects many makes of laptops, so most distributions and recent releases of the APM daemon set up their suspend/resume scripts to automatically take down/bring up network interfaces immediately before/after suspend/resuming. But you should be aware of this issue, in case your particular version doesn't do this, so you can put together your own solution.

(I run Debian Linux, for example. Version 2.0 didn't set up the scripts to do this, but version 2.1 now does. If you're running a recent RedHat release, I assume that they've set up these scripts for you.)

Trevor


Third email

Hi, Steve -- I've happened upon a way to get APM Standby mode to work successfully for me, and thought you'd be interested..

(APM Standby == suspend to RAM, in Dell parlance, and is what you get if you set 'Display Close' to 'Suspend' in your BIOS)

Here's what you do: In your XF86Config-4 file, add this option:

Option "XaaNoSolidFillRect"

Then restart your X server (I like control-alt-del for this), and you should then be able to successfully go into/out of standby mode at any time by closing the display (if you set that up in your bios), or by giving the command 'apm -S' as root.

I've noticed a minor speed penalty from this option, but not enough to worry me.

Trevor


Trevor, if you're reading this... thanks very much for taking the time to write to me back then, and sorry I didn't get round to putting your info on the site. If you'd like me to stick your email address on as well I'd be more than happy to do that, but didn't want to without your permission.