SpamapS.org Tux the Linux Penguin

Running Debian GNU/Linux on a Dell Latitude C640

12/30/06 - This page is now listed on the Tuxmobil.org site in the Dell section.

1/29/03 - I have solved a few issues I was having with the C640. Most importantly, I got the suspend/powersave to not totally lock up the machine's video, keyboard, and mouse, upon resuming. This was solved easily somewhere between the A02 and A07 BIOS updates from Dell.

Secondly, upon resuming from suspend, the machine immediately thinks it is at 85 degrees celsius. This causes the fans to run constantly, and slows things down to a crawl(stupid P4M). If you press 'Fn-z' on the keyboard, the machine will re-load some settings from the BIOS and magically figure out whats going on. I am still trying to figure out how to get apmd to automatically trigger this.
I recently received a very nice new Dell Latitude C640 on loan from one of my clients to try out and use as I see fit. This machine is quite a nice upgrade from my previous Toshiba Satellite 4030CDT. Some Specs:

Screen:14.1" 1024x768
Video:ATI Radeon 7500 Mobility, 32MB
CPU:Intel P4M 2.0Ghz
RAM:256MB
Disk:40GB Hitachi
Wireless:Orinoco PCMCIA in mini-PCI slot

I promptly gave the original OS that was installed a pink slip for unsatisfactory performance, and grabbed my Debian 3.0 boot mini-CD. The install went quite well.

Network


The onboard NIC is a 3com 905C.
3Com PCI 3c905C Tornado at 0xec80. Vers LK1.1.16
This is supported by the 3c59x driver in the kernel. Use modconf to load it.

If you opted for the built-in wireless, you will get an Agere mini-PCI card installed in your laptop. This uses the orinoco_cs driver. I used the driver from pcmcia_cs, but the kernel driver *SHOULD* work. Here's how I did it though:

In the kernel, I turned off all pcmcia. I went to Network Devices, Wireless. I made sure none of the cards there were enabled(especially Orinoco). I built the kernel then, using 'fakeroot make-kpkg --revision=lap1.3 kernel_image'. If you're not familiar with Debian, this builds a kernel .deb package for easy installation.

I then did 'apt-get install pcmcia-source'. This places a file, pcmcia-cs.tar.gz in /usr/src. tar zxvf pcmcia-cs.tar.gz gives us a modules/pcmcia-cs directory. If we return to our kernel source tree, we should be able to do 'make-kpkg modules' and it will build the external pcmcia-cs .deb for us. So this is what I have now:

-rw-r--r--    1 clint    src       5813656 Nov 19 22:49 /usr/src/kernel-image-2.4.19-i4_lap1.3_i386.deb
-rw-r--r--    1 clint    src        360458 Nov 19 22:57 /usr/src/pcmcia-modules-2.4.19-i4_3.1.33-6+lap1.3_i386.deb

Once these two were installed, I rebooted, and like magic, eth1 was now the orinoco.

Unfortunately, Woody's wireless-tools package seems to be out of date. I'm not sure how to correct this. I don't use WEP normally, and for the one location I do, I have to use a different adapter because it requires 128-bit WEP (the orinoco in the Dell only supports up to 104 bit). Watch this space, as I may have a solution in the future.

Sound

The sound is an Intel i810 chip. I tried both i810 drivers, and only i810_audio worked properly. I had some odd sounds with music playing too quickly or slowly at first, but they went away before I could add any params to see what was going on. I simply ran 'modconf' and added the module to the kernel.

Video

This was the largest problem I had. Debian 3.0 installs with XFree 4.1.0, and so, does not have proper support for the Radeon 7500. However, I was fortunate enough to find some XFree 4.2.1 packages for woody here:

http://people.debian.org/~blade/woody/i386/

I answered the questions with some pretty basic answers during installation, here they are:

NOTE: These work for me. The wrong refresh/sync rates may cause damage to your LCD. Use these settings *AT YOUR OWN RISK*
Manage X config with debconfYes
Desired X server driverradeon
IdentifierRadeon 7500 Mobility
Bus ID[left blank]
Amount of Memory[left blank]
Use Kernel FramebufferNo
[Defaults until ...]...
Mouse port/dev/psaux
Entry that best describes mousePS/2
Emulate 3 buttonYes
Scroll eventsYes
Monitor IDC640 LCD
Is monitor LCD?Yes
Advanced or BasicAdvanced
Horizontal sync range28-50
Vertical refresh range43-75
Modes1024x768,800x600
Depth24
ModulesGLcore,bitmap,dbe,ddc,dri,extmod,freetype,glx,int10,record,speedo,type1,vbe
Write default Files sectionYes
Write default DRI sectionYes

After the file /etc/X11/XF86Config-4 was created, I edited it so I could have support for my USB mouse.

Section "InputDevice"
  Identifier      "Generic Mouse"
  Driver          "mouse"
  Option          "SendCoreEvents"        "true"
  Option          "Device"                "/dev/input/mice"
  Option          "Protocol"              "ImPS/2"
  Option          "Emulate3Buttons"       "true"
  Option          "ZAxisMapping"          "4 5"
EndSection

Section "ServerLayout"
  Identifier      "Default Layout"
  Screen          "Default Screen"
  InputDevice     "Generic Keyboard"
  InputDevice     "Configured Mouse"
  InputDevice     "Generic Mouse"
EndSection

I also had to add the kernel modules 'input', 'usbmouse', and 'hid' to get this working whenever I plugged in my Logitech optical USB mouse. These can be added using 'modconf'.

UPDATE 3/23/03 - Ok, so I wanted 3D acceleration on this machine, but didn't have it with the setup above. I got it working, however, with the GATOS drivers, available at http://gatos.sourceforge.net. The instructions there are fairly clear, except that the 4.2.0 drivers *do* work with XFree86 4.2.1 as well (which is what you'll have installed if you followed my instructions above).

One note they don't mention is that your kernel needs to be compiled for P4, with CONFIG_MPENTIUM4. If it is set to CONFIG_M386 , you will not have the cmpxchg() function, and the drm drivers will fail. This can be done in the kernel configuration under the "processor type and features" section. If you're using a stock debian kernel, make sure it is the -686 version, not the -386.A

Once you have the drm drivers installed, and the gatos drivers installed, you can test with the glxgears program. If you have full acceleration turned on you should get about 430fps(make sure the window is not behind any other windows. I also noticed that XVideo playback (such as in mplayer) is smoother, and the windows move around more fluidly now.

Utilities

There is a debian package to help you control your fans and see the CPU temperature on the laptop. Its name is 'i8kutils'. I run i8kmon all the time to help manage the fans in the box.

Problems

By this time you may be noticing that there are some small bugs in the video acceleration code. I don't know what to do about them. Enlightenment seems especially hard hit, with the window animations wreaking havoc all over my screens. That said, these are just temporary moments of forgetfullness on the driver's part. Repaint the screen to fix the mistakes.

File last modified September 23 2010 05:22:26 AM PDT
Copyright Clint Byrum, 2010. All Rights Reserved.
Created using VIM  - Snowboards For Sale Spoon!
Powered By CentOS foobar Valid HTML 4.01!hosting Powered by PHP