Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo on IBM Thinkpad T42
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
cb100
n00b
n00b


Joined: 31 May 2003
Posts: 19
Location: Europe

PostPosted: Thu Dec 30, 2004 5:37 pm    Post subject: Gentoo on IBM Thinkpad T42 Reply with quote

Updated: 28.03.2005 (cpufreq, PCMCIA, Thinkpad extras)

Shortly after having received an IBM Thinkpad T42 (Model-No. 2373-6ZG) I've installed Gentoo on it.
As the installation guides I've found in this forum (and on other places in the www) were quite helpful when setting up my system, I would like to share the information that is necessary for setting up Gentoo on this machine.


1. Basic System
Just follow the Gentoo Linux x86 Handbook (http://www.gentoo.org/doc/en/handbook/handbook-x86.xml).

Booting with a stage1-minimal LiveCD (2004.3), the kernel was able to detect the ethernet device and IIRC automatically loaded the e1000 module. Therefore, assigning an IP using dhcpcd wasn't any problem.

I've deleted the Rescue Partition (designation: "Compaq diagnostic"), as this model only has a 40GB harddisk and it shouldn't be any problem to receive some Rescue CDs from IBM on request.

If you would like to use the suspend-to-disk mode of your laptop, make sure to make a swap partition of appropriate size!

Now just follow the installation guide.

The next T42 relevant part is editing /etc/make.conf.
CHOST should be set to i686-pc-linux-gnu (surprise, surprise), CFLAGS and CXXFLAGS depend on the gcc version.
When using gcc 3.4.x or higher use
Code:
-march=pentium-m

for older versions use
Code:
-march=pentium3 -msse2

As some packages seem to have problems with gcc 3.3.x generated SSE2 code, it would perhaps be wise to remove the -msse2.
For the USE flags, make sure to add
Code:
mmx sse sse2


Once again, follow the installation guide. The next important section is kernel configuration. I assume you have decided to use a 2.6.x kernel.

Under Processor type and features, make sure you choose Pentium M as processor family.

Under Device Drivers - Networking Support - Ethernet 1000Mbit check the Intel PRO/1000 Gigabit Ethernet Support (e1000).

For later use by the X-Server, perhaps also include Device Drivers - Character Devices - Direct Rendering Manage and ATI Radeon from the list below.

Proceed with the installation guide, after reboot hopefully everything is working fine, including the ethernet connection.


2. X-Server
I've decided to use the xorg server:
Code:
emerge xorg-x11


The relevant parts from my xorg.conf:
Code:

...
Section "Module"
        Load  "record"
        Load  "extmod"
        Load  "dbe"
        Load  "dri"
        Load  "radeon"
        Load  "glx"
        Load  "xtrap"
        Load  "freetype"
        Load  "type1"
EndSection
Section "DRI"
        Mode   0666
EndSection
...
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbRules" "xorg"
        Option      "XkbModel" "pc89"
        Option      "XkbLayout" "de"
        Option      "XkbVariant" "nodeadkeys"
EndSection
...
Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/usbmouse"
        Option      "ZAxisMapping" "4 5"
EndSection
...
Section "Device"
        Identifier  "Card0"
        Driver      "radeon"
        VendorName  "ATI Technologies Inc"
        BoardName   "Radeon Mobility M7 LW [Radeon Mobility 7500]"
        Option      "AGPMode" "4"
        Option      "Accel"
        Option      "AGPFastWrite" "Yes"
        Option      "EnablePageFlip" "on"
        Option      "DDCMode" "Yes"
        BusID       "PCI:1:0:0"
EndSection
...


/dev/usbmouse reacts on input of an attached USB mouse, but also when using the trackpoint and the touchpad, including all buttons. Therefore, I have not installed the synaptics drivers.
BTW, same behaviour for /dev/psaux and /dev/mouse.

The Radeon Mobility 7500 is troublesome in terms of hardware acceleration, check the forum for further advice.


3. Sound
Follow the Gentoo Alsa Guide (http://www.gentoo.org/doc/en/alsa-guide.xml).
The T42 has an Intel Sound Chip, so include
Code:

ALSA_CARDS="intel8x0"

into /etc/make.conf before emerging alsa-driver.


4. Wireless LAN
The T42 has integrated WLAN:
Code:

lspci | grep 802.11
0000:02:02.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abgNIC (rev 01)

The madwifi-driver work fine with the Atheros chipset.

Just follow the HOW-To from Gentoo WIKI (http://gentoo-wiki.com/index.php?title=HOWTO_Wireless_Configuration_and_Startup).


5. Powermanagement (ACPI)
Once again, there exists a nice How-To for setting up ACPI: http://www.gentoo.org/doc/en/power-management-guide.xml

cpufreq won't run (at least with gentoo-dev-sources-2.6.9), as the T42 has a Pentium M with the Dothan core which is not (yet) supported by speedstep-centrino.
speedfreq work's fine though.
Update: cpufreq now works with kernel 2.6.11. Under Power Management Options - CPU Frequency Scaling make sure to add Intel Enhanced SpeedStep and the ACPI tables (CONFIG_X86_SPEEDSTEP_CENTRINO,CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI ).

I've not yet tried standby, sleep or hibernation.

Take a look at section 11 of this guide for instructions on how to use the Fn+X key combinations to send your system into sleep mode.


6. Bluetooth
Just do what Gentoo Wiki tells you: http://gentoo-wiki.com/HOWTO_The_host-to-host_Bluetooth.

Don't forget to activate the bluetooth device with Fn+F5!


7. Infrared
not yet tested


8. Modem
Not tested and no intention to do so.


9. PCMCIA
Make sure to add Bus Options - PCCard (PCMCIA/CardBus) support and the appropriate bridge support (most likely CardBus yenta will work) to your kernel. PCMCIA network drivers can be found in Device Drivers - Networking Support - PCMCIA network device support.

First, you will need the PCMCIA Card Services. So
Code:

emerge pcmcia-cs

and perhaps add it to default runlevel. If so, make sure that yenta (or whatever bridge support you use) is listed in modules.autoload.d!

Now
Code:

modprobe yenta # or whatever bridge support you need
/etc/init.d/pcmcia start
modprobe pcnet_cs # the driver for my pcmcia network card


Check your dmesg output. A new device should be available now.


10. VGA-/TV-Out
VGA-Out worked flawlessly from scratch.

TV-Out is a subject for further investigations.


11. Thinkpad Extras
Thinkpads, like other notebooks, offer special keys for certain purposes.
The following keys or key combinations are hard-wired and work without any special drivers:
* Power Button ;-)
* Increase/Decrease Volume
* Mute
* Fn+F5 (power up/down bluetooth)
* Fn+Pos1/End (increase/decrease brightness)
* Fn+PageUp (switch thinklight on/off)

In case you use KDE, you may want to activate the IBM Thinkpad KMilo plugin via Control Center - System Administration which will allow you to specify commands for certain buttons (i.e. "Access IBM").

In order to fire sleep events etc. we will have to install acpid and ibm_acpi:
Code:

emerge acpid ibm-acpi

(ibm-acpi may also be installed via the kernel configuration)
Add acpid to your default runlevel and add "ibm_acpi" to your modules.autoload.d.
acpid is explained in the Gentoo Powermanagement Guide (see section 5 in this guide).

ibm_acpi will recognize the thinkpad hotkeys (Fn+X) and forward all events to acpid.
In order to activate the keys, you will have to add the following line to /etc/conf.d/local.start:
Code:

# activate hotkeys via ibm_acpi
echo enable > /proc/acpi/ibm/hotkey


Restart acpid and press Fn+F3. Now check /var/log/acpid - you should see something similiar to
Code:

[Mon Mar 28 17:02:09 2005] received event "ibm/hotkey HKEY 00000080 00001003"


Lets define our actions for these events. First, create /etc/acpi/events/buttons:
Code:

# Fn keys
event=ibm/hotkey.*
action=/etc/acpi/actions/buttons_act.sh

This defines buttons_act.sh as our handler for all hotkey related events. Now create /etc/acpi/actions/buttons_act.sh:
Code:

#!/bin/bash

case "${1##ibm/hotkey HKEY 00000080 }" in
        "00001003") # Fn+F3
                /usr/bin/radeontool light off
                ;;
        "00001004") # Fn+F4
                echo 3 > /proc/acpi/sleep
                ;;
