Home Andrew Hamilton's Homepage

Linux on Alienware Area-51m 7700

The initial version of this document was written on 8 Feb 2005. Last updated 28 Mar 2005 20 Jul 2005.

Standard disclaimer: The information herein comes with no guarantee of any kind. Use at your own risk. If you find an error or can offer useful advice, feel free to email me (my email address is at the bottom of my homepage).

1. Hardware Specs
2. Introduction
3. Installation
3.1 Fedora fails
3.2 Gentoo succeeds
3.3 Hard disk
3.4 Gentoo installation
3.5 Ethernet
3.6 Compile the Kernel
3.7 /etc/make.conf
3.8 Sound
3.9 Video
3.10 DVD player
3.11 Superuser
3.12 /etc/modules.autoload.d/kernel-2.6
3.13 Hyperthreading
3.14 Desktop
3.15 Clock
3.16 Special keys
3.17 Modem
3.18 Internationalization
3.19 Mouse

1. Hardware Specs

Component Status under linux Notes
Intel Pentium 4 560 Processor with HyperThreading Technology, 3.6 GHz. Works Turn on hyperthreading in the bios: linux will recognize the CPU as being 2 processors.
17" WXGA (1680 × 1050) TFT LCD Works You'll need the customized modelines from this xorg.conf.
nVidia GeForce GO 6800 Video card, 256 MB DDR2 Video Ram Works Download and run the latest nVidia driver.
2 GB DDR2 RAM (2 × 1 GB), expandable up to 4 GB Works  
100 GB Seagate disk, with Promise SATA378 TX2+ controller Works Requires the PATA-enabled sata_promise driver, available since Jan 05.
External USB floppy drive Works Works out of the box. Requires usb_storage, uhci_hcd modules. Gets loaded as /dev/sdx where x is a, b, c, ..., whatever the next unused letter may be.
RTL8169 Gigabit Ethernet Works Works out of the box. Requires r8169 module.
Internal V.90/50K Azalia Modem Not working scanModem and slmodem (emerge slmodem) failed to identify this modem.
Intel 82801FB/FBM/FT/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03) integrated on to the chip. It's actually a Realtek ALC880 chip. Works Requires snd-azx snd-hda-intel module.
_NEC DVD+/-RW ND-6500A, ATAPI CD/DVD-ROM drive Works Requires CONFIG_BLK_DEV_PIIX in the kernel.
802.11b/g Mini-PCI Wireless LAN Not working (yet) This is an Atheros card, according to the Windows installation cd. I believe that the required module is ath_pci, but I did not yet (Feb 05) get it to work.
Integrated ALI M5603C USB web-cam Not working Linux driver not yet written (Feb 05).
ACPI Power Management Not working The nVidia driver does not support ACPI Power Management. And APM does not work with an SMP (multi-processor) kernel.
Li-ion battery Works Lasts a little over 1 hour when new.

% lspci
0000:00:00.0 Host bridge: Intel Corporation 915G/P/GV Processor to I/O Controller (rev 04)
0000:00:01.0 PCI bridge: Intel Corporation 915G/P/GV PCI Express Root Port (rev 04)
0000:00:1b.0 Class 0403: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03)
0000:00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
0000:00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
0000:00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
0000:00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
0000:00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
0000:00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d3)
0000:00:1f.0 ISA bridge: Intel Corporation 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge (rev 03)
0000:00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03)
0000:00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)
0000:01:00.0 VGA compatible controller: nVidia Corporation NV41.8 (rev a2)
0000:0a:00.0 CardBus bridge: Texas Instruments PCI1410 PC card Cardbus Controller (rev 02)
0000:0a:01.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)
0000:0a:02.0 RAID bus controller: Promise Technology, Inc. PDC20378 (FastTrak 378/SATA 378) (rev 02)
0000:0a:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

2. Introduction

