Gentoo Linux: Digimate M-2615 Laptop

Home
I'd wanted a laptop for some time so, after researching what was available and deciding what I wanted it for, I bought the rather nice Digimate M-2615 from Aria Technology. Checkout the 'tour', it has an interactive flash animation of the connections and layout.

Contents

Introduction
Recent changes
Gentoo base-installation
ALSA Sound
Xorg-X11 X Window system
KDE Desktop
DVD Player
Touchpad and External USB Mouse
USB Camera
USB Scanner
Smart Link 56K Modem
Network Configuration
KDE Menu Editor problem
Guarddog Firewall
K3B CD-Burner
Reboot and Poweroff
Intel PRO/Wireless LAN 2100
ACPI Power Management
Hardware List
Configuration files
Links
Digimate M-2615 Laptop PC
  • CPU : Intel Mobile Pentium-M 1.5GHz /1MB L2 Cache
  • Screen: 14.1" XGA TFT (1024 x 768)
  • Memory : 256 DDR SDRAM (1GB Max.)
  • Video: Intel 82855GM Graphics Controller
  • Hard Drive: 40GB, 9.5mm thin
  • DVD+CD-RW Combo Drive
  • One Type II PC Card/CardBus Slot
  • One 4in1 Card Reader (MS / SM / SD / MMC)
  • One FAX Modem port (RJ-11)
  • One LAN port (RJ-45)
  • Three High Speed USB 2.0
  • One IEEE1394 port
  • One S-Video port
  • One VGA DB-15 pin
  • One Microphone-in
  • One headphone-out
  • Battery : 4400mAh
  • Dimensions(mm) : 318*277*30
  • Weight : 2.5 kg

Introduction

As a programmer, I need access to Windows for development and testing and have been using Windows 2000 successfully for a number of years. I partitioned the 40G drive into an 8G NTFS partition, the rest unused, and installed Win2K without any problems. For web-browsing, e-mail and everything else, I have been using Gentoo Linux for over a year on a desktop system, have learnt a lot, and even had a bit of fun! This page documents my attempts to get a Gentoo Linux / Win2K dual-boot system setup and working.

Recent changes

Discovered that The Gimp didn't have printing support and that the built-in help wasn't available. Added the 'doc' and 'gimpprint' USE flags to make.conf and re-ran 'emerge -av gimp'.

Gentoo base-installation

I initially tried the 'install-x86-minimal-2004.1' Gentoo LiveCD, but it didn't automatically detect the network interface (VT6105 [Rhine-III]) and I failed to get it working manually. Being a big fan of Knoppix which I knew worked (surfing the web less than 5 minutes after unpacking!), and knowing that there were instructions for installing Gentoo Linux using a Knoppix CD, I decided to go this route.

After configuring the BIOS (<F2>) to try booting from CD-ROM, and making sure that the Knoppix CD was in the drive, it booted. (Note: unusually, the graphical boot-screen was corrupted, but the instructions were readable) I just hit 'enter' when prompted, and eventually arrived at a good-looking KDE desktop. I sparked-up a console using CTRL-ALT-F2 and then followed the alternate instructions.

I used the pentium3 stage3 tarball (a Pentium-M is a kind of 'super' pentium III) as the stage1 tarball wasn't available, and opted for a 2.6 version of the Linux kernel using 'emerge gentoo-dev-sources'.

I chose to use syslog-ng, grub, fcron, and partitioned the disk, using cfdisk, like this:
  Name    Flags    Part Type    FS Type        [Label]    Size (MB)
-------------------------------------------------------------------
  hda1    Boot      Primary     NTFS                        8389.79    Windows 2000
  hda5              Logical     Linux ext2                    65.81    /boot
  hda6              Logical     Linux swap                   509.97
  hda7              Logical     Linux ReiserFS             31042.21    /
After completing installation and successfully rebooting, doing 'emerge -a world' resulted in the following message:
root@tty1[/]# emerge -a world
These are the packages that I would merge, in order: 
 
Calculating world dependencies    

*** Package in world file is not installed: sys-apps/fileutils

*** Package in world file is not installed: sys-apps/textutils

*** Package in world file is not installed: sys-apps/sh-utils

 ...done!