esac

Make this file executeable:
Code:

chmod +x /etc/acpi/actions/buttons_act.sh


In case you have not yet done so:
Code:
emerge radeontool


Pressing Fn+F3 will switch off the LCD screen, Fn+F4 will send our system into sleep mode.

As you will have already seen, I'm not really a bash programmer. Especially the LCD switching will not work the way you will want it. Somehow the script should remember how often the button was pressed and appropriately use "off" or "on" as a parameter. If anyone could help me with this: Thank you!

Caution: Sleep Mode does not yet really work for me. Getting into sleep mode is no problem, however, waking up will lead to a reboot.


Last edited by cb100 on Mon Mar 28, 2005 3:50 pm; edited 12 times in total
Back to top
View user's profile Send private message
Deathwing00
Bodhisattva
Bodhisattva


Joined: 13 Jun 2003
Posts: 4087
Location: Dresden, Germany

PostPosted: Thu Dec 30, 2004 7:47 pm    Post subject: Reply with quote

Moved from Installing Gentoo by Earthwings request.
Back to top
View user's profile Send private message
TecHunter
Tux's lil' helper
Tux's lil' helper


Joined: 15 Feb 2003
Posts: 124

PostPosted: Thu Mar 17, 2005 2:17 pm    Post subject: Reply with quote

