Installing Ubuntu 10.04 (Lucid Lynx) on a ThinkPad Z61m

From ThinkWiki
Jump to: navigation, search

Installing from USB stick

If you already use Ubuntu 9.10 Karmic, installing Ubuntu 10.04 from USB stick is very easy. Just download the latest ISO, plug the USB stick in and run System-->Administration-->Create a USB startup disk. Load the downloaded ISO and hit "Make Startup Disk". For more information check this page. After that reboot your Thinkpad and press F12. This will allow you to boot from USB stick and start the installation routine.

Tested Configuration

Hardware Support

Device / Function Works? Comment
Suspend & Hibernate yes out of the box
Intel GMA950 2D and 3D yes out of the box
Intel 3945ABG WiFi yes out of the box
Bluetooth yes out of the box
Broadcom Gigabit Ethernet yes out of the box
DVD±RW Burner yes out of the box
Ultrabay Hotswapping partial hotswapping optical drives (like DVD±RW) works out of the box, for HDD hotswapping look here
Hard Drive Active Protection System yes must be activated and configured. See here
Intel HDA Sound yes out of the box, modem must be enabled in BIOS
PCMCIA yes out of the box
Express Card yes out of the box, tested with a Conrad 1 Port SATA II ExpressCard 34 (SiL3531) and an external eSATA HDD (easyNova DATA BOX PRO-35SUS)
TPM unknown (should work) not tested, for further information check out these links [1], [2]
Firewire unknown (should work) not tested
USB yes out of the box
IRDA yes irda-utils must be installed. See here (Got full IrDA FIR 4 Mbps when communicating with a Thinkpad 390E running Win98SE)
Docking unknown (should work) not tested
Fingerprint Reader yes works with ThinkFinger. See here
VGA out yes out of the box
S-Video out partial a 100 Hz Sony TV was recognized as a 30 Hz TV, poor picture
Modem unknown not tested
Microphone yes both internal and external mics work out of the box, but are muted by default. Click on Volume Indicator, select Sound Preferences and go to the Output tab to unmute them.
Headphones yes out of the box
Touchpad yes out of the box
Trackpoint yes out of the box, to enable middle button scrolling see bellow
Multimedia Card Reader yes? works out of the box with all kinds of SD cards. No other cards have been tested
FnFx, FnPageUp, FnHome, FnEnd yes out of the box, except of FnF9 and FnSpace. For configuring FnSpace see here
FnUp, FnDown, FnLeft, FnRight partial depends on the player, works out of the box with Rhytmbox but not Audacious. Thus, needs additional configuration
ThinkVantage yes does nothing by default, but can be easily mapped to something useful. See here
Volume up, Volume down, Volume mute partial the volume buttons work but don't affect the software (Pulse Audio) mixer. For possible workarounds see here
Back and Forward keys (near the arrow keys) yes out of the box
FnSpace (Screen Magnify) yes requires some acpi hacking. See here


Set up the Middle Button Scrolling

Start a terminal and run

sudo gedit /usr/lib/X11/xorg.conf.d/20-trackpoint.conf

paste this

Section "InputClass"
    Identifier      "Trackpoint"
    MatchProduct    "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint"
    MatchDevicePath "/dev/input/event*"
    Option          "EmulateWheel" "true"
    Option          "EmulateWheelButton" "2"
    Option          "EmulateWheelTimeout" "200" 
    Option	    "Emulate3Buttons"	"false"
    Option          "YAxisMapping" "4 5"
    Option          "XAxisMapping" "6 7"

and save. Reboot.

Configure Trackpoint and Touchpad

The most convenient way to do this is to install GPointing Device Settings via

sudo apt-get install gpointing-device-settings

After that you will find it in System -> Preferences -> Pointing Devices

Screenshot-GPointing Device Settings-TrackPoint.png

GPointing Device Settings, however, can't configure such important Trackpoint settings as sensitivity, speed and press to select. To do this, open a terminal, run

sudo apt-get install sysfsutils
sudo gedit /etc/rc.local


for i in 1 2 3
 if [ -d /sys/devices/platform/i8042/serio1/serio$i ]; then
  echo -n 200 > /sys/devices/platform/i8042/serio1/serio$i/speed
  echo -n 150 > /sys/devices/platform/i8042/serio1/serio$i/sensitivity
  echo -n 1 > /sys/devices/platform/i8042/serio1/serio$i/press_to_select


exit 0

