Linux on a Dell Inspiron 3500

This page will describe some of my successes with installing Linux on a Dell Inspiron 3500. I made heavy use of the resources listed in the links section below and would suggest that if you are new to Linux on the Inspiron that you read the links below in addition to this page (if you haven't already done so). I have attempted to not provide information that overlaps with the information on other people's pages.

First I'll describe the laptop and operating system. The laptop is a Dell Inspiron 3500 with a 333MHz Celeron, 64MB of RAM, 4.3GB hard drive, 14.1" display, CD-ROM, Floppy, and two batteries. I have no modem for the laptop (built-in or otherwise), but do have a 3COM 3C575 10/100Mbps ethernet PCMCIA card. The operating system I just recently installed is Mandrake 6.0 with the included 2.2.9 linux kernel. So far I am not having any trouble and I have not had to install extra X servers or sound drivers.

Sound

One problem with the sound system on the Inspiron is that the free linux sound drivers cannot recover from a suspend of the laptop. I believe I have managed to hack around the problem.

First, my sound setup. I have the following lines in my /etc/conf.modules file:

alias midi off
alias sound ad1848
options ad1848 io=0x530 irq=5 dma=0 dma2=1
options adlib_card io=0x388

In the BIOS, the sound device is configured to match the above settings. This setup works fine when the machine is first booted and until the machine is suspended. When the laptop resumes from a suspend (to RAM or to disk) sound will be all messed up. The following script, run as root, seems to correct the problem:

#!/bin/bash
/sbin/rmmod ad1848
/sbin/insmod uart401
/sbin/insmod sb io=0x220 irq=5 dma=0
/sbin/rmmod sb
/sbin/rmmod uart401
/sbin/modprobe ad1848

You can either run these commands (preferably in a script) or use the following C program:

#include <stdio.h>
#include <unistd.h>
#include <string.h>

int main() {
  char commands[1024];
  commands[0]=0;

  strcat(commands,"/sbin/rmmod ad1848; ");
  strcat(commands,"/sbin/insmod uart401; ");
  strcat(commands,"/sbin/insmod sb io=0x220 irq=5 dma=0; ");
  strcat(commands,"/sbin/rmmod sb; ");
  strcat(commands,"/sbin/rmmod uart401; ");
  strcat(commands,"/sbin/modprobe ad1848; ");

  setuid(0);
  execl("/bin/sh","/bin/sh","-c",commands,0);
  
  return 0;
}

Just paste the above program into a file called fixsound.c and compile using:

gcc -o fixsound fixsound.c

Then install (as root):

cp fixsound /usr/local/bin
chown root:root /usr/local/bin/fixsound
chmod a+rx,u+s /usr/local/bin/fixsound

Now you can simply execute the command fixsound at any command prompt while logged in as any user after the resume to fix your sound device.

Note: Since this fix requires unloading the sound module, you must ensure that all programs using the sound device have been terminated before attempting to run fixsound. This is a small price to pay for not having to shutdown the machine and restart it to get sound back after a suspend.

Suspend to Disk

For the longest time I couldn't get the 'Suspend to Disk' feature of the laptop setup properly. No matter how hard I tried (configuring the on disk file under Windows), the BIOS would continually report that the Suspend to Disk file was missing or the wrong size. It turns out that the Suspend to Disk file must be located on your active partition (a DOS partition I assume).

Like most, I still maintain a small Windows installation on the laptop for emergancies. When I installed Linux I choose to have it install LILO in the superblock of the Linux root partition and then make the Linux partition the active partition in the Master Boot Record (MBR). The reason for this was so that I could completely hide the presence of Linux by simply (temporarily) setting the DOS partition as the active partition. Linux is restored by setting the active partition back to the Linux partition. Since LILO can boot the Windows partition, there is no need to change the active partition to use Windows, only to hide Linux.

To make a long story short, my idea wasn't ideal as Suspend to Disk didn't work. I now have LILO installed in the MBR and can only get rid of it with an fdisk /mbr. Not a big deal as I really have no reason to want to hide the presence of Linux on my laptop.

Suspend in general

I really dislike the fact that the Inspiron automatically suspends itself when the laptop lid is closed. In trying to find out how to get the laptop to continue running with the lid closed, I discovered that if you use DPMS to turn off the laptop LCD (not standby or suspend, but off) the laptop will not suspend when the lid is closed. This worked when I first figured it out, but a month later when I really needed to keep the laptop going with the lid closed, I couldn't get it to do it. A pair of needle nosed plyers used to grasp the little pin by the power button and pull it out fixed my problem. Now, when I close the lid, absolutely nothing happens. I use DPMS to shut off the LCD after a few minutes, but the laptop keeps running. At first I was a little concerned about the idea of intentionally breaking the laptop, but now I have to say that I couldn't be happier. I definately prefer having to explicitly suspend the laptop when I want it suspended.

Another minor issue is that DPMS (in X Windows) doesn't seem to work after the laptop has resumed from a suspend. This is fixed by changing virtual terminals to a text console and then back to X Windows (Ctrl-Alt-F1 followed by Alt-F7).

CDROM

Another thing that annoyed me about the Inspiron is that the CDROM drive is too fast (makes too much noise) and is constantly spinning up and spinning down when you are using it (which can't be good for battery life). Luckily, someone wrote a small utility called cdrom_speed that allows you to easily reduce the speed of your cdrom. I highly recommend this utility. Don't be concerned with the fact that it is listed as alpha software. On the Inspiron it does exactly what it claims to do and might as well be called version 1.0 as far as I'm concerned. For playing MP3's from CD, set your drive to a speed of 1 and you won't even hear it.

Links


Copyright © Chris Studholme 2000.
The information on this page is provided in the hopes that it will be useful; however, I make NO WARRANTY WHATSOEVER as to its effectiveness or accuracy.
Please feel free to use and distribute this page as you see fit so long as this notice is preserved.
Last Modified: September 8, 2000