Installing Fedora Core 2 on a Dell Inspiron 9100

Note (11/9/2004): I upgraded to Fedora Core 3. The upgrade was the best ever. No major problems so far, and the minor ones are REALLY minor (like terminal windows needing to be re-sized).

The new driverloader for Fedora Core 3 installed without the usual nasty sounding (but harmless) error messages. I just deleted the old rpm and installed the new one, and it worked.

Still no acpi suspend, but the boot-up is a LOT faster.

Another note (1/11/05): You might want to stop reading now and go here, but I am leaving this because I did a few things differently.


Original description starts here

I did a clean install on a new computer. This Inspiron 9100 is a top-of-the-line Dell "desktop replacement." It is huge. It has a huge screen. It is perfect for using around the house, carrying from room to room with a wireless connection. Not ideal for travel, when you want to travel light. But really not all that bad. I use it on the train.

In general, I got what I wanted from the combination of the latest-and-greatest laptop with the latest-and-greatest Linux distribution: blazing speed; incredible power; crystal clear display; lots of neat features; and plenty of fun getting it to work. I am now using my new laptop in preference to my (perfectly good but 2 year old) workstation.

Notable features of the computer:

In general, the installation went well except for failure of Anaconda to recognize the ATI driver. I first did it with the final test release, then upgraded. But I don't think this was fixed by then. The odd thing is that the driver is actually supported in the 2.6 kernel. (And ATI has a Linux driver, which I was warned not to use so I didn't try it.) The installation did work well enough with a generic LCD so that I was able to use the computer. But, be warned: don't do any time-consuming configuration of fonts and window sizes until you finish getting the display working properly.

Display

Here is my current /etc/X11/xorg.conf file, most of which I got from someone else whose name I've lost.
Section "ServerLayout"
	Identifier     "Default Layout"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
# RgbPath is the location of the RGB database.  Note, this is the name of the 
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.

# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.

	RgbPath      "/usr/X11R6/lib/X11/rgb"
	FontPath     "unix/:7100"
EndSection

Section "Module"
	Load  "GLcore"
        Load  "bitmap"
	Load  "dbe"
	Load  "ddc"
        Load  "dri"
	Load  "extmod"
	Load  "glx"
	Load  "record"
	Load  "freetype"
	Load  "type1"
        Load  "vbe"
EndSection

Section "InputDevice"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
#	Option	"Xleds"		"1 2 3"

# To disable the XKEYBOARD extension, uncomment XkbDisable.
#	Option	"XkbDisable"

# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults).  For example, for a non-U.S.
# keyboard, you will probably want to use:
#	Option	"XkbModel"	"pc102"
# If you have a US Microsoft Natural keyboard, you can use:
#	Option	"XkbModel"	"microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
#	Option	"XkbLayout"	"de"
# or:
#	Option	"XkbLayout"	"de"
#	Option	"XkbVariant"	"nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
#	Option	"XkbOptions"	"ctrl:swapcaps"
# Or if you just want both to be control, use:
#	Option	"XkbOptions"	"ctrl:nocaps"
#
	Identifier  "Keyboard0"
	Driver      "keyboard"
	Option	    "XkbModel" "pc105"
	Option	    "XkbLayout" "us"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "IMPS/2"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5"
	Option	    "Emulate3Buttons" "yes"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Unprobed Monitor"
 ### Uncomment if you don't want to default to DDC:
	HorizSync    31.5 - 110
	VertRefresh  28-90
	Option	    "dpms"
EndSection

Section "Device"
	Identifier  "Videocard0"
	Driver      "radeon"
	Option      "NoDCC"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Videocard0"
	Monitor    "Monitor0"
	DefaultDepth     24
	SubSection "Display"
		Depth     24
		Modes    "1680x1050" # this could be extended
	EndSubSection
EndSection

Section "DRI"
	Group        0
	Mode         0666
EndSection

For displaying on a projector, what works (so far, on several projectors) is to just plug in the projector after starting X. The only problem is that the shape of the screen isn't right. To fix this, I opened Firefox (using the View menu to remove everything possible from the top of the screen) and shaped its window to cover the external display. I use Firefox to display slides, but you could do the same thing with OpenOffice or xpdf.

Wireless

The wireless was the biggest problem. There is no Linux support for the BCM94306, but it is used a lot. The problem seems to be that the chip has some security features which prevent releasing any source code for it. So the only solution was getting a new wireless chip or, alternatively, using the Windows drivers.

There are two ways to use the windows drivers on Linux: Ndiswrapper and Linuxant. Ndiswrapper, which is free and open source, didn't work for me, although I didn't try everything possible. Linuxant costs about $20, which I gladly paid (twice) after I got it to work, with the help of their tech support people (person?) who respond(s) by email within a day.

