Install Ubuntu 9.04 (Jaunty Jackalope) on a ThinkPad T400

From ThinkWiki
Jump to: navigation, search

T400

Newest Version of Ubuntu is 9.10 -> Install Ubuntu 9.10 (Karmic Koala) on a ThinkPad T400


Contents

Before Installation

Before you can start Ubuntu from CD or USB you have to change two BIOS settings:

  • Change to Internal or ATI Graphics with Config --> Display --> Graphics Device --> [Integrated graphics] or [Discrete Graphics]
  • Disable OS Detection for Switchable Graphics. Otherwise it will mysteriously switch back to Switchable Graphics.

Now you can boot your Live-CD, connect to Wireless Lan, and install the OS.

What works out of the box?


  • Intel driver for Integrated Graphics (Intel Integrated Intel GMA 4500MHD)
    • with 3D acceleration out-of-the-box
  • ATI fglrx driver for Discrete Graphics (ATI Mobility Radeon HD 3470 graphics)
    • To enjoy 3D acceleration, you have to install the proprietary fglrx Driver. (for example with the jockey-gtk tool)
  • VGA/HDMI output


  • Sound card
    • To use your internal microphone you maybe have to change to "HDA Intel CONEXANT Analog (ALSA)" in audio-settings.
  • Optical drive (Including DVD burning)
  • built-in webcam (tested with skype, cheese and vlc media player)
  • 7-in-1 card reader from Ricoh (MMC, Memory Stick, Mem Stick Pro, SD, SDHC, XD, XD Type H Memory)
  • Touchpoint and Trackpad
    • Including scroll at the right side of the pad by default. (for scrolling with the middle mouse button, see below!)


  • Control buttons/Hotkeys
    • Volume control buttons
    • Screen brightness control (FN + Home/End)
    • Thinklight control (FN + PgUp)
    • WLAN/BT/OFF toggle (Fn+F5 press once: Wlan and BT off/Press second time: BT off, Wlan on/Third time: BT on, Wlan off/Press another time: BT and Wlan on)
    • To add a bluetooth-only-toggle (Fn+F6) that doesn't affect WLAN take a look here
    • Wlan/BT hardware switch
    • Media player control (FN + arrows)
    • Browser history buttons
    • Switch to extern Monitor (FN + F7 press once: picture on both monitors/Second time: on external Monitor/Third time: Laptop monitor)
    • Suspend shortcut (FN + F4)
    • Hibernate shortcut (FN + F12)
    • Battery info shortcut (FN + F3)
    • Screenlock shortcut (FN + F2)
    • dock eject button (FN + F9) not tested yet!
    • ThinkVantage Button (You only have to allocate a programm!)


  • Some ACPI features
    • Battery status, power graphs and history (tested with an single 6-Cell battery)
    • Lid states and events
  • Suspend/Hibernate

What needs some Tweaks?

Mute button

The Mute button only mutes the sound but no induction in the gnome volume indicator. To fix this you must edit you grub menu.lst and add a kernel option acpi_osi="Linux" .

first back up your menu list

> sudo cp /boot/grub/menu.lst{,.orig}

Edit it

> sudo vim /boot/grub/menu.lst

Look for a line that looks something like this:

# kopt=root=UUID=<the disk partition id> ro

Add the kernel option to the end of the line:

# kopt=root=UUID=<the disk partition id> ro acpi_osi="Linux"

Save the file, then update grub

> sudo update-grub

Postinstall-Script for this Workarounds

This script:

  • enables scrolling with trackpoint
  • enables FN + F8 to switch on/off trackpad
  • makes the recommended Workaround for the harddrive-Bug
  • writes BATT_HD_POWERMGMT=200 (also to disable permanent Harddrive-parking )
  • enables the Menu-Key


#!/bin/sh
# Shell-script for postinstallation work on a T400 or another Thinkpad

# Scrolling with Trackpoint
echo '<?xml version="1.0" encoding="UTF-8"?>
<match key="info.product" string="TPPS/2 IBM TrackPoint">
 <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
 <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
 <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
 <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
</match>' > /etc/hal/fdi/policy/mouse-wheel.fdi

# FN + F8 to switch trackpad on/off
echo '<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
 <device>
  <match key="input.x11_driver" string="synaptics">
   <merge key="input.x11_options.SHMConfig" type="string">True</merge>
  </match>
 </device>
</deviceinfo>' > /etc/hal/fdi/policy/shmconfig.fdi

