Thinkpad T42 Laptop Notes

Author: Martin Blais <blais@furius.ca>
Date: 2005-03-29

Abstract

Some package notes about stuff specific to the Thinkpad T42 laptop. Note that setup is covered in the gentoo.txt file.

Contents

1   Introduction

These are my notes on setting up a IBM Thinkpad T42 computer with a Gentoo distribution. Some of these notes may apply on other computer models or brands.

Note that this is my working file and is the place when I keep ongoing information about my laptop setup. This file is thus due to change as often as I find/try something new on my laptop setup (which should be for a while).

1.1   What is important in a laptop

I need the following features in a laptop:

  • power management: this is the most important feature of all and is extremely important. A laptop battery without power management does NOT last long enough for serious disconnected work. When the laptop is running, some features need to be triggered to save power as much as possible.
  • suspending: a lightweight method for turning off the computer. This makes it much convenient than to poweroff and reboot the machine everytime you need to move it. There are two main approaches for doing this:
    1. suspend-to-disk (takes no battery at all)
    2. suspend-to-RAM (consumes about 5% of powersave consumption)
  • wireless: a working wireless network interface. I'm expecting to be able to list and change the connections easily, and to monitor them as well.
  • pointer input device: some amount of configurability of the touchpad and/or trackpoint input devices. I work with lots windows and sometimes I still need the mouse and I'm not going to be carrying an external USB mouse everywhere I go, so those need to be somewhat usable.
  • external keyboard: support for an external keyboard.

All these aspects are explored in the sections below.

1.2   Searching for Info

Good places to find more information about configuration of this machine:

  1. the Gentoo forums;
  2. The Linux on Laptops IBM section;
  3. The IBM Thinkpad Webring;
  4. ThinkWiki;

1.3   Kernel

1.3.1   Using 2.6.11.4

This document was originally written/updated from the perspective of running Gentoo Linux with a vanilla kernel 2.6.11.4.

1.3.2   Upgrading to 2.6.16

