Installing Ubuntu 9.10 (Karmic Koala) on a ThinkPad T61p

From ThinkWiki
Revision as of 01:24, 3 November 2009 by Ghosty (Talk | contribs) (←Created page with 'Tested with new installation of Ubuntu Karmic Koala 64 bit =Getting the hardware to work= ==Fingerprint Reader== The [http://thinkfinger.sourceforge.net Thinkfinger] pac...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Tested with new installation of Ubuntu Karmic Koala 64 bit

Getting the hardware to work

Fingerprint Reader

The Thinkfinger package allows you to swipe a finger in most places where you would have to type your password. This works with sudo, gksudo and on the login page and with a little fix also for the screen saver. Also, you are still required to type your user name on the login screen.

1) Install the following packages:

$ sudo apt-get install thinkfinger-tools libpam-thinkfinger libthinkfinger0

2) For your user:

$ sudo tf-tool --acquire && sudo tf-tool --verify

A completed fingerprint setup should look something like this:

frank@Laptop:~$ sudo tf-tool --acquire && sudo tf-tool --verify

ThinkFinger 0.3 (http://thinkfinger.sourceforge.net/)
Copyright (C) 2006, 2007 Timo Hoenig <thoenig@suse.de>

Initializing... done.
Please swipe your finger (successful swipes 3/3, failed swipes: 0)... done.
Storing data (/tmp/test.bir)... done.

ThinkFinger 0.3 (http://thinkfinger.sourceforge.net/)
Copyright (C) 2006, 2007 Timo Hoenig <thoenig@suse.de>

Initializing... done.
Please swipe your finger (successful swipes 1/1, failed swipes: 0)... done.
Result: Fingerprint does match.
frank@CLaptop:~$

This will store your fingerprint information in /home/$USERNAME/.thinkfinger.bir

You should do this step for each user who wants to use the fingerprint reader

3) Enable use of reader for authentication:

$ sudo gedit /etc/pam.d/common-auth

add

auth    sufficient      pam_thinkfinger.so

before the line which contains pam_unix.so and add

try_first_pass

to the end of the line containing pam_unix.so.

So it should look something like this:

...
auth    sufficient                      pam_thinkfinger.so
auth    [success=1 default=ignore]      pam_unix.so nullok_secure try_first_pass
...

4) Check uinput kernel module:

$ lsmod | grep uinput If the output starts with uinput, then you're done. If you don't get any output, then it needs to be started and set to start on boot.

Start uinput:

$ sudo modprobe uinput

Start on boot:

$ sudo gedit /etc/modules

make sure there is a line like this or add it at the bottom:

uinput

5) Enabling thinkfinger for gnome-screensaver

  • create this file:

$ sudo gedit /etc/udev/rules.d/60-thinkfinger.rules with this contents:

#
# udev rules file for the thinkfinger fingerprint scanner
# gives access to the fingerprint reader to those in the "fingerprint" group
#
# Taken from:
# http://www.thinkwiki.org/wiki/Install_Ubuntu_Intrepid_Ibex_on_a_T61p#Fingerprint_Reader
# which was taken and modified from:
#  http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger
#  http://article.gmane.org/gmane.linux.drivers.thinkfinger/329

# SGS Thomson Microelectronics Fingerprint Reader
SYSFS{idVendor}=="0483", SYSFS{idProduct}=="2016", SYMLINK+="input/thinkfinger-%k", MODE="0660", GROUP="fingerprint"

# the also-needed uinput device
KERNEL=="uinput", MODE="0660", GROUP="fingerprint"
  • Make the group:

$ sudo groupadd fingerprint

  • per user:

$ sudo gpasswd -a $USERNAME fingerprint && sudo chown $USERNAME:root /home/$USERNAME/.thinkfinger.bir

Reboot your laptop and you should be ready to swipe!

Sources:

Battery control by tp_smapi

The kernel module is not present for some reason in Karmic Koala but there is a source package:

sudo apt-get install tp-smapi-source
cd /usr/src/
sudo tar -xjf tp-smapi.tar.bz2 
cd modules/tp-smapi/debian/
sudo module-assistant prepare tp-smapi
sudo module-assistant auto-install tp-smapi

You need to load a kernel module first:

sudo modprobe tp_smapi

Check if it was succesfully loaded:

sudo lsmod | grep tp_smapi

For convenience, you could load the kernel module at boot time by adding it to /etc/modules.

echo "tp_smapi" | sudo tee -a /etc/modules

Now, you will be able to have significantly more control over your battery charging via /sys/devices/platform/smapi.

For example, you could set a threshold value of 90% for charging, preventing the battery from charging all the way in exchange for a reduction in the loss of battery capacity that occurs after multiple cycles.

echo "90" | sudo tee -a /sys/devices/platform/smapi/BAT0/stop_charge_thresh

View the number of charge cycles your battery has had in its lifetime:

cat /sys/devices/platform/smapi/BAT0/cycle_count

While AC connected, force discharging of your battery:

echo "1" | sudo tee -a /sys/devices/platform/smapi/BAT0/force_discharge

If you have an Ultrabay battery, you might want to place this script into /etc/crontab to keep the Ultrabay battery from being completely discharged to 0%, which permanently damages the battery.

# rolls to BAT0 when remaining capacity on BAT1 is less than 20%.  Change .2 if wanted.  Swap BAT0 and BAT1 if tp_smapi thinks the ultrabay is BAT0.
awk '{if (/remaining capacity/) left=$3; if (/last full capacity/) full=$4} END {if ((left/full) < .2) system("echo 1 > /sys/devices/platform/smapi/BAT0/force_discharge")}' /proc/acpi/battery/BAT1/*

Remember the script needs root in order to write to the files in /sys/devices/platform/smapi/BAT{0,1}/.

Problems

Hibernate

Waking up from hibernation does something like this:

  • It shows a mangled screen and waits 15 seconds
  • It beeps (hardware beep which i have no idea how to disable)
  • It reinitializes the graphics card
  • It mangles the screen again and waits 15 seconds
  • Again hardware beep
  • It reinitilizes the screen again
  • Finally everything should be ok and it should be back from hibernation

It takes shorter to just shut down and restart then to hibernate/wake up currently ... :-(