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

From ThinkWiki
Jump to: navigation, search
(X Server (Intel))
(ThinkPad keys)
 
(46 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Success Chart ==
+
{| width="100%"
 +
|style="vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;" | __TOC__
 +
|style="vertical-align:top" |
 +
{{NOTE|Some functions mentioned below might rely on available Fedora updates being installed. So if you're having problems with something that is supposed to work, please ensure you have all available updates installed}}
 +
{{NOTE|This is based on the x86-64 version of Fedora 11}}
 +
{{NOTE|ThinkPad T60p is reported here as well}}
 +
|}
  
 +
== Success Chart - Out of the box experience ==
 +
The SMOLT profile for the T60 used for testing Fedora 11 is [http://www.smolts.org/client/show/pub_55c7e1c7-00a3-468c-a558-ae1382ef506c here].
 
{| border="1" cellpadding="5" cellspacing="0"
 
{| border="1" cellpadding="5" cellspacing="0"
 
|-
 
|-
Line 12: Line 20:
 
| USB Installation    || {{Cyes}} ||
 
| USB Installation    || {{Cyes}} ||
 
|-  
 
|-  
|rowspan=3|Display
+
|rowspan=3|Display - Intel
 
| 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
 +
| Laptop Screen  || {{Cyes}} || everything works, including rotation
 +
|-
 +
| VGA || {{Cyes}} || everything works, including rotation and mirroring
 +
|-
 +
| DVI || {{Cunk}} (should work) || no reason this wouldn't work
 
|-
 
|-
 
|rowspan=2|Power Management
 
|rowspan=2|Power Management
Line 26: Line 41:
 
|colspan=2| Audio || {{Cyes}} ||
 
|colspan=2| Audio || {{Cyes}} ||
 
|-
 
|-
|rowspan=3| Wireless || 802.11 - Atheros|| {{Cyes}} || occasional disconnect/reconnect
+
|rowspan=5| Wireless || WiFi - Atheros|| {{Cpart}} || occasional disconnect/reconnect
 
|-
 
|-
| 802.11 - Intel|| {{Cunk}} (should work)||
+
| WiFi - Intel|| {{Cyes}} || no problems at all
 
|-
 
|-
 
| Bluetooth || {{Cyes}} ||
 
| Bluetooth || {{Cyes}} ||
 
|-
 
|-
| Extra Buttons || Keyboard Section || partial || thinkpad_acpi, acpi button and acpi dock driver
+
| WWAN - Verizon  || {{Cunk}} ||
 +
|-
 +
| WWAN - Cingular || {{Cunk}} ||
 +
|-
 +
| Extra Buttons || Keyboard Section || {{Cpart}} || see ThinkPad keyboard section below
 
|-
 
|-
 
| rowspan=8|Ports
 
| rowspan=8|Ports
Line 41: Line 60:
 
| Serial || {{Cyes}} || Requires port-replicator or dock
 
| Serial || {{Cyes}} || Requires port-replicator or dock
 
|-
 
|-
| IrDA || {{Cunk}} (should work)|| Device is detected
+
| IrDA || {{Cno}} || Device is detected, but does not work.
 
|-
 
|-
| PS/2 Keyboard/Mouse || {{Cunk}} (should work)|| Requires port-replicator or dock
+
| PS/2 Keyboard/Mouse || {{Cyes}}|| Mouse tested, Requires port-replicator or dock
 
|-
 
|-
 
| Parallel || {{Cunk}} (should work)|| Requires port-replicator or dock
 
| Parallel || {{Cunk}} (should work)|| Requires port-replicator or dock
Line 49: Line 68:
 
| USB || {{Cyes}} ||
 
| USB || {{Cyes}} ||
 
|-
 
|-
| PCMCIA/Cardbus || {{Cyes}} ||
+
| PCMCIA/Cardbus || {{Cyes}} || even ATA adaptors (for CF cards, etc) now work!
 
|-
 
|-
 
| colspan=2| Harddisk Active Protection || {{Cno}} ||  
 
| colspan=2| Harddisk Active Protection || {{Cno}} ||  
 
|-
 
|-
| colspan=2| Ultrabay device removal || {{Cyes}} ||
+
| colspan=2| Ultrabay device hotswap || {{Cpart}} || see below, use with
 +
caution out of the box
 +
|-
 +
| colspan=2| Fingerprint reader || {{Cyes}} || F11 has standard support for Fingerprint readers
 +
|-
 +
| colspan=2| TPM (security subsystem) || {{Cunk}} || Not brave enough to mess around with it
 +
|-
 
|}
 
|}
  
Line 70: Line 95:
  
 
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, 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.
 +
 
 +
A workaround to the single mode problem is to add the modes manually with xrandr. Below is a script I created that adds the most common modes for a 1400x1050 LCD ThinkPad
 +
 
 +
<pre>
 +
#!/bin/bash
 +
#
 +
# modelines created with "gtf 640 480 60"
 +
#
 +
xrandr --newmode "1280x1024_60.00"  108.88  1280 1360 1496 1712  1024 1025 1028 1060  -HSync +Vsync
 +
xrandr --newmode "1024x768_60.00"  64.11  1024 1080 1184 1344  768 769 772 795  -HSync +Vsync
 +
xrandr --newmode "800x600_60.00"  38.22  800 832 912 1024  600 601 604 622  -HSync +Vsync
 +
xrandr --newmode "640x480_60.00"  23.86  640 656 720 800  480 481 484 497  -HSync +Vsync
 +
xrandr --addmode LVDS1 "1280x1024_60.00"
 +
xrandr --addmode LVDS1 "1024x768_60.00"
 +
xrandr --addmode LVDS1 "800x600_60.00"
 +
xrandr --addmode LVDS1 "640x480_60.00"
 +
</pre>
 +
 
 +
=== 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 ====
 
==== Desktop Effects ====
Compiz untested
+
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 (Dots per Inch) 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.
 +
=== OSD ===
 +
By default OSD (On-Screen-Display) will only function for the brightness keys, not for other functions such as Volume.
 +
 
 +
For this you can install the 'tpb' package from the standard Fedora repository
 +
yum install tpb
 +
 
 +
But afterwards, you need to edit {{path|/etc/tpbrc}} and change
  
=== dpi ===
+
#OSDBRIGHTNESS OFF
On the 1400x1050 LCD Fedora comes up with a DPI of 124. While this is correct for the physical screen size, it waists a lot of screen real estate.
+
to (remove the #)
 +
OSDBRIGHTNESS OFF
  
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.
+
Otherwise you will get two OSDs when using the brightness keys, one from gnome-power-manager and the other from tpb.
  
 
=== Wireless Network ===
 
=== Wireless Network ===
  
 
Both the Intel and Atheros wireless should work out of the box.
 
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.
 +
 +
As a test I tried the 2.6.31 fedora 12 kernel from rawhide, and it does improve matters, the chip no longer gets stuck, but I it can still take several tries before I get a network connection established. After a suspend/resume cycle, I occasionally have to unload/reload the ath5k module. Also the WiFi activity LED works.
  
Atheros was tested and works, but you may encounter occasional disconnects and reconnects. Intel wireless was not tested.
+
====Intel WiFi====
 +
Intel wireless was tested and works.
  
 
=== 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.}}
+
 
 
{| border="1" cellpadding="5" cellspacing="0"
 
{| border="1" cellpadding="5" cellspacing="0"
 
|-
 
|-
| '''Key''' || '''Function''' || '''Handled by''' ||'''HAL event''' || '''Works''' || '''Notes'''
+
| '''Key''' || '''Function''' || '''Handled by''' ||'''Event''' || '''Works''' || '''Notes'''
 
|-
 
|-
| Fn-F2 || lock screen || thinkpad_acpi || {{Cyes}} || {{Cyes}} ||
+
| Fn-F2 || lock screen || thinkpad_acpi || {{Cyes|text=}} HAL || {{Cyes}} ||
 
|-
 
|-
| Fn-F3 || battery || thinkpad_acpi || {{Cyes}} || {{Cyes}} ||
+
| Fn-F3 || battery || thinkpad_acpi || {{Cyes|text=}} HAL || {{Cyes}} ||
 
|-
 
|-
| Fn-F4 || suspend || acpi button|| {{Cyes}} || {{Cyes}} ||
+
| Fn-F4 || suspend || acpi button|| {{Cyes|text=}} HAL || {{Cyes}} ||
 
|-
 
|-
| Fn-F5 || wireless || thinkpad_acpi || {{Cyes}} || {{Cno}} || Can be associated with gnome-keybinding-properties
+
| Fn-F5 || wireless || thinkpad_acpi || {{Cyes|text=}} HAL || {{Cpart}} || No default action, but can be associated with gnome-keybinding-properties
 
|-
 
|-
| Fn-F7 || videomode || thinkpad_acpi || {{Cyes}} || {{Cyes}} || Attempts to enable mirror mode
+
| Fn-F7 || videomode || thinkpad_acpi || {{Cyes|text=}} HAL || {{Cyes}} || Cycles through only LCD, only external, both (mirrored), and both (non-mirrored)
 
|-
 
|-
| Fn-F8 || mouse input select || thinkpad_acpi || {{Cyes}} || {{Cno}} || Can be associated with gnome-keybinding-properties
+
| Fn-F8 || mouse input select || thinkpad_acpi || {{Cyes|text=}} HAL || {{Cpart}} || No default action, but can be associated with gnome-keybinding-properties
 
|-
 
|-
| Fn-F9 || undock || thinkpad_acpi || {{Cyes}} || {{Cno}} || Can be associated with gnome-keybinding-properties
+
| Fn-F9 || undock || thinkpad_acpi || {{Cyes|text=}} HAL || {{Cpart}} || No default action, but can be associated with gnome-keybinding-properties
 
|-
 
|-
| Fn-F12 || hibernate || acpi button|| {{Cyes}} || {{Cyes}} || does the same as Fn-F4 (suspend), not hibernate  
+
| Fn-F12 || hibernate || acpi button|| {{Cyes|text=}} HAL || {{Cpart}} || does the same as Fn-F4 (suspend), not hibernate  
 
|-
 
|-
| Fn-Home || brightness up || acpi video || {{Cyes}} || {{Cyes}} ||  
+
| Fn-Home || brightness up || acpi video || {{Cyes|text=}} HAL || {{Cyes}} || includes on-screen display of brightness level
 
|-
 
|-
| Fn-End || brightness down || acpi video || {{Cyes}} || {{Cyes}} ||  
+
| Fn-End || brightness down || acpi video || {{Cyes|text=}} HAL || {{Cyes}} || includes on-screen display of brightness level
 
|-
 
|-
 
| Fn-PgUp || thinklight || - || {{Cno}} || {{Cyes}} || changing thinkpad_acpi hotkey_mask, causes HAL events. No OSD in any case.
 
| Fn-PgUp || thinklight || - || {{Cno}} || {{Cyes}} || changing thinkpad_acpi hotkey_mask, causes HAL events. No OSD in any case.
 
|-
 
|-
| Fn-Space || zoom || thinkpad_acpi || {{Cyes}} || {{Cno}} ||
+
| Fn-Space || zoom || thinkpad_acpi || {{Cyes|text=}} HAL || {{Cno}} || Known Xorg limitation, scheduled to be fixed in Xorg 1.8 with the new XKB2 extension in 2Q 2010
 
|-
 
|-
 
| VolumeUp || Volume Up || - || {{Cno}} || {{Cyes}} || changing thinkpad_acpi hotkey_mask, causes HAL events. But OSD is wrong
 
| VolumeUp || Volume Up || - || {{Cno}} || {{Cyes}} || changing thinkpad_acpi hotkey_mask, causes HAL events. But OSD is wrong
Line 124: Line 193:
 
| Mute || Mute || - || {{Cno}} || {{Cyes}} || changing thinkpad_acpi hotkey_mask, causes HAL events and OSD. works as a on/off toggle
 
| Mute || Mute || - || {{Cno}} || {{Cyes}} || changing thinkpad_acpi hotkey_mask, causes HAL events and OSD. works as a on/off toggle
 
|-
 
|-
| ThinkVantage || Vendor key ||thinkpad_acpi || {{Cyes}} || {{Cno}} || Can be associated with gnome-keybinding-properties
+
| ThinkVantage || Vendor key ||thinkpad_acpi || {{Cyes|text=}} HAL || {{Cpart}} || No default action, but can be associated with gnome-keybinding-properties
 
|-
 
|-
| NextTab || Browser Next tab || standard keyboard driver || {{Cyes}} || {{Cyes}} ||
+
| NextTab || Browser Next tab || standard keyboard driver || {{Cyes|text=}} HAL || {{Cyes}} ||
 
|-
 
|-
| PreviousTab || Browser Previous tab || standard keyboard driver || {{Cyes}} || {{Cyes}} ||
+
| PreviousTab || Browser Previous tab || standard keyboard driver || {{Cyes|text=}} HAL || {{Cyes}} ||
 
|-
 
|-
| Fn-Up || Stop || standard keyboard driver || {{Cyes}} || {{Cyes}} ||
+
| Fn-Up || Stop || standard keyboard driver || {{Cyes|text=}} HAL || {{Cyes}} ||
 
|-
 
|-
| Fn-Left || reverse || standard keyboard driver || {{Cyes}} || {{Cyes}} ||
+
| Fn-Left || reverse || standard keyboard driver || {{Cyes|text=}} HAL || {{Cyes}} ||
 
|-
 
|-
| Fn-Right || forward || standard keyboard driver || {{Cyes}} || {{Cyes}} ||
+
| Fn-Right || forward || standard keyboard driver || {{Cyes|text=}} HAL || {{Cyes}} ||
 
|-
 
|-
| Fn-Down || play/pause || standard keyboard driver || {{Cyes}} || {{Cyes}} ||
+
| Fn-Down || play/pause || standard keyboard driver || {{Cyes|text=}} HAL || {{Cyes}} ||
 
|-
 
|-
| Power || Power button || acpi button|| {{Cyes}} || {{Cyes}} || Need to press button for ~1 second to trigger event  
+
| Power || Power button || acpi button|| {{Cyes|text=}} HAL || {{Cyes}} || Need to press button for ~1 second to trigger event  
 
|-
 
|-
| Lid || Lid button || acpi button|| {{Cyes}} || {{Cyes}} ||
+
| Lid || Lid button || acpi button|| {{Cyes|text=}} HAL || {{Cyes}} ||
 
|-
 
|-
| Dock || Dock eject button || acpi dock  || {{Cyes}} || {{Cyes}} || causes unload of USB devices (including internal BlueTooth!!) and switch to battery mode. Does not restore video to ThinkPad only. Causes HAL event, but not a button event.
+
| Dock || Dock eject button || acpi dock  || {{Cyes|text=}} udev || {{Cpart}} || 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 || {{Cno}} || {{Cno}} || Should be handled by ACPI dock driver
+
| Ultrabay || Ultrabay eject switch || acpi dock || {{Cyes|text=}} udev || {{Cpart}} || 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 || || {{Cyes}} || partial || works for Bluetooth only
+
| Radio switch || Radio kill switch || thinkpad_acpi || {{Cyes|text=}} udev || {{Cpart}} || Bluetooth only
 
|-
 
|-
 
|}
 
|}
  
= Untested on Fedora 11 =
+
=== 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 {{path|/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 {{path|/usr/local/sbin/ultrabay_eject}} with the following content
 +
<pre>
 +
#!/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"
 +
</pre>
 +
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 {{path|/etc/sysconfig/irda}} after which the irda service can be started ({{cmdroot|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 WWAN option has not been tested yet. If you try it with Fedora 11, please update the table.
  
[[Category:T60]][[Category:Fedora]]
+
[[Category:T60]][[Category:Fedora]][[Category:T60p]]

Latest revision as of 23:04, 26 October 2009

NOTE!
Some functions mentioned below might rely on available Fedora updates being installed. So if you're having problems with something that is supposed to work, please ensure you have all available updates installed
NOTE!
This is based on the x86-64 version of Fedora 11
NOTE!
ThinkPad T60p is reported here as well

Success Chart - Out of the box experience

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 yes Mouse tested, 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 yes 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.

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.

A workaround to the single mode problem is to add the modes manually with xrandr. Below is a script I created that adds the most common modes for a 1400x1050 LCD ThinkPad

#!/bin/bash
#
# modelines created with "gtf 640 480 60"
#
xrandr --newmode "1280x1024_60.00"  108.88  1280 1360 1496 1712  1024 1025 1028 1060  -HSync +Vsync
xrandr --newmode "1024x768_60.00"  64.11  1024 1080 1184 1344  768 769 772 795  -HSync +Vsync
xrandr --newmode "800x600_60.00"  38.22  800 832 912 1024  600 601 604 622  -HSync +Vsync
xrandr --newmode "640x480_60.00"  23.86  640 656 720 800  480 481 484 497  -HSync +Vsync
xrandr --addmode LVDS1 "1280x1024_60.00"
xrandr --addmode LVDS1 "1024x768_60.00"
xrandr --addmode LVDS1 "800x600_60.00"
xrandr --addmode LVDS1 "640x480_60.00"

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 (Dots per Inch) 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.

OSD

By default OSD (On-Screen-Display) will only function for the brightness keys, not for other functions such as Volume.

For this you can install the 'tpb' package from the standard Fedora repository

yum install tpb

But afterwards, you need to edit /etc/tpbrc and change

#OSDBRIGHTNESS OFF

to (remove the #)

OSDBRIGHTNESS OFF

Otherwise you will get two OSDs when using the brightness keys, one from gnome-power-manager and the other from tpb.

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.

As a test I tried the 2.6.31 fedora 12 kernel from rawhide, and it does improve matters, the chip no longer gets stuck, but I it can still take several tries before I get a network connection established. After a suspend/resume cycle, I occasionally have to unload/reload the ath5k module. Also the WiFi activity LED works.

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.

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 Known Xorg limitation, scheduled to be fixed in Xorg 1.8 with the new XKB2 extension in 2Q 2010
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 WWAN option has not been tested yet. If you try it with Fedora 11, please update the table.