and save. This will set sensitivity to 200, speed to 150 and activate press to select. Replacing "echo -n 1" by "echo -n 0" in the file will deactivate press to select. To find the right speed and sensitivity values, you should do some tests before by issuing

echo -n 200 | sudo tee /sys/devices/platform/i8042/serio1/serio?/sensitivity
echo -n 150 | sudo tee /sys/devices/platform/i8042/serio1/serio?/speed

in the terminal and using different numerical values between 0 and 255. The default values are 128 for sensitivity and 97 for speed.

Workaround for the Volume Buttons

Volume buttons work but don't control software mixer (PulseAudio) settings. Thus you effectively get two volume scales completely independent from each other: Ubuntu's software mixer and Z61m's hardware mixer. That's confusing and inconvenient but as of 2010-05-05 (see Bug #357673) still unfixed.

Possible Workaround #1

Probably the easiest workaround is to make things work like they did in earlier Ubuntu versions (e.g. 7.04). This means that each time you press a hardware volume button you do see a notification via Ubuntu's OSD but you also change both mixers (hardware and software) simultaneously. This means that you get a quite weird volume scale and reach maximal loudness at approximately 50-80% of the software mixer. The experience shows, however, that most users don't consider that to be disturbing and are mostly fine with these "solution". To check, if it's okay for you, open a terminal and run

cp /sys/devices/platform/thinkpad_acpi/hotkey_all_mask /sys/devices/platform/thinkpad_acpi/hotkey_mask

If you are happy with the result all you should do is make it persistent. To do this, open a terminal, run

sudo gedit /etc/rc.local


cp /sys/devices/platform/thinkpad_acpi/hotkey_all_mask /sys/devices/platform/thinkpad_acpi/hotkey_mask

save and exit. If you don't like the result, don't make it persistent. Just reboot and try Workaround #2 or #3.

Possible Workaround #2

A simple workaround is to set hardware volume control to an acceptable level and not to use those volume buttons afterwards. Instead, you can use the software mixer only. It's easy to configure WinF1 and WinF2 which are not used in Ubuntu by default to act as volume buttons for the software mixer. To do this go to System -> Preferenced -> Keyboard shortcuts, click on "Volume Down" and press WinF1. Now click on "Volume Up" and press WinF2. If you also need mute, you can define Win1 for that. The changes will be applied immediately.

Screenshot-Keyboard Shortcuts.png

To check the current level of the hardware mixer, open a terminal and run


Then, hit F6 and select ThinkPad Console Audio Control. Change the values using Z61m's volume buttons. Values between 50 and 29 are quite acceptable, higher values might lead to sound distortions when having max volume in the software mixer.

Alsamixer Z61m.png

Possible Workaround #3

If you still want to use the hardware volume buttons you can add a special volume indicator for them. In this case you can still apply the Workaround #1 to get special keyboard shortcuts for the software mixer, or you can simply set the software mixer to something like 50% and use the hardware mixer only. To add a simple volume indicator for the hardware mixer, do the following. Open a terminal and run

sudo apt-get install xosd-bin
sudo gedit /etc/acpi/

paste this

# This script show the current state of the internal volume mixer
test -f /usr/share/acpi-support/key-constants || exit 0
. /usr/share/acpi-support/power-funcs
osd_cat=`pidof osd_cat`
for x in /tmp/.X11-unix/*; do
       displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
       if [ x"$XAUTHORITY" != x"" ]; then
           export DISPLAY=":$displaynum"
           if [ "$osd_cat" != "" ]; then      
                /usr/bin/killall osd_cat                                  
                /usr/bin/osd_cat -p bottom -d 1 -s 1 -o 120   -A center -f "-microsoft-verdana-*-r-*-*-*-*-0-*-*-*-*-*" -c green -b percentage -P $(/usr/bin/amixer -c 29 | /bin/grep Mono: | /usr/bin/awk -F" " '{print $4}' | /usr/bin/tr -d "[]") -T "Thinkpad Hardware Volume Mixer" &
                /usr/bin/osd_cat -p bottom -d 1 -s 1 -o 120   -A center -f "-microsoft-verdana-*-r-*-*-*-*-0-*-*-*-*-*" -c green -b percentage -P $(/usr/bin/amixer -c 29 | /bin/grep Mono: | /usr/bin/awk -F" " '{print $4}' | /usr/bin/tr -d "[]") -T "Thinkpad Hardware Volume Mixer" &

save and close gedit. In the same terminal run

sudo chmod +x /etc/acpi/
sudo gedit /etc/acpi/events/ibm-volume-up

paste this

# /etc/acpi/events/ibm-volume-up
event=ibm/hotkey HKEY 00000080 00001015

save and close gedit. In the same terminal run

sudo gedit /etc/acpi/events/ibm-volume-down

paste this

# /etc/acpi/events/ibm-volume-down
event=ibm/hotkey HKEY 00000080 00001016

save and close gedit. In the same terminal run

sudo kill -SIGHUP `pidof acpid`

close the terminal. Now you should be able to see the new volume indicator.


Make Fn-Space (Screen Magnify) work

Open a terminal and run

sudo apt-get install kmag
sudo gedit /etc/acpi/events/asus-rotate

replace it's content by the following

# /etc/acpi/events/ibmwireless
# This is called when the user presses Fn-Space
event=ibm/hotkey HKEY 00000080 00001014

and save. Now run

sudo cp /etc/acpi/ /etc/acpi/
sudo gedit /etc/acpi/

and replace its content by the following

# This script activates gnome-mag when Fn+Space is pressed
test -f /usr/share/acpi-support/key-constants || exit 0
. /usr/share/acpi-support/power-funcs
magnifier_pid=`pidof kmag`
for x in /tmp/.X11-unix/*; do
       displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
       if [ x"$XAUTHORITY" != x"" ]; then
           export DISPLAY=":$displaynum"
           if [ "$magnifier_pid" != "" ]; then	    
		/usr/bin/killall kmag
               /usr/bin/kmag &

Save and reboot. Now when pressing Fn-Space you can open KMagnifier. Pressing Fn-Space once again will close KMagnifier. You can configure KMagnifier as you like and your settings will be saved automatically

Map ThinkVantage Button

ThinkVantage Button is recognized but is not mapped to any function so that pressing it does nothing. To change this go to System->Preferences-> Keyboard shortcuts. There you can look for some predefined actions ThinkVantage Button might do for you. To map the button to a certain action simply click on the action and press ThinkVantage. Via Add you can also add your own commands, for instance to start your browser or e-mail client.

Set up External Monitor or Beamer (VGA)

Connect your monitor/beamer to VGA port and go to System -> Preferences -> Monitors. For quick access to those settings it might be useful to activate "Show monitors in panel".

Lucid ext Monitor new.png

You can also use this to configure an external device connected to S-Video Out.

Z61m svideo.JPG

Set up Color Management

To use ICC/ICM profiles you should install GNOME Color Manager via

sudo apt-get install gnome-color-manager

After that it should appear under System -> Preferences -> Color Profiles. Alternatively you can start it from the terminal by issuing


GCM should detect your Thinkpad monitor automatically. All you need to do is supply the correct ICC/ICM profile by clicking on the list under Color Profile and selecting Other profile ...


Lenovo does supply ICM profiles for most Thinkpads, but in order to open the appropriate .exe-archive under Linux you'll need Wine. Install Wine by running

sudo apt-get install wine

After that download 79oi22ww.exe and right-click the file. Go to the Properties tab and tick Allow executing file as program In the Open With tab select Wine Windows Program Loader and close the dialog. Now double-click 79oi22ww.exe, and hit Next -> I accept the agreement -> Next -> Next -> Install -> Finish. Using Nautilus go to "~/.wine/drive_c/DRIVERS/WIN/MONITOR". There you'll find different ICM profiles which can be used by GCM. TPFLX.icm is for FlexView panels whereas TPMB60.ICM and TPMB72.ICM are for MaxBright panels. If you have only a plain TFT panel (not MaxBright) then stick to TPLCD.icm.

After importing the appropriate profile to GCM and selecting it, be sure to go to Defaults tab and select Apply display correction and Set profile for color managed applications Unfortunately, GCM doesn't seem to support manual adjustments of gamma, brightness or contrast on Thinkpad displays.

At least adjusting gamma is possible when using xgamma. In a terminal run


to see you current gamma settings. You should see something like

-> Red  1.000, Green  1.000, Blue  1.000

It is possible to adjust gamma values for all colors at the same time by issuing something like

xgamma -gamma 0.9

or for red, green and blue separately

xgamma -rgamma 0.815 -ggamma 0.844 -bgamma 1.0

If you want to be able to relate RGB gamma values to a certain colour temperature, take a look at this page by Mitchell Charity. Thus, to get something like 7800K you'll have to issue

xgamma -rgamma 0.8115 -ggamma 0.8351 -bgamma 1.0

After having found your favourite settings, you'll probably want to make them persistent. To do this go to System -> Preferences -> Startup Applications, select the "Startup Programms" tab, click Add and add something like this

Name: xgamma
Command: xgamma -rgamma 0.8 -ggamma 0.8 -bgamma 1.0

(replace these values by your values) Click Add and then Close. Now these xgamma settings will be applied on each Gnome startup

Set up Fingerprint Reader

Although thinkfinger can be installed from Lucid repos, it contains some regressions which prevent fingerprint authentication from working properly. For more information check out Bug #256429 Martin Schwenke provides a PPA with the fixed version of thinkfinger which seems to work quite well.

To install thinkfinger open a terminal and run

sudo add-apt-repository ppa:martin-meltin/ppa
sudo apt-get update
sudo apt-get install libpam-thinkfinger=0.3+r118-0ubuntu4ppamartinmeltin5
sudo /usr/lib/pam-thinkfinger/pam-thinkfinger-enable

after that run

tf-tool --acquire $USERNAME

to acquire your fingerprint. Now you can use Z61m's fingerprint reader when using sudo/gksudo or in GDM login screen.

There seems to be a gnome-keyring related problem in Lucid when using fingerprint to log in. In that case Network Manager (nm-applet) may not appear in the panel or freeze when trying to change connection settings (Bug #529338). A known workaround is not to use fingerprint when logging in. You, however, still can use fingerprint for sudo, gksudo and all other supported authentication prompts.

Set up Hard Drive Active Protection System

Open a terminal and run

sudo apt-get install tp-smapi-dkms
sudo apt-get install python python-gtk2 python-gnome2 hdapsd

Now run

sudo gedit /etc/modules

and add


to the very end of the file so that it looks like this (example)

# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

Reboot. Now HDAPS should work. If you want to have a HDAPS icon in your notification area like in Windows, follow these steps to install ThinkHDAPS

Download and put it into your home directory. Right click on the file and select "Extract Here". In terminal run

cd ~
cd thinkhdaps_0.2.1-1_all
tar -zxvf data.tar.gz 
sudo cp usr/bin/thinkhdaps /usr/bin/
sudo chmod +x /usr/bin/thinkhdaps
sudo cp usr/share/pixmaps/* /usr/share/pixmaps/

Now you can run

thinkhdaps &

to make the ThinkHDAPS icon appear in the notification area


To make it autostart go to System -> Preferences -> Startup Applications, select the "Startup Programms" tab, click Add and add this

Name: thinkhdaps
Command: thinkhdaps

Click Add and then Close. Now the ThinkHDAPS icon should be always visible in the notification area.

To change the sensitivity run

sudo gedit /etc/default/hdapsd

and change the SENSITIVITY value. Default is 15 whereas higher values mean less sensitive. For example 25 seems to be just fine.

Set up HDAPS accelerometer event

This section assumes you set up tp_smapi.

To add the device rule (this worked for X61t, there is more info about the udev rule on the HDAPS Talk page)

echo 'KERNEL=="event[0-9]*", ATTRS{phys}=="hdaps/input1",ATTRS{modalias}=="input:b0019v1014p5054e4801-*",SYMLINK+="input/hdaps/accelerometer-event"' | sudo tee /etc/udev/rules.d/51-hdaps.rules

Then force the reloading of rules.d

sudo udevadm trigger

Now you should have a


Power Management

Fix the hard drive clicking bug

This problem is apparently not present anymore in Lucid with latest update. Thus, you should skip this part.

If you don't know what the hard drive clicking bug is, read this. Although this bug was apparently fixed in Ubuntu Karmic, Lucid seems to be affected.

If you have a better solution, be sure to share it here

To fix the bug open a terminal and run

sudo cp /usr/lib/pm-utils/power.d/95hdparm-apm /etc/pm/power.d/
sudo gedit /etc/pm/power.d/95hdparm-apm

Insert "hdparm -B 254 /dev/sda" after "resume_hdparm_apm" so that the appropriate section looks like this

case "$1" in
	thaw|resume|true|false) # true and false for power.d
                hdparm -B 254 /dev/sda
                exit 254

To test the fix try suspending/resuming and plugging/unpluging AC power. After each process run

sudo hdparm -B /dev/sda

hdparm should always report

 APM_level	= 254

Set up Fan Control

Wrong fan control settings may seriously damage you Thinkpad. You do it on your own risk!

To override BIOS fan control you can install ThinkPad Fan Control. Go to System -> Administration -> Synaptic Package Manager. Switch to the "Third Party Software" tab and click on "Add". As APT line add this

deb jaunty main

Click "Add Source" then "Close" and finally "Reload" as suggested. Now use "Synaptic Package Manager" to install following packages

tpfand tpfan-admin tpfand-profiles

Go to System -> Administration -> ThinkPad Fan Control and click on "Unlock". Select "Control system fan by software" and you're done.

It's also possible to define your own fan control rules thus overriding the default settings. To do this select "Manually configure system fan trigger temperatures". Here is an example for a Z61m with Core2Duo T5500 and GMA 950. Models with discrete graphics (like FireGL) will probably need lower threshholds as they usually produce more heat and thus require better cooling.

Screenshot-ThinkPad Fan Control Configuration.png

Don't do this if you are not affected!

tpfand relies on HAL for determining the ThinkPad's model. If the detection routine fails, tpfand stops immediately (see Bug #575199). If for some reasons you experience this problem, it is prossible to tweak this detection routine by editing tpfand's

sudo gedit /usr/lib/python2.6/dist-packages/tpfand/

and replacing

self.product_id = None
self.product_name = None
self.product_pretty_vendor = None
self.product_pretty_name = None
self.product_pretty_id = None


self.product_id = 
self.product_name = 
self.product_pretty_vendor = 
self.product_pretty_name = 
self.product_pretty_id = 

this will prevent tpfand from crashing even if it wasn't able to detect your ThinkPad's model.

This problem is apparently not present anymore in Lucid with latest update. Thus, you should skip this part.

Sometimes ThinkPad Fan Control's daemon tpfand crashes for unknown reasons causing software fan control to stop working (i.e. BIOS starts controlling the fan). A quick and dirty solution is to create a cronjob which will check if tpfand is working and restart it if necessary. To do this open a terminal and execute

sudo gedit /usr/bin/

paste this

echo "Checking if tpfand is still running"
ps -ef | grep -v grep | grep tpfand
if [ $? -eq 1 ]
echo "tpfand is not running - restarting"
sudo /etc/init.d/tpfand restart
echo "tpfand is still running"

and save the file. Now run

sudo chmod +x /usr/bin/
sudo crontab -e 

if asked to choose an editor, choose nano. Paste this

*/5 * * * * /usr/bin/

Finally press Ctrl+O, Enter, Ctrl+X to save the file. Now a cronjob will be executed every 5 minutes to make sure tpfand is running.

Set up IrDA

Make sure that you have IrDA enabled in BIOS. For this I recommend the following settings

Base I/O address 2F8
Interrupt 3

First you need to install irda-utils

sudo apt-get install irda-utils

Now stop irattach by issuing

sudo /etc/init.d/irda-utils stop

and run

sudo dpkg-reconfigure irda-utils

On the configure screen set the options as the following:

Activate IrDa on boot-up: yes
Attempt to probe for IrDa at system boot: yes
Discovery mode: yes
Typ of the IrDa-adaptor: native
Typ of the FIR-chip: nsc-ircc
Options for the modules of the FIR-chip:
Port for setserial to deactivate: 

Start irattach again

sudo /etc/init.d/irda-utils start

To test IrDA run

watch -n 1 cat /proc/net/irda/discovery

and place your IrDA device in front of the IrDA eye (for Z61m it's located near the WiFi switch). To transfer or receive files via IrDA you can use ircp

Note that by default you'll get only 115.2 Kbps. To get the full 4 Mbps run

sudo gedit /etc/default/irda-utils

and replace




After that restart irda-utils

sudo /etc/init.d/irda-utils stop
sudo /etc/init.d/irda-utils start

and you should get the higher speed. Use

cat /proc/sys/net/irda/max_baud_rate

to check the current max speed.

Configure Battery Charge Control

In a terminal run

sudo apt-get install sysfsutils
sudo apt-get install tp-smapi-dkms

Now run

sudo gedit /etc/modules

and add


to the very end of the file. Run

sudo gedit /etc/sysfs.conf

and add


to the very end of the file. Save and reboot. With this values your battery will start charging at 80% and stop charging at 96%. Of course you can also put other values between 1 and 100.

To check the current thresholds run

cat /sys/devices/platform/smapi/BAT0/start_charge_thresh


cat /sys/devices/platform/smapi/BAT0/stop_charge_thresh

External Sources

  • [3] Trackpoint Configuration (
  • [4] Gnome Color Manager (
  • [5] Calibrate your monitor (Ubuntu Field Manual)
  • [6] Shell Script – Restart Process if not found running
  • [7] (Installing Ubuntu 7.10 on a Thinkpad Z61m)