I just bought a T42, so your experiences will help me a lot. thanks!
_________________
Gentoo is GREAT!!!
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Karlsruhe, Germany

PostPosted: Thu Mar 17, 2005 2:32 pm    Post subject: Reply with quote

I think cpufreq should run now on a 2.6.11 kernel.
Back to top
View user's profile Send private message
blais
n00b
n00b


Joined: 30 Jul 2003
Posts: 57

PostPosted: Fri Mar 18, 2005 2:49 pm    Post subject: graphics Reply with quote

i bought a recent T42 with a different radeon card::

/proc/pci: VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10] (rev 0).

I used fglrxconfig to setup my xorg server.
however i'm having some problems: glxgears does not run smoothly, it "blocks" every second or so, i still have to look into it, no idea what it could be.
Back to top
View user's profile Send private message
MrStaticVoid
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jul 2003
Posts: 114
Location: Maryland

PostPosted: Fri Mar 18, 2005 8:06 pm    Post subject: Reply with quote

Just a note: my T41p (FireGL T2) can suspend and resume with the fglrx drivers and kernel agpgart using APM.
Back to top
View user's profile Send private message
cb100
n00b
n00b


Joined: 31 May 2003
Posts: 19
Location: Europe

PostPosted: Mon Mar 28, 2005 3:47 pm    Post subject: Reply with quote

Added information regarding: cpufreq, PCMCIA and Thinkpad extras
Back to top
View user's profile Send private message
blais
n00b
n00b


Joined: 30 Jul 2003
Posts: 57

PostPosted: Tue Mar 29, 2005 11:12 pm    Post subject: Gentoo on Thinkpad T42 (me too!) Reply with quote

allrighty

after MUCH fiddling, i wrote a document that summarizes my own experience with installing Gentoo on the T42. The online, up-to-date version will be kept at

http://furius.ca/techdoc/misc/thinkpad.html



I will paste it here for people searching:

=============================
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::
.. section-numbering::

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

Kernel
~~~~~~

This document was written/updated for kernel 2.6.11.4.


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


.. raw:: html

<br clear='all' />



-----------------
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 TOOD 3.4 is not in gentoo stable yet, try this
when it comes out.


------------------
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.*

ACPI Support
~~~~~~~~~~~~

In the kernel
`````````````

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

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


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.


Interfaces to ACPI
~~~~~~~~~~~~~~~~~~

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.


Thinkpad Drivers
~~~~~~~~~~~~~~~~

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.


-----------------
Input Devices
-----------------

This section describes the various input devices.


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.


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"


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)

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.


GUIs to configure the touchpad
``````````````````````````````

qsynaptics
http://www.sourceforge.net/projects/qsynaptics

ltpconf
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.


Gestures
````````

.. important:: FIXME TOOD

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.


Links
`````

