Difference between revisions of "Install Ubuntu 8.10 (Intrepid Ibex) on a ThinkPad T400"

From ThinkWiki
Jump to: navigation, search
(What works out of the box?)
m (ThinkPad 11b/g Wireless LAN mini PCI Express Adapter III (Atheros AR5007EG/AR2425 Chipset))
 
Line 254: Line 254:
 
12. Clean the src directory
 
12. Clean the src directory
  
  {{cd /usr/src; rm compat-wireless-2008-10-31}}
+
  {{cmdroot|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.
 
   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.
Line 260: Line 260:
 
13. Last, blacklist any other drivers that may interfere with the new ath5k drivers:
 
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}}
+
  {{cmdroot|echo "blacklist ath_pci" >> /etc/modprobe.d/blacklist; echo "blacklist ath_hal" >> /etc/modprobe.d/blacklist}}
  
 
'''Installing the Madwifi drivers:'''  
 
'''Installing the Madwifi drivers:'''  

Latest revision as of 13:04, 3 November 2016

Newest Version of Ubuntu is 9.04 -> Install_Ubuntu_9.04_(Jaunty_Jackalope)_on_a_ThinkPad_T400

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.

With one version of the installer CD, the installation works fine, but after rebooting it hangs with ATA errors. Solution was to boot the Live CD, mount the partition, chroot, and upgrade to the newest kernel (from 2.6.27-7 to 2.6.27-9).

What works out of the box?

  • Wireless with iwlagn driver (Intel WiFi Link 5100/5300 WLAN controller)
    • G mode + WEP and WPA2 PSK (If you have the ThinkPad 11b/g Wireless LAN mini PCI Express Adapter III (Aetheros Chipset), see below!)
    • with status LED and everything!
  • Bluetooth
    • Even with Bluetooth Laser Mouse
    • Note: Bluetooth can only be toggled together with WLAN on and off, to add a bluetooth-only-toggle (Fn+F6) that doesn't affect WLAN take a look here.
  • Intel Gigabit Ethernet (10/100/1000) PCI-Express
  • Intel driver for Integrated Graphics (Intel Integrated Intel GMA 4500MHD)
    • with 3D acceleration out-of-the-box
    • VGA output - mirrored and extended desktop both work, but might need to run the following to enable 1600x1200 resolution
$ sudo dpkg-reconfigure -phigh xserver-xorg
  • 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)
  • 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
    • Including DVD burning
  • 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
  • Suspend/Hibernate on a fully updated System!

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 (uncheck Mirror Displays), and disable the secondary display (click the Unknown monitor and set its Resolution to None) 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: You can have URandR setup 1440x900 in Xorg for you and skip the below steps: http://www.albertomilone.com/urandr.html Download: http://albertomilone.com/ubuntu/urandr/urandr_0.1+0ubuntu12-3_all.deb You'll be prompted to open it in the Package Installer - say Yes. Once it's installed, run URandR (System>Preferences>URandR). Choose 1440x900 from the list and click Apply. URandR takes care of the rest. If you want to ensure 1440x900 is set on the login screen click the Profiles tab and check the first 2 checkboxes, then click Apply.

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

UPDATE: Thomas Jaeger no longer maintains the updated Intel drivers, but he helpfully directed me to the intel-gfx-testing team's Personal Package Archive (here:https://launchpad.net/~intel-gfx-testing/+archive) which does maintain them.

UPDATE: Resolutions work fine on both gpus for me, maybe this issue was fixed in the standard driver?


Create a file /etc/apt/sources.list.d/intel-gfx-testing.list with the following contents:

deb http://ppa.launchpad.net/intel-gfx-testing/ubuntu intrepid main
deb-src http://ppa.launchpad.net/intel-gfx-testing/ubuntu intrepid main

You can edit it using:

sudo gedit /etc/apt/sources.list.d/intel-gfx-testing.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.

UPDATE: Using the intel-gfx-testing drivers causes a 3D performance issue, but only because the permissions on the DRM device are not set up properly, which forces 3D applications to use software rendering. This is tracked in this bug: https://bugs.launchpad.net/ubuntu/+source/hal/+bug/306014. Fixes and workarounds are provided in the bug comments.

You can test if you're using the software renderer by running:

glxinfo | grep renderer

If you're using the software renderer, you will see:

OpenGL renderer string: Software Rasterizer

With the fix in place, I get:

OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset 20061102 x86/MMX/SSE2

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

Suspend/Hibernate

UPDATE: On a fully updated 8.10-32bit-System Suspend and Hibernate now work out of the box. You do not need this workaround anymore!

UPDATE: In 9.04 64-Bit Suspend works fine.

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.

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

ath5k cons: 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.

Madwifi cons: For one user at least, the madwifi driver is dumping *tons* of text into /var/log/messages , /var/log/syslog , /var/log/kern.log , wasting several GBs of disk space. (In general, if your /var/log directory uses more than 100 MB of space, there's probably something wrong) I don't know if the driver is set up to dump debug info to the log files, or if there is some error that keeps occurring (although the wireless seems to work just). If anyone figures out how to fix this, please post here!

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

# 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-project.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.

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: [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.

Update: This does not seem to work on 64bit versions of Intrepid. See this bug for a fix using a backported driver from Jaunty.

Enabling Touchpad on/off key

Source: [[4]] 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="ISO-8859-1"?>
<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.


Brightness control broken - lowest level after Booting/Suspend/Hibernate/Screen-off

I had the problem (after kernel-update to 2.6.27-11), that while booting, or after suspend/hibernate/screen-off my brightness was on lowest level, which peeved a lot.

You always had to change brightness level to jump back to previous setting.

The workaround:

Edit following file:

sudo gedit /etc/modprobe.d/options

And add this line:

options thinkpad_acpi brightness_enable=1

Please note that it seems that removing the module and reloading it with this option does not work. A reboot after adding the option to the module-properties is necessary to activate the workaround.

See also Ubuntu Bug 322610

Menu-Key

There is a bug #287428 "Menu key emits XF86WakeUp on ThinkPad X61s", common to all IBM/Lenovo laptops. When you press (windows)-Menu bottom, nothing happens. If you run showkey or xev, you'll see that it is mapped to <I151>, and this, in turn, is mapped to XF86WakeUp. This a duplicate of SuSe bug, which was fixed long ago, but is still present in Debian Lenny/Squeeze and Ubuntu Intrepid (it is not fixed Ubuntu Jaunty either, but Jaunty has a dummy hotkey-setup package). To fix it, apply

--- /usr/share/hotkey-setup/ibm.hk.orig
+++ /usr/share/hotkey-setup/ibm.hk
@@ -1,5 +1,6 @@
 # IBM/Lenovo ThinkPads
-setkeycodes	e05d	$KEY_WAKEUP	# Fn-click (Press & release with no action), observed on R52
+#comment the following, e05d should be set to $KEY_COMPOSE=127, dirty fix is "setkeycodes e05d 127"
+#setkeycodes	e05d	$KEY_WAKEUP	# Fn-click (Press & release with no action), observed on R52
 #setkeycodes	e063	$KEY_WAKEUP	# Fn-click (Press & release with no action), found on Google and LenovoPads  # Canonical mapping, commented out.
 
 # ThinkPad A and S series

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)


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

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!


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.