Tag/tag.png

Unsupported Version
This article applies to an unsupported version of Ubuntu. More info...

Introduction

This page covers the additional hardware setup required after a default installation of Ubuntu 9.10 Karmic Koala to make the ThinkPad X61 Tablet fully functional. All instructions are given avoiding creation of an xorg.conf file.

What Works

Forward / Back Buttons, Audio Buttons, Brightness Fn Buttons, Radio Fn Button, Suspend Fn Button, Power Fn Button, Lock Fn Button, Hibernate Fn Button, Tablet L/R/U/D Buttons, Tablet Enter Button, Tablet Esc Button, Media Fn Buttons NumberLock Fn Button, Tablet Pen, Wireless Radio, Bluetooth Radio,

What Almost Works

Tablet Toolbox Button - causes lock or suspend, Tablet Touch – Requires Calibration,

What Does Not Work

Tablet Control-Alt-Delete Button, Tablet Rotate Button, Middle Mouse Button Scrolling, ThinkVantage Button, Magnify Fn Button, Fingerprint Reader, Automatic Screen Rotation, ThinkVantage ActiveProtection,

Fixing Touch

The Wacom touchscreen works out of the box, but loses accuracy at the edges of the screen. To fix this the touchscreen needs to be calibrated.

Wacomcpl

The Wacom Tablet in the X61t is a serial Wacom tablet. It can be configured by using wacomcpl. Wacomcpl is part of the wacom-tools package and can be retrieved in apt:

sudo apt-get install wacom-tools

After this wacomcpl can be run by typing: wacomcpl in Terminal.

Helping wacomcpl

Unfortunately HAL assigns names to wacom devices in a way that the current wacomcpl cant find them, to help wacomcpl to find them we need to create a rule to rename the outputs as wacomcpl expects.

Open a terminal and type :

gksudo gedit /etc/hal/fdi/policy/wacom.fdi

and paste this code in:

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="input.x11_driver" contains="wacom">
      <match key="input.x11_options.Type" contains="stylus">
        <merge key="info.product" type="string">stylus</merge>
      </match>
      <match key="input.x11_options.Type" contains="eraser">
         <merge key="info.product" type="string">eraser</merge>
      </match>
      <match key="input.x11_options.Type" contains="touch">
         <merge key="info.product" type="string">touch</merge>
      </match>
    </match>
  </device>
</deviceinfo>

Now reboot and launch wacomcpl. You should now be able to see the devices and calibrate them.

Making Wacomcpl Settings Restore on Reboot

If you lose your calibration after reboot:

In terminal:

gksudo gedit ~/.xinitrc

Find the line that says:

. /etc/X11/xinit/xinitrc

and change it to

#. /etc/X11/xinit/xinitrc

Save and exit.

Go to System>Preferences>Startup Applications and create a new entry named whatever you want.

The command should be:

sh /home/yourusername/.xinitrc

Your wacomcpl settings will now restore on reboot

Fixing the Tablet Toolbox Button

No Solution Yet.

Setup the Tablet Control-Alt-Delete Button

No Solution Yet.

Setup the Tablet Rotate Button

Creating Rotation Commands

Every time the rotation changes we need to change: 1. Display Orientation 2. Wacom Tablet Orientation 3. Left, Right, Up, and Down Tablet Buttons

To do this we will create scripts to do all of this at once

Create a file called /usr/bin/rotatenormal

gksudo gedit /usr/bin/rotatenormal

And fill it with:

xrandr -o normal
xsetwacom set stylus Rotate none
sudo setkeycodes  0x71 103 0x6f 108 0x6e 105 0x6d 106

Then create a file called /usr/bin/rotateright

gksudo gedit /usr/bin/rotateright

And fill it with:

xrandr -o right
xsetwacom set stylus Rotate cw
gksudo setkeycodes  0x71 105 0x6f 106 0x6e 108 0x6d 103

Then create a file called /usr/bin/rotateinverted

gksudo gedit /usr/bin/rotateinverted

And fill it with:

xrandr -o inverted
xsetwacom set stylus Rotate half
sudo setkeycodes  0x71 108 0x6f 103 0x6e 106 0x6d 105

Then create a file called /usr/bin/rotateleft

gksudo gedit /usr/bin/rotateleft

And fill it with:

xrandr -o left
xsetwacom set stylus Rotate ccw
sudo setkeycodes  0x71 106 0x6f 105 0x6e 103 0x6d 108

Next we need to add a sudo exception so the user can run the setkeycodes in the script Type:

sudo visudo

Go to the bottom and add

<username> ALL=NOPASSWD: /usr/bin/setkeycodes

