Gentoo Linux on IBM ThinkPad T60

From Linux Wiki

Jump to: navigation, search
Overview
CPU/Multicore support Works perfectly
X11 with 3d-acceleration Works perfectly with newest driver
3D Desktop effects Works perfectly with newest driver
Ethernet works perfectly
Serial ATA/HDD works perfectly
DVD/Burner works perfectly
Wireless LAN Works with some configuration/newest driver
Verizon CDMA Card Works with some configuration/tweaking
Keyboard works perfectly
Touchpad/Trackpoint works perfectly
Bluetooth works perfectly
Fn-Keys works perfectly
ThinkLight works perfectly
OSD Works with some configuration/tweaking
ACPI Some control feature work without problems
Fingerprint reader Works with some configuration/tweaking
Modem Not tested
IBM Harddisk Protection System    Works with some configuration/tweaking


Pictures

Please feel free to email me if you want to comment on the Howto or you've found a mistake/typo or something else. Since this is wiki, everyone can add/correct everything, but - because of spam - you have to create an account. Email functions are deactivated!!! Any contact via my email

If you've problems with installing Gentoo after reading this howto, please first try some other howtos (probably different distributions) and resources here, then look at The Internet and then write me an email.

Contents

Specification of my system

  • Intel Centrino Duo T2500 2GHz, 2MB L2 Cache
  • ATI Graphics Card X1400
  • 2048 MB RAM
  • 14" SXGA+ Screen (1400x1050)
  • PCI-Express bus
  • UltraBay DVD multiburner
  • IntelPro Gigabit Ethernet
  • Intel HD Audio chipset
  • IPW3945 WLAN 802,11 a,b,g
  • Bluetooth (via internal USB-port)
  • Fingerprint reader
  • IBM Harddisk-Protection-System

Second system used in this wiki

  • Intel Centrino 2 Duo T7200 2GHz, 4MB L2 Cache
  • 1024 MB RAM
  • everything else just the same as above, perhaps some newer versions


Added: Information on getting some new Atheros based a,b,g,n wireless cards to work. These are found in some newer Thinkpads.


Here is my output of lspci.

Here is the output of lspci on the 2nd system.

Installation from CD

The Gentoo installation from CD works without problems, you can type at the boot prompt

boot: gentoo doscsi

if you want to, but a

boot: gentoo 

is sufficient.

For 64bit you might need

boot: gentoo noapic

If you're a new to gentoo, you should read the Gentoo Handbook first.


To build a kernel, gentoo-sources are working perfectly.

Simply type

emerge -av gentoo-sources

