Installing Ubuntu 6.10 on a ThinkPad X41 Tablet
This document describes the process of (installing and?) configuring Ubuntu Edgy Eft (final release expected October 2006) on a Lenovo ThinkPad X41 Tablet. With whatever relevance it may have, the particular model number used in testing was an 1869CSU. Keep in mind that at this document's inception 6.10 is a development version of the Ubuntu Linux OS.
Tablet Screen Rotation (updated i810 drivers)
This edition of Ubuntu (Edgy) has XRandR enabled i810 drivers, which allow you to rotate your screen orientation on the fly. The command xrandr -o [orientation] will rotate your screen to your liking. For more information about the xrandr command, refer to the man file (man xrandr).
Wireless seems to be supported flawlessly in terms of drivers, though I'm not sure how well the built-in Network Manager works. I use the iwconfig command to manage my wireless, as I have a need to create pseudo-"profiles", and in this document I will describe this alternative process.
Fingerprint Reader Support
Honestly, I care very little about the fingerprint functionality. Its only real use seems to be for gksu-type logins while the tablet is swiveled down, which doesn't occur often in my setup. If someone wants to explore/expound, please do, but I won't include any details about the fingerprint reader in this document.
For those of you new to Linux, I'll try to detail a few terms I use with little explanation: Xorg configuration -- the display configuration file, residing in /etc/X11/xorg.conf Execute a command -- press Alt-F2, then type gnome-terminal into the prompt and press enter -- this is a terminal into which you input said commands
The installation process didn't require anything exceptional. Feel free to fill in the blanks if it could be useful.
Like in all ThinkPad Xorg configurations, add the following under the "Configured Mouse" device to enable TrackPoint scrolling:
Option "EmulateWheel" "true" Option "EmulateWheelButton" "2"
First install the wacom drivers with the following command:
sudo apt-get install wacom-kernel-source xserver-xorg-input-wacom wacom-tools
After doing this, I strongly suggest that you reboot your computer; however, if you're one of those people whose uptime is on the order of four years, I'm sure you'll figure out an alternative that I won't be describing here.
Next step is to check to see if /dev/wacom exists. A 'ls -al /dev | grep wacom' should do the trick quite nicely. If it does exist, add the following to your Xorg configuration.
Section "InputDevice" Driver "wacom" Identifier "stylus" Option "Device" "/dev/wacom" Option "Type" "stylus" Option "ForceDevice" "ISDV4" EndSection Section "InputDevice" Driver "wacom" Identifier "eraser" Option "Device" "/dev/wacom" Option "Type" "eraser" Option "ForceDevice" "ISDV4" EndSection Section "InputDevice" Driver "wacom" Identifier "cursor" Option "Device" "/dev/wacom" Option "Type" "cursor" Option "ForceDevice" "ISDV4" EndSection
And under the ServerLayout section add:
InputDevice "stylus" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents"
Some people seem to have slightly different configurations (potentially due to model differences). At any rate, if you're looking to find what serial device your stylus is, a simple 'dmesg | grep ttyS' should do the trick. Be sure to append to this article if the procedure varies from model to model.
ACPI Swivel Events
When you swivel your tablet's LCD down or up your computer triggers what's called an ACPI event. This is an event similar to pushing the power or sleep buttons -- it's telling the OS about something that's going on with the hardware.
In Linux, ACPI event handling is bundled into a nice neat little package. First, to make sure you can hear the ACPI event when it happens, run the command 'acpi_listen'. The command line will hang there until it picks up on an ACPI event that's occuring, and then it will dump it to the screen. After running acpi_listen, while it's hanging there, swivel your screen down, and then back up. You should get a result similar to this:
$ acpi_listen ibm/hotkey HKEY 00000080 00005009 ibm/hotkey HKEY 00000080 0000500a
The first HKEY entry is your swivel-down-event identifier and the second is your swivel up. If your values differ from those displayed here, be sure to use your values instead.
Next, what we do is create new ACPI handler entries for the specified events, which we operate on in /etc/acpi/.
The /etc/acpi/ folder generally contains shell files to be executed when events occur. Since there's no shell files to handle swivel events yet, we're gonna go ahead and create some. Yeah, that'd be great.
I don't know what all the rave is about these so called "text editors". I do all my "text editing" from the command line. Actually, I'd just rather not confuse newbies by teaching them vi in this article. Therefore, run the following commands:
sudo cat <<EOF > /etc/acpi/x41tsdown.sh #!/bin/sh /usr/bin/xrandr -o right /usr/bin/xsetwacom set stylus rotate 1 /usr/bin/xvkbd& EOF
sudo cat << EOF > /etc/acpi/x41tsup.sh #!/bin/sh /usr/bin/xrandr -o normal /usr/bin/xsetwacom set stylus rotate 0 killall xvkbd EOF
sudo chown root.root /etc/acpi/x41tsdown.sh sudo chmod 755 /etc/acpi/x41tsdown.sh sudo chown root.root /etc/acpi/x41tsup.sh sudo chmod 755 /etc/acpi/x41tsup.sh
If you'd like to edit these scripts with your favorite text editor (which, I realize, is most likely ed), it's fairly obvious that they're located in /etc/acpi/ as x41tsdown.sh and x41tsup.sh. These commands make the shell scripts that handle the events... once we register the events. Let's do that now.
sudo cat <<EOF > /etc/acpi/events/x41t-swivel-down # /etc/acpi/events/x41t-swivel-down # called when tablet head swivels down event=ibm/hotkey HKEY 00000080 00005009 action=/etc/acpi/x41tsdown.sh EOF
sudo cat <<EOF > /etc/acpi/events/x41t-swivel-up # /etc/acpi/events/x41t-swivel-up # called when tablet head swivels up event=ibm/hotkey HKEY 00000080 0000500a action=/etc/acpi/x41tsup.sh EOF
Now, awaken your inner ACPI daemon with the following commands:
sudo /etc/init.d/acpid force-reload sudo /etc/init.d/acpid restart
And swivel down your LCD to make sure it works.
To be continued...