The problem with Ndiswrapper was, I think, the 4k Stack "feature" of the 2.6 kernel. I don't understand this too well, but I think by using a smaller stack, you can run more processes. But I don't think this is something I really want to do that much. And it really louses up many wireless chips, as well as some Nvidia video drivers. (The attitude of the kernel developers is that the companies involved will change their products to support the 2.6 kernel. Perhaps this is a good attitude, but I didn't want to wait.)

The Linuxant people have built a custom version of the 2.6 kernel especially for Fedora Core 2 (with an smp version), which they update when the kernel is updated, in a few days. And there is a custom version of their rpm, driverloader, to go with it, available at http://www.linuxant.com/driverloader/wlan/full/downloads-fc2-i686.php (with an explanation, and a link to where you can get the custom kernel). (You need a license, of course, to get this to work. You can get a temporary license, then pay if it works.) But this isn't necessary anymore for the BCM94306.

What works is to configure driverloader with the command:
dldrconfig --enable-workaround=stack
The BCM94306 has a whole series of drivers written for it. Some came with my computer. (You have to unzip the exe files.) Some were linked from the Ndiswrapper site. The one I'm using was recommended at the Linuxant site, by clicking the link on Drivers, which takes you here. The one I got was for the Dell TrueMobile 1300 (even though this is what Dell calls 1350). The one I used is R74092/IR/bcmwl5a.inf, but others probably work.

Note: Adam Vance has told me that Ndiswrapper worked with a standard FC2 2.6.5-1.358smp kernel (not the special version I used) and R74092us/IR/bcmwl5a.inf, for a 1350 WLAN miniPCI on his Inspiron 5150. And I have other reports of ndiswrapper working with the BCM94305.

Power management

The 2.6 kernel seems to be in a transition state between supporting the apm method and the acpi method for power management, and some chips don't support acpi. A true "suspend" state does not happen on this chip. (However, this is very chip specific. I installed Core 2 on my old Latitude CPX, pushed the suspend button, and, to my utter astonishment, the computer suspended perfectly, then woke up perfectly when I pushed the power button. I have yet to look into how this happened. And, on my older Dell desktop, the suspend state S3 put the computer into a terminal coma, from which it could be aroused only by rebooting.) But something approaching a suspend is possible.

Acpi is configured in the directory /etc/acpi, which contains actions/ and events/. The events directory has the following files, each preceded with its name.

The section in small print was written before I made a few discoveries. I leave it because it explains some things that might be useful later. Read on for the discoveries.

I got some scripts here from Diego Santa Cruz, in particular his tar file at http://ltswww.epfl.ch/~dsanta/resources/soft/acpid-events-0.3.tar.gz. Most of it did not work for me, but I could get the suspend file to work somewhat. Here is my version, with my comments labeled JB:

#!/bin/sh

# Load config
if [ -f /etc/acpi/actions/functions ]; then
	. /etc/acpi/actions/functions
else
	exit 1
fi

if [ ! -f /proc/acpi/sleep ]; then
	echo "ERROR: ACPI support not present" 1>&2
	exit 1
fi

LOCKFILE=/var/lock/subsys/acpi-suspend

if [ -f $LOCKFILE ]; then
	pid=`cat $LOCKFILE`
	wall "ACPI suspend requested but previous suspend process still going (PID $pid)"
	exit 1
fi

# Check that suspend would be OK
check_suspend_ok || exit 1
# Start suspend process
echo $$ > "$LOCKFILE"
screen_power off
# Perform APM configured suspend settings
"$APMSCRIPT" standby user
sync
# spin_disks_down does not work now, but I have hopes (JB)
spin_disks_down
# Suspend - this works - it slows the processor (JB)
echo -n "7" > /proc/acpi/processor/CPU0/throttling
echo -n "7" > /proc/acpi/processor/CPU1/throttling

## Resume back to normal - removed by JB
I also removed the resume part of it and put that in a separate file called resume as follows:
#!/bin/sh
# Load config
if [ -f /etc/acpi/actions/functions ]; then
        . /etc/acpi/actions/functions
else
        exit 1
fi
 
if [ ! -f /proc/acpi/sleep ]; then
        echo "ERROR: ACPI support not present" 1>&2
        exit 1
fi
 
# Resume back to normal
"$APMSCRIPT" resume standby
screen_power on
rm -f "$LOCKFILE"
rm /var/lock/subsys/acpi-suspend
echo -n "0" > /proc/acpi/processor/CPU0/throttle
echo -n "0" > /proc/acpi/processor/CPU1/throttle
I have not yet put resume on a button. Instead, I simply type "resume" on a command line, and I put the following line in my .cshrc:
alias resume "su -c '/etc/acpi/actions/resume'"

The suspend script blanks the screen, reduces the processor speed, and turns off the network, but you can bring the screen back with any key. The computer does not go to sleep, but the processor slows down a lot. You can see this if you you just try the two "throttle" commands and then try to do anything. This reduces the load on the battery and reduces the temperature.

The resume script takes a few seconds. It brings back the network and resets the processor to normal speed.

Possibly all the benefit of this is in the two throttle commands and the screen blanking. I've now put these on the lid action, so I think I get all the benefit from closing the lid, which does not shut down the network:

What I discovered was the following. I read /proc/acpi/battery/BAT0/state to see the rate at which the battery is discharging. I experimented with various changes. I found that changing the speed of the processor (throttling) did absolutely nothing. Blanking the screen reduces power use by 20%. So I removed the lines that are commented out below about throttling. In sum, there isn't much to be done with this kernel except to blank the scren.

#!/bin/sh
# Acts on lid open/close events
 
# Load config
if [ -f /etc/acpi/actions/functions ]; then
        . /etc/acpi/actions/functions
else
        exit 1
fi
 
# Take action
if lid_open ; then
        screen_power on
#        if ac_online; then
#           echo -n "0" > /proc/acpi/processor/CPU0/throttling
#           echo -n "0" > /proc/acpi/processor/CPU0/throttling
#        else # come back with 50% throttle
#           echo -n "4" > /proc/acpi/processor/CPU0/throttling
#           echo -n "4" > /proc/acpi/processor/CPU0/throttling
        fi
else # lid closed
        screen_power off
#        if ! ac_online; then
#            echo -n "7" > /proc/acpi/processor/CPU0/throttling
#            echo -n "7" > /proc/acpi/processor/CPU0/throttling
#        fi
fi

The computer also has some power management features built into the BIOS (and partially controllable through it). The screen dims when it isn't plugged in, and CPU0 and CPU1 are throttled by some apparently random amount (approximately 50% on the average).

USB memory chip

Dell always gives you stuff you don't ask for. Windows, of course. Last time this really awful printer/scanner/copier. (Finally found someone who could use it.) But this time it included one of those little key-chain memory things. Wow. This means that, when I travel, I have a way of backing up.

I followed these instructions, and they worked except for actually using the thing. The directory that gets made is called
/mnt/diskonkey,
and to get it to work I actually had to mount it by saying
mount /mnt/diskonkey,
and of course
umount /mnt/diskonkey
when I'm done.

In case that page disappears, the basic sequence is:

I have a sneaking suspicion that none of this did any good and the thing would have worked anyway, given that the directory is not the one I used and it did not get automounted. So my advice is just plug the thing in and see if you can find it before you do anything.

Other issues

Sound: I thought the sound didn't work, but it does. It comes with the mute turned on. Use aumix to unmute, particularly Pcm and Pcm2 for the speakers. I haven't tried the headphone jack yet. The built-in speakers are amazingly good - just what I need to annoy my fellow train commuters when they get out their cellphones.

Booting: Because the power management doesn't work perfectly, I have to boot more often than I would like, so I sped up the boot process by removing things that I don't want, with chkconfig --levels 345 [whatever] off (or just removing them completely): rpcidmapd, nfs, nfslock, netfs, rpcgssd, rpcsvcgssd, rpcidmapd, irda, isdn, and winbind, cups, kudzu, mdmpd, sendmail, cpuspeed, and mdmonitor. This leaves (in rough order of booting): syslog, irqbalance, portmap, random, pcmcia, autofs, smartd, driverloader, acpid, sshd, xinetd, gpm, crond, xfs, anacron, atd, readahead, and messagebus. I think that getting rid of netfs and nfs was what produced most of the benefit, but I'm not sure. The bootup is much faster now.

Fonts: I added /usr/share/fonts/Type1 and /usr/share/fonts/local to the font path, using chkfontpath. This allowed me to use the Bitstream Vera fonts with Xemacs and my terminal window. (They look nice, and the clear distinction between 1 and l is useful.)

Cursor: I found the large cursor under Preferences/Accessibility/Mouse keys. This is very helpful with high resolution. There is also a preference for the cursor to blink when you hit Ctrl.

Path: I found the following useful as an addition to my .cshrc:
setenv PATH "/usr/local/sbin:/usr/sbin:/sbin:${PATH}"

To do

Fiddle with power management some more, particularly hdparm.

Acknowledgements and other resources

For other information, see TuxMobil - Linux on laptops, PDAs and mobile phones.

The most helpful single resource was an earlier description, for a different computer, by Diego Santa Cruz, at http://ltswww.epfl.ch/~dsanta/resources/dell-i8500-linux.


Jonathan Baron
Web page: http://www.sas.upenn.edu/~baron Last modified 08/12/07