and configure your kernel in /usr/src/linux. (don't forget to set the symlink, see Gentoo Handbook).

Don't forget to add the drivers for SATA, AHCI and the intel SATA chipset (Device-Drivers->SATA)

to boot your system.

There are still some problems with alsa (audio drivers), you should compile only sound card support and NOT alsa into your kernel. Then add

ALSA_CARDS="hda-intel" 

to /etc/make.conf and

emerge alsa-driver

to get support for your sound card.




Here is my kernel .config.

CPU/Multicore

You need to compile SMP (support for 2 cpus/symmetric multi-processing) in your kernel, SMT (simultaneous multithreading) is not needed.

X11 with 3d-acceleration

The vesa driver works well, but only in 2d mode.

As playing only 2d is boring, you have to deal with the ATI-Driver. The latest version in the portage works, so add the following line to your /etc/portage/package.keywords:

x11-drivers/ati-drivers

Now let's configure xorg.conf, you can either use

aticonfig

(see man aticonfig for details) or you can use my xorg.conf. The important part is:


Section "Device"
	Identifier	"ATI Technologies, Inc. ATI Default Card"
	Driver		"fglrx"
	BusID		"PCI:1:0:0"
EndSection


Restart Xorg and look for 3d-acceleration with

glxgears

ati-drivers-8.35.5 on amd64 with suspend2-sources

If you get no hardware-acceleration, and an error about "try_to_freeze" when modprobing fglrx, you have to comment out two lines in the ebuild of ati-drivers-8.35.5.

Change

   # These patches are conditional because they contain api changes.
   if kernel_is ge 2 6 19; then
       epatch "${FILESDIR}"/ati-drivers-${PV}-2.6.19.patch
   fi
   if kernel_is ge 2 6 20; then
       epatch "${FILESDIR}"/ati-drivers-2.6.20.patch
       epatch "${FILESDIR}"/ati-drivers-${PV}-2.6.20.patch
   fi

to

   # These patches are conditional because they contain api changes.
   if kernel_is ge 2 6 19; then
       epatch "${FILESDIR}"/ati-drivers-${PV}-2.6.19.patch
   #fi
   #if kernel_is ge 2 6 20; then
       epatch "${FILESDIR}"/ati-drivers-2.6.20.patch
       epatch "${FILESDIR}"/ati-drivers-${PV}-2.6.20.patch
   fi

and recompile it.

Getting 8.24.8 to work:

If you're using the first working version (8.24.8), you have to tweak your kernel as there is a bug concerning a module conflict with the ati-driver. It works with kernel >=2.6.16

Open the kernel Makefile

vi /usr/src/linux/kernel/Makefile

and add a

intermodule.o

at the end of the module list. It should look like this (the other modules may differ):

obj-y     = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
            exit.o itimer.o time.o softirq.o resource.o \
            sysctl.o capability.o ptrace.o timer.o user.o \
            signal.o sys.o kmod.o workqueue.o pid.o \
            rcupdate.o extable.o params.o posix-timers.o \
            kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
            hrtimer.o intermodule.o

Then add a

CONFIG_OBSOLETE_INTERMODULE=y

at the end of the .config (kernel configuration, in /usr/src/linux).

Compile your kernel and the modules, boot the new kernel and try again.


If you get any AGP symbol errors, add AGP support to your kernel:


thg@neo ~ $ cat /usr/src/linux/.config | grep AGP
CONFIG_AGP=y
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
# CONFIG_AGP_INTEL is not set
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set

45679651136247757761211

XGL

At first you follow the HOWTO at the Gentoo Wiki. The ATI X1400 is supported by XGL, not by AIXGL and of course not by the nvidia driver. So take the instructions for installing standard Xgl.

The should be nothing more to do, it works good (only very few % additional cpu use) and looks great!

Beryl has actually some problems with Gnome, you should use Beryl with kde.

Compiz works with Gnome and Beryl, if you encounter problems (e.g. no window decorations) try the following script:


/usr/local/bin/startxgl

#!/bin/bash
echo ">Starte XGL auf dem Display: $1"
echo "========= XGL ============"
Xgl :$1 -ac -accel xv -accel glx:pbuffer &
sleep 3
echo "======= COMPIZ ==========="
DISPLAY=:$1 LD_LIBRARY_PATH=/usr/lib/opengl/xorg-x11/lib/ compiz --replace decoration wobbly fade minimize cube switcher rotate zoom scale move resize place &
 sleep 3
echo "====== DECORATIONS ======="
DISPLAY=:$1 gtk-window-decorator &
# sleep 3
echo "======= GNOME ============"
DISPLAY=:$1 /usr/libexec/gnome-settings-daemon &
DISPLAY=:$1 nautilus -n --sync &
DISPLAY=:$1 gnome-panel &
# DISPLAY=:$1 setxkbmap -model pc105 -layout de -variant basic &
#echo "======= LOGOUT ============"
#killall Xgl
# If you cannot logout put this part in

Now you can start Gnome with XGL by typing

startxgl 1

Ethernet

Works with the e1000 driver in kernel but there is a little bug in the driver. The card fails sometimes initialising because of a wrong EEPROM value. There are some Workarounds for that.

Serial ATA/HDD

There should be no problems with kernel >=2.6.16. For kernel <2.6.16 and problems with newer kernel run the hdd in the compatibility mode (bios).

You will have to add SCSI support (SCSI emulation/SCSI disk) AND S-ATA support AND AHCI support to yur kernel.

CONFIG_SCSI_SATA=y
CONFIG_SCSI_SATA_AHCI=y

Remember the changes from /dev/hdXY at normal IDE-system to /dev/sdXY at SCSI/S-ATA-systems, so you have to edit your grub.conf, fstab and many other config files to this syntax.

DVD/Burner

UPDATE: Kernel 2.6.19 and higher (gentoo sources) The dvd burner has an ide interface which is directly connected to the SATA controller.

You have to remove completely ide support

Device Drivers --->
ATA/ATAPI/MFM/RLL support --->
< > ATA/ATAPI/MFM/RLL support

and add SATA support (SATA, AHCI and the Intel sata driver).

Then add the following options to grub to your kernel(sata in the kernel and not as modules):

noprobe=/dev/hdc libata.atapi_enabled=1 

so that it looks like that:

title Gentoo Linux 2.6.19-gentoo-r5
root (hd0,0)
kernel /boot/kernel-2.6.19-gentoo-r5 root=/dev/sda2 vga=0x31B noprobe=/dev/hda noprobe=/dev/hdc libata.atapi_enabled=1 udev

Wireless LAN

Update: If you use an atheros wireless card with your T60 and kernel >=2.6.26: the atheros driver is now in the kernel, for more details see here.


Update: kernel-2.6.19-r5 and above

With kernel 2.6.19-r5(gentoo-sources) or 2.6.19-r3(suspend2-sources) and above ieee80211 support is built into the kernel, but you need these versions:

neo thg # eix ipw3945
[I] net-wireless/ipw3945
     Available versions:  ~0.0.69 1.0.5 (~)1.2.0
     Installed:           1.2.0(13:52:18 02/11/07)(-debug kernel_linux)
     Homepage:            http://ipw3945.sourceforge.net/
     Description:         Driver for the Intel PRO/Wireless 3945ABG miniPCI express adapter

[I] net-wireless/ipw3945-ucode
     Available versions:  1.13 (~)1.14.2
     Installed:           1.14.2(13:35:35 02/11/07)
     Homepage:            http://www.bughost.org/ipw3945/
     Description:         Microcode for the Intel PRO/Wireless 3945ABG miniPCI express adapter  

[I] net-wireless/ipw3945d
     Available versions:  ~0.7.16 1.7.18 (~)1.7.22-r4
     Installed:           1.7.22-r4(13:13:27 02/11/07)
     Homepage:            http://www.bughost.org/ipw3945/
     Description:         Regulatory daemon for the Intel PRO/Wireless 3945ABG miniPCI express adapter 

* net-wireless/ipw3945-firmware
     Available versions:  (1.13)  ~1.13
     Homepage:            http://ipw3945.sourceforge.net

Simply compile ieee80211 into the kernel ...

   --- Networking support                                          
           Networking options  ---> 
               <*>   Generic IEEE 802.11 Networking Stack

... get the programs

emerge -D ipw3945 ipw3945d

(they are all stable in amd64 and x86 now) and have wlan!

Perhaps you have to reload the init-script at the first time, therefore:

modprobe -r ipw3945
modprobe ipw3945

Atheros chipID 0x0024 (rev 01)

This card is found in newer Thinkpads and some Macbooks. The open-source driver for Atheros based wireless cards is called madwifi. In a 32bit environment you can alternatively use a Windows XP driver through ndiswrapper. You might be able to get more features (encryption etc.) to work than with using the premature madwifi branch.

In 64bit (amd64) this is not possible (as of Apr. 2007), because there is no Windows XP 64bit driver for these cards and ndiswrapper doesn't support Windows Vista drivers (yet). You will have to use the new madwifi branch (madwifi-hal-0.9.30.10). Since support for the new a/b/g/n chips has been added very recently the ebuild is not in portage yet.

You can either download a tarball from here or download the ebuild via svn. It seems though that WEP/WPA encryption is not implemented yet. Look at bugtracking tickets #1001 and #1243 for updates on the matter.


Using the ebuild

To use the ebuild you need to have subversion (svn) installed. If you havn't got it yet do

emerge -av subversion

To download the latest svn snapshot type

svn co svn://svn.tuxfamily.org/svnroot/picoverlay/ebuilds/trunk

A good how-to for setting up the portage overlay can be found here. After you have set up the overlay do

emerge -av madwifi-ng

The version from the overlay shows up as 9999 you might have to select it specifically doing

emerge -av =madwifi-ng-9999

That should compile and install the needed modules.

Loading the driver

To load the modules do the following as root (in the exact same order)

modprobe -r ath_pci
modprobe -r wlan_tkip
modprobe -r wlan_scan_sta
modprobe -r ath_rate_sample

modprobe ath_rate_sample
modprobe wlan_scan_sta
modprobe wlan_tkip
modprobe ath_pci

If you don't do it in this order one of the modules will not load, because it expects one of the others to be already loaded. I wrote myself a little bash script that does the work for me. After that you should see your wireless interface when you do an

iwconfig

It should be named ath* (there should also be a wifi0 interface, but I don't know what it is for, does anybody know?)

There is a good HowTo on the fundamentals of madwifi usage here

Verizon CDMA Card


Things that need fixing:
 * A way to alias /dev/ttyUSBn to something like /dev/verizon based on
   the vendor and product.
 * Clean up the rc script.
 * Set up log rotation on /var/log/verizon
 * Make the card actually power off upon rc stopping
 * Write a function to interface to the 'AT&V' command and fetch vars
 * Figure out how to run commands on the card while pppd is running

Hardware: 

Things that need fixing:
 * A way to alias /dev/ttyUSBn to something like /dev/verizon based on
   the vendor and product.
 * Clean up the rc script.
 * Set up log rotation on /var/log/verizon
 * Make the card actually power off upon rc stopping
 * Write a function to interface to the 'AT&V' command and fetch vars
 * Figure out how to run commands on the card while pppd is running

Hardware:
Sierra Wireless MC5720

  artur ~ # lsusb
  ...
  Bus 002 Device 002: ID 1199:0218 Sierra Wireless, Inc. 
  ...

1199 is the vendor, and 0218 is the product.  Alternatively, you can:

  artur ~ # grep -B 3 -A 9 Sierra /proc/bus/usb/devices 
  T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
  D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
  P:  Vendor=1199 ProdID=0218 Rev= 0.01
  S:  Manufacturer=Sierra Wireless
  S:  Product=Sierra Wireless MC5720 Modem
  C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
  I:  If#= 0 Alt= 0 #EPs= 7 Cls=ff(vend.) Sub=ff Prot=ff Driver=sierra
  E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=128ms
  E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
  E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
  E:  Ad=84(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
  E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
  E:  Ad=85(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
  E:  Ad=05(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

Notice the third line, starting with 'P:', where it shows the vendor
and product codes (in hex).  That comes into play later, when loading
the usbserial module.  Moreover, you can use those values to reference
the specifics of the device itself.

http://www.notebookreview.com/assets/17890.htm

Kernel Modules:
sierra
usbserial vendor=0x1199 product=0x0218

Kernel Config:
Device Drivers 
  -> USB support 
    -> USB Serial Converter 
      -> USB Sierra Wireless Driver

Packages:
sys-apps/usbutils
net-dialup/ppp

RC:
verizon

You'll have to communicate with the card through chat.  Every now and
then you may have to toggle the hardware switch on the front of the
notebook, and completely reset everything (stop /etc/init.d/verizon,
rmmod, etc...) to get it working, but it's pretty reiliable.  Windows
leaves it in a bit of a goofy state that may require said reset.  I
might get more sophisticated later and get a reset script working and
put it into the rc script.  If you perform the reset, and the light
doesn't come on then you might have to power the card up manually.
See below.

# fixme(kungfoo): find the thread on this topic and add a link

Useful chat commands:

  AT+CSQ - show signal (1st number)
  AT - just do this until the card responds with 'OK'
  AT!PCSTATE=1 - turn the card on
  AT!PCSTATE=0 - turn the card off

Useful function:

  function SAY {
    echo "$*" > /dev/ttyUSB0
  }

So, in one terminal:

  cat /dev/ttyUSB0

and in another:

  SAY 'AT' # watch for 'OK' from the card
  SAY 'AT!PCSTATE=1' # watch for the power to come on
  SAY 'AT+CSQ' # verify the card has singal
  SAY 'AT&V' # if you're feeling adventurous, view all settings

Kill the cat in the first terminal and:

  /etc/init.d/verizon start

/etc/init.d/verizon:
  #!/sbin/runscript
  # Copyright 1999-2007 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  # $Header: $
  
  start() {
    /usr/local/bin/verizon.sh > /dev/null 2>&1 &
  }
  
  stop() {
    kill $(pgrep verizon.sh)
    kill $(pgrep pppd)
  }

/usr/local/bin/verizon.sh:
  #!/bin/bash
  
  while true ; do
    pppd call verizon >> /var/log/verizon.log
  done

/etc/ppp/peers/verizon:
  #the USB serial device of the EVDO PCMCIA card.
  ttyUSB0
  #your login information
  user <YOUR NUMBER HERE>@vzw3g.com
  230400 # speed
  #debug
  defaultroute # use the cellular network for the default route
  usepeerdns # use the DNS servers from the remote network
  -detach # keep pppd in the foreground
  crtscts # hardware flow control
  #lock # lock the serial port
  noauth # don't expect the modem to authenticate itself
  connect "/usr/sbin/chat -v -f /etc/ppp/peers/verizon-connect"
  disconnect "/usr/sbin/chat -v -f /etc/ppp/peers/verizon-disconnect"

/etc/ppp/peers/verizon-connect:
  #time out is 20 because sometimes the card takes a little while to initalize
  TIMEOUT 20
  ABORT 'BUSY'
  ABORT 'NO ANSWER'
  ABORT 'NO CARRIER'
  SAY 'Starting Verizon\n'

  '' 'AT'
  'OK' 'AT!PCSTATE=1'
  'OK' 'ATQ0V1E0'
  'OK' 'ATZ'
  'OK' 'AT&F'
  # Dial the number
  SAY 'Connecting...\n'
  'OK' 'ATDT#777'
  CONNECT CLIENT

/etc/ppp/peers/verizon-disconnect:
  "" "\K"
  "" "+++ATH0"
  '' 'AT!PCSTATE=0'
  SAY "Disconnected from Verizon."

Keyboard

Works perfectly with normal "pc105" driver.

Touchpad/Trackpoint

Simple compile PS/2-support in your kernel and it will work! You can get the special touchpad functions working by using google, there is well documentated linux driver for the touchpad named "synaptics"

Logitech G5 Mouse (and perhaps other evdev controlled mice)

It's a bit tricky to get an evdev controlled mouse working in a way, that you are able to use all buttons and don't have to have the mouse plugged in at boot time.

Kernel:

   --- Device Drivers  --->
           Input device support  ---> 
               <*>   Event interface
           USB support  ---> 
               <*>   USB Human Interface Device (full HID) support

Needed software: emerge -av xf86-input-evdev

Configuration: In /etc/X11/xorg.conf, configure your Touchpad, Trackpoint and Mouse as follows:

Section "ServerLayout"
       InputDevice    "Trackball" "CorePointer"
       InputDevice    "Touchpad"
       InputDevice    "mouse0"
       Identifier     "Default Layout"
       Screen         "screen0" 0 0
       InputDevice    "Generic Keyboard"
EndSection
Section "InputDevice"
       Identifier  "Trackball"
       Driver      "mouse"
       Option      "CorePointer"
       Option      "Device" "/dev/input/mice"
       Option      "Protocol" "Auto"
       Option      "Emulate3Buttons" "true"
EndSection
Section "InputDevice"
       Identifier  "Touchpad"
       Driver      "synaptics"
       Option      "SendCoreEvents" "true"
       Option      "Device" "/dev/psaux"
       Option      "Protocol" "auto-dev"
       Option      "SHMConfig" "on"
EndSection
Section "InputDevice"
       Identifier "mouse0"
       Option     "SendCoreEvents" "true"
       Driver     "evdev"
       Option     "evBits" "+1-2"
       Option     "keyBits" "~272-287"
       Option     "relBits" "~0-2 ~6 ~8"
       Option     "Pass" "3"
       Option     "Buttons" "12"
       Option     "ZAxisMapping" "4 5"
       Option     "HWHEELRelativeAxisButtons" "7 6"
EndSection

After restarting X (or possibly rebooting, dunno...) you should be able to use your G5 mouse with all it's buttons. For testing issues, try using your tilt-wheel in firefox.

Bluetooth

The Bluetooth is plugged into an internal USB-port, so you have to compile bluetooth and bluetooth usb support into your kernel. Nice HOWTOs can be found here.

Fn-Keys

Hardware controlled keys work without any tweaking.

To make other keys work make sure you build the ibm-acpi module and

 echo "options ibm_acpi experimental=1 hotkey=enable,0xffef" > /etc/modules.d/ibm-acpi 
 modules-update

0xffef specifies which keys should send ACPI events. I think Fn-F5 isn't enabled. 0xffff sends all events (but then the default actions don't always happen).

Also if you haven't already done so

 emerge -av acpid
 rc-update add acpid default

Now if you tail /var/log/acpid you should see ACPI events happening as you press Fn-F* (and the others) assuming you have the ibm-acpi module loaded with the right options. To listen to the events add an event scripts in /etc/acpi/events and the corresponding action script in /etc/acpi/actions:

 echo 'event=ibm/
 action=/etc/acpi/actions/ibm.sh "%e"' > /etc/acpi/ibm

Here an exemplary ibm.sh. In addition to the usual commands I have Fn-F1 set up to restart wireless by removing the wireless kernel module and then reinserting it. Its useful because for some reason wireless doesn't always come up when booting (but works fine resuming from a suspend). The only problems I have is xscreensaver takes a second or so to activate or lock so the keys can feel a bit sluggish sometimes. Files: modipw, suspend-ram, suspend-disk. Note: my scripts assume the currently logged in user is 'john'. Theres probably a better way to activate the screensaver but anyway..

ThinkLight

The ThinkLight (a little LED for keyboard illumination) is hardware-controlled, so it works out-of-the-box.

OSD

On-Screen-Display is displaying information about your thinkpad specials, e.g. when you switch your monitor, the battery or something else.

It's working with tpb, a tool for thinkpad buttons and OSD. You can emerge it but be sure to add xosd to your use flags.

emerge -av tpb

Notice that NVRAM support has to be in your kernel in order to get tpb to work. I also had to edit udev config to give users permission to /dev/nvram.

ACPI

A few features are built-in in the kernel (power management>acpi>ibm) and they work well, look at

cat /proc/acpi/ibm/*

The rest (standby, etc.) is working, too, but not with most recent kernels because of some bugs.

2.6.18 works fine with the suspend2-sources kernel.

Otherwise, if you wish to downgrade to 2.6.15, do this.

With your downgraded kernel do

emerge -av thinkpad tpctl configure-thinkpad tp_smapi

This will install thinkpad with tpctl, a very powerful thinkpad tool (console), configure-thinkpad, which is a gtk-gui for thinkpad and tp_smapi (optional), which is an api for new special acpi bios features. More information about these tools are available here.

As said before, it's buggy and only for old kernel an designed for older ThinkPad generations, so we have to wait for a good implementation. I'm working on acpi with 2.6.17, but up until now there is module conflict.

With 2.6.18-gentoo-r3 suspend to RAM seems to work fine (without suspend2-sources), I just had to disable AHCI in the bios and switch to compatibility mode. Apparently the requirement to disable AHCI is removed in 2.6.19 (but haven't tested yet). Also I had to enable "Sleep States" under ACPI support. Then just

 echo -n mem > /sys/power/state

Fingerprint reader

There is a very good work-around from Tobias Sager with some additional ebuilds.

Currently all the required packages are in portage. First, unmask the following:

 sys-auth/pam_bioapi ~x86
 sys-auth/bioapi ~x86
 sys-auth/tfm-fingerprint ~x86

Also,

 echo "sys-auth/bioapi qt3" >> /etc/portage/package.use

Install the new packages with

emerge -av bioapi tfm-fingerprint pam_bioapi

Add your user to the groups usb and bioapi:

gpasswd -a user usb
gpasswd -a user bioapi

Then create a fingerprint while with the nice GUI

 # /opt/bioapi/bin/QSample

Choose "Touchchip", enter your username in "user id" and create your fingerprint file. After that a user.bir should be in the current directory.

Now you can proceed with installing the .bir-file(try as root, if you get an "BioAPITest: command not found", take your user account. you will have to copy the SERIAL={5550454b-2054-464d-2f45-535320425350} into the root console for editing a file in /etc later on)

SERIAL=`BioAPITest | sed -ne "/Fingerprint/{n;n;s/^.*: \(.\{9\}\)\(.\{4\}\)\(.\{4\}\)\(.\{4\}\)\(.*\)/\1-\2-\3-\4-\5/gp}"` 
echo $SERIAL

It should return

{5550454b-2054-464d-2f45-535320425350}

If that's not the case, try a

SERIAL={5550454b-2054-464d-2f45-535320425350}

Go on with

mkdir -p /etc/bioapi/pam/$SERIAL
cp <username.bir> /etc/bioapi/pam/$SERIAL


and replace the contents of /etc/pam.d/system-auth with this after taking a backup of it:

account    required     pam_unix.so
auth       sufficient   pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/
password   sufficient   pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/
auth       required     pam_unix.so nullok_secure
session    required     pam_limits.so
session    required     pam_unix.so 

That's it, be sure that you have a running root console for backup and try to login with kdm/gdm or whatever. Note there's other ways to to this particular step for example have fingerprint reader only used for certain programs see: /etc/pam.d/* and google.

If you have problems, there a some links at the end of this howto for internet resources.

Sound

It's important to enable modem-support in BIOS else the hda-intel driver will complain and ALSA works not until the restart of /etc/init.d/alsasound

Modem

Not tested.

IBM Harddisk Protection System.

Firstly you want to add the hdaps kernel module:

(enable hdaps with 2.6.18 kernel December 2006)

Symbol: SENSORS_HDAPS [=m]
Prompt: IBM Hard Drive Active Protection System (hdaps)
  Defined at drivers/hwmon/Kconfig:494=  
  Depends on: HWMON && INPUT && X86  
  Location:  
    -> Device Drivers
      -> Hardware Monitoring support   

Build as a module, modules_install

Next add hdaps to USE flags and rebuild tp_smapi. To do this I had to:

 echo "app-laptop/tp_smapi ~x86" >> /etc/portage/package.keywords
 emerge -va tp_smapi

Then: (note the order)

 echo "tp_smapi" >> /etc/modules.autoload.d/kernel-2.6
 echo "hdaps" >> /etc/modules.autoload.d/kernel-2.6

If you get errors in dmesg about hdaps device not supported its because tp_smapi isn't the hdaps version or possibly tp_smapi isn't loaded. tp_smapi contains patches relating to newer ThinkPads such as the T60 that make hdaps now work

Reboot. Now hdaps module should load. The next step is to do cool things with it - for example use as a joystick? or actually suspend the drive - this likely requires a kernel patch that doesn't seem to be kept up to date - not in portage.

See also: ACPI, install thinkpad/tpctl/tp_smapi/configure-thinkpad with the use-flag "hdaps".

I'have seen some nice apps for linux in the internet, but many are in the beta/alpha status. We are working on it.

More information

Personal tools