More info in gentoo wiki::
http://gentoo-wiki.com/HARDWARE_Synaptics_Touchpad


Trackpoint
~~~~~~~~~~

The trackpoint is the little red clitoris device 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.


IBM TrackPoint Linux kernel driver
``````````````````````````````````

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.

.. important:: FIXME TODO

The patch does not apply on kerner-2.6.11 so I could not try it.fix the patch
and try it.


The Linux Trackpoint Utilities
``````````````````````````````

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.

.. important:: FIXME TODO / try this when it starts working with
2.6. Website seems active that this should happen soon.



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.


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.


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.

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


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.


Other Things
~~~~~~~~~~~~

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.


--------------------
Power Management
--------------------

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

- LCD power: reduce the intensity of the LCD or turn it off. Remember that the
LCD is battery consumer no.1;
- HDD power: spin down the drive when it is not being used;
- Current wireless interface (on/off);
- CPU power: CPU frequency scaling allows changing the speed of the CPU
dynamically;

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:

- any amount of profiles is available
- each profile has two modes:
- when AC power is on
- when on battery mode


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.


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.


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``.


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.

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.


Hard-disk Drive
~~~~~~~~~~~~~~~

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.


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)



--------------
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


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.


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


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


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.


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.


------------
Graphics
------------

- emerge ati-drivers ati-drivers-extra

- run::

opengl-update ati
/opt/ati/bin/fglrxconfig