A quick search on the Gentoo Forums found this which suggests reading this message:
root@tty1[/]# esearch -c sh-utils
[ N] sh-utils (2.0.15-r1):  textutils, sh-utils and fileutils moved to coreutils
After 'emerge esearch' and 'eupdatedb', I confirmed this, and edited the world file '/var/cache/edb/world' to remove the entries for fileutils, textutils and sh-utils and to add an entry for 'sys-apps/coreutils'.

Before configuring anything else I emerged a few of my favourite utilities:

ALSA Sound

The Gentoo Linux ALSA guide is helpful for ALSA configuration in general. I opted to build the snd-intel8x0 drivers and support as modules which means that /etc/modules.d/alsa needed editing.

In the past, I've found sound on Linux to be a royal pain. With one application blocking access to the sound device, how are you supposed to play music over your favourite game?

With ALSA, this is possible using 'dmix' and an /etc/asound.conf script. All ALSA aware applications (or with an ALSA plugin) will now play happily together.

Xorg-X11 X Window system

The Gentoo Linux X Server Configuration HOWTO is helpful for Xorg-X11 configuration in general. I wanted hardware-accelerated 3D graphics (OpenGL) and overlay surfaces (DVD scaling). This involved building the kernel (DRM) drivers for the AGPGART and the graphics chipset.

I tried the stock Gentoo distribution, but enabling Direct Rendering resulted in a hard-lock whilst starting X, and (recoverable) damage to my disk drive. An 'Option "NoAccel"' in XF86Config 'solved' the problem but I was left with no hardware acceleration. I ended up building a version fresh out of cvs by following these instructions: X.org Foundation CvsPage.

This was when I discovered that I should be using the new 'i915' driver along with the intel AGPGART. These were loaded at startup by making entries in '/etc/modules.autoload.d/kernel-2.6':
intel-agp
i915

KDE Desktop

I just did an 'emerge -a kde' which gets you the KDE desktop and a load of KDE applications.

Configuration and Applications

Fonts

First I improved the range of fonts available: Some of the above steps may be redundant, I just fiddled 'til it worked.

Cursors

Changed the low visibility black pointer for this set of flat, white pointers which are much easier to see against Hubble Space Telescope desktop pictures. I extracted the archive and, as a normal user, did a "make install" which installed the theme files for just this user. To activate them I then edited the file "/usr/share/cursors/xorg-x11/default/index.theme":
[Icon Theme]
Inherits=flatcursor
and restarted X.

Konsole

Improving the readability of 'Konsole' (the KDE xterm) involved disabling anti-aliasing for 'Konsole' only, which I did by editing the 'Properties' of the 'Terminal/Shell' button on the taskbar, and changing the command to 'konsole --noxft'. I also changed the 'Konsole' font to 'Lucida Typewriter', regular, size 12.

Other

Then I installed more of my favourite applications, games and tools:

DVD Player

My Gentoo USE flag settings are from my PIII system (see below), so MMX and SSE are already enabled. I used 'emerge -a mplayer' to install MPlayer. I added a symbolic link using the command 'ln -s /dev/hdc /dev/dvd' to make MPlayer happy, and edited '/etc/mplayer.conf' to set defaults:
ao=alsa         # use ALSA
vo=xv           # use the Xv overlay
fs=yes          # fullscreen video 
To get it to use the Linux hardware RTC, I changed the group for '/dev/misc/rtc' using the command 'chgrp audio /dev/misc/rtc' and then added:
# Enable user-defined RTC frequencies
echo 1024 > /proc/sys/dev/rtc/max-user-freq
to '/etc/conf.d/local.start' to allow a user (in the audio group) to set the RTC frequency to 1024Hz maximum.

I started missing the introduction and scene selection interface so I installed Xine as well. It requires 'libdvdcss' to actually play encrypted (most) DVD's but this isn't emerged automatically for legal reasons.

Touchpad and External USB Mouse

The Synaptics Touchpad drivers and a GUI control program qsynaptics proved easy to install and get working. It was a relief to get a 'scroll-wheel' and middle mouse button capability back. Configuration details are in the XF86Config (see below). I had to adjust the 'RightEdge' option to get the vertical scrolling to work reliably. To make an external USB mouse 'just work' when plugged in, I have this in XF86Config which also enables its scroll-wheel :
Section "InputDevice"
    Identifier	"Mouse"
    Driver	"mouse"
    Option      "Protocol"        "Auto"
    Option      "Device"          "/dev/mouse"
    Option      "ZAxisMapping"    "4 5"
