Installing Fedora Core 5 on a ThinkPad X41 Tablet

From ThinkWiki
Revision as of 23:03, 6 April 2006 by Saikat (Talk | contribs) (Harddrive Active Protection System (HDAPS))
Jump to: navigation, search

Success Chart

Item Working Notes
Installation Network Installation Yes
USB Installation Not Tested
Display Laptop Screen Yes X.org i810 driver
CRT / Projector Yes
Screen Rotation Yes Separate X server (not on-the-fly)
Stylus Yes wacom serial driver.
Power Management Software Suspend (hibernate) Yes Software Suspend 2
Suspend to Memory (ACPI sleep) Yes (mostly) Software Suspend 2, occasional crash
Audio Yes ALSA intel8x0 driver
Wireless 802.11b/g Yes ipw2200/madwifi drivers
Bluetooth Not Tested Should work. See Installing Fedora Core 4 on a ThinkPad X41 Tablet
Extra Buttons Keyboard Section Yes ibm-acpi driver
Tablet buttons Yes setkeycodes
Fingerprint Scanner Not Tested See Integrated Fingerprint Reader.
Harddisk Active Protection Yes kernel 2.6.16, hdapsd

Installation

Installation is straight forward and no different from the process mentioned in Installing Fedora Core 4 on a ThinkPad X41 Tablet.

Configuration

X Server

Enabling the Stylus

Add the following lines to /etc/rc.d/rc.local:

# Map stylus to a serial port
setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig


Add the lines in bold font to /etc/X11/xorg.conf:

 Section "ServerLayout"
        Identifier     "default"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "cursor" "SendCoreEvents"
        InputDevice    "stylus" "SendCoreEvents"
EndSection

Section "InputDevice"
      Driver        "wacom"
      Identifier    "cursor"
      Option        "Device"        "/dev/ttyS0"
      Option        "Type"          "cursor"
      Option        "ForceDevice"   "ISDV4"
      Option        "Mode"          "Absolute"
      Option        "TPCButton"     "on"
EndSection

Section "InputDevice"
      Driver        "wacom"
      Identifier    "stylus"
      Option        "Device"        "/dev/ttyS0"
      Option        "Type"          "stylus"
      Option        "ForceDevice"   "ISDV4"
EndSection


Enabling Screen Rotation

Add the following lines to /etc/X11/xorg.conf:

# Clockwise Rotation

Section "ServerLayout"
        Identifier     "rotateCW"
        Screen      0  "Screen0CW" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "cursorCW" "SendCoreEvents"
        InputDevice    "stylusCW" "SendCoreEvents"
EndSection

Section "Device"
        Identifier  "Videocard0CW"
        Driver      "i810"
        VendorName  "Videocard vendor"
        Option      "NoAccel"       "false"
        Option      "DRI"           "true"
        Option      "Rotate"        "CW"
        BoardName   "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller"
        Option      "XAANoOffscreenPixmaps"
        Option      "SWCursor"      "On"
EndSection 

Section "InputDevice"
      Driver        "wacom"
      Identifier    "cursorCW"
      Option        "Device"        "/dev/ttyS0"
      Option        "Type"          "cursor"
      Option        "ForceDevice"   "ISDV4"
      Option        "Mode"          "Absolute"
      Option        "TPCButton"     "on"
      Option        "TopX"          "500"
      Option        "BottomX"       "18000"
      Option        "TopY"          "-6000"
      Option        "BottomY"       "18500"
EndSection

Section "InputDevice"
      Driver        "wacom"
      Identifier    "stylusCW"
      Option        "Device"        "/dev/ttyS0"
      Option        "Type"          "stylus"
      Option        "ForceDevice"   "ISDV4"
      Option        "Rotate"        "CW"
EndSection 

Section "Screen"
        Identifier "Screen0CW"
        Device     "Videocard0CW"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     16
                Modes    "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1024x768" "800x600" "640x480"
        EndSubSection
EndSection

To activate the rotated layout, start X with $ startx -- :1 -layout rotateCW. To enable a login screen in the rotated configuration, add a new server under System > Admininstration > Login Screen > Security > Configure X Server

VT: 1
Server: Standard
Options: -layout rotateCW

Log out and restart the login manager: # gdm-restart. The standard (unrotated) server will be on screen 0 (AltF7) and the rotated server will be on screen 1 (AltF8)

On-the-fly Rotation

On-the-fly rotation does not work. The X.org 810 driver does not support it yet. Once support for it is added, on-the-fly rotation can be invoked by executing $ xrandr -o 3.

Note: Using Gnome 2.14 and xorg-x11-drv-i810-1.4.1.3-4.cvs20060322, On-the-fly rotation does work.

Wireless Network

Install the ipw2200 driver from ATrpms.

# rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms
# rpm -Uvh http://dl.atrpms.net/all/3rd-party-package-config-104-3.rhfc5.at.i386.rpm
# yum install ipw2200

Hibernation

Software suspend works using Software Suspend 2. To install:

# cd /etc/yum.repos.d
# wget http://mhensler.de/swsusp/download/suspend2.repo
# yum install userui-suspend2-fbsplash userui-suspend2-theme-fedorabubbles kernel-suspend2

Edit the appropriate kernel line in /etc/grub.conf and add the parameters vga=0x317 and acpi_sleep=s3_bios. For example:

title Fedora Core (<kernel.version-build>.rhfc5.cubbi_suspend2)
       root (hd0,1)
       kernel /vmlinuz-<kernel.version-build>.rhfc5.cubbi_suspend2 ro root=/dev/VolGroup00/LogVol00 rhgb quiet vga=0x317 acpi_sleep=s3_bios
       initrd /initrd-<kernel.version-build>.rhfc5.cubbi_suspend2.img

Add the following lines in /etc/hibernate/hibernate.conf:

ProcSetting userui_program /sbin/suspend2ui_fbsplash
OnResume 96 setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig

Comment out the following line in /etc/hibernate/hibernate.conf:

# ProcSetting userui_program /sbin/suspend2ui_text

Add the following lines in /etc/hibernate/ram.conf:

Distribution fedora

Comment out the following lines in /etc/hibernate/ram.conf:

# EnableVbetool yes
# VbetoolPost yes

Force the use of suspend2 by editing the appropriate line in /etc/sysconfig/pm:

HIBERNATE_METHOD="suspend2"

Tablet Buttons

Activate mappings for the tablet buttons by adding the following lines to /etc/rc.d/rc.local:

# Map tablet hardware buttons
setkeycodes 6e 109 6d 104 69 28 6b 1

Harddrive Active Protection System (HDAPS)

Harddrive active protection system requires the hdaps kernel module (included in stock Fedora kernels), and a kernel capable of parking disks (patch included in kernel-suspend2 RPMs from the Hibernation section above). It also requires a userspace daemon to monitor the accleration sensor and park the disk head when excessive motion is detected. To install the userspace daemon, do the following:

# wget http://www.cs.cornell.edu/~saikat/hdapsd-20060326cvs-1.sg.i386.rpm
# rpm -Uvh hdapsd-20060326cvs-1.sg.i386.rpm

Software

Network, Power Management, OSD

Some useful software is not installed by default. These include:

  • tpb — On screen display for thinkpad buttons
  • Network Manager — Manages wireless and wired networks automatically
  • Gnome Power Manager — Manages ACPI power events

To install them execute:

# yum install tpb NetworkManager gnome-power-manager
# chkconfig NetworkManager on

Check your gnome-session-manager is configured to automatically start the panel applets that control Network Manager and Gnome Power Manager. Ensure the following entries are present under System > Preferences > More Preferences > Sessions > Startup Programs:

 nm-applet --sm-disable
 gnome-power-manager --sm-disable

Java 1.5

Install Sun's JRE 1.5. This is required for the jarnal program below.

Download the build: $ wget http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.06-1jpp.nosrc.rpm

  • Create the build environment: # rpm -Uvh java-1.5.0-sun-1.5.0.05-1jpp.nosrc.rpm
  • Download the JVM from Sun's Java page and download jdk-1_5_0_06-linux-i586.bin to /usr/src/redhat/SOURCES
  • Build the RPMs: # rpmbuild -ba /usr/src/redhat/SPECS/java-1.5.0-sun.spec
  • Install the JVM: # rpm -Uvh /usr/src/redhat/RPMS/i586/java-1.5.0-sun-1.5.0.06-1jpp.i586.rpm
  • Install the fonts: # rpm -Uvh /usr/src/redhat/RPMS/i586/java-1.5.0-sun-fonts-1.5.0.06-1jpp.i586.rpm

Note: This is tailored for the latest JVM as of writing this article. Substitute the latest version numbers if this doesn't work.

Jarnal Note-Taking

Install the Jarnal note-taking application:

# wget http://www.cs.cornell.edu/~saikat/jarnal-8.14-1sg.noarch.rpm
# yum localinstall jarnal-8.14-1sg.noarch.rpm