# recommended workaround for hard disk bug
sed -i 's/ENABLE_LAPTOP_MODE=false/ENABLE_LAPTOP_MODE=true/g' /etc/default/acpi-support

sed -i 's/BATT_HD_POWERMGMT=1/BATT_HD_POWERMGMT=200/g' /etc/laptop-mode/laptop-mode.conf

# Menu Key Workaround
sed -i 's|key\ <I151>\ \ \ {\ \ \ \ \ \ \[\ XF86WakeUp|key\ <I151>\ \  {\ \ \ \ \ \ \[\ Menu\ \ \ \ \ \ |g' /usr/share/X11/xkb/symbols/inet

echo '==========================================='
echo 'After an reboot you certainly can use the features! To do so type "reboot"'

Step for Step:

1.Save this script as a textfile on your Desktop

2.Open the Terminal

3.Write this to change directory to Desktop

cd Desktop

4.Then type this line to set rights to read/write and execute (replace textfile with your filename!)

chmod 775 textfile

5.To get administrator rights type:

sudo su

6.Type your password

7.Execute the script

./textfile

8. If the script doesn't lead to success, you could try

 sudo rm /var/cache/hald/fdi-cache
 sudo /etc/init.d/hal restart


Scrolling with Trackpoint

Create a new file called /etc/hal/fdi/policy/mouse-wheel.fdi typing:

sudo gedit /etc/hal/fdi/policy/mouse-wheel.fdi

And fill it with this code:

<?xml version="1.0" encoding="UTF-8"?> 

<match key="info.product" string="TPPS/2 IBM TrackPoint">
 <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
 <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
 <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
 <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
</match>


Source: [1]

(Based on code from Michael Vogt and adapted to support both vertical and horizontal scrolling.)

Enabling Touchpad on/off key

Source: [[2]] The SHMConfig is now controlled through hal. In the past this was done through xorg.conf

You have to add the file

$ sudo gedit /etc/hal/fdi/policy/shmconfig.fdi

with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
 <device>
  <match key="input.x11_driver" string="synaptics">
   <merge key="input.x11_options.SHMConfig" type="string">True</merge>
  </match>
 </device>
</deviceinfo>

After this change please reboot. Restarting hal doesn't help.


Menu-Key

Taken from Bug #287428 "Menu key emits XF86WakeUp on Thinkpad X61s":

Václav Šmilauer wrote: "When I press the menu key on Thinkpad X61s, it doesn't do anything. I checked with xev and the generated keycode is 151 (xev-reported), which is mapped to <I151> and this, in turn to XF86WakeUp. I tried diferent keyboard models for Thinkpads, bot none of them worked in this respect. A temporary solution was to replace "XF86WakeUp" with "Menu" in /usr/share/X11/xkb/symbols/inet:86, where <I151> is mapped."


The Workaround in short:

sudo gedit /usr/share/X11/xkb/symbols/inet

Press Str + F to search for "I151" and write

"Menu" instead of "XF86WakeUp" in this line!


Notebook-Harddrive Bug

https://wiki.ubuntu.com/PowerManagement#8.10%20(Intrepid):

"Many of the previous issues have been addressed in Intrepid. All you need to do is:
"ENABLE_LAPTOP_MODE=true" in /etc/default/acpi-support (Bug 244838 fixed in acpi-support 0.111?)

You can also change "BATT_HD_POWERMGMT=1" in /etc/laptop-mode/laptop-mode.conf to an higher value to stop permanent harddrive-parking!

Active Protection System

APS with DKMS support for tp_smapi, visit: http://code.google.com/p/tp-smapi-dkms-module/

If you use APS with DKMS then you don't need to rebuild the module after kernel switch/update.

DKMS: http://en.wikipedia.org/wiki/DKMS


Sources: http://ubuntuforums.org/showthread.php?t=1017393 http://wiki.ubuntuusers.de/Festplattenschutz?highlight=festplattenschutz#Module_laden https://bugs.launchpad.net/ubuntu/+source/hdapsd/+bug/303915/ https://bugs.launchpad.net/ubuntu/+source/linux/+bug/297213/ http://www.thinkwiki.org/wiki/Talk:Install_Ubuntu_8.10_%28Intrepid_Ibex%29_on_a_Thinkpad_T400 http://www.thinkwiki.org/wiki/Tp_smapi#t…s_0x1600-0x161f


Here is a Step by Step guidance How to protect the harddisk through APS with Kernel 2.6.28!

At first you have to delete existing kernel modules to make space for the new ones (Press ENTER after each line):