EndSection

Section "ServerLayout"
    Identifier  "Simple Layout"
    Screen      "Screen 1"
    InputDevice "Synaptics Touchpad" "CorePointer"
    InputDevice "Mouse"              "AlwaysCore"
    InputDevice "Keyboard1"          "CoreKeyboard"
EndSection

USB Digital Camera

I've got a 'Canon Powershot A70'. I use 'gphoto2' and 'gtkam' on my desktop. After previous experiences with 'hotplug', I was pleasantly surprised by how easy it was to get the interface to the camera working. I just plugged in the camera, started gtkam, chose 'Camera|Add Camera..' from the menu, and clicked on the 'Detect' button!

USB Scanner (Mustek Scan Express 1248UB)

I followed this document HOWTO Install a USB scanner to get my new (£25) scanner working. Obtained the following:
# lsusb
Bus 003 Device 002: ID 055f:021f Mustek Systems, Inc.
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 002: ID 0458:0003 KYE Systems Corp. (Mouse Systems) Genius NetScroll+
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
giving the required VendorID : 055f and ProdID : 021f and then using the SANE Supported Scanners - Search Engine to discover that I need to use the 'sane-gt68xx' driver, providing 'complete' support. I'd already checked this before purchase and must say that it influenced my choice of scanner.

After setting 'SANE_BACKENDS=sane-gt68xx' in '/etc/make.conf' as suggested in the docs, I did:
emerge -av coldplug sane-backends xsane
(first checking that 'hotplug' was up to date). Unfortunately, the version of SANE that I built doesn't make use of the SANE_BACKENDS variable, so it built all the backends anyway(!) I remembered to do:
rc-update add coldplug boot
and moved on to configuration. The file '/etc/hotplug/usb/libsane.usermap' already knew about my scanner so I proceeded to edit '/etc/sane.d/sane-gt68xx.conf'. Here, it appeared that the scanner would be autodetected, so I didn't need to change a thing.

Used the following:
# gpasswd -a root scanner
# gpasswd -a <user> scanner
to set up group membership, then logged out and back in again.

When I started coldplug, it seemed to work but came up with some strange permission errors:
# /etc/init.d/coldplug start
 * Coldplugging input devices ...                                                               [ ok ]
 * Coldplugging isapnp devices ...                                                              [ ok ]
 * Coldplugging pci devices ...                                                                 [ ok ]
 * Coldplugging pnp devices ...                                                                 [ ok ]
 * Coldplugging usb devices ...
chown: cannot access `/proc/bus/usb/001/003': No such file or directory
chmod: cannot access `/proc/bus/usb/001/003': No such file or directory                         [ ok ]
which I ignored for now.

