Install Ubuntu 8.10 (Intrepid Ibex) on a ThinkPad T400

From ThinkWiki
Revision as of 11:38, 18 November 2008 by Jsolomon (Talk | contribs) (ThinkPad 11b/g Wireless LAN mini PCI Express Adapter III (Atheros AR5007EG/AR2425 Chipset))
Jump to: navigation, search

T400 Site under construction. You are invited building an useful guidance!

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?

$ sudo dpkg-reconfigure -phigh xserver-xorg
  • ATI fglrx driver for Discrete Graphics (ATI Mobility Radeon 3470 graphics)
    • To enjoy 3D acceleration, you have to install the proprietary fglrx Driver. (for example with the jockey-gtk tool)
  • Touchpoint and Trackpad
    • Including scroll at the right side of the pad by default. (for scrolling with the middle mouse button, see below!)
  • Optical drive
    • Not tested burning yet
  • Sound card
    • To use your internal microphone you have to change to "HDA Intel CONEXANT Analog (ALSA)" in audio-settings.
  • built-in webcam with Skype
  • 7-in-1 card reader from Ricoh (MMC, Memory Stick, Mem Stick Pro, SD, SDHC, XD, XD Type H Memory)
    • Only tested SD cards.
  • Control buttons/Hotkeys
    • Volume control buttons
    • Screen brightness control (but changing brightness is a little bit diffuse. It's getting brighter but on maximum it changes to nearly lowest and get brighter again.)
    • Thinklight control
    • WLAN/BT/OFF toggle (Fn+F5 and mechanical toggle)
    • Media player control
  • Some ACPI features
    • Battery status, power graphs and history (tested with an single 6-Cell battery)
    • Lid states and events

What needs some Tweaks?

ThinkVantage Button ThinkVantage

Edit the file /usr/share/hotkey-setup/ibm.hk with adding this line:

setkeycodes e017 148 #thinkpad button

You have to restart, then you refer a program with the "System -> Preferences -> Keyboard Shortcuts"-Menu (eg. Terminal, Firefox,...).

Internal LCD Resolution Fix

The native screen resolution of 1440x900 is not detected automatically. The problem is that a secondary cloned display is set to 1360x768, and is being displayed on the integrated screen. Disable screen cloning, and disable the secondary display to fix the problem. For a complete fix, a restart of X is required (CTRL+ALT+BACKSPACE) is required, and when logging in again, you may need to fix your dock icon positions.

However, GDM still displays at either 1152x864 or 1360x768, creating a fuzzy image, or leaving borders at right and bottom, respectively. But it isn't a problem after logging in.

UPDATE:The solution posted above was too sparse for me. Instead, I found a new driver and compviz packages that fixed the problem using the v.2.5.0 of the intel drivers that are available here:https://launchpad.net/~thjaeger/+archive

make a back up of your /etc/apt/sources.list, i.e.

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak


Then add the following lines at the end of the /etc/apt/sources.list:

deb http://ppa.launchpad.net/thjaeger/ubuntu intrepid main

deb-src http://ppa.launchpad.net/thjaeger/ubuntu intrepid main


which you can edit using:

sudo gedit /etc/apt/sources.list


once you've closed gedit, update the list of updates by typing:

sudo apt-get update


this will update the package db, and you should see the 'package update' icon light up. Open that up, and apply the updates. Alternately, you can open it via System->Administration->Update Manager

Once the updates are applied, you will need to revert your /etc/X11/xorg.conf file if you've made any changes to it. You can do this via:

sudo dpkg-reconfigure -phigh xserver-xorg


Finally press ctrl-alt-backspace to restart the X-server.

Now, once you've logged back in, under System->Preferences->Screen Resolution, you should see 1440x900 listed.

Shutdown freezes sometimes

It seems that ALSA has problems to shut down if network devices are still active. You can force ALSA during its unloading to disable the networking first (remember to backup your files!):

sudo gedit /etc/init.d/alsa-utils

Search for "stop)" and add immediately below:

ifconfig eth0 down
ifconfig wlan0 down

NOTE - This doesn't seem to be a problem with Madwifi drivers, it is created by the Intel wireless card?

Now your shutdown should go smoothly.

VGA Output Resolution Fix

To enable 1600x1200 resolution to show up, run

$ sudo dpkg-reconfigure -phigh xserver-xorg

ThinkPad 11b/g Wireless LAN mini PCI Express Adapter III (Atheros AR5007EG/AR2425 Chipset)

There are two options for drivers here, the ath5k project, or older Madwifi drivers. The Madwifi drivers are based on the older, closed source HAL by Atheros, and the ath5k driver are based on the newer open source HAL by Atheros. Note that you should not enable more than one Atheros driver, or they will conflict with each other (this includes ath5k, ath9k, and Madwifi). If you need both BG & N support, do not use ath5k & ath9k, use Madwifi instead (only applicable if you are running multiple wireless cards).

NOTE: One user (with the a B/G card) reports that wireless performance was awful with the FOSS ath5k driver, but smooth and nice with Madwifi. YMMV - Also, the ath5k do not correctly detect hardware settings such as txpower.

NOTE 2: Due to a conflict, in order to achieve a stable connection it may be necessary to remove linux-restricted-modules beforehand using the following command: "sudo update-rc.d -f linux-restricted-modules-common remove" http://madberry.org/2008/11/how-to-get-atheros-ar242x-to-work-on-810-intrepid-ibex/


Installing the ath5k drivers from the compat-wireless package

Original discussion thread: [1]

1. Become the super user of the system:

$ sudo su
*NOTE: Becareful here, as you have complete access to the system, and can do damage if careless.  Optionally, you can work as a normal user, and preface each command with sudo.

Disable any currently running Madwifi drivers by running this in the terminal:

# rmmod ath_pci; rmmod ath_hal

3. These drivers require source compilitation, so the build-essential package is required:

# apt-get install build-essential

4. Enter the /usr/src directory, and download the source package:

# cd /usr/src; wget http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2008-10-31.tar.bz2

5. Extract the source and enter the directory:

# tar xjvf compat-wireless-2008-10-31.tar.bz2; cd compat-wireless-2008-10-31

6. Take a quick look at the README:

# less README

7. Begin the compiliation process

# make

8. Next, disable any active wireless connections, and run a script to make sure all wireless drivers that are going to be replaced are unloaded:

# make unload

9. Install the drivers:

# make install

10. If everything completed without errors, load the ath5k module:

# modprobe ath5k

11. Check to make sure the new drivers detected the wireless card (you may need to adjust the interface name if you have several wireless cards):

# ifconfig wlan0 up; iwconfig
 NOTE: When I first installed these drivers, they were unable to bring the MAC chip up, and needed a restart.

12. Clean the src directory

Template:Cd /usr/src; rm compat-wireless-2008-10-31
 NOTE: You can also delete the compat-wireless-2008-10-31/ folder if you need to recover the space, but it is useful to keep because the Makefile has a 'make uninstall' switch.

13. Last, blacklist any other drivers that may interfere with the new ath5k drivers:

{{echo "blacklist ath_pci" >> /etc/modprobe.d/blacklist; echo "blacklist ath_hal" >> /etc/modprobe.d/blacklist}}

Installing the Madwifi drivers:

The following instructions were originally found here [2]:

1. Under System/Administration/HarwareDrivers disable "Support for Atheros 802.11 wireless LAN cards

2. Reboot

3. The kernel headers and the compiler are needed to build this driver so install build-essential. In a terminal window (Applications/Accessories/Terminal) enter:

$ sudo apt-get install build-essential

4. Install Subversion

$ sudo apt-get install subversion

5. Checkout the Madwifi drivers to a directory on your local disk

$ cd~
$ mkdir madwifi
$ cd madwifi
$ svn co https://svn.madwifi.org/madwifi/branches/madwifi-hal-0.10.5.6

6. Build the drivers

$ cd madwifi-hal-0.10.5.6
$ make

7. Install the drivers

$ make install

8. Add the Atheros kernel module to the list of modules to be automatically loaded at boot by adding "ath_pci" (without the quotes) to the end of the /etc/modules file and save the file

$ sudo gedit /etc/modules

9. Now you can reboot and it should work. To get it working without a reboot you need to load the module manually you can use

$ sudo modprobe ath_pci

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:

<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.ZAxisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
</match>

Source: [3]

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

Note: If you change to another Shell (<ctrl><alt>F1 etc) the Trackpoint does not scroll anymore. Restarting the Xserver works and can most easily done by choosing "switch user" and than log in again. All programs stay open and it does not take much time.

What doesn't work at the moment?

Integrated Fingerprint Reader

Theres 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

I installed Ubuntu 8.10 with the on-board Intel Graphic chip. So 3D acceleration works out-of-the-box.

Then I booted with the ATI Graphics, which was no problem, because the radeon driver works very well, but only in 2D.

After installing fglrx packages, jockey also found out, that proprietary drivers are available. So i let him configure my xorg.conf:

Section "Monitor"
	Identifier	"Configured Monitor"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Monitor		"Configured Monitor"
	Device		"Configured Video Device"
	DefaultDepth	24
EndSection

Section "Module"
	Load	"glx"
EndSection

Section "Device"
	Identifier	"Configured Video Device"
EndSection

Section "Device"
	Identifier  	"ATI Technologies Inc Mobility Radeon HD 3400 Series"
	BusID       	"PCI:01:00.0"
	Driver	        "fglrx"
EndSection

After reboot also Compiz works (but not so smooth as with Intel, i allege)

Problem: Strating up with integrated graphic again, no 3D desktop works. After removing all fglrx packages, Compiz normally works.

So i changed my xorg.conf using the radeon driver, succeeding to have 3D on onboard Graphics and 2D on ATI Graphics.

I also tried radeonhd driver, which does not work.

Note 1: I got tired of going in to BIOS to switch chipsets, so I explicitly set the BusID in xorg.conf. The problem with this approach is that power consumption doubles, even when you are not using the discrete graphics card. I had 28W consumption when in switchable graphics mode, and 16W consumption when I configured "Integrated graphics" in BIOS.

Note 2: fglrx diverts libGL.so.1.2 that is installed by mesa. This means that you can't simply swap xorg.conf files and kernel modules, you need to replace libGL.so.1.2 with the proper one if you want restart X with a certain chipset.

TODO
Maybe anybody can get both working!

Suspend/Hibernate

Neither Suspend nor Hibernate work out of the box. They fall asleep, but when waking up only the mousepointer is on the black screen, put neither keyboard, nor mouse showing response.

Here's a Ubuntu forum discussion thread about the problem!


Petri K posted a workaround, to get suspend and hibernate working:

"I would say that this is a classical multiprocessor concurrency control problem! Disabling all but one core makes the bug disappear.
Here is my suggestion for a workaround. Save in /etc/pm/sleep.d/00CPU with 755 permissions. 
Note that it has to be called 00CPU so that it gets executed before and after anything else."

Open Terminal and type:

$ sudo gedit /etc/pm/sleep.d/00CPU

Copy the following Code into gedit and save the file!

#!/bin/sh
# Workaround for concurrency bug in xserver-xorg-video-intel 2:2.4.1-1ubuntu10.
# Save this as /etc/pm/sleep.d/00CPU

. "${PM_FUNCTIONS}"

case "$1" in
	hibernate|suspend)
		for i in /sys/devices/system/cpu/cpu*/online ; do
			echo 0 >$i
		done
		;;
	thaw|resume) 
		sleep 10	# run with one core for 10 secs
		for i in /sys/devices/system/cpu/cpu*/online ; do
			echo 1 >$i
		done
		;;
	*)
		;;
esac

Then close gedit and copy this line into the terminal to set permission 755 (read, write and execute):

$ sudo chmod 755 /etc/pm/sleep.d/00CPU

After reboot suspend and hibernate should work for you, because there is only one core running while doing this events.

Menu-Key

I changed keyboard modell to "IBM Thinkpad R60/T60/R61/T61" using the "German Dead acute" Layout.

But also with these settings my menu-key does not work. I tried to refer it with Firefox using the keyborad shortcuts-tool. It writes: "XF86WakeUp"

Problem: The FN-Key also writes "XF86WakeUp", which is not so practical, so I removed allocation!

TODO
Is ist possible to have an real menu-key?

Not tested yet

Active Protection System

There is no patch for Kernel 2.6.27-7 at the moment to use HDAPS. See also How to protect the harddisk through APS.

VGA/HDMI

  • NEC MultiSync LCD 2190UX - VGA tested and working in mirrored and extended desktop modes (had to run $ sudo dpkg-reconfigure -phigh xserver-xorg to get 1600x1200 resolution to show up)
TODO
please test other external monitors!