Rubins Homepage

Hi there

  • Increase font size
  • Default font size
  • Decrease font size

Debian Linux on a Dell Inspiron 8200

Print
Dell Inspiron 8200I have a Dell Inspiron 8200, and found James Strandboge's webpage on the Inspiron 8200 very valuble. It seems to be down recently (and was being hosted on a dialup) so I am mirroring a copy here in case anyone needs it, along with my own (2.6.8 kernel with pre-emption, acpi and reliable swsuspend) advances:

How to Configure a Dell Inspiron 8200 Laptop

Version 0.5.2 -- last updated 9/12/2004: Added my experiance using 2.6.8 kernel and swsuspend -Rubin Version 0.5.1 -- last updated 6/29/2004: Grammtical errors, updated firewire section and new firewire.sh script
Version 0.5.0 -- last updated 6/18/2004: Rewrote with latest configuration

James Strandboge This e-mail address is being protected from spambots. You need JavaScript enabled to view it
With additions by Rubin

Hardware

15.0" SXGA
32MB Nvidia GeForce2 Go
256MB Ram (upgraded to 512MB from http://www.crucial.com)
30GB hard drive (upgraded to IBM Travelstar 40GNX 40GB 5400rpm 8MB cache hard drive-- great performance)
TOSHIBA CD-RW/DVD-ROM SD-R2102, ATAPI CD/DVD-ROM drive
Floppy
3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78) Ethernet
Intel Corp. 82801CA/CAM AC'97 Audio (rev 02)
Intel Corp. 82801CA/CAM AC'97 Modem (rev 02)
2 USB ports
1 Irda port
1 Serial port
Parallel Port
Port Replicator port
SVGA video out
TV Out
PS/2 port
2 PCMCIA slots
1394 Firewire port
Alps Glidepad/Stickpoint Touchpad
2 Type 66Whr 4460mAh High Capacity 8 Cell batteries (don't get the 3800mAh like the Dell site recommends)


Preface

In general, I have found this to be a good laptop, with a few caveats. You get a very full featured laptop at a reasonable price, and it has served as a complete desktop replacement for me.

That said, I have had two hardware problems that required servicing:
  • The touchpad became very erratic at times, and I couldn't figure out what was causing it. After having it replaced, it works fine, with the exception that a few times a day it decides to 'reset' itself, and puts the cursor in the upper right hand corner. This is annoying, but apparently normal for this laptop (under any operating system).
  • I had the screen replaced because of 'dark spots' on the screen. These are not dead pixels, but areas the size of a fingertip to the size of the palm of my hand that are not as bright as other areas. I had the LCD screen replaced, and now never close lid while the laptop is running. I have not had this problem since.
(Note: I have not experianced either of these bugs in my inspiron. -Rubin)

The screen and fonts are crystal clear at 1400x1050 (I use 1600x1200 -Rubin) and it has good 3D acceleration. I initially wanted a laptop with an ATI card, since there are free drivers available, but the price was so good on this laptop that I couldn't resist. The Nvidia drivers have been very stable for me (see configuration below) and I do not have any complaints so far. Newer versions of XFree86 contain a 2D driver to support this card, and I have documented its use here. The i810 sound works well for my uses. PCMCIA works great and power management is done with APM (as opposed to the newer ACPI). The information contained in this document has come from postings I found at This e-mail address is being protected from spambots. You need JavaScript enabled to view it and personal trial and error.
(Note: I have found that with the binary nvidia drivers, you cannot "suspend" or hibernate the laptop which IMO is unacceptable for a laptop however, the x.org/xfree86 "nv" drivers work reasonably, and with the 2.6.8 kernel with acpi the "half screen virticle shift" problem has stopped hapning to me -Rubin)

This document does not cover in depth installation of GNU/Linux, though tips are sprinkled throughout. The purpose is to discuss configuration of GNU/Linux (specifically Debian) on a Dell Inspiron 8200, and hopefully what I have done will help others.


Disclaimer

Everything contained on this page is what worked for me. Use all information at your own risk, for I(/we) am not responsible for any loss of data, damage to hardware or any other liability as a result of using the information contained in these pages. Keep in mind that not all Inspiron 8200s have the same hardware, and therefore this information may be inaccurate.


Installation

I initially installed Debian GNU/Linux unstable on this machine, but then installed Debian GNU/Linux Woody. Woody is quite old now, so I installed my Gnome 2.2 Backport for woody. In addition to a more up to date desktop, the backport includes XFree86 4.2.1 (see below for its configuration). I do everything on this laptop and it has been rock solid under this configuration. I recommend it to anyone who needs to do real work.

Boot Options:To install Debian GNU/Linux, put in the Debian GNU/Linux CD-ROM, and at the boot prompt type:

bf24 noapic video=vga16:off

This boots a 2.4 kernel (which allows you to format partitions as ext3) and makes sure your computer is stable (apic doesn't work well with Dell laptops in general-- newer kernels use 'nolapic').

Partitioning: I partitioned the drive into three partitions, '/', '/home' and swap. The '/' is 10GB, 256MB of swap and the rest for '/home'. People have different philosophies on how to partition their drives, and I have my own. In my experience, too many partitions slow the system down. For a desktop system, I use '/' and '/home', whereas on a server I use '/' and '/var' (and maybe '/home' depending on its usage). Ideally, these partitions would reside on different drives (and if using IDE, different cables). Obviously, on a laptop with one drive, you have to partition the drive, so definitely the fewer the better for performance. I like to have a separate '/home' in case I need to reinstall the OS (which I have never done since switching to Debian GNU/Linux). This way, you just don't touch '/home' during install, and nothing is lost. As for '/usr/local' and '/opt', I created '/home/local' and '/home/opt' and made symlinks from '/usr/local' and '/opt' to '/home/local' and '/home/opt' respectively. It isn't the prettiest solution, but you retain your LSB hierarchy while having good performance. Seems a good balance to me.

Networking: Use the 3c59x driver.

Packages: After installing the base system, you will be prompted to install packages with dselect and/or tasksel. Feel free to do so, however, if you are installing the gnome2.2 backport, you should skip these steps.

If you want to use the gnome2.2 backport, once the system is completely installed, login as root and add this line to /etc/apt/sources.list:

deb http://ftp.acc.umu.se/mirror/mirrors.evilgeniuses.org.uk/debian/backports/woody gnome2.2/

and make sure these lines are also in sources.list:

deb http://http.us.debian.org/debian stable main contrib non-free
deb http://security.debian.org/ stable/updates main


Then do:

apt-get update && apt-get -u dist-upgrade
apt-get install gnome gdm gnome-fifth-toe x-window-system


This will install a complete Gnome Desktop system. See the Gnome 2.2 Backport page for more information.


Hard Drive

In my experience, second only to RAM, the hard drive is the single most important factor for a good desktop experience. The CPU is really not that important, so by all means, get the cheaper CPU and the fastest hard drive if at all possible.

Though the 4200rpm drive that shipped with the laptop was adequate, I was used to an old Pentium 233MHz system that had dual 7200rpm drives with '/' on one and '/home' on another. I was getting around 30MB/sec transfers based on hdparm. Even with the increased CPU speed and more RAM in my new laptop, the laptop wasn't as snappy as on the old 233, so I upgraded to the new IBM Travelstar 40GNX hard drive. It is offered through dell, but I got it at googlegear.com because it is so much cheaper. It is a 5400rpm drive with 8MB cache (most drives, including the one shipped with this laptop, only have 2 MB of cache). hdparm tests report 25-26MB/sec transfers, and coupled with the increased cache and CPU of the laptop, it beats my old 233-- that's more like it!

For any drive, you should enable DMA to increase its performance. Make sure 'hdparm' is installed, then do:

hdparm -d1 /dev/hda

You can enable other options, but in my experience, this is really all you need, and should be safe for any modern drive. See 'man hdparm' for details.


Kernel Configuration

Though I didn't use it for very long, I had no problems with the stock debian kernel (I did not use ALSA, firewire or the modem with this kernel however-- so your mileage may vary). You can get it by doing:

apt-get install kernel-image-2.4.18-686

(Note: I have removed a large section on obtaining a 2.4 vanilla kernel image, and replaced it with my instructions for building a 2.6 kernel using make-kpkg for debian -Rubin)
I (Rubin) run a custom kernel image generated from debian sarge kernel-source-2.6.8.
edit /etc/apt/sources.list and change "woody" or "stable" to "testing" or "unstable" depending (debian sarge will go from testing to stable soon after this writing so it may be possible to do this using "stable" soon)
apt-get install kernel-package kernel-source-2.6.8 libncurses-dev
cd /usr/src/kernel-source-2.6.8/
make menuconfig

Configure (see more on this below) basically turn APM off, ACPI on (everything 'cept the toshiba and asus parts) and "Software Suspend (EXPERIMENTAL). Dispite the warning, software suspend works reliably for me and no other suspend mechanism does on the 8200.
make-kpkg --append-to-version=".yymmddxx" kernel-image
where yy is the year (04) mm is the month, dd is the date, and xx is the # of kernel you have built today ;)
go get a cup of coffee...
The resulting kernel-image-2.6.8.yymmddxx.Custom_i386.deb packag is located in /usr/src. Install with:

dpkg -i ../kernel-image-2.6.8.yymmddxx.Custom_i386.deb

If you have the nvidia propreitary drivers, ndiswrapper drivers and ALSA sound drivers installed (see the XFree86, 802.11g and Sound sections below), they will be recompiled as well. Install them with:

./NVIDIA-Linux-x86-1.0-6111-pkg1.run
cd /usr/src/modules/ndiswrapper/; debian/rules binary
dpkg -i ../ndiswrapper-modules_0.10-1-2.6.yymmddxx_i386.deb
dpkg -i ../alsa-modules-2.4.26-mykernel_1.0.4-0jds1+1_i386.deb

I use grub, so at this point, I just run 'update-grub' and reboot. This works because I added these lines to /boot/grub/menu.lst:

# kopt=root=/dev/hda1 ro hdb=ide-scsi nolapic resume=/dev/hda6 video=vga16:off

(don't forget the '#'). The above arguments are passed to the kernel on boot. If using lilo, modify lilo.conf accordingly, and run '/sbin/lilo'. You can use the above procedure for compiling your own kernels too. The algorithm is:

1. download kernel
2. optionally download kernel patches
3. unpack the kernel
4. optionally patch the kernel (and modify Makefile)
5. copy old .config file (eg cp /boot/config-2.4.26 ./.config)
6. optionally run 'make oldconfig' followed by 'make xconfig' to configure your kernel differently
7. run 'make-kpkg kernel_image' and 'make-kpkg modules_image'
8. install resulting packages
9. if using lilo, edit lilo.conf, and run lilo, or run 'update-grub'
10. reboot


Kernel compilation really isn't too bad anymore. The hard part is getting a basic .config file that works with your system, which you can get from this page or linux-dell-laptops on Yahoo groups.
(Update: Here is mine -Rubin

XFree86

You can use either the Free 'nv' driver found in XFree86 4.2.1 and higher (as found in the gnome2.2 backport), or use the proprietary 'nvidia' driver. The Free driver does not support Xinerama, TV-Out or 3D, but is very capable with 2D. The binary nvidia driver does not support suspending the system to disk using swsusp (and doesnt resume correctly using old style apm tho they claim it should)

XFree86 Free Driver
Here is my XF86Config-4 for the Free driver. All the 3D modules load even though 3D acceleration is not supported under the nv driver because I still like having the OpenGL screensavers. Also note that there are a lot of commented out options. This is the final configuration I came up with.

Some observations and caveats:
  • Color depth of 24 creates barring with gradients. This issue has been brought to the attention of the Xpert mailing list, and a patch is forthcoming. It has to do with dithering not explicitly being enabled. Color depth of 16 looks great though.
  • Coming out of APM resume or a blank screen (via Fn+D) results in the top half of the screen on the bottom and vice versa. This is a known issue that I am told has to be solved via a kernel module (which needs to be written). The workaround is to suspend or blank the screen from a tty (eg Ctrl+Alt+F1 or chvt 1) and then use Alt+F7 (or chvt 7) to get back into X with it properly reinitialized. (Update: After using the 2.6 kernel with preemption, this has stopped hapning to me.)
  • Xvideo (xv) works well enough for me with my webcam and playing DVDs. However, some have reported that Xvideo in earlier versions of the nv driver is slow. Make sure you are not polling /proc/apm (eg via a battery monitor) when using Xvideo.
  • TVout or TwinView with xfree86 does not appear to work. Changing resolutions may result in a black border around the window. Use Fn+F5 then Fn+F7 to get rid of the border. It may need to be done twice.
  • Occasionally the mouse and keyboard aren't quite as responsive as they should be. This is related to the webcam drivers I use, and should not generally be an issue.

Nvidia Proprietary Drivers
With Debian, installing the Nvidia drivers is actually pretty easy. This covers the procedure for installing the 3123 version of the drivers, but the procedure should be the same for later versions. Version (4191) of the nvidia drivers have a problem with gnome2, so avoid those. I still use version 3123, even though they are quite old. You can grab a more recent version from Debian GNU/Linux Sarge or Unstable.
(Update: I don't think the debian packages are "up to date" with the website installer for nvidia drivers, however nvidia now uses a binary installer which is actually pretty slick. you simply download a .run file and execute it as root. it compiles (if necessary) a module for your kernel and installs it. Only hassle is when changing kernels you must boot to the new kernel and THEN run it... or it installs in the "old" modules tree. Also note that when the nvidia module is loaded in the kernel, you cannot do a swsuspend.. so i suggest skipping this part. I also had some weird problems with font size using the latest nvidia binary driver, which was solved by putting "DisplaySize 608 456" in my XF86Config-4 "Monitor" section. -Rubin)

Download nvidia-kernel-src_1.0.3123-3_i386.deb and nvidia-glx-src_1.0.3123-4_i386.deb and install them with:

dpkg -i ./nvidia-glx-src_1.0.3123-4_i386.deb ./nvidia-kernel-src_1.0.3123-3_i386.deb

and if you don't have the kernel sources for your running kernel (eg 2.4.18-686):

apt-get install kernel-source-2.4.18

First I built the libraries and did (as root):

cd /usr/src/nvidia-glx-1.0.3123
dpkg-buildpackage
cd /usr/src
dpkg -i ./nvidia-glx-1.0.3123.deb
dpkg -i ./nvidia-glx-dev-1.0.3123.deb

Next I installed the kernel modules. I had the sources for a compiled kernel already installed, so as root, I did:

cd /usr/src
tar -zxvf ./nvidia-kernel-src.tar.gz
cd /usr/src/linux-2.4.26-mykernel
make-kpkg modules_image
cd /usr/src
dpkg -i nvidia-kernel-KERNEL_VERSION.deb

Then added myself to the video group:

adduser james video

If you don't have the compiled sources, do:

cd /usr/src/linux-2.4.26-mykernel
cp /boot/config-2.4.26-mykernel ./.config
make oldconfig
make dep

and then you can compile the drivers as above.

To configure XFree86, use my XF86Config-4 file as a reference, modify it, and save put it to /etc/X11/XF86Config-4. Keep in mind I have an SXGA+ screen that goes up to 1400x1050, so if you have the UXGA screen that can do 1600x1200, you need to add that resolution to your "Screen" section.

Also, my XF86Config-4 file is setup for TwinView. With this configuration, I use one XF86Config-4 file, and when I want to plug in a TV, I just plugin and then run 'xvidtune -next' or press 'Ctrl+Fn+Alt+;' until the TV displays at a resolution it can handle.

Applications in general do not seem to have any problems using the nvidia OpenGL libraries, but xscreensaver did. To be able to use OpenGL screensavers, put in ~/.xscreensaver:

memoryLimit: 0


Sound

I now use ALSA drivers for the soundcard. I have been using the drivers since version 0.9.6 of the drivers, and they are very stable and utilize the full capabilities of the soundcard. The OSS/Free drivers (default in kernel drivers in 2.4.x kernels) work in a limited way, and may be adequate for just listening to audio cds or mp3s, however, I recommend using alsa.

(Update: I use the built in linux kernel driver, alsa and oss and things all went through a huge transition i believe since this was written. The normal i810 drivers work fine for me, so again skip this part) A couple of caveats with ALSA:
  • I have encountered garbled sound when listening to music in one X session, and firing up another X session and working in there. This is obviously not a normal situation, but just something to be aware of.
  • Using alsa while using the modem may cause a lockup. Try the latest version of the modem driver-- they are reportedly working on it.
To install the drivers, either go to http://www.alsa-project.org and install them manually, use your distribution's version, or, if using Debian Woody, add this to /etc/apt/sources.list:

deb http://jpstrand.homeip.net/user/delli8200/packages alsa-drivers/

Then run (as root):

apt-get install alsa-utils alsa-base alsa-headers alsa-source libasound2

Don't build the ALSA driver with ISA PnP or debugging and select the 'intel8x0' card. Then run (as root):

cd /usr/src
tar -jxvf ./alsa-driver.tar.bz2
cd /usr/src/linux-2.4.26-mykernel
make-kpkg modules_image
cd /usr/src
dpkg -i ./alsa-modules-KERNEL_VERSION.deb


Add myself to the 'audio' group with:

adduser james audio

Usage
This card can only be used at a rate of 48Khz, but the alsa drivers take care of that for you. Also, if you unplug or plugin the ac adapter before the soundcard is initialized, the soundcard won't play any sound until after reboot.

Desktop environments with a sound server like gnome and kde may 'lock up' waiting on the sound server. They are not really locked up-- just go to a console (eg Ctrl+Alt+F1) and kill the sound server. If you are going to use a sound server, then all your apps should use it. If your sound server is running and then an app that accesses the device directly tries to use sound, then the app accessing the soundcard will hold the soundcard until it closes, thus the apparent 'lock up.'

All that said, you can in fact use gnome and (most likely kde) with a sound server without problems. If you are using kde, you should be able to adjust your sound server to use a rate of 48000 in your sound server settings. People seem to have mixed results with artsd (kde's sound server).

As said above, I use gnome 2.2, but that makes no difference here. In general gnome's sound server (esd) is not as good as kde's, but it does have an option to specify the rate on startup. If you are using esd 0.2.30 and below, you need to apply a patch to get it to play nice with this soundcard. Here is the patch against esound 0.2.28, though it will probably work against other versions. With the patch, simply have this in /etc/esound/esd.conf:

[esd]
auto_spawn=0
spawn_options=-terminate -as 5 -r 48000
spawn_wait_ms=100

Some applications do not work well with esd. A notable case is xine. Esd has a design limitation where you cannot accurately synchronize sound with video. Since this is very distracting, we want to be able to launch xine without esd. You can turn off esd by doing 'esdctl off' and then launch your application. To reenable esd, just type 'esdctl on' after the application exits. You could even script this and add it to your menus.

Since xine is not using esd now, we need to make sure that it is sampling at 48000, so in the audio configuration section of xine, make sure 'if !=0 always resample to given rate' is set to 48000.

With this patch and configuration, I have been using gnome with the sound server enabled for months with no problems.

Pcmcia

apt-get install pcmcia-cs

Pcmcia works great. You just need to modify /etc/default/pcmcia to contain:

PCMCIA=yes
PCIC=yenta_socket
PCIC_OPTS=
CORE_OPTS=
CARDMGR_OPTS=


Apm

(Note: I have had better luck with acpi and swsusp, using 2.6 kernel i can NEVER get a normal suspend to work, with or without the binary nvidia drivers. Skip to the acpi section and dont enable APM -Rubin)
Apm works pretty well for me, with some caveats (see below) and only after playing with it quite a bit. I can suspend the machine by doing Fn+Esc or in low power situations. The machine comes back up after a few seconds after pushing the power on button. The Free 'nv' video driver works fine, but the Nvidia drivers (1.0.3123) do not officially support this. However, they can be patched to work if you disable AGP. To patch, make sure the drivers are installed (above), download nv-1.0.3123-apm.patch and save it in /usr/src. Now patch your nvidia kernel sources with:

cd /usr/src/modules/nvidia-kernel-1.0.3123
tar -zxvf ./NVIDIA_kernel-1.0-3123.tar.gz
cd ./NVIDIA_kernel-1.0-3123
cat ../../../nv-1.0.3123-apm.patch | patch -p0
cd ../
tar -zcvf ./NVIDIA_kernel-1.0-3123.tar.gz ./NVIDIA_kernel-1.0-3123
cd /usr/src/KERNEL_VERSION (this is where your currently running kernel sources are)
make-kpkg modules_image

What the above does is unpacks the NVIDIA_kernel-1.0-3123.tar.gz tarball that was downloaded from nvidia.com (by the package), patches nv.c, then creates a new tarball that contains the patched file, then makes the debian package of the patched kernel module. When upgrading a kernel in the future, you do not need to do all of the above steps, just 'make-kpkg modules_image'.

Once the nvidia kernel module is patched and recompiled, you MUST add:

Option "NvAGP" "0"

to your XF86Config-4 file if you want to suspend from within X and be able to come out again. For the new module to be used, the easiest thing is to just reboot, but you can optionally logout of X, run 'rmmod NVdriver', then log back into X. The video driver now supports APM suspend.

In addition to the above, some people reported problems unless the kernel had been compiled with:

CONFIG_PM=y
CONFIG_APM=m
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
CONFIG_APM_DO_ENABLE=y
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
CONFIG_APM_RTC_IS_GMT=y
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set

To make other parts of the system work with APM, I then created the file /etc/apm/event.d/apm_i8200 so the network, vmware and keyboard come back up properly after a suspend. This script is your friend! Add whatever you want. After making changes, run '/etc/init.d/apmd restart'.

Polling the apm status will cause clock slowdown, however this can be adjusted by running 'tickadj 10100' in rc.local (this is for a 1% slow clock). If you have the battery status applet running (eg gnome, kde) you will need to do something to compensate, either ntp, rdate or tickadj, because it will go very off (I use a combination of tickadj and ntp). tickadj is in the debian ntp package. Since adding tickadj, my clock drift on 2-3 seconds every 8 hours, whereas before it drifted several minutes.

Some small issues (for me):
  • When using the 'nv' driver, if the screen automatically blanks, or you press 'Fn+D' to blank the screen, the console is left in a weird state (the bottom half is displayed on top and vice versa). The only way I have found to correct it is to press 'Alt+F7' followed by 'Ctrl+Alt+F7'. This only works if X is up and running though. The registers don't seem to be restored properly. Talks with the nv developers state that a kernel module (as yet unwritten) is needed to fix this.
  • Standby mode does not appear to be supported by the bios. Running apm -S results in a hard lockup. DON'T DO IT!
  • Suspend to disk does not work with Dell's s2d. Windows XP suspend to disk is done through ACPI and uses a file on disk, not the special Dell suspend to disk partition. A program called 'swsusp' can be used in GNU/Linux to do the equivalent, but it requires a kernel patch and I haven't tried it yet.
  • After suspend to RAM, the fans may go crazy and the temperature is fixed at 85. 'Fn+z' stops this.
  • Polling /proc/apm (which is what gnome battstat-applet and other battery status apps use) causes clock drift and USB hiccups (if not other problems-- like serial port problems). I bought a webcam where if I had the battstat-applet loaded, or did 'cat /proc/apm' it would skip with errors. It is reported that enabling interrupts (allow_ints=1 or CONFIG_APM_ALLOW_INTS=y) would improve things, but I tried and it did not. Basically, turn off the battery monitor when doing video. This would probably go for DVD playback as well.

As reported by Rodney "meff" Gordon (http://www.rm-r.net/~meff/i8200/):

"If you have a high pitched squeal or chirping and it sounds like its coming from your keyboard, disabling CPU idle APM calls in the kernel config fixes this. This can also fix some sound problems and other various things. I believe there is something in the code for this option that doesn't work correctly with this laptop."

This is option CONFIG_APM_CPU_IDLE.


ACPI

ACPI on the 8200 can be made to work, but the process is somewhat difficult and does not offer as much functionality as APM. I don't recommend using it at this point, but 2.6 series kernels may give better results. To see my previous work on ACPI, see my old page.

(Update: I have had good results with the 2.6 kernel's acpi code. I can read battery/power/cpu info, as well as trigger software suspend using fn-esc etc. Here is my experiance with getting it all to work. -Rubin)
Configure your kernel with the following options:
CONFIG_PM=y
CONFIG_SOFTWARE_SUSPEND=y

CONFIG_ACPI=y
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_INTERPRETER=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_DEBUG=y
CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
# CONFIG_X86_PM_TIMER is not set
apt-get install apmd
edit lilo.conf and add to the "append" line the string "resume=/dev/hdaX" where X is your swap partition.
swsuspend writes active ram to your (first) swap partition. Then during boot if suspend data is found, and a suspend is found in the swap partition, a resume is executed. Don't forget to run lilo after changing lilo.conf.
test software suspend by executing the following without X running: echo "4">/proc/acpi/sleep
Now to make it work with the suspend button and with X running you'll need a few hacks. create the file /etc/acpi/events/sleepbtn containing the following:
event=button[ /]sleep
action=/etc/acpi/sleepbtn.sh
Then, create /etc/acpi/sleepbtn.sh containing:
#!/bin/sh

# On my inspiron 8200, the sleep button generates 2 sleep button pressed
# events wich are both 00000008 000000xx where xx increments.
# There are 2 possible solutions for this: 1, write this script such that
# it won't accept a "sleep" command within 10 seconds of resuming
# or 2 (done here), only run every other time.
if [ -f "/tmp/acpi_sleep_event" ]; then
        if which fgconsole > /dev/null 2>&1 ; then
            XHACKS_ORIGINAL_VT=`fgconsole`
        else
            XHACKS_ORIGINAL_VT=1
        fi
        sleep 1
        chvt 1

        /bin/sleep 1
        #echo "Would do suspend here";
        /bin/echo "4">/proc/acpi/sleep
        /bin/rm /tmp/acpi_sleep_event
        sleep 1
        chvt $XHACKS_ORIGINAL_VT
        # Ugly hack to re-init nvidia registers with a 2nd x session
        # We do this always - i cant think of a good way for root
        # to know if someone has X running :/
        sleep 1
        /usr/X11R6/bin/xinit /bin/true -- `which X` :9 -auth /dev/null -audit 0 -nolisten tcp > /dev/null 2>&1
else
  touch /tmp/acpi_sleep_event
fi

run chmod a+x /etc/acpi/sleepbtn.sh to mark it executable, and then reload acpid (/etc/init.d/acpid reload).


Theres 3 hacks involved in software suspend on the 8200. First the suspend button (fc-esc) results in 2 identical acpi events, so the script only "goes" every other time. Second, the script takes care of switching out of the X virtual terminal before suspending, and back into it after (or the video card is left in an unstable state). Lastly, you'll have weird video driver problems after a resume unless you start a momentary 2nd x session to reset the nvidia registers, so thats done last after a resume. A few second pauses are placed to keep things hapning with proper timing.
As amaising as it is with all these hacks, this configuration has been working flawlessly for me, and really doesnt take that long to suspend/resume, but swsusp wont execute with the nvidia binary driver module loaded in the kernel, so your stuck with the x.org/xfree86 "nv" driver.

Ethernet Card

This card works in the 2.2 - 2.6 series kernels. Just add to /etc/modutils/aliases (if not compiled into the kernel-- which it isn't on stock distribution kernels):

alias eth0 3c59x

and run 'update-modules' to merge the changes into /etc/modules.conf.

One thing that can be annoying on a laptop is to have to wait for the dhcp configuration to time out when not connected to a network. On debian, run 'dpkg-reconfigure etherconf' and don't have it manage eth0, eth1 or eth2. Then add to /etc/network/interfaces:

iface eth0 inet dhcp
up sendmail -q

iface eth1 inet dhcp
up sendmail -q

iface eth2 inet dhcp
up sendmail -q

and make sure that eth0, eth1 and eth2 don't appear on the 'auto' line. I configured this for 3 interfaces (eth0, eth1 and eth2) because the internal ethernet adaptor is eth0, and eth1 and eth2 are used when using a USB or pcmcia adaptor. The 'up sendmail -q' line means to flush the mail queue when the interface is brought up. I also run this from cron periodically so that my mta (exim) doesn't access the disk all the time.

When connected to a network, use the ifup command (eg 'ifup eth0'). 'ifup' normally needs to be run as root, but you can use 'sudo' to allow normal users to use it (see the manpage for details).


(Update: I use the ifplugd daemon to automatically monitor eth0 for a connection and ifup it when i plug in. Put "eth0 inet dhcp" in the interfaces file, but do not mark it 'auto'. apt-get install ifplugd and see /usr/share/doc/ifplugd for details (it wasnt too hard) -Rubin)

Floppy

This is a standard floppy drive that is accessed via /dev/fd0.

DVD/CDRW

The drive appears as /dev/hdb and works fine, but you should pass 'ide-scsi=hdb' to the kernel on boot either via kopt (see Kernel section above) or on the kernel line grub. Eg, in my /boot/grub/menu.lst I have:

kernel /boot/vmlinuz-2.4.26-mykernel 3 root=/dev/hda5 ro hdb=ide-scsi vga=791

Add to /etc/modutils/aliases (if not compiled into the kernel, which it isn't on stock distribution kernels):

alias scd0 sr_mod
alias scsi_hostadapter ide-scsi

and run 'update-modules' to merge the changes into /etc/modules.conf.

For convenience, I did:

ln -s /dev/scd0 /dev/dvd
ln -s /dev/scd0 /dev/cdrom
chmod 660 /dev/scd0
chgrp cdrom /dev/scd0


and then added myself to the 'cdrom' group. Eg:

adduser james cdrom

In order to get the best performance from the drive, make sure that the ide-scsi module is loaded, then do:

hdparm -d1 /dev/hdb

Another tip for fast drive access is to bypass the block device altogether (ide-scsi) and use the raw device. Xine is capable of using raw devices, I do not know about other players. To create a raw device, I did:

mknod /dev/rawctl c 162 0
mknod /dev/raw1 c 162 1
raw /dev/raw1 /dev/scd0
ln -s /dev/raw1 /dev/rdvd

Depending on your distribution, you may not have to create these devices. Xine's default configuration checks for the existence of /dev/rdvd, so it should just work.

You should disable XV_DOUBLE_BUFFER in video configuration section of xine if using an nvidia geforce. See the Sound section for configuring sound in xine for this laptop.

Many dvds are region encoded, and my dvd drive was setup without a region, so some dvd's with multiple regions worked very slowly at first, or not at all if I used the raw device. Now, because I don't forsee getting dvd's from different regions, I set my dvd up for region 1 (US). I got (from xine FAQ) dvd_disc_20000215_css.tar.gz and used its regionset command. You can only set the region on a dvd player 4 or 5 times, so be careful about setting it. Also, you don't technically need to do this, and many people prefer region free players. I suggest doing some research before using regionset.

This DVD/CDRW may have issues regarding suspend/resume. Some have reported it not working after a suspend/resume, and I have had issues if a DVD was in the drive when I did a suspend/resume. These issues could probably be resolved by adjusting the apm scripts, which is something I haven't done yet.


USB

Download the necessary software with:

apt-get install hotplug hotplug-utils usbutils

I use a 2.4 series kernel and USB required no additional configuration. I have used a USB drive (Trek ThumbDrive), USB mouse (Logitech Optical Mouse), USB Logitech Quickcam Web and a USB ethernet adaptor with no problems.

Some have reported you need to add to modules.conf (if not compiled into the kernel, which it isn't on stock distribution kernels):

alias usb-controller usb-uhci

I did this by adding it to my /etc/modutils/aliases file and running 'update-modules'.

For the webcam, I used quickcam-tt and it works great. Even the audio works. Add this to /etc/modules.conf

# for quickcam
alias video videodev alias camera mod_quickcam


Whenever the camera is plugged in, it just loads the necessary modules, including the USB audio module, audio.o. To access the microphone on the audio device, use /dev/dsp1 (mixer is /dev/mixer1). Eg:

sound-recorder -A /dev/dsp1 ./test.wav

Using the webcam microphone basically works, but is a little flaky. I need to play with this some more.


Mouse/Touchpad

The touchpad is really the only thing I don't like about this laptop. My wife has an Inspiron 4100 with a synaptics touchpad and it works great. The Alps installed in this laptop works under GNU/Linux, but advanced features like edge detection and corner clicks are not supported. This is not the fault of driver developers; Alps won't release the specifications. This is a good opportunity for someone to reverse engineer a device and help the GNU/Linux cause. There is a program called 'tpconfig' that controls touchpads, but its use for this touchpad is limited to disabling the tap feature. Also, this particular touchpad apparently has to recaliber itself occasionally, which results in the cursor moving around for a few seconds, and landing almost anywhere. Many people on the linux-dell-laptop list have confirmed this behavior. It doesn't happen very often, but it is annoying. The stickpad works properly.

Here is how I set it up in /etc/X11/XF86Config-4:

Section "InputDevice"
    Identifier "Mouse1"
    Driver "mouse"
    #Option "Protocol" "PS/2"
    Option "Protocol" "GlidePointPS/2"
    Option "Device" "/dev/psaux"

    # couldn't get this to work-- mouse would freeze after a while
    #Option "Protocol" "MouseSystems"
    #Option "Device" "/dev/gpmdata"

    Option "Emulate3Buttons"
    Option "ZAxixMapping" "4 5"
    #Option "Emulate3Timeout" "50"
EndSection

Disable gpm, it doesn't work well on this laptop from my experience.

Some people want to use a USB mouse and have had difficulties using two mice under XFree86. This isn't a problem with X, but instead its configuration. X can have multiple pointing devices with no problem. What I came up with is based on the information in the linux-dell-laptops FAQ.

First, configure the touchpad (see previous), then add to /etc/X11/XF86Config-4:

Section "InputDevice"
    # This section controls the optional USB mouse
    Identifier "USBMouse"
    Driver "mouse"
    Option "Device" "/dev/input/mice"
    Option "Name" "AutoDetected"
    # Maximum functionality
    Option "Protocol" "IMPS/2"
    # For maximum compatibility, use PS/2
    #Option "Protocol" "PS/2"
    Option "Vendor" "AutoDetected"
    Option "ZAxisMapping" "4 5"
EndSection

Next, modify the "ServerLayout" section to look something like:

Section "ServerLayout"
    Identifier "Simple Layout"
    Screen "Screen 1"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "USBMouse" "SendCoreEvents"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

Finally, modify the "ServerFlags" section to contain:

Section "ServerFlags"
    Option "AllowMouseOpenFail"
EndSection

This tells the Xserver to always look for Mouse1 (the touchpad), and if the USBMouse is detected at /dev/input/mice, to use it too. With this configuration, I was able to plug the USB mouse in to either USB port while X was running and have it work properly-- cool! My USB mouse has a scroll wheel, so I am using the IMPS/2 protocol, however, to use more mice, you might try the PS/2 protocol instead (or whichever is proper for your mouse). Be sure that in the ServerLayout section your 'Identifier' and 'Screen' correspond to what you use in your XF86Config-4 file.

You should also add this to /etc/modules/aliases (if not compiled into the kernel, which it isn't on stock distribution kernels):

alias char-major-13 mousedev

and run 'update-modules' to get the changed merged into /etc/modules.conf. This makes sure that the mousedev module is loaded when /dev/input/mice is accessed.


Modem

The modem sometimes works under GNU/Linux from my experience. Go to http://www.linuxant.com/drivers/ and get the latest hsf modem package, and follow their instructions. These drivers are not free however-- but you can get limited drivers to test the configuration.

I now use a pcmcia modem when I need a modem. I didn't like having to pay for drivers, and the drivers don't work well with ALSA (you need to run /etc/init.d/alsa stop before using the modem with these drivers).

Using a pcmcia modem requires no additional configuration beyond that in the PCMCIA section above, and does not conflict with ALSA. Plug in the card, and the modem shows up as /dec/ttyS1. If you'd like, you can

ln -s /dev/ttyS1 /dev/modem

and access the modem through /dev/modem. I would also like to point out my fondness for kppp. It is a great and easy to use ppp configuration tool and dialer.

For convenience, also do:

adduser james dialout


IR

IR works and now I can sync with a Palm m500 with irda. To get it to work on my system, download the necessary software with:

apt-get install irda-tools irda-common

modprobe ircomm-tty
modprobe irda
modprobe ircomm


Set to COM4 in BIOS
Set to Fast Infrared (FIR) in BIOS (even though we will use SIR)

Then I created /etc/modutils/irda and put in it:

alias char-major-161 ircomm-tty
alias irda0 ircomm

Then ran 'update-modules'. I then added to /etc/serial.conf:

/dev/ttyS3 uart 16550A port 0x02e8 irq 3 baud_base 115200 spd_vhi skip_test

To connect the serial device to an IR device, as root, do:

irattach /dev/ttyS3 -s

Now can access the IR port through /dev/ircomm0. You will also see the irda0 device with 'netstat -ie'. On my system, ircomm0 is in the 'dialout' group, so I did:

adduser james dialout

To test the configuration, you can get a listing of the databases with pilot-xfer:

pilot-xfer -p /dev/ircomm0 -l

I also use gnome-pilot, so I configured as new device as '/dev/ircomm0', with a rate of '115200' and as 'Irda'. Now it works with the caveat that gnome-pilot doesn't seem to initialize the port after a reboot properly. Gnome-pilot will work fine after doing something like:

pilot-xfer -p /dev/ircomm0 -l &
sleep 5
killall pilot-xfer

This is obviously a bug, but is easily worked around (just put the above in rc.local). Pilot-link seems to prefer having the PILOTRATE environment variable set too (' export PILOTRATE=115200').

I had a lot of problems getting this to work right. The FIR driver is smc-ircc, but I could not get it to work. If using the debian irda initscripts, set /etc/irda.conf to have:

#irda.conf Version: 1.0
IRDADEV=/dev/ttyS3
DONGLE=none
DISCOVERY=-s
ENABLE=yes # if you do not need to start irattach, set "no"

Then it will work on boot.

Serial Port

Serial port is /dev/ttyS0. If you are using a PDA, have /dev/pilot be a symlink to here.

ln -s /dev/ttyS0 /dev/pilot


Firewire

Firewire works fine under kernel 2.4.26, with the noted exception that hotplugging does not work. Kernel 2.6 is supposed to do firewire (and hotplugging) a lot better.

To get it to work I added to /etc/modules:

ieee1394
ohci1394


This sets up the firewire susbsytem, but not the modules for whatever devices you are connecting. Since hotplugging doesn't work with this kernel, I wrote firewire.sh which uses rescan-scsi-bus.sh to mount my firewire external hard drive.

This is good enough for me, but go to http://www.linux1394.org/ and http://linux-hotplug.sourceforge.net/ for information on getting hotplug to work.


BIOS

I am running BIOS version A07. It seems that other Inspiron users (not necessarily Inspiron 8200) have had difficulties with their BIOS and have upgraded frequently. I have had no problems with this BIOS, and everything works fine. A04 worked well too, except I needed to upgrade to A07 to use the new DSDT for ACPI. If you are not using the new ACPI patches, don't bother upgrading. As the saying goes, "If it ain't broke don't fix it!" So I haven't.


Extra Buttons

The Inspiron series of laptops have volume control buttons that you can use with ACPI or with the i8kutils package. To install, run 'apt-get install i8kutils'. You will also have to have a kernel compiled with the 'i8k' module (ie CONFIG_I8K=m). Mapping these keys to useful functions is then easy. First run:

modprobe i8k

to load the proper kernel module. I put 'i8k' in my /etc/modules file so it is loaded automatically on boot. Then put in a boot script:

/usr/bin/i8kbuttons -u "/usr/bin/aumix -v+5" -d "/usr/bin/aumix -v-5" -m "/usr/bin/aumix -v0" &

This sets up the buttons to increase or decrease the master volume by 5 when the volume up or down button respectively is pressed. It also sets the master volume to 0 when the mute button is pressed.

The remaining four keys (play/pause/E, stop/i, rewind/1, fast forward/2) are keycodes 129, 130, 131, and 132 respectively. To map these to functions keys, create an '~/.Xmodmap' file and put in it:

keycode 129 = F13
keycode 130 = F14
keycode 131 = F15
keycode 132 = F16

This maps the four keys to the function keys F13, F14, F15 and F16. This file somehow needs to be sourced when you login. If using xdm or its variants (eg gdm), then the file should be sourced automatically. If not, the easist thing to do is put 'xmodmap ~/.Xmodmap' in your '~/.xsession' or '~/.xinitrc' file. I found these keys using the 'xev' program. Launch 'xev' from a terminal and type a key that you want to know its keycode, and xev will display information about the key (including its keycode) in the terminal.

Now that the keycodes are mapped to keys, you can use your window manager or specific applications to have them do something useful. For example, when Xmms is running and has focus, I have F13 as Play, Alt+F13 as Pause, F14 as Stop, F15 as Previous and F16 as Next. For the window manager, you might have Ctrl+F13 launch Evolution, and Ctrl+F14 to launch a help browser (eg yelp). It is best if you have the window manager use different combinations of Alt, Ctrl, or Shift than the applications, otherwise, it will take the event and your application won't get it (eg, I use just F13 for Xmms, but Ctrl+F13 to launch evolution).


Miscellaneous

I bought a small USB drive (Trek Smart ThumbDrive) that works great for file transfers or gpg key storage. To mount the drive, simply do:

mount -t vfat /dev/sda /mnt/trek

I use gnupg and encourage everyone to investigate this great technology and use it. Since laptops are often stolen, encryption can provide a very good solution. However, gpg private keys really shouldn't be on your hard disk, since decrypting an encrypted file is possible if you have both the public and private key even if you don't have the password. Therefore, a small USB drive is a great place to store gpg keys. To do this, I added to /etc/fstab:

/dev/sda /mnt/trek vfat user,noauto,sync,umask=0077 0 0

This allows any user to mount it, it is not mounted on boot, writes are done immediately and no one but the person who mounted it (and root) can access the drive after mounting.

You only need to keep your secring.gpg file on the drive, since this holds your private keys. With just storing secring.gpg on the drive, you can still encrypt files without having the thumbdrive inserted. Also, depending on how you have gpg setup, you may encounter locking problems since vfat filesystems don't support locks. Gnupg does not lock secring.gpg, so its not a problem here. I then set up a symlink from $HOME/.gnupg/secring.gpg to /mnt/trek/.gnupg/secring.gpg with:

ln -s /mnt/trek/.gnupg/secring.gpg $HOME/.gnupg/secring.gpg

Next, mount the drive, then generate or move your private keys to the ThumbDrive. Unmount and your gpg private keys are stored off line. Now all I need to do is put the USB drive in and mount and I can decrypt. Decryption therefore is not possible without the USB drive. I put the USB drive on my key chain, and I liken it to being the 'key' for my computer (pun totally intended).


Helpful Links

linux-dell-laptops on Yahoo groups
linux-dell-laptops FAQ (great resource)
linux-laptop.net
debian-laptop
xfree86.org
Nvidia Drivers
Nvidia Drivers README
kernel.org
http://acpi.sourceforge.net/devel/
http://developer.intel.com/technology/iapc/acpi/
http://sourceforge.net/project/showfiles.php?id=36832
http://irda.sourceforge.net/
http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/IrDA.html

Debian

    Valid HTML 4.01!