Where <username> is the username of the user we are enabling rotate for. Repeat this line for all users you wish to permit, or add a group by replacing <username> with %<groupname> where <groupname> is the name of the group you would like to add.

Finally we need to make these commands executable with chmod in a terminal

sudo chmod +x /usr/bin/rotateright
sudo chmod +x /usr/bin/rotateleft
sudo chmod +x /usr/bin/rotatenormal
sudo chmod +x /usr/bin/rotateinverted

Now the you should be able to type rotatenormal, rotateright, rotateleft, and rotateinverted into terminal and the screen should rotate correctly.

Enabling the Button

First create a file to store the current rotation data

gksudo gedit /usr/bin/rotationmode

fill this file with:

0

and make it editable, but not executable

sudo chmod 666 /usr/bin/rotationmode

Now we will write the script to rotate the screen

gksudo gedit /usr/bin/rotatebutton

And fill it with:

mode=`cat /usr/bin/rotationmode`
if test 0 = $mode
then
echo 1 > /usr/bin/rotationmode
rotateright
fi
if test 1 = $mode
then
echo 2 > /usr/bin/rotationmode
rotateinverted
fi
if test 2 = $mode
then
echo 3 > /usr/bin/rotationmode
rotateleft
fi
if test 3 = $mode
then
echo 0 > /usr/bin/rotationmode
rotatenormal
fi

Make it executable:

sudo chmod +x /usr/bin/rotatebutton

Now typing rotatebutton in terminal should go through all of the rotations

To map the command to the button go to System>Preferences>Keyboard Shortcuts, click the Add button at the bottom, name it whatever you want and use the command rotatebutton. Then bind the key by clicking in the shortcut column and pressing the tablet rotate key.

Setup the Middle Button Scrolling

Create a new file called /etc/hal/fdi/policy/mouse-wheel.fdi typing:

gksudo gedit /etc/hal/fdi/policy/mouse-wheel.fdi

And fill it with this code:

<?xml version="1.0" encoding="UTF-8"?> 

<match key="info.product" string="TPPS/2 IBM TrackPoint">
 <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
 <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
 <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
 <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
</match>

Reboot

Setup ThinkVantage Button

The ThinkVantage button does not work, only in that it is not bound to anything as there is no ThinkVantage in linux. To bind it go to System>Preferences>Keyboard Shortcuts and set it to perform any command.

Setup Magnify Fn Button

No Solution Yet.

Setup Fingerprint Reader

No Solution Yet.

Setup Automatic Screen Rotation

Due to changes in the way that Ubuntu handles the input acpi for the lid swivel no longer functions. The following uses a depreciated method to poll the hardware.

First follow the instructions under Setup Rotate Button as we will call those files

Next create a file called autorotate:

gksudo gedit /usr/bin/autorotate

And fill it with:

pastmode=`cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode`
while [ true ]
do
  nowmode=`cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode`
  if test 1 = $pastmode
  then  
    if test 0 = $nowmode
    then
      rotatenormal
      echo 0 > /usr/bin/rotationmode
      pastmode=0
    fi
  fi
  if test 0 = $pastmode
  then
    if test 1 = $nowmode
    then
      rotatemode=`cat /usr/bin/rotationmode`
      if test 0 = $rotatemode
      then
        rotateright
        echo 1 > /usr/bin/rotationmode
        pastmode=1
      else
        pastmode=1
      fi
    fi
  fi
  sleep 5
done

And make it executable

sudo chmod +x /usr/bin/autorotate

Now add this to the list of startup programs by going to System>Preferences>Startup Applications, click the add button, name it whatever you want and use the command autorotate.

Setup ThinkVantage ActiveProtection

No Solution Yet.

Useful Task: Enable Laptop Mode

Laptop mode is a power saving tool that allows the hard drive to spin down to conserve battery power. This is disabled by default as it has been known to cause problems on some computers, but it appears to work on the X61t.

*Warning: Laptop mode stores data in ram teporarily until it needs to write to disk. Power Loss in laptop mode could lead to significant data loss.

*Warning: Excessive spin-up spin-down cycles will wear out your hard drive much more quickly than normal use. Be careful when configuring laptop mode settings.

*Warning: Do Not Use Laptop Mode if you have a SSD. It is for platter drives only.

Edit /etc/default/acpi-support

gksudo gedit /etc/default/acpi-support

Set: ENABLE_LAPTOP_MODE=true

Configure Laptop Mode

gksudo gedit /etc/laptop-mode/laptop-mode.conf

More

Feel free to add more to this page. Some solutions may exist on thinkwiki.org

See Also

X61T (last edited 2015-03-30 20:26:54 by knome)