The Alienware Area-51m 7700 is huge, 40 cm × 30 cm × 5 cm, and massive, 5.8 kg with battery, with a power supply that looks like it could power a small city. Alienware call it a mobile workstation, or desktop replacement. Definitely a boy toy, with its cool blue alien eyes.

The folks at Alienware were eager to please. When I told them I planned to put linux on the machine, they responded that they did not support linux. When I told them I didn't need linux support (we have good linux support in house), and I don't want Windows support either, they said fine, and were willing to ship the laptop without any operating system installed. They even said they'd give me a $80 rebate for not using Windows (wow!).

When the machine arrived, sure enough when I turned it on, it said

Operating system not found
which provoked a small frisson of pleasure. Windows was indeed nowhere to be found.

3. Installation

Loading linux on to the Alienware Area-51m 7700 proved seriously tricky.

3.1 Fedora fails

The hard drive uses a Promise SATA hard drive controller, the driver for which is, as of this writing (8 Feb 05), not yet in the Fedora kernel, not even as a loadable model. The driver exists only as a patch. An attempt to boot from a Fedora cd fails when the installer fails to find the hard drive.

One possibility would be to use the linux dd option of the Fedora boot disk to load a driver disk with the new modules on it. Unfortunately, the new modules must be created from a patched kernel, and the patched modules prove to be incompatible with the kernel and modules on the Fedora disk.

Another possibilty would be to create a new Fedora boot disk with all the relevant files on it. Unfortunately, if you do all of that and try to do a network install of Fedora, then the install fails because the md5sum of the boot disk fails to match that of the network installation.

So our electronics shop took the disk out of the laptop, and bunged it into a desktop with an old-fashioned disk cable. We loaded Fedora on to the disk, compiled a kernel patched with the new sata_promise driver, took the disk out of the desktop, put it back in the laptop, started it up and ... boot panic.

Conclusion: installing Fedora was, as of the first half of Feb 2005, a mathematical impossibility. Maybe for you it will be different: perhaps by the time you read this Fedora will have incorporated the patches into the kernel, and for you all will be plain sailing.

3.2 Gentoo succeeds

Googling around suggested trying a Gentoo install. With Fedora, the only way to get a shell from a boot disk is to use the "linux rescue" option, but that option fails without a hard disk.

By contrast, when you load the Gentoo boot disk, it puts you in a shell where you can poke around, look for disks, load modules. With Gentoo I loaded the needed sata_promise module, mounted the hard disk on /dev/sdb2, and saw the Fedora installation which had been impossible to access under Fedora. Gentoo one, Fedora zero.

For a while, I contemplated trying to fix up the Fedora installation inside a Gentoo environment. But I figured that would be asking for trouble. So Fedora got wiped out, and Gentoo got in.

Pleas to the open source developer:

If you agree with the above, then Gentoo is for you. Gentoo is all about power to the people. It let's you know every step of the way what is happening. And it let's you do just exactly what you want.

Gentoo is apparently not the only distribution that succeeds. Ivan Moore writes:

From: "Ivan E. Moore II"
Date: Fri, 22 Apr 2005

