Difference between revisions of "Installing Ubuntu 10.04 (Lucid Lynx) on a ThinkPad Z61m"

From ThinkWiki
Jump to: navigation, search
(Setup Hard Drive Active Protection System)
(Hardware Support)
Line 63: Line 63:
 
|Hard Drive Active Protection System
 
|Hard Drive Active Protection System
 
|{{Cyes}}  
 
|{{Cyes}}  
|must be activated and configured. See below
+
|must be activated and configured. [http://www.thinkwiki.org/wiki/Installing_Ubuntu_10.04_%28Lucid_Lynx%29_on_a_ThinkPad_Z61m#Setup_Hard_Drive_Active_Protection_System See here]
  
 
|-
 
|-
Line 100: Line 100:
 
|Fingerprint Reader
 
|Fingerprint Reader
 
|{{Cyes}}
 
|{{Cyes}}
|works with UPEK's proprietary driver. See bellow
+
|works with ThinkFinger. [http://www.thinkwiki.org/wiki/Installing_Ubuntu_10.04_%28Lucid_Lynx%29_on_a_ThinkPad_Z61m#Setup_Fingerprint_Reader See here]
 
|-
 
|-
 
|VGA out
 
|VGA out
Line 108: Line 108:
 
|S-Video out
 
|S-Video out
 
|{{Cpart}}  
 
|{{Cpart}}  
|a 100HZ Sony TV was recognized as a 30HZ TV, poor picture
+
|a 100 Hz Sony TV was recognized as a 30 Hz TV, poor picture
 
|-
 
|-
 
|Modem
 
|Modem
Line 136: Line 136:
 
|{{key|Fn}}{{key|Fx}}, {{key|Fn}}{{key|PageUp}}, {{key|Fn}}{{key|Home}}, {{key|Fn}}{{key|End}}
 
|{{key|Fn}}{{key|Fx}}, {{key|Fn}}{{key|PageUp}}, {{key|Fn}}{{key|Home}}, {{key|Fn}}{{key|End}}
 
|{{Cyes}}  
 
|{{Cyes}}  
|out of the box, except of {{key|Fn}}{{key|F9}} and {{key|Fn}}{{key|Space}}
+
|out of the box, except of {{key|Fn}}{{key|F9}} and {{key|Fn}}{{key|Space}}. For configuring {{key|Fn}}{{key|Space}} [http://www.thinkwiki.org/wiki/Installing_Ubuntu_10.04_%28Lucid_Lynx%29_on_a_ThinkPad_Z61m#Make_Fn-Space_.28Screen_Magnify.29_work see here]
 
|-
 
|-
 
|{{key|Fn}}{{key|Up}}, {{key|Fn}}{{key|Down}}, {{key|Fn}}{{key|Left}}, {{key|Fn}}{{key|Right}}
 
|{{key|Fn}}{{key|Up}}, {{key|Fn}}{{key|Down}}, {{key|Fn}}{{key|Left}}, {{key|Fn}}{{key|Right}}
Line 144: Line 144:
 
|{{ibmkey|ThinkVantage|#495988}}
 
|{{ibmkey|ThinkVantage|#495988}}
 
|{{Cyes}}  
 
|{{Cyes}}  
|does nothing by default, but can be easily mapped to something useful. See bellow
+
|does nothing by default, but can be easily mapped to something useful. [http://www.thinkwiki.org/wiki/Installing_Ubuntu_10.04_%28Lucid_Lynx%29_on_a_ThinkPad_Z61m#Map_ThinkVantage_Button See here]
 
|-
 
|-
 
|{{ibmkey|Volume up|#494949}}, {{ibmkey|Volume down|#494949}}, {{ibmkey|Volume mute|#494949}}
 
|{{ibmkey|Volume up|#494949}}, {{ibmkey|Volume down|#494949}}, {{ibmkey|Volume mute|#494949}}
 
|{{Cpart}}  
 
|{{Cpart}}  
|the volume buttons work but don't affect the software (Pulse Audio) mixer. See bellow
+
|the volume buttons work but don't affect the software (Pulse Audio) mixer. For possible workarounds [http://www.thinkwiki.org/wiki/Installing_Ubuntu_10.04_%28Lucid_Lynx%29_on_a_ThinkPad_Z61m#Workaround_for_the_Volume_Buttons see here]
 
|-
 
|-
 
|Back and Forward keys (near the arrow keys)
 
|Back and Forward keys (near the arrow keys)
Line 156: Line 156:
 
|{{key|Fn}}{{key|Space}} (Screen Magnify)
 
|{{key|Fn}}{{key|Space}} (Screen Magnify)
 
|{{Cyes}}  
 
|{{Cyes}}  
|requires some acpi hacking. See below
+
|requires some acpi hacking. [http://www.thinkwiki.org/wiki/Installing_Ubuntu_10.04_%28Lucid_Lynx%29_on_a_ThinkPad_Z61m#Make_Fn-Space_.28Screen_Magnify.29_work See here]
 
|}
 
|}
 
 
  
 
[[Category:Z61m]]
 
[[Category:Z61m]]

Revision as of 22:57, 20 May 2010

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 unknown (should work) not tested
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 unknown (should work) not tested
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. See bellow
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

HOWTOS

Setup 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"
EndSection

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

paste

for i in 1 2 3
do
 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
 fi
done

before

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

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

Possible Workaround #2

If you still want to use volume keys for volume control, you should run

sudo gedit /etc/rc.local

and add this before "exit 0"

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

This solution is still not really acceptable because it uses a quite weird volume scale resulting in maximum loudness already on 50% of the software mixer. If you've already applied workaround #1, be sure to map "Volume Up" and "Volume Down" back to the Thinkpad volume keys

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
action=/etc/acpi/ibm-zoom.sh

and save. Now run

sudo cp /etc/acpi/ibm-wireless.sh /etc/acpi/ibm-zoom.sh
sudo gedit /etc/acpi/ibm-zoom.sh

and replace its content by the following

#!/bin/sh
#
# 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##`
       getXconsole;
       if [ x"$XAUTHORITY" != x"" ]; then
           export DISPLAY=":$displaynum"
           if [ "$magnifier_pid" != "" ]; then	    
		/usr/bin/killall kmag
           break
           else
               /usr/bin/kmag &
               break
           fi
       fi
done

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.

Setup 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

Setup Fingerprint Reader

In a terminal 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.

Setup 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

tp_smapi 

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

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 https://launchpad.net/~andypiperuk/+archive/andypiper-ppa/+files/thinkhdaps_0.2.1-1_all.deb 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
sudo cp
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

ThinkHDAPS.png

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.

Power Management

Fix the hard drive clicking bug

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.

ATTENTION!
Here is a solution that worked for me. It's a bit dirty and turns off the power management of your HDD. This will slightly decrease your battery life but greatly improve your drive's lifetime.
Hint:
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
                resume_hdparm_apm
                hdparm -B 254 /dev/sda
                ;;
           *)
                exit 254
                ;;
                esac

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

/dev/sda:
 APM_level	= 254

Setup Fan Control

ATTENTION!
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 http://ppa.launchpad.net/tp-fan/ppa/ubuntu 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

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

tp_smapi 

to the very end of the file. Run

sudo gedit /etc/sysfs.conf

and add

devices/platform/smapi/BAT0/start_charge_thresh=85
devices/platform/smapi/BAT0/stop_charge_thresh=96

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

and

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


External Sources

  • [3] Trackpoint Configuration