Difference between revisions of "Installing Fedora 11 on a ThinkPad T60"

From ThinkWiki
Jump to: navigation, search
(X Server (Intel))
(ThinkPad keys)
Line 117: Line 117:
 
=== ThinkPad keys ===
 
=== ThinkPad keys ===
 
ThinkPad keys are handled by a mixture of the thinkpad_acpi, acpi button, acpi dock and acpi video drivers.
 
ThinkPad keys are handled by a mixture of the thinkpad_acpi, acpi button, acpi dock and acpi video drivers.
{{NOTE|Due to Xorg limitations, some keys that cause HAL events work with Xorg (ThinkVantage and Fn-F7) and others do not. This is a known limitation that should be fixed with the next major Xorg (v1.7) release.}}
+
{{NOTE|Due to Xorg limitations, some keys that cause HAL events work with Xorg and others do not (Fn-Space). This is a known limitation that should be fixed with the next major Xorg (v1.7) release.}}
 
{| border="1" cellpadding="5" cellspacing="0"
 
{| border="1" cellpadding="5" cellspacing="0"
 
|-
 
|-

Revision as of 20:26, 17 May 2009

NOTE!
This is based on the x86-64 pre-release version of Fedora 11, but should give a good indication of what to expect of the final release
NOTE!
ThinkPad T60p is reported here as well

Success Chart

The SMOLT profile for the T60 used for testing Fedora 11 is here.

Item Working Notes
Installation Local CD/DVD install yes
Network Installation yes
USB Installation yes
Display - Intel Laptop Screen yes only 1 video mode available
VGA yes with hotplug only ?
DVI yes with hotplug only ?
Display - ATI Laptop Screen yes everything works, including rotation
VGA yes everything works, including rotation and mirroring
DVI unknown (should work) no reason this wouldn't work
Power Management Software Suspend (hibernate) yes
Suspend to Memory (ACPI sleep) yes
Audio yes
Wireless WiFi - Atheros yes occasional disconnect/reconnect
WiFi - Intel yes no problems at all
Bluetooth yes
WWAN - Verizon unknown
WWAN - Cingular unknown
Extra Buttons Keyboard Section partial see ThinkPad keyboard section below
Ports Ethernet yes
Modem no Requires closed-source driver
Serial yes Requires port-replicator or dock
IrDA no Device is detected, but no device files are created
PS/2 Keyboard/Mouse unknown (should work) Requires port-replicator or dock
Parallel unknown (should work) Requires port-replicator or dock
USB yes
PCMCIA/Cardbus yes even ATA adaptors (for CF cards, etc) now work!
Harddisk Active Protection no
Ultrabay device hotswap partial see below, use with

caution out of the box

Fingerprint reader unknown (should work) F11 has standard support for Fingerprint readers
TPM (security subsystem) unknown Not brave enough to mess around with it

Tested and Verified on Fedora 11

Information in this section has been tested and verified using Fedora 11, including the pre-release (post-beta) version. The development version of Fedora 11 (rawhide) is quite stable and even suitable for day-to-day use, if you are a bit brave. You will be automatically switched over to the release version of Fedora 11 if you keep everything up to date.

Installation

Installation is straight forward; you can follow the generic Fedora install instructions.

Configuration

X Server (Intel)

Basic X server functionality should work out of the box on the ThinkPad LCD (LVDS), as long as no external displays are attached at boot.

Fedora 11 uses KMS (Kernel Mode Setting) by default, which for now has some up and down sides for external displays. The down sides are that external displays attached during boot might not function properly (mostly they may have non-optimal resolution), but they do when hot plugged afterwards. Another down side is that currently mirror mode is very limited as the ThinkPad LCD (LVDS) is limited to one single display mode, so only if the external display supports this same mode can you activate mirror mode. On the other hand with KMS enabled the maximum virtual display size is now 4096x4096 (2048x2048 without KMS) meaning you can have an extended desktop.

These issues have been reported to Red Hat bugzilla.

X Server (ATI)

On a T60p, displays work well, with multiple mirrored and non-mirrored displays and even with one of the displays being rotated! This may also work on a base T60, as there has been a lot of effort put into getting this to work right.

One thing that still doesn't work quite right is screensavers and screen blanking. There is something wrong with the timers, which may result in your screen blanking while you are typing. Recovery is a simple as waiting until the screen is completely blank and then type or click to wake up the screen.

Another thing that doesn't work quite right is screen resolution when booting with multiple screens. If one screen doesn't not have a preferred resolution, a poor resolution may be used for both screens during the booting process. Everything works fine after login, however.

Desktop Effects

Compiz (wobbly windows, desktops on a cube) seems to work. Direct display of video may be problematic with Compiz, however.

dpi

On the 1400x1050 (and 1600x1200) LCD Fedora comes up with a DPI of 124 (or higher). While this is correct for the physical screen size, it waists a lot of screen real estate.

To change to the more typical 96 DPI, go to System -> Preferences -> Appearance. Now in Appearance Preferences select the Fonts tab and press the "Details ..." button. Here you can change the dots per inch to 96. Of course, many things will shrink, but that is what you wanted, after all.

Wireless Network

Both the Intel and Atheros wireless should work out of the box.

Atheros was tested and works, but you may encounter occasional disconnects and reconnects. Intel wireless also works.

ThinkPad keys

ThinkPad keys are handled by a mixture of the thinkpad_acpi, acpi button, acpi dock and acpi video drivers.

NOTE!
Due to Xorg limitations, some keys that cause HAL events work with Xorg and others do not (Fn-Space). This is a known limitation that should be fixed with the next major Xorg (v1.7) release.
Key Function Handled by Event Works Notes
Fn-F2 lock screen thinkpad_acpi HAL yes
Fn-F3 battery thinkpad_acpi HAL yes
Fn-F4 suspend acpi button HAL yes
Fn-F5 wireless thinkpad_acpi HAL partial No default action, but can be associated with gnome-keybinding-properties
Fn-F7 videomode thinkpad_acpi HAL yes Cycles through only LCD, only external, both (mirrored), and both (non-mirrored)
Fn-F8 mouse input select thinkpad_acpi HAL partial No default action, but can be associated with gnome-keybinding-properties
Fn-F9 undock thinkpad_acpi HAL partial No default action, but can be associated with gnome-keybinding-properties
Fn-F12 hibernate acpi button HAL partial does the same as Fn-F4 (suspend), not hibernate
Fn-Home brightness up acpi video HAL yes includes on-screen display of brightness level
Fn-End brightness down acpi video HAL yes includes on-screen display of brightness level
Fn-PgUp thinklight - no yes changing thinkpad_acpi hotkey_mask, causes HAL events. No OSD in any case.
Fn-Space zoom thinkpad_acpi HAL no
VolumeUp Volume Up - no yes changing thinkpad_acpi hotkey_mask, causes HAL events. But OSD is wrong
VolumeDown Volume Down - no yes changing thinkpad_acpi hotkey_mask, causes HAL events. But OSD is wrong
Mute Mute - no yes changing thinkpad_acpi hotkey_mask, causes HAL events and OSD. works as a on/off toggle
ThinkVantage Vendor key thinkpad_acpi HAL partial No default action, but can be associated with gnome-keybinding-properties
NextTab Browser Next tab standard keyboard driver HAL yes
PreviousTab Browser Previous tab standard keyboard driver HAL yes
Fn-Up Stop standard keyboard driver HAL yes
Fn-Left reverse standard keyboard driver HAL yes
Fn-Right forward standard keyboard driver HAL yes
Fn-Down play/pause standard keyboard driver HAL yes
Power Power button acpi button HAL yes Need to press button for ~1 second to trigger event
Lid Lid button acpi button HAL yes
Dock Dock eject button acpi dock udev partial causes udev event. Disconnects Ethernet, switches to battery and unload of USB devices (including internal Bluetooth!!).Does not restore video to ThinkPad only.
Ultrabay Ultrabay eject switch acpi dock udev partial causes a udev event, which can be handled as in [How to hotswap Ultrabay devices], with minor changes, but should be handled better
Radio switch Radio kill switch thinkpad_acpi udev partial Bluetooth only

Ultrabay

The Ultrabay has some glitches out of the box with respect to hotswapping. It is possible to lock the machine when pulling out devices, even the CD/DVD device.

The culprit is that the Ultrabay pre-eject switch is not hooked into anything useful. It does cause udev events, but nothing is listening for them. When a device that has a mounted partition or CD is actually pulled out it is too late to do the right thing. Fedora 11 will usually just complain, sometimes bitterly, but may also lock up for some unknown reason, even if just pulling out a CD/DVD device with a mounted CD.

Manually unmounting before removal will help. Manual powering down may also be required for correct performance.

A better solution is to set up a udev rule and script to handle the pre-eject switch event for Ultrabay devices that have mountable things in them as in [How to hotswap Ultrabay devices].

The revised solution here works well. Pushing the pre-eject switch either does the unmounting and powering off and then emits a low beep, or fails and then emits a triple beep. After success the device can be safely removed or the eject lever can be pushed back and everything will be remounted. After failure pushing the eject lever back in does nothing, permitting continuing as if nothing happened or allowing changes to be made before the next attempt to remove.

Unfortunately the code below is complex and may be fragile. A better solution would be very useful.

To set this solution up, first create the file /etc/udev/rules.d/50-ibm-ultrabay.rules with the following content

ENV{BAY_EVENT}=="3", ACTION=="change", SUBSYSTEM=="scsi", RUN+="/usr/local/sbin/ultrabay_eject"

Make sure it is owned by root and has the following selinux security context # chcon system_u:object_r:etc_runtime_t:s0 /etc/udev/rules.d/50-ibm-ultrabay.rules

Then create the executable file /usr/local/sbin/ultrabay_eject

#!/bin/bash

ULTRABAY_SYSDIR=/sys$DEVPATH
shopt -s nullglob
logger ultrabay_eject storage device $DEVPATH

# Umount the filesystem(s) backed by the given major:minor device(s)
unmount_rdev() { perl - "$@" <<'EOPERL'  # let's do it in Perl
	for $major_minor (@ARGV) {
		$major_minor =~ m/^(\d+):(\d+)$/ or die;
		push(@tgt_rdevs, ($1<<8)|$2);
	}
        # Sort by reverse length of mount point, to unmount sub-directories first
        open MOUNTS,"</proc/mounts" or die "$!";
        @mounts=sort { length($b->[1]) <=> length($a->[1]) } map { [ split ] } <MOUNTS>;
        close MOUNTS;
        foreach $m (@mounts) {
                ($dev,$dir)=@$m;
		next unless -b $dev;  $rdev=(stat($dev))[6];
		next unless grep($_==$rdev, @tgt_rdevs);
		system("logger","ultrabay_eject","umounting",$dev,$dir);
		system("umount","-v","$dir")==0  or  $bad=1;
	}
	exit 1 if $bad;
EOPERL
}

# Get the UltraBay's /dev/foo block device node
ultrabay_dev_node() {
	UDEV_PATH="`readlink -e "$ULTRABAY_SYSDIR/block/"*`" || return 1
	UDEV_NAME="`udevadm info --query=name --path=$UDEV_PATH`" || return 1
	echo /dev/$UDEV_NAME
}

if [ -d $ULTRABAY_SYSDIR ]; then
	sync
	# Unmount filesystems backed by this device
	## This seems to be very inelegant and prone to failure
	unmount_rdev `cat $ULTRABAY_SYSDIR/block/*/dev     \
	                  $ULTRABAY_SYSDIR/block/*/*/dev`  \
	|| {
		logger ultrabay_eject umounting failed
		echo 2 > /proc/acpi/ibm/beep;  # triple error tone
		exit 1;
	}
        sync
        # Nicely power off the device
	DEVNODE=`ultrabay_dev_node` && hdparm -Y $DEVNODE
        # Let HAL+KDE notice the unmount and let the disk spin down
	sleep 0.5
	# Unregister this SCSI device:
	sync
	echo 1 > $ULTRABAY_SYSDIR/delete
else
	logger ultrabay_eject no ultrabay device directory
	echo 2 > /proc/acpi/ibm/beep  # triple error tone
	exit 1
fi

# We need sleep here so someone can disconnect the bay and the drive
sleep 1

# Turn off power to the UltraBay
dock=$( /bin/grep ata_bay /sys/devices/platform/dock.?/type )
dock=${dock%%/type:ata_bay} # needed for 2.6.27 and later
if [ -n "$dock" -a -d "$dock" ]; then
	logger ultrabay_eject undocking $dock
        echo 1 > $dock/undock
fi
# Tell the user we're OK
logger ultrabay_eject done
echo 12 > /proc/acpi/ibm/beep

Untested on Fedora 11

The Fingerprint reader and the WWAN options have not been tested yet. If you tried them with Fedora 11, please update the table.