To get the X200 Wacom Tablet to work i have made several steps, that i will describe later in the post. After the last update of xserver-xorg-input-wacom i also got the touch input working without problems.
First my hardware specifications:
Thinkpad X200 Tablet (with Stylus and Touch)
2x Intel(R) Core(TM)2 Duo CPU L9400 @ 1.86GHz
4GB Ram
Display Resolution: 1280×800 pixels
I am running Debian GNU/Linux “squeeze” testing.
1. Install the following packages
aptitude install xserver-xorg-input-wacom |
2. Let Xorg produce the xorg.conf
Xorg -configure |
3. Edit xorg.conf
Now edit /etc/X11/xorg.conf and add the following lines in the Section “ServerLayout”:
# X200 touchscreen InputDevice "cursor" "SendCoreEvents" InputDevice "stylus" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents" InputDevice "touch" "SendCoreEvents" #touch device |
The other lines can be added anywhere:
# X200 touchscreen Section "InputDevice" Driver "wacom" Identifier "cursor" Option "Device" "/dev/ttyS0" Option "Type" "cursor" Option "ForceDevice" "ISDV4" Option "Mode" "Absolute" EndSection Section "InputDevice" Driver "wacom" Identifier "stylus" Option "Device" "/dev/ttyS0" Option "Type" "stylus" Option "ForceDevice" "ISDV4" EndSection Section "InputDevice" Driver "wacom" Identifier "eraser" Option "Device" "/dev/ttyS0" Option "Type" "eraser" Option "ForceDevice" "ISDV4" EndSection # support for "touch" (with finger, available on x200t and some x61t) Section "InputDevice" Driver "wacom" Identifier "touch" Option "Device" "/dev/ttyS0" # SERIAL ONLY Option "Type" "touch" Option "ForceDevice" "ISDV4" # Serial Tablet PC ONLY # suppress cursor movements when touch movements are too small, prevents flickering of cursor Option "Suppress" "2" # Adding manual calibration, since proper calibration seems impossible. Option "BottomY" "940" Option "BottomX" "950" Option "TopX" "48" Option "TopY" "90" EndSection |
4.Configure Tablet Keys
- To get the Tablet Buttons to do what i want them to do, create a file called .Xmodmap in your home directory with the following content:
! tablet, from left to right: rotate, flip, full keycode 162 = XF86LaunchA keycode 161 = XF86LaunchB keycode 149 = XF86LaunchC
- Edit your .Xsession or .xinit Script to use this Xmodmap configuration. Beside this i also mapped the Stylus to Mousebuttons and activated the TrackPoint Scrolling:
# trackpoint xinput xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 1 xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 2 xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 200 # wacom stylus xsetwacom set stylus Button1 1 xsetwacom set stylus Button2 3 xsetwacom set stylus Button3 3 # using special Xmodmap xmodmap ~/.Xmodmap
- Create a new Bash script that we will use to rotate and flip the display, like ~/tablet.sh and make it executable (chmod +x tablet.sh):
#!/bin/bash # config output="LVDS1" # get current rotation current=`xrandr --verbose | grep "$output" | sed "s/^[^ ]* [^ ]* [^ ]* ([^(]*) \([a-z]*\).*/\1/"` case $current in normal) geom=0;; left) geom=1;; inverted) geom=2;; right) geom=3;; esac if [ "$1" == "invert" ] || [ "$1" == "flip" ]; then # based on current rotation set new rotation if [ "$1" == "invert" ]; then # invert case $geom in 0) wacom=half; xrandr=inverted;; 1) wacom=cw; xrandr=right;; 2) wacom=none; xrandr=normal;; 3) wacom=ccw; xrandr=left;; esac else # flip case $geom in 0) wacom=cw; xrandr=right;; 1) wacom=half; xrandr=inverted;; 2) wacom=ccw; xrandr=left;; 3) wacom=none; xrandr=normal;; esac fi #echo "xrandr to $xrandr, xsetwacom to $wacom" # rotate display xrandr -o $xrandr # rotate wacom xsetwacom set "stylus" Rotate $wacom xsetwacom set "eraser" Rotate $wacom xsetwacom set "touch" Rotate $wacom else echo "possible parameters: flip, invert" fi
- Map the script to the Tablet Keys. I am using Awesome WM so this part is window manager specific. In Gnome you can set these Keys via a graphical interface. In the case of awesome add this to your globalkeys:
awful.key({}, "XF86LaunchA", function () awful.util.spawn("bash /home/NAME/tablet.sh invert") end), -- invert awful.key({}, "XF86LaunchB", function () awful.util.spawn("bash /home/NAME/tablet.sh flip") end), -- flip
This tutorial is based on the following hints:
[1] http://www.cub3.net/blog/configuring-the-touch-screen-for-x200t/
[2] http://linuxwacom.sourceforge.net/index.php/howto/inputdev
[3] http://www.thinkwiki.org/wiki/Wacom_Serial_Tablet_PC_Stylus
[4] http://www.thinkwiki.org/wiki/Tablet_Hardware_Buttons
[5] http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work




hi,
the xsetwacom syntax changed, this script includes the new one.
this script was testet on my x200t with a current debian testing.
furtheremore this script checks if an external output is connectet. the external output should not be rotated
#!/bin/bash
# config
output=”LVDS1″
external=”VGA1″
mode_output=”1280×800″
mode_external=”1024×768″
# get current rotation
current=`xrandr –verbose | grep “$output” | sed “s/^[^ ]* [^ ]* [^ ]* ([^(]*) \([a-z]*\).*/\1/”`
case $current in
normal) geom=0;;
left) geom=1;;
inverted) geom=2;;
right) geom=3;;
esac
if [ "$1" == "invert" ] || [ "$1" == "flip" ];
then
# based on current rotation set new rotation
if [ "$1" == "invert" ];
then
# invert
case $geom in
0) wacom=half; xrandr=inverted;;
1) wacom=cw; xrandr=right;;
2) wacom=none; xrandr=normal;;
3) wacom=ccw; xrandr=left;;
esac
else
# flip
case $geom in
0) wacom=cw; xrandr=right;;
1) wacom=half; xrandr=inverted;;
2) wacom=ccw; xrandr=left;;
3) wacom=none; xrandr=normal;;
esac
fi
# rotate wacom
xsetwacom –set “Serial Wacom Tablet stylus” Rotate “$wacom”
xsetwacom –set “Serial Wacom Tablet eraser” Rotate “$wacom”
xsetwacom –set “Serial Wacom Tablet touch” Rotate “$wacom”
#check if external monitor is connected & configure
if [ "$(xrandr --verbose | grep "$external" | head -1 | awk '{print $2}')" == "connected" ] ; then
xrandr –output $output –rotate $xrandr –output $external –rotate normal
xrandr –output $output –mode $mode_external –output $external –mode $mode_external –same-as $output
xsetwacom –set “Serial Wacom Tablet stylus” Area 2560 0 24000 16520
else
xrandr –output $output –rotate $xrandr
xrandr –output $output –mode $mode_output
xsetwacom –set “Serial Wacom Tablet stylus” ResetArea
fi
else
echo “possible parameters: flip, invert”
fi