SANE scanner detection test and scanner info was obtained like this:
$ sane-find-scanner -q
found USB scanner (vendor=0x055f, product=0x021f [USB Scanner], chip=GT-6816) at libusb:003:003
$ scanimage -L
device `gt68xx:libusb:003:003' is a Mustek ScanExpress 1248 UB flatbed scanner
When I tried to run xsane, after clicking on the disclaimer, I got the following error:
[gt68xx] Couldn't open firmware file (neither `/usr/share/sane/gt68xx/SBSfw.usb' nor 
`/usr/share/sane/gt68xx/sbsfw.usb'): No such file or directory
I was feeling optimistic, so I rebooted, thinking that perhaps coldplug didn't like being run so long after hotplug. No such luck: produced the same errors on startup, and xsane still didn't work.

The trouble-shooting section mentions the coldplug problem: a tweak to '/etc/hotplug/usb.rc' should fix it, and it did! No joy with xsane yet, though.

I then followed the advice about removing the SANE_BACKENDS variable and re-emerging(Doh!). Still no joy, so it was time to investigate this 'missing firmware' problem. Discovered that there is a man page for the backend:
$ man sane-gt68xx
and that there is an up to date backend site. The missing firmware file is here: SBSfw.usb. Making a directory '/usr/share/sane/gt68xx/' and copying the 'SBSfw.usb' file into it did the trick. Hurray!

Hmmmm. Managed to get a preview scan and selected a region for the full scan. Unfortunately, it segfaulted on me :-( I was using sane-backends 1.0.15 - changed to 1.0.17 as recommended and that crashed as well. Tried updating xsane from 0.97 to 0.98a, and deleting the old xsane config files:
$ rm -rf ~/.sane
That fixed it! To get the GIMP plugin built, I had to add 'gimp' to the USE flags and rebuild xsane. This added a pair of menu items to the GIMP 'File|Acquire' menu.

Smart Link 56K Modem

Update: After upgrading to kernel 2.6.15-gentoo-r1, even the patched slamr driver wouldn't work, so I tried the ALSA-based driver and found that this worked:
$ ACCEPT_KEYWORDS="~x86" emerge -av net-dialup/slmodem-2.9.11_pre20051101
I'm using the ALSA drivers in the kernel, and enabled these PCI drivers:
<M> Intel/SiS/nVidia/AMD/ALi AC97 Controller
<M> Intel/SiS/nVidia/AMD MC97 Modem (EXPERIMENTAL)
I found this useful for checking that the modem hardware and driver were happy:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: I82801DBICH4 [Intel 82801DB-ICH4], device 0: Intel ICH [Intel 82801DB-ICH4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: I82801DBICH4 [Intel 82801DB-ICH4], device 4: Intel ICH - IEC958 [Intel 82801DB-ICH4 - IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Modem [Intel 82801DB-ICH4 Modem], device 0: Intel ICH - Modem [Intel 82801DB-ICH4 Modem - Modem]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
and I set /etc/conf.d/slmodem to this:
# Config file for /etc/init.d/slmodemd

DEV=/dev/ttySL0
COUNTRY=UK
GROUP=dialout
# the group should be kept in sync with:
# /etc/devfs.d/slmodem (devfs)
# /etc/udev/rules.d/55-slmodem.rules (udev)

# The following symlink will be created if uncommented
LN_DEV=/dev/modem

# Raise priority to reduce modem dropouts
NICE=-6

# ALSA Options:

# The following sets the ALSA (alsasound) init script to
# be a dependancy of the slmodem one. It does also provides
# ALSA support.
MODULE=alsa

# The modem hardware slot
# use "modem:0", "modem:1", etc.
# usually modem:1 is used
HW_SLOT=modem:1
I checked that I was a member of the 'uucp' and 'dialout' groups and then made sure that I could dial-out using minicom. This only worked when I used the ALSA device 'modem:1', 'hw:1' looked like it worked but the modem didn't go on-line when dialing.

Previously: Download the Linux driver from Smart Link Driver Downloads. I used slmodem-2.9.10, but it may have moved or been updated by now. Unfortunately, these drivers didn't work with the latest 2.6.11 kernel without being patched. I found a solution to the
# modprobe slamr
FATAL: error inserting slamr (/lib/modules/2.6.11-gentoo-r4/extra/slamr.ko): 
Unknown symbol in module, or unknown parameter (see dmesg)
#
# dmesg | grep slamr
slamr: module license 'Smart Link Ltd.' taints kernel.
slamr: Unknown symbol get_device
slamr: Unknown symbol put_device
slamr: Unknown symbol device_release_driver
slamr: Unknown symbol get_device
slamr: Unknown symbol put_device
slamr: Unknown symbol device_release_driver
messages I was getting here, and I've put a copy of this patch online.

As a normal user, I changed into my 'utils' directory, extracted the archive using the command :
$ tar xvzf ~/zips/smartlink-modem/slmodem-2.9.10.tar.gz
and after reading the README, edited the Makefile to point to my kernel source tree '/usr/src/linux' and then typed 'make' to build the drivers, utilities etc. To install, I typed 'su -c "make install"' and entered the root password when prompted.

Next you need to know your country-code/country-name. To get a list of these, I used:
$ /usr/sbin/slmodemd --countrylist 2>&1 | less
For where I live, the country-name is 'UK' and the county-code is 'b4'.

I added 'slamr' to '/etc/modules.autoload.d/kernel-2.6' and then hacked up Gentoo compatible 'init' and 'conf' scripts which I put into '/etc/init.d/' and '/etc/conf.d/' respectively (see below). After setting the executable bit using the command:
# chmod +x /etc/init.d/slmodemd
I tested manually :
# modprobe slamr                 # load the kernel module for the modem
# /etc/init.d/slmodemd start     # start the soft-modem application
# ps aux                         # see if running
# /etc/init.d/slmodemd stop      # stop the soft-modem application
# ps aux                         # see if stopped
then set it to be started up with everything else:
# rc-update add slmodemd default
I emerged 'minicom' so that I could test it:
# emerge -a minicom
and did a reboot to see how I was doing. To get anywhere with 'minicom' as a non-root user, I became a member of group 'uucp' and allowed group write on '/var/lock' with the command:
# chmod 775 /var/lock
I also made a symbolic link '/dev/modem' for mnemonic purposes:
# ln -s /dev/ttySL0 /dev/modem
Getting somewhere now, I configured 'minicom' to use '/dev/modem' through the configuration screens reached using 'CTRL-A Z O', then choosing 'Serial port setup'. I was rewarded with an AT command (from minicom) echoed back with an OK. ATZ seemed to work, so I tried my ISP using 'ATDT 1234567890'. I couldn't hear anything, but it seemed to connect and displayed some garbage on the screen.

I read further in the README file, noticed the 'ALSA mode', but thought it was probably more sensible to see if I could connect for real using 'KPPP'. Remembering that 'KPPP' needs 'ppp', I installed it:
# emerge -a ppp
Setting up an account with KPPP is routine and it worked second time, after I'd got my password correct. I had to disable my broadband Ethernet connection first by issuing:
# ifconfig eth0 down            # disconnects the bb connection
# ifconfig                      # check its gone
Worked a treat, but I would have liked some audible feedback, and a firewall!

Network Configuration

By now, I'd noticed that if I forgot to plug-in the ethernet cable before starting, there was a nasty delay and lots of error messages. A while back I came across ifplugd which periodically checks to see if an ethernet cable has been plugged-in or un-plugged, and if so, runs a script that either starts or stops networking. This is similar to the scripts that are run when a PPP connection is made or broken.

The latest stable Gentoo version was quite old, so I just downloaded and compiled by hand. The library libdaemon is also required, and I compiled this first. I used the following commands to build them:
$ cd ~/utils/libdaemon-0.6
$ ./configure --prefix=/usr --disable-doxygen
$ make
$ su -c "make install"
$ cd ~/utils/ifplugd-0.25
$ ./configure --prefix=/usr
$ make
$ su -c "make install"
To set it up I did this:
$ rc-update remove net.eth0   # Don't start network automatically
$ rc-update remove sshd       # or anything else that depends on a network connection
and added these lines to the end of '/etc/conf.d/local.start':
# start the ifplugd
/etc/init.d/ifplugd start
To observe what was happening when I plugged and un-plugged the cable, I ran this in one shell:
$ su -c "tail -f /var/logs/messages"
and this, periodically, in another:
$ /sbin/ifconfig
This revealed that I was missing the scripts '/sbin/ifup' and '/sbin/ifdown' which I added thus:
File '/sbin/ifup'   :

#!/bin/sh
/etc/init.d/net.eth0 start
/etc/init.d/sshd start

File '/sbin/ifdown' :

#!/bin/sh
/etc/init.d/sshd stop
/etc/init.d/net.eth0 stop
These needed to be made executable by running:
# chmod +x /sbin/ifup /sbin/ifdown
This sort-of worked, but when the cable was unplugged I was left with a broken 'eth0' according to 'ifconfig'. This turned out to be because I needed to start 'ifplugd' with the '-a' option. I added the '-a' to this line in the file '/usr/etc/ifplugd/ifplugd.conf':
ARGS="-afwI -u0 -d10"
At this point everything looked good, so I rebooted and confirmed that everything worked OK.

KDE Menu Editor problem

Discovered that the KDE menu editor wasn't working correctly. Adding and removing entries appeared to work, but after saving all changes would be lost - very irritating. After making multiple searches on Google I finally noticed that there was a lot of talk about a '.config' directory that I didn't have.

Before installing X, I had put a copy of my kernel '.config' file into my home directory and this was preventing the creation of a '.config' directory used by KDE. Ouch!

Guarddog Firewall

The 2.0.0 version of Guarddog in portage doesn't work with the 2.6 Kernel series, and rather than use the 'unstable' 2.3.1 alternative, I downloaded and installed the stable 2.2.0 version. There is nothing much to say about building and installing, it just worked.

Configuration was more complicated though. Guarddog is a configuration tool for the 'iptables' packet-filter that is part of the Linux Kernel. It is controlled by a set of 'rules' about what kind of packets from where are allowed through to which destination, and is quite complex to setup, but very powerful.

Guarddog creates a script, '/etc/rc.firewall', that basically calls the 'iptables' tool with the right arguments to setup the firewall you described to Guarddog using its friendly user interface. It isn't as easy to use as, say, Zone-Alarm for Windows, but it does the job, and I found it quite educational, not being a networking expert.

In brief: I read the tutorial material, added a LAN Network Zone, a small number of missing protocols: and enabled DNS, HTTP/HTTPS, FTP etc. as described in the documentation. Using other machines on the network, it was easy to test and understand what the setting were doing by trying to get ping working. Being able to ping other machines from the laptop and being able to ping the laptop from other machines got the concepts fairly clear in my mind.

The next step was to get the generated script, '/etc/rc.firewall', run at the right times, which is pretty much anytime the network configuration changes. I edited '/etc/init.d/net.eth0' and added a pair of functions at the end of the script which get called automatically for you:
postup() {
    ebegin "  Reconfiguring firewall"
    /etc/rc.firewall
    eend 0
}

postdown() {
    ebegin "  Reconfiguring firewall"
    /etc/rc.firewall
    eend 0
}
I also added the following lines to the end of scripts '/etc/ppp/ip-up' and '/etc/ppp/ip-down':
# Reconfigure the firewall rules
/etc/rc.firewall
which are called by pppd when a dialup connection is made/lost. Not exactly elegant, but it seems to work well. Unplugging the ethernet cable to drop eth0, and then using KPPP, I visited Shields Up! to check that the firewall was working. Passed with flying colours.

K3B CD-Burner

Whilst the 'cdrtools' collection is technically very impressive, it doesn't appeal to someone who just wants to backup some files, or make a copy of an audio CD. Enter K3B which, if you are familiar with Easy-CD (one of the versions that worked properly that is) will make you feel right at home. It has an easy to use 'Copy' button which will copy Audio and Data CDs without much fuss, will burn ISOs and has quite a nice project builder interface. It emerged painlessly, and on first running, prompted me to run the companion k3bsetup program. K3bsetup presumably 'captures' the root password, and requires a user to be a member of the 'cdrw' group. After logging back in and restarting X, it worked fine and I successfully burnt a test CD.

Just for the record (ho, ho, ho) here is the output of 'cdrecord':
# cdrecord -scanbus dev=ATA
Cdrecord-Clone 2.01a28 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
scsidev: 'ATA'
devname: 'ATA'
scsibus: -2 target: -2 lun: -2
Warning: Using badly designed ATAPI via /dev/hd* interface.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
scsibus1:
        1,0,0   100) 'QSI     ' 'CDRW/DVD SBW-242' 'UX09' Removable CD-ROM
        1,1,0   101) *
        1,2,0   102) *
        1,3,0   103) *
        1,4,0   104) *
        1,5,0   105) *
        1,6,0   106) *
        1,7,0   107) *

Reboot and Poweroff

I emerged 'sudo' so that I could run '/sbin/reboot' and '/sbin/poweroff' as a normal user without having to type the root password in everytime. sudo is configured by editing '/etc/sudoers' using the command 'visudo'. I found it a little tricky to figure out, but 'man sudo' and 'man sudoers' were quite helpful. I used the following, which allows local users in the wheel group to use the command 'sudo /sbin/poweroff' to switch off or restart the machine.
# Cmnd alias specification
Cmnd_Alias ONOFF = /sbin/reboot, /sbin/poweroff

# User privilege specification
root    ALL=(ALL) ALL

%wheel  localhost=NOPASSWD: ONOFF
%wheel  digimate=NOPASSWD: ONOFF

Intel PRO/Wireless LAN 2100

Luckily, this WiFi card has quite mature Linux drivers, and has support from Wireless Tools for Linux. I checked with the Gentoo package list and, whilst the above drivers and tools are included, they aren't very upto date. I downloaded wireless_tools.27.pre25.tar.gz, drivers ipw2100-1.1.0.tgz and the card firmware ipw2100-fw-1.3.tgz.

I unpacked them and read the INSTALL file for the drivers. First, I decided to build the driver 'outside' the kernel as I'm already doing that for the modem. This meant that I had to check that the CONFIG_NET_RADIO kernel configuration option was set, it wasn't so I sorted that out whilst also ensuring that CONFIG_CRYPTO_ARC4 and CONFIG_CRYPTO_CRC32C were set. After rebuilding, installing and rebooting, a simple 'make', 'make install' ritual did the job. Note: there were some warnings about missing CRCs which I just ignored. I built the wireless tools the same way, but edited the Makefile first so that they would install in '/usr/sbin' instead of '/usr/local/sbin'. As directed by the INSTALL file, I also moved the firmware files and licence into the directory '/usr/lib/hotplug/firmware/'.

At this point I was pretty much left on my own as the example in the INSTALL instructions was for an rc system quite different from Gentoo's. Fortunately, it wasn't difficult to check that it worked manually. As root I did:
# modprobe ipw2100
# lsmod
...
ipw2100               151708  0
firmware_class          7744  1 ipw2100
ieee80211              13892  1 ipw2100
ieee80211_crypt         4996  1 ieee80211
...
which was reassuring. Then I tried using some of my new wireless tools:
# iwconfig
eth0      no wireless extensions.

lo        no wireless extensions.

eth1      IEEE 802.11b  ESSID:""  Nickname:"ipw2100"
          Mode:Managed  Channel:0  Access Point: 00:00:00:00:00:00
          Bit Rate=0kb/s   Tx-Power=32 dBm
          Retry:on   RTS thr=2304 B   Fragment thr:off
          Encryption key:off
          Power Management:off
which looked promising. After a rather embarrasing episode trying to test the WiFi card using Windows 2000, where I forgot about the miniature WiFi power switch at the front (Doh!), I slid the lock to one side and pushed the button. This time I got a bit more:
eth0      no wireless extensions.

lo        no wireless extensions.

eth1      IEEE 802.11b  ESSID:"XXXXXX"  Nickname:"ipw2100"
          Mode:Managed  Frequency:2.462GHz  Access Point: XX:XX:XX:XX:XX:XX
          Bit Rate=1Mb/s   Tx-Power=32 dBm
          Retry:on   RTS thr=2304 B   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=30/100  Signal level=-88 dBm  Noise level=-98 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:6
The XXs are where I've replaced specific WAP information. This was all the more surprising as I don't actually have a WAP (Wireless Access Point) at home! One of my neighbours must have though... As I'm not 'up-to-no-good' I decided to continue and see how far I could get.
# ifconfig eth1 up
# ifconfig
...
eth1      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:11 Base address:0x2000 Memory:e0001000-e0001fff
...
# dhcpcd eth1
# ifconfig
...
eth1      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          inet addr:192.168.1.104  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:1240 (1.2 Kb)  TX bytes:4142 (4.0 Kb)
          Interrupt:11 Base address:0x2000 Memory:e0001000-e0001fff
...
At this point it was clear that it was working so I tried a few other tools:
# /usr/sbin/iwlist eth1 scanning
eth1      Scan completed :
          Cell 01 - Address: XX:XX:XX:XX:XX:XX
                    ESSID:"XXXXXX"
                    Mode:Master
                    Frequency:2.462GHz (Channel 11)
                    Bit Rate:1Mb/s
                    Bit Rate:2Mb/s
                    Bit Rate:5.5Mb/s
                    Bit Rate:11Mb/s
                    Bit Rate:18Mb/s
                    Bit Rate:24Mb/s
                    Bit Rate:36Mb/s
                    Bit Rate:54Mb/s
                    Quality=23/100  Signal level=-75 dBm  Noise level=-98 dBm
                    Encryption key:on
          Cell 02 - Address: XX:XX:XX:XX:XX:XX
                    ESSID:"XXXXXX"
                    Mode:Master
                    Frequency:2.462GHz (Channel 11)
                    Bit Rate:1Mb/s
                    Bit Rate:2Mb/s
                    Bit Rate:5.5Mb/s
                    Bit Rate:11Mb/s
                    Bit Rate:18Mb/s
                    Bit Rate:24Mb/s
                    Bit Rate:36Mb/s
                    Bit Rate:54Mb/s
                    Quality=14/100  Signal level=-84 dBm  Noise level=-98 dBm
                    Encryption key:off
This shows what is, presumably, my neighbours WAP and WiFi enabled computer. All very interesting, but what about surfing the net? It turned out that, after running 'dhcpcd eth1', I was surfing the net:
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
loopback        digimate        255.0.0.0       UG    0      0        0 lo
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
And indeed, when I tried Konqueror, there was Google! I switched off the WiFi interface at this point, using the convieniently mounted power-switch, and had a think about automating the above, using a firewall, and getting my own WAP.

I eventually purchased a cheap WAP and did a little more work on configuring the WiFi interface so that it worked with ifplugd. It was quite nice being able to just pull out the ethernet cable, flick the WiFi interface on and be surfing again in well under a minute.

ACPI Power Management

Here things went wrong. The fan was running continuously, and the lid switch and mains<->battery transitions were being ignored - until the power button was briefly pushed. The fan was the killer for me: couldn't stand the noise. The CPU Frequency Scaling seemed to work. Using 'top', I could see the effect of writing to '/proc/acpi/processor/CPU0/throttling' but the fan kept running.

I tried decompiling/recompiling the ACPI scripts as described in HOWTO Fix Common ACPI Problems , but found no errors. I tried identifying the OS as various flavours of Windows to no effect. It seemed that ACPI interrupts from sources other than the power button were being ignored - presumably because they were being initialised incorrectly or masked for some reason. I started reading the ACPI documentation but eventually gave up.

Until now. Using a recent kernel: linux-2.6.11-gentoo-r4, and having done a bit more reading of the the kernel documentation, I've got the fan to run only when required. I needed to enable 'ACPI Processor P-States driver' and 'Intel Speedstep on ICH-M chipsets (ioport interface)' under 'CPU Frequency scaling'. I also built the new 'ondemand' governor which is currently working very well.

I found a more extensive power management interface here: '/sys/devices/system/cpu/cpu0/cpufreq/', and writing to 'scaling_cur_freq' after reading 'scaling_available_frequencies' generated cheers when the fan stopped and stayed stopped.

I set the governor at start-up by adding this line to the end of '/etc/conf.d/local.start':
# Set the CPUFreq governor to 'ondemand'
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Note: to make this work with a Knoppix LiveCD I used the following:
$ su
# modprobe speedstep_centrino
# modprobe cpufreq_ondemand
# echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Hardware List

root@tty1[/]# lspci
0000:00:00.0 Host bridge: Intel Corp. 82852/855GM Host Bridge (rev 02)
0000:00:00.1 System peripheral: Intel Corp. 855GM/GME GMCH Memory I/O Control Registers (rev 02)
0000:00:00.3 System peripheral: Intel Corp. 855GM/GME GMCH Configuration Process Registers (rev 02)
0000:00:02.0 VGA compatible controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02)
0000:00:02.1 Display controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02)
0000:00:1d.0 USB Controller: Intel Corp. 82801DB (ICH4) USB UHCI #1 (rev 03)
0000:00:1d.1 USB Controller: Intel Corp. 82801DB (ICH4) USB UHCI #2 (rev 03)
0000:00:1d.7 USB Controller: Intel Corp. 82801DB (ICH4) USB2 EHCI Controller (rev 03)
0000:00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 83)
0000:00:1f.0 ISA bridge: Intel Corp. 82801DBM LPC Interface Controller (rev 03)
0000:00:1f.1 IDE interface: Intel Corp. 82801DBM (ICH4) Ultra ATA Storage Controller (rev 03)
0000:00:1f.3 SMBus: Intel Corp. 82801DB/DBM (ICH4) SMBus Controller (rev 03)
0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801DB (ICH4) AC'97 Audio Controller (rev 03)
0000:00:1f.6 Modem: Intel Corp. 82801DB (ICH4) AC'97 Modem Controller (rev 03)
0000:01:01.0 Network controller: Intel Corp. PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04)
0000:01:02.0 Ethernet controller: VIA Technologies, Inc. VT6105 [Rhine-III] (rev 8b)
0000:01:04.0 CardBus bridge: ENE Technology Inc CB710 Cardbus Controller (rev 01)
0000:01:04.1 FLASH memory: ENE Technology Inc CB710 Memory Card Reader Controller
0000:01:05.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 80)
The output from dmesg.

Configuration files

Links










Valid HTML 4.01!