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

From ThinkWiki
Jump to: navigation, search
(Ultrabay)
Line 1: Line 1:
{{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|This is based on the x86-64 version of Fedora 11}}
  
 
{{NOTE|ThinkPad T60p is reported here as well}}
 
{{NOTE|ThinkPad T60p is reported here as well}}
Line 19: Line 19:
 
| Laptop Screen  || {{Cyes}} || only 1 video mode available
 
| Laptop Screen  || {{Cyes}} || only 1 video mode available
 
|-
 
|-
| VGA || {{Cyes}} || with hotplug only ?
+
| VGA || {{Cno}} || currently broken
 
|-
 
|-
| DVI || {{Cyes}} || with hotplug only ?
+
| DVI || {{Cno}} || currently broken
 
|-
 
|-
 
|rowspan=3|Display - ATI
 
|rowspan=3|Display - ATI
Line 91: Line 91:
  
 
Fedora 11 uses KMS (Kernel Mode Setting) by default, which for now has some up and down sides for external displays.
 
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.
+
For the moment external displays do not work. When you boot with an external display attached, you will get a non-optimal resolution on the external display, and the LVDS will be off. When you logon the system will hang, and you will have a black display, but with functioning mouse cursor. Attaching a display afterwards also freezes the system when you try to active extended desktop.
 +
 
 +
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.
 +
 
 
=== X Server (ATI)===
 
=== 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.
 
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.

Revision as of 20:22, 13 June 2009

NOTE!
This is based on the x86-64 version of Fedora 11
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 no currently broken
DVI no currently broken
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 partial 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 does not work.
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.

For the moment external displays do not work. When you boot with an external display attached, you will get a non-optimal resolution on the external display, and the LVDS will be off. When you logon the system will hang, and you will have a black display, but with functioning mouse cursor. Attaching a display afterwards also freezes the system when you try to active extended desktop.

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.

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 WiFi

Atheros was tested and works, but you may encounter occasional disconnects and reconnects. In addition you might have problems after a suspend cycle. It seems the Atheros chip can get stuck sometimes, require a shutdown (not just a reboot) before the driver can initialize the chip again. Also the WiFi LED remains off.

Intel WiFi

Intel wireless was tested and 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-thinkpad-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 right selinux security context

chown root:root /etc/udev/rules.d/50-thinkpad-ultrabay.rules
chmod 644 /etc/udev/rules.d/50-thinkpad-ultrabay.rules
chcon system_u:object_r:etc_runtime_t:s0 /etc/udev/rules.d/50-thinkpad-ultrabay.rules

Then create the executable file /usr/local/sbin/ultrabay_eject with the following content

#!/bin/bash

ULTRABAY_SYSDIR=/sys$DEVPATH
shopt -s nullglob
logger ultrabay_eject storage device $DEVPATH
export DISPLAY=:0.0 # required for notify-send

# 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("umount","-v","$dir")==0  or  $bad=1;
                if ($bad == 1) {
                        system("logger","ultrabay_eject","ERROR unmounting",$dev,$dir);
                        system("notify-send -u critical -t 300000 \"Error unmounting $dir\" \"Unmounting of $dir on $dev failed!\"");
                } else {
                        system("logger","ultrabay_eject","unmounted",$dev,$dir);
                        system("notify-send -u normal -t 300000 \"Unmounted $dir\"");
                };
        }
        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
                notify-send -u critical -t 300000 "ThinkPad Ultrabay eject failed" "Please do not pull the device, doing so could cause file corruption and possibly hang the system. Unmounting of the filesystem on the ThinkPad Ultrabay device failed. Please put the eject leaver back in place, and try to unmount the filesystem manually. If this succeeds you can try the eject again"
                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
notify-send -u normal -t 300000 "Safe to remove" "The ThinkPad Ultrabay device can now safely be removed"

Then make sure ownership and permissions are set correct

chown root:root /usr/local/sbin/ultrabay_eject
chmod 555 /usr/local/sbin/ultrabay_eject

IrDA

IrDA is detected, but does not work. Part of the problem is that the default Fedora configuration expects to find the IrDA port at /dev/ttyS2, while it should use /dev/ircomm0 instead. This can be fixed in /etc/sysconfig/irda after which the irda service can be started (# service irda start).

However, even after this communication with other devices fails. irdadump does not show any output when something like a mobile phone with IrDA is sending data.

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.