sudo rm /lib/modules/$KVER/kernel/ubuntu/misc/thinkpad_ec.ko
sudo rm /lib/modules/$KVER/kernel/ubuntu/misc/tp_smapi.ko
sudo rm /lib/modules/$KVER/kernel/drivers/hwmon/hdaps.ko


Then downlaod the newest packages:

You will need

Save these things on your Desktop and unpack them, e.g.

tar xvfz hdapsd-20090401.tar.gz
tar xvfz tp_smapi-0.40.tgz
tar xvfz gnome-hdaps-applet-20081204.tar.gz

Then open the Terminal and type this to change into the tp_smapi directory:

cd Desktop/tp_smapi-0.40

Then try to load the kernel modules:

make load HDAPS=1 FORCE_IO=1

If there is written "drivers successfully loaded", you can type this for installation:

make install HDAPS=1 FORCE_IO=1

To laod these modules on startup you have to write them into the /etc/modules file:

sudo gedit /etc/modules

Append this to the file:

thinkpad_ec	
tp_smapi
hdaps

We also need options to load these modules correctly. They have to be written in /etc/modprobe.d/local.conf

sudo gedit /etc/modprobe.d/local.conf

Fill the file with this code

# enable thinkpad_ec
options thinkpad_ec force_io=1

# option to correctly set tilting through hdaps sensor
options hdaps invert=1

Now you can try, if the modules are loaded yet. Do so with

lsmod | grep hdaps

if not perform:

sudo modprobe thinkpad_ec tp_smapi hdaps


Then install these packages:

sudo apt-get install hdaps-utils hdapsd

Afterwards you can test hdaps-gl (with typing hdaps-gl in terminal) which shows the position of your Laptop.

hdapsd is not working yet. Therefore we need to compile our newer version downloaded before.

cd Desktop/hdapsd-20090401/
./configure --prefix=/usr/
make
sudo make install

If compilation and installation succeeded, you can test it by typing this into your terminal:

sudo hdapsd -d sda -s 15 -a -v -y 

If you suddenly move your laptop the output will change! (stop it with pressing Ctr + C)

The last step is, to copy an overworked initiation-script over the existing one.

The first line will download it, the second will set rights and the third one copies it to the right position. (Press ENTER after each!)

wget http://www.unet.univie.ac.at/~a0604095/hdapsd
sudo chmod 733 hdapsd
sudo cp hdapsd /etc/init.d/

Now you can start hdapsd with typing

sudo /etc/init.d/hdapsd start

After an reboot everything should start automatically and work correctly! You can change the sensitivity value and other things in this file: "/etc/default/hdapsd". To see the effects you have to type "sudo /etc/init.d/hdapsd restart" to restart hdapsd!

To install the gnome-panel-applet type these lines into the terminal:

sudo apt-get install libpanel-applet2-dev
cd Desktop/gnome-hdaps-applet-20081204
gcc $(pkg-config --cflags --libs libpanelapplet-2.0) -o gnome-hdaps-applet gnome-hdaps-applet.c
sudo cp gnome-hdaps-applet /usr/bin/
sudo mkdir /usr/share/pixmaps/gnome-hdaps-applet/
sudo cp *.png /usr/share/pixmaps/gnome-hdaps-applet/
sudo cp GNOME_HDAPS_StatusApplet.server /usr/lib/bonobo/servers/

The first line is to install required deps, second line is to move to the source directory (we have downloaded it looong time ago!), then we compile it and copy the files to several positions. After an reboot you can add this applet to the panel!

Please feel free to correct mistakes. If you have trouble, don't be shy and contact me with jabber: jango4@jabber.org

What doesn't work at the moment?

Integrated Fingerprint Reader

There is a new chipset build in, the "AuthenTec AES2810". So neither the thinkfinger nor the fprint Project support this Device at the moment.

lsusb:
Bus 002 Device 004: ID 08ff:2810 AuthenTec, Inc.

Daniel from fprint Project wrote in their mailing list, that support for our device is in development! For more information look here: fprint Unsupported devices


Switchable Graphics

Same Problem as with 8.10!

Not tested yet

Upgrading from earlier versions of Ubuntu

Resume/Suspend problems

If you have problems with resume/suspend, first try if it works from the LiveCD. If LiveCD works, the problem must be in your Ubuntu configuration. Try reinstalling acpi-support and laptop-mode-tools:

sudo apt-get remove --purge laptop-mode-tools acpi-support
sudo apt-get install laptop-mode-tools acpi-support

If this doesn't help, check the files in /etc/hal/fdi/information directory and remove the unnecessary files.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox