<html><head><title>Linux on a Dell Inspiron 3500</title></head>
<body bgcolor="#FFFFFF">

<h1>Linux on a Dell Inspiron 3500</h1>

<p>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 <strong>not</strong> provide information that 
overlaps with the information on other people's pages.</p>

<p>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&quot; 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.</p>

<h2>Sound</h2>

<p>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.</p>

<p>First, my sound setup.  I have the following lines in my 
<code>/etc/conf.modules</code>
file:<br><blockquote><pre>alias midi off
alias sound ad1848
options ad1848 io=0x530 irq=5 dma=0 dma2=1
options adlib_card io=0x388</pre></blockquote></p>

<p>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:<br><blockquote><pre>#!/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</pre></blockquote></p>

<p>You can either run these commands (preferably in a script) or use the
following C program:<br><blockquote><pre>#include &lt;stdio.h&gt;
#include &lt;unistd.h&gt;
#include &lt;string.h&gt;

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;
}</pre></blockquote></p>

<p>Just paste the above program into a file called <code>fixsound.c</code> and compile
using:<br><blockquote><pre>gcc -o fixsound fixsound.c</pre></blockquote></p>

<p>Then install (as root):<br><blockquote><pre>cp fixsound /usr/local/bin
chown root:root /usr/local/bin/fixsound
chmod a+rx,u+s /usr/local/bin/fixsound</pre></blockquote></p>

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

<p><strong>Note:</strong> 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 <code>fixsound</code>.  This is a small price to pay
for not having to shutdown the machine and restart it to get sound back after
a suspend.</p>

<h2>Suspend to Disk</h2>

<p>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).</p>

<p>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.</p>

<p>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 <code>fdisk /mbr</code>.  Not a big deal as I really have no reason to want
to hide the presence of Linux on my laptop.</p>

<h2>Suspend in general</h2>

<p>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 <strong>off</strong>)
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.</p>

<p>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).</p>

<h2>CDROM</h2>

<p>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
<a href="http://dmpc.dbp.fmph.uniba.sk/~krivanek/cdrom_speed/">cdrom_speed</a> 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.</p>


<h2>Links</h2>
<ul>
<li><a href="http://www.dell.com/products/notebook/inspiron/insp3500/">Dell Inspiron 3500</a></li>
<li><a href="http://www.cs.utexas.edu/users/kharker/linux-laptop/">Linux on Laptops</a></li>
<li><a href="http://www.owlnet.rice.edu/~dwp/3500.html">davepr's Linux on a Dell Inspiron 3500 page</a></li>
<li><a href="http://www.post1.com/home/kal/inspiron3500.html">Kal Ng's Linux on a Dell Inspiron 3500 page</a></li>
</ul>


<hr>
<p><font size="-1">Copyright &copy;
<script type="text/javascript">b="u"+"t"+"o"+"r"+"o"+"n"+"t"+"o";
c="c"+"h"+"r"+"i"+"s"; d="."; f="c"+"a"; g="m"+"a"+"i"+"l"+"t"+"o"+":";
h="s"+"t"+"u"+"d"+"h"+"o"+"l"+"m"+"e"; i="@";
document.write("<a href="+g+c+d+h+i+b+d+f+">");</script>Chris Studholme<script type="text/javascript">document.write("</a>");</script>
2000.<br>
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.<br>
Please feel free to use and distribute this page as you
see fit so long as this notice is preserved.<br>
<i>Last Modified:</i> September 8, 2000
</font></p>

</body></html>