Out of the box...Ubuntu Linux 5.04 installs on the 7700.  I have pretty
much the exact setup as you.  I wanted to keep my existing Alienware XP
install so I broke the raid array, created 2 seperate ones (the respawn'd
XP croaks if it's not installed on a raided device I guess) and then
installed Ubuntu and it works.  Wireless...works...Video...out of the
box...only things I haven't tested so far is modem and audio.  Probably
have to customize my kernel for the audio and I doubt the modem will
work...ohh...and the issue you refer to with the mouse...don't have it.  I
have my USB mouse connected and the touchpad works as well...

I've never had a Linux install that has gone this well with this type of

Ubuntu is Debian based which is also extremely nice.

Hope this helps you or someone else out.


3.3 Hard disk

Turn on the Alienware Area-51m 7700, and boot into the bios by pressing F2 (quickly, perhaps repeatedly, before the opportunity passes). Under Main, the bios shows which looks as though you have a cdrom but no hard drive. Rest assured, you do have a hard drive. Under Boot, the bios shows the Boot priority order:
  1. USB FDC:
  2. PCI SCSI: SATA378 TX2plus D0
  3. IDE 0: _NEC DVD+/-RW ND-6550A-(P
  4. IDE 1:
  5. PCI LAN:
  6. ...
Number 2 on the boot list is the hard drive - or rather, it is the hard drive controller. The hard drive itself is a standard IDE disk.

The controller requires the new (Jan 05) sata_promise driver.

3.4 Gentoo installation

The Gentoo Handbook is a superbly written document on how to install Gentoo. For the Alienware Area-51m 7700, you need (as of Feb 05) the latest sata_promise driver, so you need the Gentoo "experimental" boot disk image
(or whatever the latest is) downloadable from one of the mirrors mentioned in the Gentoo handbook.

On another computer, burn the iso9660 image on to a cd using your favourite burn program, or from the command line with (change ATA:0,1,0 in the following to whatever is correct for your system, in accordance with the cdrecord documentation):
% cdrecord -dev=ATA:0,1,0 -v speed=8 -pad -data x86-installcd-minimal-2005.0-rc5.iso

Boot the Alienware Area-51m 7700 with the resulting Gentoo boot disk.

In my case, the hard disk showed up as /dev/sdb (not /dev/sda as it would later become), because the hard disk was the second scsi storage device that the Gentoo boot disk recognized. Later, when everything was installed, the hard disk would show up as /dev/sda, the first scsi storage device recognized during the boot process.

Partition the hard disk to your preference. I configured 96MB for /boot, 2GB for swap, and the rest for /. Here is my fdisk configuration:
Disk /dev/sdb: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          12       96358+  83  Linux
/dev/sdb2              13       11905    95530522+  83  Linux
/dev/sdb3           11906       12161     2056320   82  Linux swap / Solaris

Because the hard disk can show up as a different device (/dev/sda, /dev/sdb, ...) depending on when it is recognized during boot up, it is sensible to make /etc/fstab refer to the disk with a label rather than as an absolute device, as in
LABEL=/boot		/boot		ext3		noatime			1 1
LABEL=/			/		ext3		noatime			1 2
/dev/sda3		none		swap		sw			0 0
When you get to the point where the Gentoo Handbook tells you to make the filesystems (with mke2fs), you can attach labels to the /boot and / partitions with the -L option on mkfs.ext3 (an alias to mke2fs -j). Thus
% mkfs.ext3 -L /boot /dev/sdb1
% mkfs.ext3 -L / /dev/sdb2
Be careful: the mkfs.ext3 command destroys all information on the partition, so do not use it on a partition that already contains valuable data. To attach labels to /boot and / after the filesystems are made, use the tune2fs command, as in
% tune2fs -L /boot /dev/sdb1
% tune2fs -L / /dev/sdb2

In the near future you should be able similarly to label the swap partition with the -L option on mkswap
% mkswap -L /swap /dev/sda3
% swapon /dev/sda3
The -L option on mkswap has been implemented by RedHat, but is not yet in the Gentoo distribution. This is why the listing of /etc/fstab above refers to the swap device in absolute terms, as /dev/sda3. This will work as long as the hard disk remains the first scsi device recognized during the boot process. But it would be more robust to label the swap partition, and refer to the device in /etc/fstab as LABEL=/swap.

3.5 Ethernet

The internal RTL8169 Gigabit Ethernet card worked immediately on dhcp, so the Gentoo network installation could proceed without a problem.

3.6 Compile the Kernel

Follow the instructions in the Gentoo Handbook for compiling the kernel. Make sure you compile in the sata_promise driver. You should compile the sata_promise driver directly into the kernel, not as a module.

There are a bunch of other things that should (or should not) be compiled into the kernel. To shortcut the matter, here are my /usr/src/linux-2.6.10-gentoo-r6/.config and /usr/src/linux-2.6.12-gentoo-r4/.config files, tweaked to work specifically for the Alienware Area-51m 7700. Use at your risk and discretion.

Note that even though ACPI Power Management does not work, nevertheless various parts of the kernel do rely on ACPI, and ACPI must be compiled into the kernel.

Having compiled the kernel, you should install grub, again following the Gentoo Handbook. If you want the console (outside X) to have a sensible resolution and a cool background (as opposed to huge type and a black background), read the excellent Gentoo HOWTO fbsplash. The contents of my /boot/grub/grub.conf file look like this (July 05):
title  Gentoo Linux (2.6.12-r4)
	root   (hd0,0)
	kernel (hd0,0)/vmlinuz-2.6.12-gentoo-r4 ro udev video=vesafb:ywrap,mtrr,1024x768-32@60 splash=verbose,theme:emergence
	initrd (hd0,0)/fbsplash-emergence-1024x768

3.7 /etc/make.conf

This is my /etc/make.conf file. Edit yours to your own preference. The compiler options reflect the capabilities of the Pentium 4 chip in the Alienware Area-51m 7700. Try
man gcc
to find out what the compiler options mean.

The -sse2 option overrides the default -i387 option. The i387 floating point convention is used by default in most chips, but it has some idiosynchracies which can lead to weird things in code. Chief among these idiosynchracies is that with i387 it is possible to arrive at <can you get here?> in the following code segment:
	if (x != 0.) {
		... <more lines of code> ...
		if (x == 0.) {
			<can you get here?>
The reason for this is that in the first if statement, if x has an underflowing value such as 1.e-400 and x is still in a register, then the if statement will evaluate x as being non-zero. Later in the code, if x has moved out of the register, then the underflowing value will have been set to zero, and the second if statement will evaluate x as being zero. More generally, the truth or falsity of a conditional involving floating point numbers depends on whether the numbers are in registers or not, which may in turn depend on extraneous factors such as the presence of other lines in the code. For example, with i387, in
	x = y;
	if (x == y) {
the (x == y) conditional may evaluate to false!

3.8 Sound

Update July 05.

The sound driver is compiled into the 2.6.12 kernel. When you compile the kernel, turn on
Device Drivers -> Sound -> Sound card support -> Advanced Linux Sound Architecture -> PCI Devices -> Intel HD Audio

You should also turn on the other kernel options recommended in the Gentoo Linux ALSA guide. Configuring the sound driver is now made easy by running
% alsaconf
After running alsaconf, you should find that /etc/modules.d/alsa contains the following line, among others:
alias snd-card-0 snd-hda-intel
Do not leave around obsolete files such as /etc/modules.d/alsa.orig, because gentoo will look also in those files, and get confused.

Obsolete Feb 05 advice.

To make sound work, follow the excellent instructions in the Gentoo Linux ALSA guide. At the time I compiled (late Feb 05), the desired azx module was not yet in the kernel. If this is still true for you, then you will have to emerge alsa-driver as described in the guide. Note that each time you recompile the kernel, you will have to repeat emerge alsa-driver, because recompiling the kernel will cause the alsa modules to be overwritten.

First (I hope you are reading the Gentoo guide for detailed instructions), add to /etc/make.conf the following line:

After emerge alsa-driver in accordance with the Gentoo guide, add to /etc/modules.d/alsa the following line:
alias snd-card-0 snd-azx
and optionally other lines as suggested by the Gentoo guide.

End of obsolete Feb 05 advice.

As the Gentoo guide tells you, at some point you have to mute all the speakers. Don't forget that, after having followed the guide to the bitter end, you need to turn the speakers back on, which you can do using
% alsamixer

If your terminal is missing its beep, make sure that the pcspkr module is compiled into the kernel. To /etc/modules.autoload.d/kernel-2.6 add the line:
If you find the beep annoyingly loud, run alsamixer and turn the PC Speaker down to 1/2 volume.

Update July 05.

The ogle dvd player now works with the alsa audio driver.

Obsolete Mar 05 advice.

The ogle dvd player does not work with the alsa audio driver, exiting with the error message (among other messages)
ERROR[ogle_audio]: drain failed: Resource temporarily unavailable
ALSA lib pcm_hw.c:535:(snd_pcm_hw_prepare) SNDRV_PCM_IOCTL_PREPARE failed: Device or resource busy
ERROR[ogle_audio]: prepare failed: Device or resource busy
However, ogle does work under oss emulation. Edit /usr/share/ogle/oglerc so that the audio device driver is specified as oss instead of alsa:

End of obsolete Mar 05 advice.

Programs like quake2 that require exclusive access to the audio card require
# Force 48k Hz
% echo "quake2 0 0 direct" > /proc/asound/card0/pcm0p/oss
# Disable recording
% echo "quake2 0 0 disable" > /proc/asound/card0/pcm0c/oss
You can undo this with
% echo "erase" > /proc/asound/card0/pcm0p/oss
% echo "erase" > /proc/asound/card0/pcm0c/oss
See Quake 1 and modern linux, and Takashi Iwai's NOTES on kernel oss-emulation.

3.9 Video

To make the nVidia video card work under X, you should either
% emerge nvidia-kernel
or else run the nVidia driver installation script.

The xorg.conf file requires a fair bit of tweaking to work. Here's my /etc/X11/xorg.conf file. The modelines
# Modelines for the native 16:10 LCD screen.
# 1280x800 @ 60.00 Hz (GTF) hsync: 49.68 kHz; pclk: 83.46 MHz
	ModeLine	"1280x800" 83.46 1280 1344 1480 1680 800 801 804 828
# 1680x1050 @ 60.00 Hz (GTF) hsync: 63.84 kHz; pclk: 144.02 MHz
	ModeLine	"1680x1050" 144.02 1680 1784 1968 2256 1050 1051 1054 1064
are required to allow the LCD to run at 1680×1050 and 1280×800 resolutions.

If pam denies you permission to run X as an ordinary user (not superuser), then
% vigr
and add the user (yourself) to the video group. The nVidia documentation in /usr/share/doc/NVIDIA_GLX-1.0/README suggests changing the permissions of the nvidia devices (chmod 0666 /dev/nvidia*), but this advice invites an ongoing battle with pam.

If you give presentations, you will want to implement support of an external projector. My xorg.conf file does this using the TwinView option of the nVidia driver. If you are having trouble getting an external projector to work, read the comments in the /etc/X11/xorg.conf file.

If you find that applications like mplayer crash, then chances are that somehow some libraries got overwritten. Try re-emerging libraries, mplayer, and/or the nVidia driver. If you change /etc/make.conf, then you should re-emerge mplayer.

3.10 DVD player

Update July 05.

Well, I was completely wrong about there being no driver that can change the settings on this drive. Sorry about that. When you compile the kernel, turn on
Device Drivers -> ATA/ATAPI/MFM/RLL support -> Intel PIIXn chipsets support

To ensure that hdparm -d1 gets run on the CD/DVD drive at boot time, edit /etc/conf/hdparm to contain the following line
and then
% rc-update add hdparm boot

Obsolete Mar 05 advice.

The video output from DVDs is choppy. The usual fix for this is to turn on dma with the hdparm utility:
% hdparm -d1 /dev/hda
Unfortunately with the _NEC DVD+/-RW ND-6500A ATAPI CD/DVD-ROM drive this command elicits the response
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma	=  0 (off)
which, as explained by DVD Playback HOWTO is not good.

More generally,
% hdparm /dev/hda
 HDIO_GET_MULTCOUNT failed: Invalid argument
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 HDIO_GETGEO failed: Invalid argument
As of writing (March 05) there does not appear to be any linux driver that can change the settings on this drive.

End of obsolete Mar 05 advice.

mplayer is a wonderful application that plays mpegs faster and smoother than any other (even the great and venerable xanim). However, I could not persuade mplayer to play dvds (whereas mplayer plays dvds fine on my dell laptop).
% mplayer -v dvd://1
Filename for url is now dvd://1
Unknown protocol 'dvd'
Unable to open URL: dvd://1

vo: x11 uninit called but X11 not inited..

Exiting... (End of file)
Many postings on the web record the same problem, but so far no solution has been forthcoming. If you know the solution, please email me.

3.11 Superuser

Initially, pam refused to allow me to become superuser with the su command, even though I put my username in the /etc/security/suauth.allow file. The fix is to
% vigr
and add yourself to the wheel group. My guess is that pam is now set up by default to allow su access only to certain priveleged groups, notably wheel. The behavior is probably configurable in /etc/security/access.conf or /etc/security/pam_env.conf but I did not stop to figure it out.

An annoying feature of gentoo is that it does not implement a scheme that allows an ordinary user to halt or reboot the system. That makes sense of course - you probably don't want some arbitrary remote user to bring the system down. However, the user who owns the console has a special status, and they should be allowed to reboot or halt the system. RedHat provides a usermode package that implements consolehelper and userhelper commands that make this possible.

3.12 /etc/modules.autoload.d/kernel-2.6

Here is my /etc/modules.autoload.d/kernel-2.6 file.

3.13 Hyperthreading

Turn on hyperthreading in the bios. If you have a multi-processed or multi-threaded application, then the application will see the CPU as being 2 processors, and will use both. I have benchmarked my own multi-processed multi-threaded application, and indeed allowing the application to use 2 processors is faster than if you restrict the application to 1 processor.

3.14 Desktop

If you don't like nautilus putting undeletable icons on your desktop, fire up gconf-editor
% gconf-editor
then click to
and turn off the various icon_visible buttons.

Alternatively, remove nautilus from your installation. After removing nautilus, you may find that desktop backgrounds do not persist across sessions. If so, then in gconf-editor set
desktop->gnome->background->draw_background true
apps->nautilus->preferences->background_set false
apps->nautilus->preferences->show_desktop false

I am delighted to find that the feature-rich sawfish window-manager
% emerge x11-wm/sawfish
% emerge x11-themes/sawfish-themes
still works under gnome, and that viewports and edge-flipping still work, although by default those capabilities are hidden from view. That is, not only are viewports and edge-flipping turned off, but the ability to turn them on is by default suppressed in the sawfish-ui sawfish configuration manager. My .sawfishrc file is as suggested by Making GNOME 2.2 Usable with Viewports. This is my customized .sawfish/custom file, some part of which appears necessary to complete the implementation of viewports and edge-flipping. Use the
% sawfish-ui
command to reconfigure sawfish to your taste. Here is the full list of options that can go in the .sawfishrc file.

gnome-terminal offers a pretty terminal window, but it has become horribly slow. If a high-performance graphics application that normally runs full screen at 30fps or 60fps writes diagnostic messages to a gnome-terminal at say one line per frame, then gnome-terminal will seriously slow the application, say by a factor of two. My guess is that one of the developers of gnome-terminal put in a sleep command after each line of output (so you can read it, right?). How else could a program that has to do so little run sooo slooowwww? Dumb, dumb, dumb. Workaround: revert to old-fashioned xterm when speed is critical.

My favourite fixed width font for terminals used to be miscfixed medium semicondensed 10, but gnome-terminal have removed that option (even if you take the precaution of explicitly putting FontPath "/usr/share/fonts/misc/:unscaled" at the top of the list of fonts in your /etc/X11/xorg.conf file). A good alternative is LucidaTypewriter 9. For some strange reason choosing LucidaTypewriter Regular with Edit->Current Profile from the gnome-terminal Menubar, gives LucidaTypewriter Bold instead of LucidaTypewriter Regular. The workaround is to fire up gconf-editor, choose apps->gnome-terminal->profiles->default, and set font to LucidaTypewriter 9.

If xscreensaver is left running, then sooner or later it will freeze the computer, requiring a hard reboot (press the off button). The web is full of messages from people recounting the same problem, and no one seems to have a good answer except to guess that the OpenGL configuration is wrong. Well, that ain't so, because I have OpenGL apps that run for ages without crashing the system. Solution:
% emerge --unmerge xscreensaver
It is possible that it is one particular screensaver application that crashes xscreensaver. If you take the time to figure out which one is the mole, email me.

Even with xscreensaver removed, the computer will, after some period of inactivity, first blank its screen, then put itself into suspend (or something), even if a program is running in background, and even if the computer is plugged into the A/C mains. This is not polite of course, because without APM or ACPI support, a suspend is equivalent to hanging the computer. I think it is xset() that is doing the dirty, The fix is to put the following into your /etc/xorg.conf:
Section "ServerFlags"
# Turn off any Power Management events.
	Option	"NoPM"	"true"
# Following set xset() values.	0 means infinite.
# Minutes of inactivity before screen blanks.
	Option	"BlankTime"	"0"
# Minutes of inactivity before DPMS standby.
	Option	"StandbyTime"	"0"
# Minutes of inactivity before DPMS suspend.
	Option	"SuspendTime"	"0"
# Minutes of inactivity before DPMS off.
	Option	"OffTime"	"0"

The panel battery applet (/usr/libexec/battstat-applet-2) requires the apmd library to run
% emerge apmd
It is not necessary to compile APM support into the kernel, and indeed if APM is compiled into the kernel it will be ignored because APM is not implemented for multi-processing (smp) kernels. If the battery applet is started and the apmd library is not installed, then gnome returns the misleading message
The panel encountered a problem while loading "OAFIID:GNOME_BattstatApplet".
Details: Failed to resolve, or extend '!prefs_key=/apps/panel/profiles/default/applets/applet_5/prefs;background=none:;orient=up;size=x-small;locked_down=false
Though gnome tries to hide what it is doing from the user (sadly), it is possible to find out what is really going on by running directly the command
% /usr/libexec/battstat-applet-2
which elicits the message
/usr/libexec/battstat-applet-2: error while loading shared libraries: libapm.so.1: cannot open shared object file: No such file or directory
which reveals what the real problem is.

3.15 Clock

The Alienware Area-51m 7700 has a cool blue glowing digital clock on its front. The clock is tied to the internal hardware clock, so if you want the clock to show the correct time, you will have to set your hardware clock to local time, not to UTC as is normal in a linux environment. Thus your /etc/rc.conf file should contain the line

3.16 Special keys

The Fn-F3 mute, Fn-F5 volume down, and Fn-F6 volume up keys are all soft keys, so are straightforward to program to do their job (with your window manager's key preferences tool). Under X, fire up
% xev
to see the codes the keys produce.

Similarly, the "email" and "web" special keys near the on/off switch are soft keys, and you can program them to do what you want.

3.17 Modem

scanModem and slmodem (emerge slmodem) failed to identify the internal modem.

Thanks to Thomas Dilts for pointing out http://www.lazy8.nu/delld180/DebianLinuxOnDellLattitude810laptop.html#step13 that http://www.linuxant.com/ offer a partly free driver that works.

However, I have an old EigerCom 56K PCMCIA modem that works fine.

Neither gnome-ppp nor wvdial was able to configure the modem set up correctly, and gentoo documentation is silent. (Incidentally, wvdial creates a world-readable file /etc/wvdial.conf containing your modem password, so after emerge --unmerge wvdial make sure to clean up after wvdial by deleting /etc/wvdial.conf). So I plagiarized my old redhat modem configuration and pppd script, modifying them to the gentoo environment. For gentoo, the ppp0 configuration file is /etc/conf.d/net.ppp0, and other relevant files and scripts are in the /etc/ppp directory. The core thing that a dialout script does is run the ppp daemon pppd with a suitable set of arguments, such as
% /usr/sbin/pppd updetach /dev/modem 115200 remotename ppp0 modem crtscts asyncmap 00000000 defaultroute mru 2048 mtu 2048 connect /usr/sbin/chat -f /etc/ppp/chat-ppp0
You should not run this directly, but rather create or plagiarize a script that does it for you. To debug what is happening, run (as superuser)
% tail -f /var/log/messages

Gentoo puts the login and password in /etc/conf.d/net.ppp0, but the more usual, potentially more secure (encryptable) approach is to put these in the pap or chap secrets file /etc/ppp/pap-secrets or /etc/ppp/chap-secrets (whichever protocol the remote server uses), as described by the pppd(8) man page. You must create a file /etc/ppp/peers/callname containing the lines
name <login_name>
where, as described in the pppd(8) documentation, <login_name> is the name in the /etc/ppp/pap-secrets or /etc/ppp/chap-secrets file. For security,
% chown root:dialout /etc/ppp/peers/callname
% chmod 640 /etc/ppp/peers/callname

You should be able to dial out as an ordinary user, not as root. To do this, you should (as superuser)
% vigr
and add yourself to the dialout group.

To allow cardmgr to set up the serial port consistently on the modem, install setserial:
% emerge setserial

Update July 05.

It appears that whatever it is that attempts to change group ownership of the modem to dialout no longer succeeds. I think this is a gentoo thing, something to do with udev(8). The workaround is to
% vigr
and add the user (yourself) to the tty group.

3.18 Internationalization

In some wonderful future, international characters (Chère chérie, Être baisé à tes lèvres, ça me plaît...) will be available effortlessly through utf8 Unfortunately utf8 breaks some crucial programs such as the debugger ddd(1).

To implement international characters, even simple 8-bit latin1 iso88591 characters, there's a bunch of things to do. First, you must compile appropriate native language support into the kernel (File systems -> Native Language Support). I set the default NLS option to utf8, compiled Codepage 437 (United States, Canada) and ASCII (United States) directly into the kernel, and turned on everything else as a module (heck, why not). Next, in gentoo, make sure that the USE flag in /etc/make.conf contains the nls parameter.

To find out what your current locale is defined to be, run
% locale
To see what locales are available, run
% locale -a
In gentoo, you define your preferred locale by editing /etc/env.d/02locales to contain lines such as
Having done so, update your environment with
% env-update

If you use the tcsh shell, as I do, then, as explained on the tcsh(1) man page, to implement utf8 characters it is necessary to compile tcsh with KANJI and DSPMBYTE defined. To do this in gentoo, make sure that the USE flag in your /etc/make.conf contains the cjk parameter. Then
% emerge tcsh
You may also find it necessary to set the dspmbyte shell variable. To do this (see http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=89549) edit /etc/profile.d/tcsh-settings to include an additional case *UTF-8 in the LANG switch, as in
  switch ( ${LANG:r} )
    case *UTF-8:
      set dspmbyte=utf8
Voilà! You have access to 8-bit characters.

Though probably somewhat out of date,

offers advice about other programs.

3.19 Mouse

The synaptics touchpad works fine. However, if you have a USB mouse plugged in at boot time (as I often do), then the boot procedure fails to load the synaptics driver for the touchpad, with the result that the nice synaptics capabilities, like tapping the touchpad being equivalent to a mouse click, cease to work. Workaround: do not plug in a USB mouse till after boot up.

Updated 20 July 2005