When 2.6.16 came out, I heard that it finally enables Sleep S3 to work. So I upgraded to suspend2-sources-2.6.16-r1 (2006-04-02). I had a few problems:

  • The devices under /dev/input/* would not show up, except for the trackpoint and something else. Updating to udev-087 fixed the problem. [FIXED]

  • In turn, this would cause Xwindows to kernel panic, somehow, because it could not find the devices. I found a track leading to the solution by using the "radeon" driver rather than the "fglrx" driver, and then rather than kernel panic I could see the error messages about the missing input devices. Upgrading to udev fixed the problem. Also, I think I read somewhere that if X has to use /dev/mouse it may cause a kernel panic. Dunno. [FIXED]

  • hibernate-sleep now works, even with X11 with the HW-accelerated "fglrx" drivers! This makes me very, very happy. [FIXED]

  • I had to rerun alsactl store, my alsactl restore settings did not work anymore and caused errors in local.start. [FIXED]

  • Somehow the USB HID (usbhid) driver was switched to a module, and my USB mouse did not work because I was not loading this module. [FIXED]

  • The Synaptics touchpad SynDaemon feature that locks it up for a time interval after a key on the keyboard has been pressed went into function. I had to disable that. [FIXED]

  • I am having problems with acpi-cpufreq (2006-04-02):

    $ modprobe acpi-cpufreq
    FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.16-suspend2-r1/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ko): No such device
    
  • My machine crashes often on shutdown since I use this kernel.

1.4   Specific Details About My Hardware

Serial number: 99RR546
Machine model: 2378REU
System Board Serial Number: J1YP452G27C
Embedded Controller Version: 3.04
BIOS version: 3.14
Processor type: Intel Pentium M 1.80 Ghz
Memory: 1GB
HDD capacity: 60GB

Graphics: ATI Radeon Mobility M10 (Chip: M10 NP, rev.4, 64MB)

[kernel] agpgart: Detected an Intel 855PM Chipset, no integrated grapics found.
[kernel] agpgart: Detected Intel i855PM chipset
[kernel] agpgart: AGP aperture is 256M @ 0xd0000000

1.5   T42 Buttons

Here is a summary description of the special buttons on the T42; apart from the standard keyboard, there is:

  • a wide large blue "Access IBM" button;
  • a small black volume down button;
  • a small black volume up button;
  • a small black mute button;
  • a medium sized power button with a dot on it;
  • Fn+F3 suspend-to-disk button;
  • Fn+F4 suspend-to-RAM button;
  • Fn+F5 toggle wireless button;
  • Fn+F7 switch display button;
  • Fn+F12 sync to disk button;
  • Fn+Home turn up brightness button;
  • Fn+End turn down brightness button;
  • Fn+PageUp toggle thinklight button;

2   Compile Flags

Starting at gcc-3.4 you can use -march=pentium-m for the Centrino processors. Set this up in /etc/make.conf

Important

FIXME TODO 3.4 is not in gentoo stable yet, try this when it comes out.

3   Kernel Support

This section outlines some general kernel support for laptops and laptop events.

There are two event protocols:

  1. APM: advanced power management. This is obsolete. Do not use this.
  2. ACPI: a complicated industry standard whose implementation has only recently been merged into the kernel. This is what we use.

3.1   Current Problems

Error compiling /usr/lib/driverloader/modules/dldrpci.c in /var/run/dldrconfig-buildlog.txt. This gives an error on startup.

3.2   ACPI Support

3.2.1   In the kernel

Enable all the events that you will want to trigger scripts on in the kernel configuration under ACPI support.

3.2.2   acpid

emerge acpid:

* sys-power/acpid
     Available versions:  1.0.1 1.0.2-r1 1.0.2-r2 ~1.0.4
     Installed:           1.0.2-r2
     Homepage:            http://acpid.sourceforge.net
     Description:         Daemon for Advanced Configuration and Power Interface

3.2.3   ibm-acpi driver

* app-laptop/ibm-acpi
     Available versions:  0.10
     Installed:           no
     Homepage:            http://ibm-acpi.sourceforge.net
     Description:         IBM ThinkPad ACPI extras

This is a Linux ACPI driver for the IBM ThinkPad laptops. It aims to support various features of these laptops which are accessible through the ACPI framework but not otherwise supported by the generic Linux ACPI drivers.

Features:

The features currently supported are the following (see the README for
detailed description):

* Fn key combinations (hotkey)

     To enable hotkeys::

            echo enable > /proc/acpi/ibm/hotkey
            echo 0xFFFF > /proc/acpi/ibm/hotkey

     This enables the F keys only, not the special Access IBM button and the
     power button, etc.

* Bluetooth enable and disable (bluetooth)
* video output switching, expansion control (video)
* ThinkLight on and off (light)
* limited docking and undocking (dock)
* UltraBay eject (bay)
* CMOS control (cmos)
* LED control (led)
* ACPI sounds (beep)
* temperature sensors (thermal)
* Experimental: embedded controller register dump (ecdump)
* Experimental: LCD brightness control (brightness)
* Experimental: volume control (volume)
* Experimental: fan speed, fan enable/disable (fan)

The ibm-acpi driver is part of kernel 2.6.10 and later (option CONFIG_ACPI_IBM). The version included in the kernel may be older than the latest release available from this web site.

(The T42 is explicitly supported.)

Note

We have disabled this with the kernel and emerged the package in Gentoo, which is more recent than the version that is in the kernel.

This adds the /proc/acpi/ibm directory.

This also goes some way towards providing automation using the special IBM buttons (see tpb below for an alternative). To enable ACPI events from the hotkeys:

echo enable > /proc/acpi/ibm/hotkey
echo 0xffff > /proc/acpi/ibm/hotkey -- enable all possible hot keys
echo reset > /proc/acpi/ibm/hotkey -- restore the original mask

On my T42, when I enable all possible keys and tail /var/log/acpid, I get the following keys recognized:

  • Fn+F3 suspend-to-disk button;
  • Fn+F4 suspend-to-RAM button;
  • Fn+F5 toggle wireless button;
  • Fn+F7 switch display button;
  • Fn+F12 sync to disk button;
  • Fn+Home turn up brightness button;

Note that the Fn keys work only intermittently, not all the events seem to arrive to ACPI. Check out tpb (below) for an alternative to this.

Also note that the e.g. sleep event does not get through if its corresponding hotkey is enabled.

Configure it, in /etc/modules.d/ibm_acpi:

options ibm_acpi experimental=1,hotkey=enable,0xffff

About the light: unplugging the AC adapter dims the LCD panel quite a bit. However, the reported setting from ibm_acpi does not change. There is a 0-7 setting but the intensities are different when on AC power vs. battery power.

3.3   Interfaces to ACPI

3.3.1   apcitool

* app-laptop/acpitool
     Available versions:  0.2.5 ~0.2.6
     Installed:           0.2.5
     Homepage:            http://freeunix.dyndns.org:8088/site2/acpitool.shtml
     Description:         A small command line application, intended to be a replacement for the apm tool

This is a rather lame C++ code that reads the files in /proc. You could do better in 10 times less code in Python.

Note: fan status does not seem to work in acpitool. I should fix that.

3.3.2   My Own

I mean to implement my own acpitool with a GUI and some control. I need to find out more about:

  • why the fan info is not available on the Thinkpad T42?
  • what is CPU throttling, CPU power management, and does it overlap with cpufreq?

3.4   Thinkpad Drivers

3.4.1   tpctl

* app-laptop/thinkpad
     Available versions:  3.2 4.1 4.3 4.3-r1 4.8 *~5.7 ~5.8
     Installed:           no
     Homepage:            http://tpctl.sourceforge.net
     Description:         Thinkpad system control kernel modules

* app-laptop/tpctl
     Available versions:  3.2 4.2 4.4 4.4-r1 4.8 ~4.16
     Installed:           no
     Homepage:            http://tpctl.sourceforge.net/tpctlhome.htm
     Description:         Thinkpad system control user space programs

* app-laptop/configure-thinkpad
     Available versions:  *~0.1-r3 *~0.7 *~0.8
     Installed:           no
     Homepage:            http://tpctl.sourceforge.net/configure-thinkpad.html
     Description:         Thinkpad GNOME configuration utility for tpctl

Execute man ./tpctl.1 to see the tpctl man page. More info:

libsmapidev.o is a library of functions that can be used to access
(some of) the features of the SMAPI BIOS via the smapi driver.
(See below for information about drivers.)

tpctl is a console interface to the drivers.

ntpctl is an ncurses interface to the drivers.

apmiser is a daemon that uses tpctl to control the power expenditure
mode dynamically according to CPU load.  See the README file in the
"apmiser" directory for more information.

These programs require the "thinkpad drivers".  The object files
thinkpad.o, smapi.o, superio.o, rtcmosram.o and thinkpadpm.o are
drivers in the form of loadable kernel modules which serve as
interfaces to the IBM System Management Application Program Interface
(SMAPI) BIOS found in some IBM ThinkPad laptop computers and as
drivers of certain ThinkPad hardware components.  Please see the
README file in the thinkpad drivers tarball for more information.

tpctlir will enable or disable the infrared port on ThinkPads with
Programmable Option Select registers: e.g., the 760 and 765.  Newer
ThinkPads such as the ThinkPad 600 do not seem to have these registers.
See the README file in the "tpctlir" directory for more information.

Important

FIXME TODO

I was not able to compile the app-laptop/thinkpad kernel drivers (2005-03-18). Try again later.

Important

/dev/rtc at boot time

When I boot I get a long long wait on /dev/rtc. I need to try to compile the RTC in the kernel to see if that solves the problem.

4   Input Devices

This section describes the various input devices.

4.1   Keyboard

I like to have the Control key where the Caps-Lock key is located.

  • in the console, I copy /usr/share/keymaps/i386/qwerty/us.map.gz to us-nocaps.map.gz and edit it by hand. Then I change /etc/conf.d/keymaps:

    KEYMAP="us-nocaps"
    
  • in X windows, I accomplish this with Xmodmap when logging in an xsession.

4.2   Mods for Happy Hacker-like Functionality

I'm very much used to the Happy Hacker keyboards. One really cool feature of these keyboards is the use of a special function key on the lower right (just next to the Shift-right key), which is used to in combination with the "kl;'" and ",./" keys to generate home, end, page up/down, and arrow keys. This alleviate the need to move your hand too much and is really cool.

It turns out that the Thinkpad T42 keyboard has some strange paging keys (with icons that seem like page left/right) just below the Shift key on the right. Particularly, the rightmost of these keys can be mapped to "Mode_switch" and then you can add key bindings that generate the same keycodes as the HHKB keyboard. Here are the relevant xmodmap commands:

! Bind mod5 to Mode_switch on the lower right paging key
keycode 233 = Mode_switch
add mod5 = Mode_switch

! Add HHKB-like navigation keys using mod5
keycode  48 = apostrophe quotedbl Right
keycode  47 = semicolon colon Left
keycode  34 = bracketleft braceleft Up
keycode  61 = slash question Down

keycode  45 = k K Home
keycode  59 = comma less End

keycode  46 = l L Prior
keycode  60 = period greater Next

keycode  31 = i I Print
keycode  32 = o O Scroll_Lock
keycode  33 = p P Break

keycode  22 = BackSpace BackSpace Delete

The arrow keys are particularly useful when you're editing in web browsers, which don't have very right editor features (i.e. you need to use the arrow keys, rather than better bindings such as those in emacs/vi).

4.3   Mice (General Info)

I have three mouse devices that I use with the Thinkpad:

  1. the Synaptics touchpad
  2. the IBM trackpoint (the little red thing in the middle of the keyboard).
  3. an external USB mouse

Note: the mouse buttons below the keyboard are associated with the trackpoint, and not with the touchpad.

I use udev. With the USB mouse plugged in, the following mouse devices are listed under /proc/bus/input/devices:

I: Bus=0011 Vendor=0001 Product=0001 Version=ab54
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0011 Vendor=0002 Product=0007 Version=0000
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
H: Handlers=mouse0 event1
B: EV=b
B: KEY=6420 0 70000 0 0 0 0 0 0 0 0
B: ABS=11000003

I: Bus=0011 Vendor=0002 Product=0001 Version=0000
N: Name="PS/2 Generic Mouse"
P: Phys=synaptics-pt/serio0/input0
H: Handlers=mouse1 event2
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3

I: Bus=0003 Vendor=046d Product=c00e Version=1110
N: Name="Logitech USB-PS/2 Optical Mouse"
P: Phys=usb-0000:00:1d.1-1/input0
H: Handlers=mouse2 event3
B: EV=17
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=103
B: MSC=10

/dev/input contains:

crw-------  1 root root 13, 64 Mar 29 07:07 event0
crw-------  1 root root 13, 65 Mar 29 07:07 event1
crw-------  1 root root 13, 66 Mar 29 07:07 event2
crw-------  1 root root 13, 67 Mar 29 07:28 event3
crw-r--r--  1 root root 13, 63 Mar 29 07:07 mice
crw-r--r--  1 root root 13, 32 Mar 29 07:07 mouse0
crw-r--r--  1 root root 13, 33 Mar 29 07:07 mouse1
crw-r--r--  1 root root 13, 34 Mar 29 07:28 mouse2

cat'ting the various devices and fiddling each mice separately reveals which is which (also see file above).

In my X configuration file, I have a section that includes all of them:

Section "ServerLayout"
    ...
    InputDevice "Touchpad" "CorePointer"
    InputDevice "Trackpoint" "CorePointer"
    InputDevice "USBMouse" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"

Important

After upgrading to udev-070 and kernel-2.6.14.2 my mouse goes too fast. Apparently it might be possible to set the speed using this snippet in the xorg.conf file, but that this does not work well for USB mice:

Option      "Resolution" "500"

Haven't tried it yet.

Note

After I upgraded to kernel 2.6.16 (2006-04-02), I could not see the devices under /dev/input anymore. I upgraded to udev-0.87 (unstable) and this fixed the problem.

4.4   Touchpad

By default, the kernel gives me these messages:

Synaptics Touchpad, model: 1
 Firmware: 5.9
 Sensor: 44
 new absolute packet format
 Touchpad has extended capability bits
 -> multifinger detection
 -> palm detection
 -> pass-through port
input: SynPS/2 Synaptics TouchPad on isa0060/serio1
serio: Synaptics pass-through port at isa0060/serio1/input0
input: PS/2 Generic Mouse on synaptics-pt/serio0

There is a basic driver in the kernel for the Synaptics touchpads, but there is a dedicated driver for Xorg, with a lot more advanced features.

* x11-misc/synaptics::

     Available versions:  0.13.6 0.14.0 ~0.14.1
     Installed:           no
     Homepage:            http://w1.894.telia.com/~u89404340/touchpad/
     Description:         Driver for Synaptics touchpads

To use it, you need to enable the following in kernel-2.6:

CONFIG_INPUT_EVDEV
CONFIG_MOUSE_PS2

You get two programs with this:

  • synclient: cmdline configuration and query tool

  • syndaemon: daemon to run from your xsession for palm detection (this disables the touchpad for a fixed delay after a key on the keyboard has been pressed, to avoid moving the mouse by accident when using the keyboard)

    Note (2006-04-02): After upgrading to kernel-2.6.16, this seems to be the case, even without using syndaemon.

My input device declaration looks something like this:

Section "Module"
   ...
   Load "synaptics"

...

# Input devices section

Section "InputDevice"
   Identifier "Touchpad"
   Driver "synaptics"
   Option "SendCoreEvents"
   Option "Device" "/dev/input/event1"
   Option "Protocol" "event"

   # Next line required only if you want to disable the mousepad while typing:
   Option "SHMConfig" "on"

   # The rest of the options are NOT required, just a default similar to the
   # Windows drivers with non of the extra features.
   Option "LeftEdge"                 "1900"
   Option "RightEdge"                "5400"
   Option "TopEdge"                  "1400"
   Option "BottomEdge"               "4500"
   Option "FingerLow"                "25"
   Option "FingerHigh"               "30"
   Option "MaxTapTime"               "180"
   Option "MaxTapMove"               "220"
   Option "MaxDoubleTapTime"         "180"
   Option "ClickTime"                "100"
   Option "FastTaps"                 "0"
   Option "EmulateMidButtonTime"     "75"
   Option "VertScrollDelta"          "0"
   Option "HorizScrollDelta"         "0"
   Option "MinSpeed" "0              .06"
   Option "MaxSpeed" "0              .18"
   Option "AccelFactor" "0           .001"
   Option "EdgeMotionMinZ"           "30"
   Option "EdgeMotionMaxZ"           "160"
   Option "EdgeMotionMinSpeed"       "1"
   Option "EdgeMotionMaxSpeed"       "400"
   Option "EdgeMotionUseAlways"      "0"
   Option "UpDownScrolling"          "1"
   Option "TouchpadOff"              "1"
   Option "GuestMouseOff"            "0"
   Option "LockedDrags"              "0"
   Option "RTCornerButton"           "2"
   Option "RBCornerButton"           "3"
   Option "LTCornerButton"           "0"
   Option "LBCornerButton"           "0"
   Option "TapButton1"               "1"
   Option "TapButton2"               "2"
   Option "TapButton3"               "3"
   Option "CircularScrolling"        "1"
   Option "CircScrollDelta" "0       .195"
   Option "CircScrollTrigger"        "0"
   Option "CircularPad"              "0"
   Option "PalmDetect"               "1"
   Option "PalmMinWidth"             "10"
   Option "PalmMinZ"                 "200"
   Option "CoastingSpeed"            "0"
EndSection

Circular scrolling is fabulous! This is better than the Powerbook's two-finger scrolling. Also, multi-finger tapping works fine, with one, two and three fingers. You can even tap 3-then-1 and hold.

4.4.1   GUIs to configure the touchpad

tpconfig -- commandline tool (2005-04)
http://www.compass.com/synaptics/
  • app-misc/tpconfig:

    Latest version available: 3.1.3
    Latest version installed: [ Not Installed ]
    Size of downloaded files: 104 kB
    Homepage:    http://www.compass.com/synaptics/
    Description: Touchpad config for ALPS and Synaptics TPs. Controls tap/click behaviour
    License:     GPL-2
    

It does not work for me:

No Synaptics or ALPS touchpad device found

I can't be bothered to find out what's wrong, there is no man page and --help does nothing.

qsynaptics
http://www.sourceforge.net/projects/qsynaptics
ltpconf (old, 2004)
http://ltpconf.sourceforge.net/

I find that qsynaptics worked better for me. I used it to set the parameters for the touchpad and then I listed them with synclient -l, changed my X configuration file and then I do not touch them.

4.4.2   Gestures

Important

FIXME TODO

Look at a gestures implementation, which would allow me to draw some shapes on the touchpad and bind that to specific commands. Somebody must have implemented this.

4.5   Trackpoint

The trackpoint is the little red button device thingy in the middle of the keyboard. The trackpoint works with the standard mouse driver.

My X input device declaration for it:

Section "InputDevice"
    Identifier "Trackpoint"
    Driver "mouse"

    Option "SendCoreEvents" # needed for multiple devices
    Option "Protocol"   "ExplorerPS/2"
    Option "Device"     "/dev/input/mouse1"
EndSection

I find it works reasonably well with no trackpoint-specific configuration.

4.5.1   IBM TrackPoint Linux kernel driver

http://stephen.evanchik.com/index.cgi/linux/index.html

From http://people.clarkson.edu/~evanchsa/

This is a driver I wrote for the 2.6.x series kernels for my
TrackPoint. You can customize many settings with this extension
to the psmouse module. The device is nothing more than an
extension of the PS/2 protocol. You can modify the device's
settings via files in /proc/trackpoint. NEW - The TrackPoint
driver now supports middle button scrolling!

This is a simple kernel patch.

This worked for me:

patch -p 1 < ~blais/net/packages/laptop/trackpoint-2.6.11-rc3.patch-1

About the trackpoint wheel events, the author writes:

> 3. with the above config, i could not enable button2-scrolling, the
> file "scrolling" is not present in /proc/trackpoint.  However, there
> is the file "scroll" and "scroll_delay".  From the source code they
> look like the right ones (you should update weblog).
>
> echo 1 > /proc/trackpoint/scroll
>
> then pressing button 2 does indeed get captured (the mouse does not
> move and no button2 event is sent), BUT no mouse wheel events are sent
> either.  Is there something else I need to enable in my kernel?

In the later versions of the patch I disabled this feature. This is more
of a user space feature rather than a kernel feature. The Xorg X server
allows you to emulate scrolling. Here's my configuration:

  Section "InputDevice"
         Identifier  "Mouse0"
         Driver      "mouse"
         Option      "Protocol" "PS/2"
         Option      "Device" "/dev/input/mouse0"
         Option      "Buttons"    "5"
         Option      "EmulateWheel" "true"
         Option      "EmulateWheelButton" "2"
         Option      "EmulateWheelInertia" "25"
         Option      "XAxisMapping" "4 5"
         Option      "ZAxisMapping" "4 5"
  EndSection

4.5.2   The Linux Trackpoint Utilities

Recommended for 2.4. For 2.6 kernel, prefer Stephen Evanchik's driver.

From http://www.slac.stanford.edu/~strauman/pers/tp4utils/

[...]

However, modern pointing devices, such as the IBM Trackpoint (R)
contained in their ThinkPad computers exhibit more features than
a basic PS2 mouse. (This also applies to touchpad devices, see
e.g. here). The trackpoint hardware is capable to detect z-axis
pressure and hence is inherently a three-dimensional device. Most
popular software applications however are not able to deal with
3D mouse input data. On the other hand, the trackpoint hardware
supports various ways of mappingz-axis activity to other,
essentially mouse button press/release events. Also, the
trackpoint hardware has more configurable parameters than the
traditional mouse resolution and scale.

The difference between this and the kernel driver above is:

It's a userspace configuration tool; it opens the PS/2 device (/dev/psaux) and writes the various configuration bytes to it. It doesn't work in the 2.6 kernel series without some modifications. It also isn't as reliable in detecting TrackPoints. I think there are also problems with gpm.

Important

FIXME TODO / try this when it starts working with 2.6.

Note (2005-08-08): this now seems to depend indirectly on some kind of psaux driver, which is now being re-implemented as a SERIO_USERDEV option in the kernel. Searching kernel 2.6.11.10 for this stuff does not yield anything. This sucks.

4.5.3   GUIs for configuring the Trackpoint

configure-trackpoint

http://tpctl.sourceforge.net/configure-trackpoint.html

Configure-trackpoint is a Gnome TrackPoint configuration tool written by Cheuksan Edward Wang (<wang02139_AT_gmail.com>). It uses the linux kernel 2.6 TrackPoint driver written by Stephen Evanchik. At the moment this driver is not in the mainline kernel so you would need to apply his patch and compile your own kernel. Users of 2.4 kernel are recommended to use the Linux TrackPoint Utilities written by Till Straumann.

This works great, you need to have the patch to build it, and then the GUI has lots of features.

Important

The patch does not apply on kernel 2.6.11

4.6   External USB mouse

I like to plug a Logitech MouseMan Plus mouse with scroll wheel when I'm at home. The scroll wheel works fine.

In xorg.conf:

Section "InputDevice"
    Identifier "USBMouse"
    Driver "mouse"

    Option "SendCoreEvents" # needed for multiple devices
    Option "Protocol"   "ExplorerPS/2"
    Option "Device"     "/dev/input/mouse2"
    Option "ZAxisMapping" "4 5" # for scroll wheel
EndSection

Important

FIXME TODO

If I start X without the USB mouse, and then I plug in the USB mouse, X does not realize that the mouse appeared and I cannot use it. I need to log out and back in to have the external mouse work. I wonder if there is an option to instruct Xorg to not try to detect the mouse and therefore to initialize the driver anyway. Check this out further.

From Sebastien <Beuss at fr dot st>:

You just have to add an entry in xorg.conf like this:

Section "InputDevice"
    Identifier  "Mouse1"
    Driver "mouse"
    Option "ZAxisMapping"   "4 5"
    Option "Device"     "/dev/input/mice"
EndSection

You also have to add InputDevice "Mouse1" in the ServerLayout section. As any mouse plugged is mapped to /dev/input/mice (even if it is plugged after boot), it works for USB mouse...

4.7   Laptop Buttons

Laptops almost always-- except the powerbooks-- have some extra buttons. For example, on the Thinkpad there is a blue "Access IBM" button and some volume control buttons next to it. I want to make use of some of those buttons somehow.

4.7.1   ThinkpadButtons

* app-laptop/tpb
     Available versions:  0.4.2 0.5.1 ~0.6.0 ~0.6.1 ~0.6.2 0.6.3
     Installed:           no
     Homepage:            http://savannah.nongnu.org/projects/tpb/
     Description:         IBM ThinkPad buttons utility

With TPB it is possible to bind a program to the ThinkPad, Mail, Home and Search button. TPB can also run a callback program on each state change with the changed state and the new state as options. So it is possible to trigger several actions on different events. TPB has a on-screen display (OSD) to show volume, mute, brightness and some other informations. Furthermore TPB supports a software mixer, as the R series ThinkPads have no hardware mixer to change the volume.

Installation:

  • emerge tpb
  • enable Character Devices -> /dev/nvram support in kernel, recompile
  • configure by editing /etc/tpbrc

The following buttons are recognized:

  • a wide large blue "Access IBM" button;
  • a small black volume down button;
  • a small black volume up button;
  • a small black mute button;
  • Fn+Home turn up brightness button;
  • Fn+End turn down brightness button;
  • Fn+PageUp toggle thinklight button;

Also see the ibm-acpi driver for generating events off the Thinkpad buttons. Both solutions are incomplete at this time.

Note

FIXME TODO

My /etc/init.d/tpb service wrapper does not seem to work properly. Stopping the service does not kill the process but somehow running the start-stop-daemon command off the cmdline it does kill process, need to find out more.

4.8   Fingerprint Reader

Important

FIXME TODO

I think this is not supported yet, but it would be awesome to replace entering my password for my GPG key.

4.9   Other Things

4.9.1   tp-scroll

tp-scroll allows the use of the middle mouse button on a Trackpoint keyboard for scrolling up and down in applications that support the use of the wheel on an Intellimouse. Basically, you hold the middle mouse button on the thinkpad and use the trackpoint or touchpad to generate scroll events.

From http://rsim.cs.uiuc.edu/~sachs/tp-scroll/

   INSTALLATION:

   1. gcc -o tp-scroll tp-scroll.c -lm
   2. mkfifo /dev/imouse
   3. In XF86Config, replace the InputDevice section:

      Section "InputDevice"
              Identifier  "Mouse0"
              Driver      "mouse"
              Option      "Device" "/dev/imouse"
              Option      "Protocol" "ExplorerPS/2"
              Option      "Emulate3Buttons" "off"
              Option      "ZAxisMapping" "4 5"
      EndSection

   4. disable gpm (sorry, doesn't play nice with gpm yet)
   5. add "[path]/tp-scroll /dev/mouse /dev/imouse" to rc.local.

(Worked directly as above. Added script to /etc/init.d/local.start)

Warning: tp-scroll is nice if you want to use that, but it messes up with the USB mouse.

Note

I do not use this since the circular scrolling provided by the Synaptics driver is so much better that this.

5   Power Management

Here are the different types of power management that a laptop can implement:

http://www.gentoo.org/doc/en/power-management-guide.xml

Comparison to Apple Powerbook. On the Powerbook with OSX they have very nice power management available in the profiles:

  1. wireless off
  2. spindown hdd
  3. backlight down to lowest setting
  4. turn off the lcd after a delay
  5. don't play with cd drive
  6. clock down processor

Their energy profiles have:

5.2   Profiles

We have basically two usage patterns for power:

  1. with the AC adapter plugged-in;
  2. running off the battery;

The Gentoo documentation suggests using two different runlevels for this and triggering on ACPI events.

Important

FIXME TODO

Setup automated triggering of the two power usage profiles.

5.3   Battery Monitoring

Question: what is an easy way to monitor the battery power? Is there a nice GUI for it?

Important

FIXME TODO

Find a way to monitor the battery status and power usage.

We would like to monitor battery status (charging/discharging), consumption, calculate remaining time, AC/battery, fan status and thermal info.

5.4   CPU Frequency Scaling

  • cpufreq started working at kernel 2.6.11.

    You can interact with the cpufreq module by cat'ing files in /sys/devices/system/cpu/cpu0/cpufreq.

  • When I upgraded to kernel 2.6.16, I enabled the userspace CPU frequency scaling module. Then I could not access the files from /sys/devices/system/cpu/cpu0/cpufreq, they did not show up. I disabled the userspace module, recompiled, and they were back.

5.5   LCD Display

The intensity of the display should be turned down when on battery mode. The T42 seems to do that automatically. Nevertheless, we might want to turn off the display temporarily sometimes.

5.5.1   app-laptop/radeontool

Available versions:  1.5-r1
Installed:           no
Homepage:            http://fdd.com/software/radeon/
Description:         Control the backlight and external video output of ATI Radeon Mobility graphics cards

Radeontool is a hack I created to save some battery on my Dell Latitude C610 with an ATI Radeon Mobility graphics chip. Radeontool can turn off and on the backlight and external video output. Radeontool requires lspci.

examples:

radeontool dac off

Important

FIXME TODO

Check how to set the DAC to off when running on the battery.

Important

FIXME TODO

Check out xset's dpms settings to see if we cannot make the LCD turn off rather than to use the screen saver.

5.6   Hard-disk Drive

5.6.1   Flushing the HDD

* sys-block/noflushd
     Available versions:  2.6.3 2.7.3 ~2.7.4
     Installed:           no
     Homepage:            http://noflushd.sourceforge.net
     Description:         A daemon to spin down your disks and force accesses to be cached

The noflushd daemon delays hard disk buffer flushes for a time, or until the next disk read occurs, thus reducing the number of spinups required, thus saving battery power.

Configuration:

TIMEOUT=60
DISKS=/dev/hda
NOFLUSHD_OPTS="-n $TIMEOUT $DISKS $EXTRA"

Note

the author of the trackpoint kernel driver sent me a script to save battery power similarly, what he does is create a ramfs filesystem in memory and he copies the /bin and /sbin utilities in it, so that using them does not spin the disk. I'm not super convinced that this works so well, so I haven't tried it yet.

5.7   Wireless Power

Important

FIXME TODO

  • how do you switch between wired/wireless/offline configs without rebooting? can it be automated with hotplug? (check in the power management guide, thre is the answer)

6   Suspending

There are two modes of suspend that I'm mostly interested in:

  1. Suspend-to-Disk (aka Hibernate / S4).

    This writes the contents of the memory in the swap (thus the swap must be larger than the RAM), and poweroff the machine. When rebooting, early in the rc init sequence that swap memory is restored.

    This is still a bit slow, but faster than a full reboot, and provides a crude method for session management (all applications remain on the desktop).

  2. Suspend-to-RAM (aka Sleep / S3)

    The computer is not powered off, but rather put in a special hardware-supported mode where every devices is turned off, except a small portion of power is used for refreshing the memory.

    This allows the fastest recovery. This is the mode that is commonly used in powerbooks. However, the battery used for keeping the memory fresh drains the battery at a rate around 5% that of the machine running. This should allow it to keep going for about two days, which is plenty enough if you use/plug the machine often, like I do.

There is some support in the kernel (namely, swsusp1), but the newer implementation of software suspend is not merged yet. It is called swsusp2.

Enable the sleep states in ACPI support in the kernel.

Links:

http://gentoo-wiki.com/HOWTO_Software_Suspend_v2 http://www.suspend2.net/ http://www.suspend2.net/HOWTO

6.1   Suspend-to-Disk / Hibernate

All the gory details here: http://gentoo-wiki.com/HOWTO_Software_Suspend_v2

  • emerge hibernate-script (~x86)
  • install swsusp2, patch the kernel and recompile
    • Note: I had to compile the USB options as kernel modules for hibernate to work properly.

6.1.1   lphdisk

I did not try this yet:

* app-laptop/lphdisk
     Available versions:  0.9.1 0.9.1-r1
     Installed:           no
     Homepage:            http://www.procyon.com/~pda/lphdisk/
     Description:         utility for preparing a hibernation partition for APM Suspend-To-Disk

6.2   Suspend-to-RAM / Sleep

  • enable sleep states in the kernel (and associated stuff)

  • boot the kernel with resume= option, e.g.

    kernel /vmlinuz-2.6.11.4 root=/dev/hda3 resume=/dev/hda3

    Problem: how can I turn the thing back on? I press on anything and it doesn't turn itself back on.

Important

FIXME TODO

  • ask the swsusp2 mailing-list if their apparent support (or hibernate scripts) is better than the sleep implementation that is in the kernel

  • check out vbetool and associated patch for sleep:

    You will need a copy of vbetool which you can get here http://www.srcf.ucam.org/%7Emjg59/vbetool/ and the patch for it which you can get here http://sourceforge.net/mailarchive/message.php?msg_id=10770502

    yes this is meant to expand on that same file. add the two sections for s3 (sleep) and s4 (hibernate), as I have in mine. Install the tool vbetool which I linked to there. I personally had to remove USB drivers prior to being able to sleep, so thats what I do. I also needed to save the video state (which is what vbetool does). You might have to personally experiment with these - but this is what works for me.

you get your T42 to sleep, just add Code: acpi_sleep=s3_bios

to your kernel parameters in grub.conf and you can get rid of vbetool mentioned above. You need to have

vbetool is required only when using fglrx. If you are using xorg's builtin radeon, then you won't need to use it.

--

Well now thats rather odd that you got that to work to be honest, me and pretty much everyone else on the linux-thinkpad mailing list has had issues with fglrx and suspending. We have all sent the boot parameters, switched to radeonfb from vesafb, and unloaded any other modules that could cause issues. It was narrowed down to the bottom line issue being fglrx, and the only solution was the one I propsed to the mailing list to use vbetool. If it works for you without it though, your the first in a very large number of people.

6.3   Wake

The T42 support multiple modes of waking up from the suspend modes (e.g. from a special packet coming from the network). This could be nice to leave the machine at home and turn it own remotely. I think some BIOS fiddling will be necessary to make this work.

Important

FIXME TODO

Check out how this works.

6.4   Debugging

Tricks, from kernel source/Documentation/power/tricks.txt:

Pavel Machek <pavel@suse.cz>

If you want to trick swsusp/S3 into working, you might want to try:

  • go with minimal config, turn off drivers like USB, AGP you don't really need
  • turn off APIC and preempt
  • use ext2. At least it has working fsck. [If something seemes to go wrong, force fsck when you have a chance]
  • turn off modules
  • use vga text console, shut down X. [If you really want X, you might want to try vesafb later]
  • try running as few processes as possible, preferably go to single user mode.
  • due to video issues, swsusp should be easier to get working than S3. Try that first.

When you make it work, try to find out what exactly was it that broke suspend, and preferably fix that.

From jafo, try this on my kernel boot line:

pci=noacpi acpi_sleep=s3_bios

Important

Try next:

  • hibernate-ram
  • Gentoo ACPI debugging page
  • Gentoo power management guide
  • binding the sleep button with acpi to hibernate-ram should work
  • Kernel 2.6.15 should work with the ATI card

7   Graphics

My xorg.conf file is too big to quote here.

Use aticonfig for automatic configuration:

Configuring the /etc/X11/xorg.conf file was originally done using the fglrxconfig application (see Q3.3), but ATI now recommend using aticonfig, which was introduced in recent driver versions. aticonfig is designed to update your existing configuration rather than replace it with a new one, which is a bit more convenient. A basic configuration can be produced simply by running the command aticonfig --initial --input=/etc/X11/xorg.conf. Run the application without arguments for a listing of the various parameters and some examples. You can run aticonfig again in future to enable/disable any of the other various settings the driver supports.

7.1   Radeon Mobility specific packages

7.1.1   Kernel Configuration

There is information about configuring the kernel for use with the ATI drivers here:

http://odin.prohosting.com/wedge01/gentoo-radeon-faq.html http://gentoo-wiki.com/Ati
* app-laptop/radeontool
     Available versions:  1.5-r1
     Installed:           no
     Homepage:            http://fdd.com/software/radeon/
     Description:         Control the backlight and external video output of ATI Radeon Mobility graphics cards

Simple tool that allows to do very basic force of LCD off, etc.

7.2   Dual Screen Setup / CRT

After some amount of fiddling, I managed to get my display working with both LCD and CRT mirroring the same buffer at the same time.

For a while I had a problem where the display on the CRT was not filling the entire screen, the displayed portion was stuck in the upper-left corner of the viewport, and the size of the image was around 70% what it should have been. It was the same using a projector. Not the best to produce a presentation, but I could manage. I was using x11-drivers/ati-drivers 8.14.3.

In [2006-01-16] I upgraded to the 8.20.8 version (still experimental at this point) and this fixed my problem.

Note: I ended up using fglrxconfig to generate my configuration for that, so I won't bother posting it here.

Note

I still don't know how to get xdm to select one of my two configurations, for now I have copy the right xorg.conf file every time I change this (not a big deal since it does not happen often anyway).

7.2.1   Problems

  • I cannot play video, only a black square is shown. This sucks!

  • When you boot up, if the external video cord is not connected, the external video will not work. (This happened to me trying to give a 5-minute lightning presentation at PyCon, and it was not fun, I had to retry 3 times until I figured out the problem).

    Note: try out radeontool dac on, I did not have a chance to try this yet.

    I found detailed information about how to set this up here:

    http://odin.prohosting.com/wedge01/gentoo-radeon-faq.html
    
    (look for xvideo, and a little further down, for TV-Out)
    
  • In relation to sleep mode and DRI:

    Question 4.46: How can I enable suspend/resume with direct rendering enabled? In most cases, attempting to use suspend/resume features on laptops with the ATI driver will cause problems if direct rendering is enabled. However, it now appears to be possible to workaround this problem and allow suspend/resume functionality and direct rendering to work sucessfully.

    The technique is described in this post: http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2005-June/026968.html The file fglrx_suspend_resume.tar.bz2 contains an example of an xorg.conf you can use as an example, and a script that performs the appropriate actions (it is intended to be executed when an ACPI lid open/close event is generated).

    (Nikias Bassen):

    I'm running my favorite config for my Xorg: fglrx with direct
    rendering enabled, working fine.
    When resuming, before switching to X, I restore the state of my
    FireGL T2 with vbetool, and then I start an X session with
    another serverlayout, without dri:
    
    xinit /bin/true -- `command -v X` :9 -layout fglrestore -auth /dev/null
    -audit 0 -nolisten tcp
    
    And the temperature falls to the same level it was when I do a clean boot
    of my machine.
    
    My xorg.conf is here:
    http://iwear.tzi.de/~nikias/xorg.conf
    

7.2.2   Links

Try this setup to have two different screens: http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2004-May/017885.html

Setup with MergedFB seems better than with Xinerama: http://forums.gentoo.org/viewtopic-t-309686-highlight-dual+display+laptop.html

Flags are available here: http://www.botchco.com/alex/radeon/mergedfb/cvs/DRI/final/radeon.4.html

A wiki with some info here: http://dri.freedesktop.org/wiki/MergedFB

http://modular.fas.harvard.edu/t42/

Simultaneous internal and external display

It was surprisingly difficult for me to get my T42p to display an image both
on its internal display and on an external display at the same time. The
automatic fglrxconfig program would not correctly configured X for this (for
me), no matter how many times I tediously ran it. I eventually stumbled upon
the following trick. In the "ATI Graphics Adapter" Device section of my
/etc/X11/XF86Config-4 file, I have the following under "Screen Management":

# === Screen Management ===
    Option "DesktopSetup"               "0x00000100"
    Option "MonitorLayout"              "AUTO, AUTO"
    Option "IgnoreEDID"                 "off"
    Option "HSync2"                     "unspecified"
    Option "VRefresh2"                  "unspecified"
    Option "ScreenOverlap"              "0"

Note the AUTO, AUTO. I also have an additional Screen section:

Section "Screen"
    Identifier   "VGA"
    Device       "ATI Graphics Adapter"
    Monitor      "External Monitor"
    DefaultDepth 24
    Subsection   "Display"
        Depth    24
    Modes    "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
    ViewPort 0 0
    EndSubsection
EndSection

And the server layout is:

Section "ServerLayout"
    Identifier  "Server Layout"
    Screen "LCD"
    Screen "VGA"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

If I start X11 with an external display plugged in, the same image will
appear on both the internal and external display. The image on the external
display should apear at the highest resolution supported by the external
display, and "virtually" at the same resolution as the internal display. I
say "should", because I have an external LCD that is capable of 1280x1024
resolution, but it only displays images at 1024x768 using this method
(frustating!). For a presentation, I set the laptop LCD panel resolution to
1024x768 (using KDE Control center), so both internal and external displays
are the same.

Important

FIXME TODO

Try this.

8   Audio

I'm using ALSA that comes with the kernel and it works fine. In /etc/make.conf:

ALSA_CARDS="intel8x0"

There is also an integrated speaker on the T42, but it automatically shuts off when the headphone jack is plugged in (I suppose that this a hardware thing and it can't be changed, and I don't really mind).

Note that the volume/mute thinkpad buttons seem to be hardwired to the hardware and independent from the Linux settings. Playing with them influences the volume but does not seem to change the ALSA settings.

9   Networking

9.1   Wired Network

The drivers already present work well with the T42's wired ethernet connection. The interface shows up as eth0.

Question: is there a way to determine in /proc if the ethernet cable is plugged in? This way we could avoid a delay when trying to setup eth0.

There is a package that deals with plugging and unplugging of devices:

* sys-apps/ifplugd
     Available versions:  0.13-r1 0.25 0.26-r1
     Installed:           no
     Homepage:            http://0pointer.de/lennart/projects/ifplugd/
     Description:         Brings up/down ethernet ports automatically with cable detection

From the website:

ifplugd is a Linux daemon which will automatically configure your ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with onboard network adapters, since it will only configure the interface when a cable is really connected. ifplugd ifplugd interfaces with your distribution's native network configuration utilities.

Provides programs ifplugd, ifplugstatus

In /etc/ifplugd/ifplugd.conf, I edited:

AUTO="yes"

And now when I plug or unplug the wired ethernet it automatically runs dhcpcd and my interface is configured.

Update [2005-11-20]: I now use udhcpc, it seems to be more reliable than the default.

9.2   Wireless Networking

Learning more about WiFi itself http://www.wi-fi.org/

Gentoo wireless documentation: http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup

The heart of all things Wireless under Linux (lots of links) http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html

The interface is eth1

cd /etc/init.d
ln -s net.lo net.eth1

This should depend on your hardware. I order my T42 with then Intel 2200/BG hardware. There was an option for getting the IBM wireless hardware, which is supposed to be supported by some Atheros (sp?) driver.

Gentoo packages to check out:

aircrack
airsnort
ap-utils
kismet
waproamd
wpa_supplicant

Note (2006-02-25): In some places udhcpcd does not work, use this instead:

sudo dhcpcd eth1

9.2.1   Connecting

9.2.2   Drivers

9.2.2.1   ipw2200 driver

HW is Intel 2200BG integrated on Thinkpad mobo http://ipw2200.sourceforge.net/

  • kernel: enable hotplug firmware loading

  • kernel: enable net_radio (amateur)

  • kernel: enable wireless

  • kernel: enable crypto ARC4 and CRC32, MICHAEL MIC

  • emerge baselayout recent

  • emerge wireless-tools

  • emerge ipw2200 ipw2200-firmware

  • after compiling and installing all the wireless stuff above, reboot, and do:

    modprobe ipw2200
    

    And the iwtools start working.

Important

My connection fails intermittently, this is REALLY annoying. I need to try something else. It mostly works, but the connection should stay up, especially if I'm sitting in the same room as the router!!

9.2.2.2   linuxant

Linuxant sells a commercial driver that wraps the Windows driver for the wireless card and other devices. I haven't tried it.

9.2.2.3   ndiswrapper

This is an open source wrapper like Linuxant. When I load the module, my T42 freezes hard. I tried this due to intermittent problems with the ipw2200 driver.

9.2.3   Command-line tools

The widely used wireless-tools is what you should use:

* net-wireless/wireless-tools
     Available versions:  24 25-r1 26-r1 27_pre26 ~27_pre27 ~27_pre28 27 ~28_pre6
     Installed:           27
     Homepage:            http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
     Description:         A collection of tools to configure wireless LAN cards

Fiddle with it like this:

/etc/init.d/net.eth1 start
iwconfig eth1 essid <essid>
iwconfig eth1 key open <wep-key>
iwlist eth1 scan

Important

FIXME TODO

The Gentoo initscripts for wireless suck. When attempting to connect it finds a different list of networks than the simple scan does.

Besides, wireless connections need a GUI, to be able to dynamically edit profiles --you change networks all the time-- and to display signal strength. write something nice, along the lines of wifi_radar.py.

9.2.4   GUI configuration tools

  • KDE-3.4: kwifimanager

    Gotta wait for stable kde.

  • kwirelessmonitor

    Has a working emerge build. Doesn't appear anywhere.

  • Kifi

    Builds fine by hand. Doesn't appear anywhere.

  • Gnome: gwireless_applet. Doesn't compile (2005-04-02).

  • wlan-ui

  • wifi radar (2)

    Works, but the code and the UI sucks.

  • Ap Radar

  • WM Wifi

    WindowMaker DockApp that displays the signal strength

  • NetworkManager

    Doesn't build. This looks interesting, gotta build it.

  • GkRellM and friends

    A small agnostic mini-panel to contain stuff that always displays.

9.2.5   Wireless Questions

Note:

Wireless networks come in two general flavors. The Linux folks call them "Managed" and "Ad-hoc". The Managed flavor is a large wireless network consisting of many access points. The NIC will go out and scan for the best access point and use that one. You do not have to specify things like the channel or the name of the access point. The Ad-hoc flavor is designed for a residence or workgroup - use this if you want the client to connect to one particular access point. As far as I know, the Managed and Ad-hoc modes are mutually exclusive - you can't use the Managed mode of the card to automatically search for access points in the Ad-hoc mode.

Note from reader: Actually, the difference between Ad-hoc networks and Managed networks is that Managed networks have at least one node which serves as a central coordinator. This node is commonly called an Access Point. All network communication is sent via the managed node which then sends it to either another machine in the wireless network or onto a wired network. Ad-hoc mode has no manager, and as a result, each machine can only communicate with others which are within range.

Question: I'm having lots of problem "associating" my interface to an address. Where is this supposed to happen, and how, and can I force to a specific IP address without running dhcp? Will this work on most default router configurations?

Note from reader: I don't use Gentoo, so I can't say how to configure their distribution, but In order to communicate with a Access Point, you have to Associate with it. Once you have done that, it will allow you to communicate with it. If you want to associate with a particular Access Point, you need only specify its SSID (ie "linksys"). Once you have associated, you can then either request a DHCP address from it or the network it is connected to, or you can assign yourself an address using the standard UNIX ifconfig command. (see the man page for details). Most AP/router boxes will probably let you assign yourself an address, provided that you pick the correct address range, most routers use the 192.168.x.x network, so you can probably guess at a valid address, but perhaps a better way would be to use a tool like tcpdump to analyze the packets and figure out what the addresses of other hosts on the network are.

Question: how can I get better diagnostic of wireless failures?

Question: can a card connect with multiple networks at the same time?

Note from reader: I'm not aware of any card which can, there are several frequencies used by wireless networks, and I'm not sure how flexible the radio receivers are inside most wireless cards. Even if the hardware did support it, the driver probably wouldn't. My card can be placed in a listen only mode which amazingly can receive packets from multiple sources, though it cannot send in this mode AFAIK.

Question: with two cards, could I connect to two networks at the same time?

Absolutely. I've used my laptop as a bridge between two different wireless networks.

Question: how come the scan list seems to come and go?

Note from reader: This entirely depends on your hardware. I have two wireless devices, one which supports scanning, and the other which does not. The scanning appears to be based on packets received from other access points. Most access points broadcast a beacon packet at regular intervals (though this can be turned off to "cloak" a network). The interval is configurable, and often varies between different sites. I suspect that card which support scanning keep a list of beacon sources in a small memory area, and that the list is either purged periodically, or that the entries grow old after a while (a few seconds) and are deleted.

Question: what about dhcp over wireless, does it work differently?

Note from reader: Nope. DHCP works the same for all networks. This is because it operates at the network layer not the physical layer. See your handy ISO/OSI 7 layer network model. (:

Question: if you don't use DHCP, what other options are there?

Note from reader: BOOTP (which is obsolete) and Static Addressing. All DHCP does is make life easier for network admins. Before DHCP, all network devices had to be configured by hand individually (static addressing). You can't imagine the hell of running a college dorm network with static addresses. People would type them in wrong, or change them just to be cute. without

Question: WHAT IS ASSOCIATION?

Important

FIXME TODO

Figure out the nature of these error messages in the syslog:

Apr  2 05:22:36 [kernel] ipw2200: failed to send ASSOCIATE command

Note from reader: Simply a way for your wireless card to tell an Access Point that you are now a member of its network.

Question: what is BSS or IBSS mode? (the ipw2200 driver has an option for it).
Does it make a difference?

Question: does my card have to remain fixed in a single channel?

Note from reader: Have you ever used a CB radio? How about TV channels? Your card has a radio transceiver inside which it uses to talk to access points with. If it had two transceiver circuits in it, it would be able to use different channels. Think of it this way, you can only watch one TV channel at a time. If you got two TVs (or picture in picture) you could try to watch two channels at once, but guess what, you'd start watching a little of one and then a little of the other. Your brain cannot do both at once (unless you have super powers or tune two really boring shows). The radio can't do it either.

Question: what is a cell, and what is an Access Point? see man iwconfig mode

Note from reader: A Cell, is just a way of describing the area where an Access Point can be communicated with. If you are within the cell, you can communicate with the AP, if you are outside of it you cannot. This have everything to do with radio reception.
Question: what is the difference between managed and adhoc modes?
Which is more common?

Note from reader: Managed is way more common. Unless you are setting up an Ad-hoc network, you will never see one.

Question: what is the difference between the essid and the "nickname"?

The nickname is something solely used as a convenience, and it is not to be taken seriously at all. From the iwconfig man page:

nick[name]
  Set the nickname, or the station name. Some 802.11 products do
  define it, but this is not used as far as the protocols (MAC,
  IP, TCP) are concerned and completely useless as far as
  configuration goes. Only some diagnostic tools may use it.

  Example :
       iwconfig eth0 nickname "My Linux Node"

Question: how do I implement creating a local network with other computers in the vicinity, a la rendez-vous on the Mac?

Note from reader: Macs use the "zero-conf" protocol which their marketing team renamed rendez-vous. I'm sure that there are some Linux utilities which can do zero-conf things, however, I doubt they work as well as Apple's stuff. The things which go on inside Mac-OS to make the whole thing work is really quite amazing, and I'm willing to bet would be a real pain to get working on Linux.

9.3   Bluetooth

I don't have Bluetooth on the T42. A salesman at IBM mentioned that they're gradually removing it from their boxes. Talking to a few people reveals that there are many problems with Bluetooth and it's on its way out.

9.4   Infrared

Important

FIXME TODO

Try making IR work at some point. I haven't had a need for it until now.

9.5   Modem

Hopefully I'll never need this. Untried.

9.6   Blocking Ads

To block all adsersers when browsing, the simplest solution is to plop the contents of:

http://pgl.yoyo.org/adservers/

at the end of your /etc/hosts file. Works wonders.

10   External Devices

10.1   Happy Hacker Lite 2 USB Keyboard

My Happy Hacker Lite 2 USB keyboard seems to work fine when I just plug it in.

On my external keyboard, well, it already has the control key in its right place.

Important

FIXME TODO /

  • how do I switch between USB keyboard and no USB keyboard config without logging off? can I run a hotplug script to change xmodmap when the USB keyboard is plugged/unplugged?
  • the thinkpad has window-tab keys near the arrows on the lower right. Can I map one of those keys to act exactly like on the HHKB, as a function key that would give me access to the home/end/arrow keys using the buttons left of the enter key? That would rock.

10.2   PCMCIA Cards

  • cardctl is in pcmcia-cs (useful for acpi support)

    emerge pcmcia-cs

10.3   USB Hard-disk Drive

  • works just fine. When I turn it on, the device file appears and I can mount it. I have an appropriate line in /etc/fstab for it (with option noauto).

10.4   HP Laserjet 4P Printer

I emerged net-print/hplip and then started cupsd and hplip. I had to fiddle and restart a few times. You need to configure the thing first, by using http://localhost:631 and adding a printer.

Then I could print with:

lpr -P locahost <file>

I'm not sure if this will work reliably everytime though, I have used this rather rarely.

11   Working Offline

11.1   Local Cache

I would like to be able to trigger "something", then browse the web, then go offline and be able to access the data that I've been browsing (without access to the network).

I tried (2005-03-28) doing this with squid, installing it and configured with offline_mode on and it didn't just work. There would need be more config work to make this work nicely. I think this would be possible.

Important

FIXME TODO

Try to configure squid for storing offline cache for browsing.

12   Links

Other people's pages about their experience with the Thinkpad.

http://www.peteleonard.com/gentoo-t41p/ http://www.stanford.edu/~sanjiv/thinkpad/thinkpad.html http://forums.gentoo.org/viewtopic-t-201356-highlight-tpctl+t42.html http://wiki.version6.net/T42 http://forum.thinkpads.com/viewforum.php?f=9&sid=a2588146bdfd5f76512a657a34c40268

Gentoo thread on the T42 http://forums.gentoo.org/viewtopic-t-272843-highlight-t42+thinkpad.html

13   Own Projects

13.1   Wireless Control Interface

I want to build a nice GUI for controlling my wireless interfaces, scan/select networks, etc. Here follows disorganized notes for that project.

13.2   Power Management Interface

I want to build a nice GUI for controlling the various power configurations of my machine and to be able to monitor the current status and power settings. Here follows disorganized notes for that project.

FIXME TODO

check out quickswitch

Set the power management of the ipw2200 with iwpriv?

eth1      Available private ioctl :
          set_power        (8BE0) : set   1 int   & get   0
          get_power        (8BE1) : set   0       & get  80 char
          set_mode         (8BE2) : set   1 int   & get   0
          get_mode         (8BE3) : set   0       & get  80 char
          set_preamble     (8BE4) : set   1 int   & get   0
          get_preamble     (8BE5) : set   0       & get  16 char

13.3   TODO / Things I Need Help With

  • Configure Sleep S3 that works on my Thinkpad:
  • X Windows:
    • Figure out how to enable the external display when the laptop is booted disconnected from it.
    • Figure out how to configure X to be able to use mplayer or xine and see the video on the external (i.e. secondary) display, or figure out how to make the external display the primary display.
    • Figure out how to configure X with dual head with different screens, rather than a copy of the same screen.