This creates the xorg.conf configuration file.
I had to change "Keyboard" to "keyboard" (xdm wouldn't start).

Use this: /opt/ati/bin/fglrxinfo

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


Radeon Mobility specific packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

::

* 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.


Dual Screen Setup
~~~~~~~~~~~~~~~~~

.. important:: FIXME TODO

- how do I set up dual screen display?
do I need Xinerama?



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


--------------------
Wired Networking
--------------------

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


-----------------------
Wireless Networking
-----------------------

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

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.


Drivers
~~~~~~~

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.


ndiswrapper
```````````

::

* If you would like to load this module automatically upon boot
* please type the following as root:
* # echo "ndiswrapper" >> /etc/modules.autoload.d/kernel-2.6
*

* ndiswrapper requires .inf and .sys files from a Windows(tm) driver
* to function. Download these to /root for example, then
* run 'ndiswrapper -i /root/foo.inf'. After that you can delete them.
* They will be copied to the proper location.
* Once done, please run 'update-modules'.

* check http://ndiswrapper.sf.net/phpwiki/index.php/List for drivers
* Look for the following on that page for your driver:
* 8086:101e 8086:4220

* Please have a look at http://ndiswrapper.sourceforge.net/wiki/
* for the FAQ, HowTos, Tips, Configuration, and installation
* information.

* IF UPGRADING FROM PRE-1.0!!!
* You MUST re-install your Windows drivers.
* Best way to do this is to run the following commands
* mv /etc/ndiswrapper/{driver} /tmp
* ndiswrapper -i /tmp/{driver}/{driver}.inf

linuxant
````````

Linuxant sells a commercial driver that wraps the Windows driver for the
wireless card and other devices.


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.



GUI configuration tools
~~~~~~~~~~~~~~~~~~~~~~~

- kwifimanager
- wlan-ui
- wifi radar (2)


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.


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

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

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

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

Question: what about dhcp, how does it work? Do I need it?

Question: what is association?

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

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

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

Question: what is the difference between managed and adhoc modes?
Which is more common?

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?



--------------------
External Devices
--------------------

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.

PCMCIA Cards
~~~~~~~~~~~~

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

emerge pcmcia-cs


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``).


-------------------
Working Offline
-------------------

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.


---------
Links
---------

Other people's pages about their experience with the Thinkpad. Also check out
the Thinkpad webring below.

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

Gentoo thread on the T42
https://forums.gentoo.org/viewtopic-t-272843-highlight-t42+thinkpad.html
Back to top
View user's profile Send private message
yem
n00b
n00b


Joined: 05 Nov 2002
Posts: 63
Location: Aotearoa

PostPosted: Wed Mar 30, 2005 3:45 am    Post subject: Reply with quote

Wow, great info here! You should get it linked from http://www.linux-laptop.net/

My own meagre notes are up at http://y3m.net/gentoo-on-t42/
Back to top
View user's profile Send private message
Hydraulix
Guru
Guru


Joined: 12 Dec 2003
Posts: 447
Location: Baltimore, Maryland

PostPosted: Wed Mar 30, 2005 2:26 pm    Post subject: Reply with quote

This is great! I'm planning on buying the T series ThinkPad in the near future. But I might wait for a 64 bit ThinkPad to come out. That fingerprint scanner is great. Hopefully there's support for this in Linux.
_________________
It is the fate of operating systems to become free.
- Neal Stephenson

If only You and Dead people can read hex, how many people can read hex?
Back to top
View user's profile Send private message
panlm
n00b
n00b


Joined: 29 Jan 2005
Posts: 45

PostPosted: Thu Mar 31, 2005 8:27 am    Post subject: Reply with quote

http://www.linux-on-laptops.com/ibm.html
Back to top
View user's profile Send private message
TecHunter
Tux's lil' helper
Tux's lil' helper


Joined: 15 Feb 2003
Posts: 124

PostPosted: Sun Apr 03, 2005 3:07 pm    Post subject: Reply with quote

3x for this good help! I just installed gentoo 2005.0 on my T42
I have one more question: If gcc in portage upgrade to 3.4.x, then can I simply modify -march in make.conf and reemerge gcc and something else?
_________________
Gentoo is GREAT!!!
Back to top
View user's profile Send private message
Sm1
Apprentice
Apprentice


Joined: 02 Dec 2003
Posts: 251
Location: Ames, IA

PostPosted: Sat Apr 09, 2005 12:48 am    Post subject: Reply with quote

Here is a quick way to use radeontool to alternate turning on and off your LCD when you hit FN F3

Code:
                                               
if [[ -e /tmp/.radeonlock ]]
then
     /usr/bin/radeontool light on
     rm /tmp/.radeonlock
else
     /usr/bin/radeontool light off
     touch /tmp/.radeonlock
fi
;;
Back to top
View user's profile Send private message
Sm1
Apprentice
Apprentice


Joined: 02 Dec 2003
Posts: 251
Location: Ames, IA

PostPosted: Sat Apr 09, 2005 1:12 am    Post subject: Reply with quote

A couple other solutions I have come up with:

ifplugd
This can be used to detect a link on eth0 and automatically enable/disable if there is a link or not

AccessIBM button
i used tpb to launch a script wireless.sh when accessibm is pressed. This lets me enable and disable my wireless easily
Code:

if lsmod | grep ath_pci
then
        Xdialog --infobox "Wireless DISABLED" 5 20 3000
        /sbin/modprobe ath_pci -r;
        if [ -e /var/run/xsupplicant ]
        then
                sudo /etc/init.d/xsupplicant stop
                if [ -e /var/run/xsupplicant ]
                then
                        sudo /etc/init.d/xsupplicant zap
                fi
        fi
        if [ -e /var/run/kismet_server.pid ]
        then
                sudo /etc/init.d/kismet stop
                if [ -e /var/run/kismet_server.pid ]
                then
                        sudo /etc/init.d/kismet zap
                        sudo rm /var/run/kismet_server.pid
                fi
        fi

else
        ######################
        ##Always insert module
        /sbin/modprobe ath_pci
        ######################

        tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
        trap "rm -f $tempfile" 0 1 2 5 15
        Xdialog --no-cancel --clear --title "Wireless Enabled" --menu "Atheros a/b/g Wireless Enabled.  What do you want to do?" 20 51 4 "CLOSE" "Choose the closest unsecured AP" "IBM" "Authenticate With IBM" "KISMET" "Scan using Kismet" "GKISMET" "Scan using Gkismet" 2> $tempfile

        retval=$?
        choice=`cat $tempfile`

        ######################
        #####Choose What to do
        ######################
        case $choice in
           IBM)
                   sudo /usr/bin/iwconfig ath0 essid IBM key 1234567890;
                   sudo /sbin/ifconfig ath0 up;
                   sudo /etc/init.d/xsupplicant start;
                   xterm -e "wavemon";;
           KISMET)
                   sudo killall runscript.sh;
                   sudo /etc/init.d/kismet start;
                   sleep 1;
                   Terminal -e "kismet_client";;
           GKISMET)
                   sudo killall runscript.sh;
                   sudo /etc/init.d/kismet start;
                   gkismet localhost;;
           CLOSE)
                   xterm -e "wavemon";;
        esac
fi


As for the touchpad, the synaptics driver is actually really good. I use the trackpoing often, but then I use the right side of the touchpad for scrolling windows, which is really convenient for me.

The other thing I do is enable those little keys above the arrows. These are back and forward for me in firefox. Use keyconfig to remap keys in firefox
Code:

xmodmap -e "keycode 234 = F19"
xmodmap -e "keycode 233 = F20"
Back to top
View user's profile Send private message
Sm1
Apprentice
Apprentice


Joined: 02 Dec 2003
Posts: 251
Location: Ames, IA

PostPosted: Tue Apr 12, 2005 5:26 am    Post subject: Reply with quote

On another note, I got ACPI s3 and s4 to work, here is my default.sh for /etc/acpi/default.sh
Code:


#!/bin/sh
# Event script for IBM Thinkpad R51

group=${1/\/*/}
action=${1/*\//}


case "$group" in
        # standard acpi button events
        button)
                case "$action" in
                        # powerbutton
                        power)  #/sbin/init 0
                                echo 4 > /proc/acpi/sleep
                                ;;

                        # lid open/close
                        lid)
                                if [[ -n `grep open /proc/acpi/button/lid/LID/state` ]] ; then
                                        #$dpms_force on
                                        /usr/bin/radeontool light on
                                else
                                        #$dpms_force off
                                        /usr/bin/radeontool light off
                                fi
                                ;;

                        # everything else -- undefined
                        *)      logger "ACPI action $action is not defined"
                                ;;
                esac
                ;;

        # ibm-acpi events
        ibm)
                case "$action" in
                        # Fn+F# hotkey
                        hotkey)
                                case "$4" in
                                        # F3 - turn off lcd
                                        00001003)
                                                if [[ -e /tmp/.radeonlock ]]
                                                then
                                                        /usr/bin/radeontool light on
                                                        rm /tmp/.radeonlock
                                                else
                                                        /usr/bin/radeontool light off
                                                        touch /tmp/.radeonlock
                                                fi
                                                ;;

                                        # F4 - sleep
                                        00001004)
                                                rmmod ehci_hcd ohci_hcd uhci_hcd
                                                /usr/local/sbin/vbetool vbestate save > /tmp/vbestat e
                                                chvt 1
                                                echo 3 > /proc/acpi/sleep
                                                /usr/local/sbin/vbetool post
                                                /usr/local/sbin/vbetool vbestate restore < /tmp/vbes tate
                                                chvt 7
                                                rm -f /tmp/vbestate
                                                modprobe ehci_hcd
                                                modprobe ohci_hcd
                                                modprobe uhci_hcd
                                                ;;

                                        # F5 - bluetooth
                                        00001005)
                                                ;;
                                        # F7 - switch display
                                        00001007)
                                                ;;
                                        # F8 - display expand
                                        00001008)
                                                echo expand_toggle > /proc/acpi/ibm/video
                                                ;;

                                        # F9 - ???
                                        00001009)
                                                ;;

                                        # F12 - hibernation
                                        0000100c)
                                                rmmod ehci_hcd ohci_hcd uhci_hcd
                                                /usr/local/sbin/vbetool vbestate save > /tmp/vbestat e
                                                chvt 1
                                                echo 4 > /proc/acpi/sleep
                                                /usr/local/sbin/vbetool post
                                                /usr/local/sbin/vbetool vbestate restore < /tmp/vbes tate
                                                chvt 7
                                                rm -f /tmp/vbestate
                                                modprobe ehci_hcd
                                                modprobe ohci_hcd
                                                modprobe uhci_hcd
                                                ;;
                                        esac
                                ;;
                        *)      logger "ibm/$action is no defined"
                                ;;
                esac
                ;;

        *)
                logger "ACPI group $group / action $action is not defined"
                ;;
esac


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

To enable LCD blanking you will need to use radeontool which I believe is in portage
Back to top
View user's profile Send private message
fennex
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2004
Posts: 106
Location: Zurich, Europe

PostPosted: Tue Apr 12, 2005 11:02 am    Post subject: Reply with quote

Sm1 wrote:
On another note, I got ACPI s3 and s4 to work, here is my default.sh for /etc/acpi/default.sh

What exactly do you mean with s3 and s4? Can I also use the sleep and hybernate commands with these files?
cb100 wrote:
Lets define our actions for these events. First, create /etc/acpi/events/buttons:
Code:

# Fn keys
event=ibm/hotkey.*
action=/etc/acpi/actions/buttons_act.sh

This defines buttons_act.sh as our handler for all hotkey related events. Now create /etc/acpi/actions/buttons_act.sh:

I got bluetooth starting when pressing FN-F5, so it would be easy to expand is to use "sleep" and "hybernate"

Thanks,
Fennex
Back to top
View user's profile Send private message
Sm1
Apprentice
Apprentice


Joined: 02 Dec 2003
Posts: 251
Location: Ames, IA

PostPosted: Tue Apr 12, 2005 12:54 pm    Post subject: Reply with quote

fennex,
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.
Back to top
View user's profile Send private message
fennex
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2004
Posts: 106
Location: Zurich, Europe

PostPosted: Thu Apr 14, 2005 3:34 pm    Post subject: Reply with quote

Hi

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
Code:
CONFIG_ACPI_SLEEP=y

enabled in your kernel as well.

Fennex
Back to top
View user's profile Send private message
Sm1
Apprentice
Apprentice


Joined: 02 Dec 2003
Posts: 251
Location: Ames, IA

PostPosted: Thu Apr 14, 2005 4:55 pm    Post subject: Reply with quote

vbetool is required only when using fglrx. If you are using xorg's builtin radeon, then you won't need to use it.
Back to top
View user's profile Send private message
fennex
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2004
Posts: 106
Location: Zurich, Europe

PostPosted: Thu Apr 14, 2005 6:17 pm    Post subject: Reply with quote

Well...

I use the fglrx drivers and it also works quiet well here.
Back to top
View user's profile Send private message
Sm1
Apprentice
Apprentice


Joined: 02 Dec 2003
Posts: 251
Location: Ames, IA

PostPosted: Thu Apr 14, 2005 6:27 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
fennex
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2004
Posts: 106
Location: Zurich, Europe

PostPosted: Mon Apr 18, 2005 11:16 am    Post subject: Reply with quote

Ok

I did it your way and it works also on the second attempt to sleep :)

In order to get hybernating working, do I have to pass acpi_sleep=s4_bios to the kernel as I did for s3?

Thanks, Fennex
Back to top
View user's profile Send private message
blais
n00b
n00b


Joined: 30 Jul 2003
Posts: 57

PostPosted: Mon Apr 18, 2005 12:36 pm    Post subject: back and fwd in firefox Reply with quote

Quote:

The other thing I do is enable those little keys above the arrows. These are back and forward for me in firefox. Use keyconfig to remap keys in firefox


did you know shift+wheel does that too?

also about those buttons: i would like to map the rightmost one to do like the Fn key on the happy hacker keyboard. not sure it can be done...
Back to top
View user's profile Send private message
Sm1
Apprentice
Apprentice


Joined: 02 Dec 2003
Posts: 251
Location: Ames, IA

PostPosted: Mon Apr 18, 2005 2:11 pm    Post subject: Reply with quote

For hibernate to work, just pass the same argument you were passing before. I didn't have any luck with software suspend2 patches, but software suspend seems to work fine now that I use vbetool.

blais:
I did know that firefox can do shift wheel for back/forward, but when reading some thing I dont have my hands on a mouse, but only arrow keys and this is convenient. When using a mouse (or trackpoint for that matter), I just use all in one gestures.
Back to top
View user's profile Send private message
xchric
n00b
n00b


Joined: 20 Feb 2005
Posts: 35

PostPosted: Mon Apr 25, 2005 3:04 pm    Post subject: Reply with quote

After I emerge ibm-acpi
I cant see folder /proc/acpi/ibm created
and when i press Fn+F3
I did not see this message
received event "ibm/hotkey HKEY 00000080 00001003"

how can i get this to work

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum