<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Trevie</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Trevie"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Trevie"/>
	<updated>2026-04-27T06:34:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Wacom_Serial_Tablet_PC_Stylus&amp;diff=55645</id>
		<title>Wacom Serial Tablet PC Stylus</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Wacom_Serial_Tablet_PC_Stylus&amp;diff=55645"/>
		<updated>2014-05-19T03:34:50Z</updated>

		<summary type="html">&lt;p&gt;Trevie: Added X200t serial input via ''inputattach''&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=ThinkPad X41 Tablet Digitizer Pen=&lt;br /&gt;
[[File:Logo_wacom.gif|alt=stock picture of ThinkPad X41 Tablet Digitizer Pen|]]&lt;br /&gt;
The ThinkPad {{X41t}} Digitizer Pen has red tips, a pocket clip, dual side-switch, no eraser.  It fits in the X41 Tablet pen storage area.&lt;br /&gt;
&lt;br /&gt;
==part numbers==&lt;br /&gt;
*Wacom model UP-814-54A&lt;br /&gt;
*Marketing part number 73P5188&lt;br /&gt;
**FRU P/N 39T0803 (replaced by 39T7303)&lt;br /&gt;
**IBM P/N 39T7302, FRU P/N 39T7303&lt;br /&gt;
**UPC 000435611079, EAN 5050689611078, JAN 4560209481797&lt;br /&gt;
&amp;lt;!-- I found number 39T7652 along 39T7302 and 39T7303 in a ebay photo - Numeric --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==documentation==&lt;br /&gt;
*[http://download.lenovo.com/ibmdl/pub/pc/pccbbs/options/x41pen.pdf User Manual] 2.39MB, pdf&lt;br /&gt;
*[http://forum.wacom.eu/viewtopic.php?f=8&amp;amp;t=15663&amp;amp;p=55664#p55664 a message from Wacom about nib length]&lt;br /&gt;
*{{IBMDOCURL|MIGR-60008|System service parts - ThinkPad X41 Tablet}}&lt;br /&gt;
*{{IBMDOCURL|MIGR-60036|ThinkPad X41 Tablet Accessories - Overview}}&lt;br /&gt;
*{{IBMDOCURL|MIGR-60039|ThinkPad X41 Tablet Accessories - Service parts}}&lt;br /&gt;
*{{IBMDOCURL|MIGR-60071|ThinkPad X41 Tablet Digitizer Pen - Publications}}&lt;br /&gt;
*{{IBMDOCURL|MIGR-60175|ThinkPad X41 Tablet Accessories - ThinkPad X41 Tablet}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=ThinkPad Tablet Digitizer Pen=&lt;br /&gt;
This generic-sounding pen has a red tip, single side-switch, grey eraser, and pocket clip.  It was first used with {{X60t}}, but it fits in the pen storage area also for the following systems: ThinkPad {{X60t}}, {{X61t}}, {{X200 Tablet}}, {{X201 Tablet}}, {{W700}}, {{W700ds}}, {{W701}}, {{W701ds}}.&lt;br /&gt;
&lt;br /&gt;
==part numbers==&lt;br /&gt;
*Marketing part number 41U3143&lt;br /&gt;
**Lenovo P/N: 39T7481, FRU P/N: 39T7482&lt;br /&gt;
&amp;lt;!-- I found uncertain number 39T3583 along real numbers 39T7481 and 39T7482 in a ebay photo - Numeric --&amp;gt;&lt;br /&gt;
**Lenovo P/N: 45N2630, FRU P/N: 45N2631&lt;br /&gt;
*ThinkPad Tablet Tether 3-pack: 41U4820&lt;br /&gt;
**UPC 882861963942, EAN 0882861963942, JAN 4560209531621&lt;br /&gt;
&lt;br /&gt;
==documentation==&lt;br /&gt;
*{{IBMDOCURL|MIGR-66714|ThinkPad Tablet Accessories (ThinkPad X60 Tablet Sleeve, ThinkPad Tablet Digitizer Pen, ThinkPad Tablet Teather) - Overview}}&lt;br /&gt;
*{{IBMDOCURL|MIGR-66717|ThinkPad Tablet Accessories (ThinkPad X60 Tablet Sleeve, ThinkPad Tablet Digitizer Pen, ThinkPad Tablet Teather) - Service parts}}&lt;br /&gt;
*{{IBMDOCURL|MIGR-67023|System service parts - ThinkPad X60 Tablet, X61 Tablet}}&lt;br /&gt;
*{{IBMDOCURL|MIGR-68049|Keyboard &amp;amp; mouse accessories - ThinkPad X61 Tablet}}&lt;br /&gt;
*{{IBMDOCURL|MIGR-70561|System service parts - ThinkPad W700, W700ds, W701 and W701ds}}&lt;br /&gt;
*{{IBMDOCURL|MIGR-70697|System service parts - ThinkPad X200 Tablet, X201 Tablet}}&lt;br /&gt;
*{{IBMDOCURL|MIGR-71598|Digitizer pen removal - ThinkPad W700, W700ds, W701, W701ds}}&lt;br /&gt;
&lt;br /&gt;
=ThinkPad X200 Tablet Pen and Touch=&lt;br /&gt;
This tablet uses a serial connection for the stylus and touch screen.&lt;br /&gt;
If you'd like to see raw output from it, type:&lt;br /&gt;
cat /dev/ttyS0&lt;br /&gt;
CTRL-C to stop.  If your terminal is corrupted, type 'reset' and press Enter.&lt;br /&gt;
&lt;br /&gt;
== systemd ==&lt;br /&gt;
*You need the ''inputattach'' program.  This may be part of a ''joystick'' package on your system.  In Gentoo, it is part of ''games-util/joystick''.&lt;br /&gt;
*You can test ''inputattach'' by running:&lt;br /&gt;
 inputattach --w8001 /dev/ttyS0&lt;br /&gt;
Now try to touch the screen with your finger or either end of the stylus.  This is blocking.  Press CTRL-C to stop it.&lt;br /&gt;
*To have this mapping occur automatically, create /etc/systemd/system/wacom-serial.service&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Tie Wacom Serial Device to XInput&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 ExecStart=/usr/bin/inputattach --w8001 /dev/ttyS0&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
*Enable the new script in systemd.&lt;br /&gt;
 systemctl enable wacom-serial&lt;br /&gt;
*If you're not rebooting, start the new service.&lt;br /&gt;
 systemctl start wacom-serial&lt;br /&gt;
*You should see an input for touch, pen, and eraser if you run 'xinput':&lt;br /&gt;
 TODO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=ThinkPad X220 Tablet Digitiser Pen=&lt;br /&gt;
The ThinkPad {{X220 Tablet}} pen has a black tip, single side-switch, red eraser, and pocket clip.  This colour option is also used in {{X230 Tablet}}&lt;br /&gt;
&lt;br /&gt;
==part numbers==&lt;br /&gt;
**Lenovo P/N: 0A72243, FRU P/N: 04W1477&lt;br /&gt;
**Lenovo P/N: 0B42547&lt;br /&gt;
&lt;br /&gt;
==documentation==&lt;br /&gt;
*{{IBMDOCURL|MIGR-77198|System service parts - ThinkPad X220 Tablet, X220i Tablet}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Linux Support=&lt;br /&gt;
The pen is supported by the XFree/Xorg Wacom driver. New tablets also have the [[MultiTouch]] capability. [[MultiTouch]] is experimentally supported presently by the Linux wacom project. The pen works regardless of [[MultiTouch]] support.&lt;br /&gt;
&lt;br /&gt;
=== Wacom Serial Tablet PC Stylus ===&lt;br /&gt;
This is a stylus made for tablet PCs by Wacom.&lt;br /&gt;
=== Features ===&lt;br /&gt;
* Chipset: Wacom&lt;br /&gt;
* Serial: irq 5 port 0x0200&lt;br /&gt;
&lt;br /&gt;
==First steps==&lt;br /&gt;
Get the [http://linuxwacom.sourceforge.net/index.php/dl linux wacom driver] and install it on your system.&lt;br /&gt;
&lt;br /&gt;
The pen uses serial and appears on some {{path|/dev/ttySnn}} device where &amp;lt;tt&amp;gt;nn&amp;lt;/tt&amp;gt; is a number. An easy way to find it is to map {{path|/dev/ttyS0}} to the pen's port and irq. The values can be found under the windows driver properties. Using values from an {{X41T}} 1869-5CU, the command is: {{cmdroot|setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig}} (you need to run this after every suspend/resume cycle).&lt;br /&gt;
&lt;br /&gt;
This may be inserted into startup scripts in {{path|/etc/rc.d/}} or {{path|/etc/rc.local}}&lt;br /&gt;
&lt;br /&gt;
After mapping the pen, you can check its output with {{cmdroot|wacdump -f tpc /dev/ttyS0}}. This will list raw information about the pens position an click status. Hit Ctrl+C to exit wacdump.&lt;br /&gt;
&lt;br /&gt;
==Setting up your Xorg.conf==&lt;br /&gt;
===X-Server &amp;gt;= 1.8 (udev)===&lt;br /&gt;
since X-Server 1.8 udev is the default way to detect any wacom-tablet. on some distributions you have to add the file ''/etc/udev/rules.d/10-wacom.rules'' with following content:&lt;br /&gt;
&lt;br /&gt;
    ACTION!=&amp;quot;add|change&amp;quot;, GOTO=&amp;quot;wacom_end&amp;quot;&lt;br /&gt;
     # Match all wacom tablets with a serial ID starting with WACf or FUJ*&lt;br /&gt;
     ATTRS{id}==&amp;quot;WACf*&amp;quot; ENV{NAME}=&amp;quot;Serial Wacom Tablet&amp;quot;, ENV{ID_INPUT}=&amp;quot;1&amp;quot;, ENV{ID_INPUT_TABLET}=&amp;quot;1&amp;quot;&lt;br /&gt;
     ATTRS{id}==&amp;quot;FUJ*&amp;quot; ENV{NAME}=&amp;quot;Serial Wacom Tablet&amp;quot;, ENV{ID_INPUT}=&amp;quot;1&amp;quot;, ENV{ID_INPUT_TABLET}=&amp;quot;1&amp;quot;&lt;br /&gt;
    LABEL=&amp;quot;wacom_end&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and ''/usr/share/X11/xorg.conf.d/50-wacom'':&lt;br /&gt;
&lt;br /&gt;
    Section &amp;quot;InputClass&amp;quot;&lt;br /&gt;
        Identifier &amp;quot;Wacom serial class identifiers&amp;quot;&lt;br /&gt;
        MatchProduct &amp;quot;WACf|WACf004|FUJ02e5|FUJ02e7&amp;quot;&lt;br /&gt;
        Driver &amp;quot;wacom&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
''thanks to the [https://wiki.archlinux.org/index.php/Wacom_Tablet#Tablet_PC_with_serial_Wacom_tablet_device_.28Xorg_.3E_1.8.29 Wacom Tablet - ArchWiki]page and [https://bbs.archlinux.org/viewtopic.php?pid=781004#p781004 this] Archlinux-Thread''&lt;br /&gt;
&lt;br /&gt;
===X-Server &amp;gt;=1.6? (hal)===&lt;br /&gt;
if HAL is configured as it should be, your wacom-tablet is working out of the box&lt;br /&gt;
&lt;br /&gt;
===older X-Server (static configuration)===&lt;br /&gt;
If you are sure, you don't want to update to a newer version, add the following sections to your xorg.conf:&lt;br /&gt;
&lt;br /&gt;
    Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
      Driver        &amp;quot;wacom&amp;quot;&lt;br /&gt;
      Identifier    &amp;quot;cursor&amp;quot;&lt;br /&gt;
      Option        &amp;quot;Device&amp;quot;        &amp;quot;/dev/ttyS0&amp;quot;&lt;br /&gt;
      Option        &amp;quot;Type&amp;quot;          &amp;quot;cursor&amp;quot;&lt;br /&gt;
      Option        &amp;quot;ForceDevice&amp;quot;   &amp;quot;ISDV4&amp;quot;     &lt;br /&gt;
      Option        &amp;quot;Mode&amp;quot;          &amp;quot;Absolute&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
    &lt;br /&gt;
    Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
      Driver        &amp;quot;wacom&amp;quot;&lt;br /&gt;
      Identifier    &amp;quot;stylus&amp;quot;&lt;br /&gt;
      Option        &amp;quot;Device&amp;quot;        &amp;quot;/dev/ttyS0&amp;quot;&lt;br /&gt;
      Option        &amp;quot;Type&amp;quot;          &amp;quot;stylus&amp;quot;&lt;br /&gt;
      Option        &amp;quot;ForceDevice&amp;quot;   &amp;quot;ISDV4&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
    &lt;br /&gt;
    Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
      Driver        &amp;quot;wacom&amp;quot;&lt;br /&gt;
      Identifier    &amp;quot;eraser&amp;quot;&lt;br /&gt;
      Option        &amp;quot;Device&amp;quot;        &amp;quot;/dev/ttyS0&amp;quot;&lt;br /&gt;
      Option        &amp;quot;Type&amp;quot;          &amp;quot;eraser&amp;quot;&lt;br /&gt;
      Option        &amp;quot;ForceDevice&amp;quot;   &amp;quot;ISDV4&amp;quot;&lt;br /&gt;
    EndSection&lt;br /&gt;
&lt;br /&gt;
    # support for &amp;quot;touch&amp;quot; (with finger, available on x200t and some x61t)&lt;br /&gt;
   Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
     Driver        &amp;quot;wacom&amp;quot;&lt;br /&gt;
     Identifier    &amp;quot;touch&amp;quot;&lt;br /&gt;
     Option        &amp;quot;Device&amp;quot;        &amp;quot;/dev/ttyS0&amp;quot;          # SERIAL ONLY&lt;br /&gt;
     Option        &amp;quot;Type&amp;quot;          &amp;quot;touch&amp;quot;&lt;br /&gt;
     Option        &amp;quot;ForceDevice&amp;quot;   &amp;quot;ISDV4&amp;quot;               # Serial Tablet PC ONLY&lt;br /&gt;
   EndSection&lt;br /&gt;
&lt;br /&gt;
   Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
     Identifier     &amp;quot;Default Layout&amp;quot;&lt;br /&gt;
     Screen 0 &amp;quot;Default Screen&amp;quot;   0 0&lt;br /&gt;
     InputDevice    &amp;quot;Configured Mouse&amp;quot;    &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
     InputDevice    &amp;quot;cursor&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
     InputDevice    &amp;quot;stylus&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
     InputDevice    &amp;quot;eraser&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
     #InputDevice   &amp;quot;touch&amp;quot;  &amp;quot;SendCoreEvents&amp;quot; #Uncomment if you have this feature.&lt;br /&gt;
   EndSection&lt;br /&gt;
&lt;br /&gt;
Check the wacom driver man page and [http://linuxwacom.sf.net/ website] for other options.&lt;br /&gt;
&lt;br /&gt;
For handwriting recognition using pen you can use [[CellWriter]].&lt;br /&gt;
&lt;br /&gt;
To get the right mouse button to map to the stylus button use this script and run it through .bashrc&lt;br /&gt;
&lt;br /&gt;
    #!/bin/bash&lt;br /&gt;
    xsetwacom set stylus Button1 1&lt;br /&gt;
    xsetwacom set stylus Button2 3&lt;br /&gt;
    xsetwacom set stylus Button3 3&lt;br /&gt;
&lt;br /&gt;
==Wacomcpl==&lt;br /&gt;
I found it useful to create a .desktop file for launching the wacomcpl program which is used for many user options for the tablet pen.&lt;br /&gt;
&lt;br /&gt;
    [Desktop Entry]&lt;br /&gt;
    Type=Application&lt;br /&gt;
    Encoding=UTF-8&lt;br /&gt;
    Name=wacomcpl&lt;br /&gt;
    GenericName=linux wacom config&lt;br /&gt;
    Comment=linux wacom configuration tool&lt;br /&gt;
    TryExec=wacomcpl&lt;br /&gt;
    Exec=wacomcpl&lt;br /&gt;
    Terminal=false&lt;br /&gt;
    Categories=System;&lt;br /&gt;
    Icon=wacomcpl.png&lt;br /&gt;
&lt;br /&gt;
To have your settings restore after logout/suspend/restart you will need to edit {{path|/home/yourusername/.xinitrc}}.&lt;br /&gt;
Go to the last line and change &lt;br /&gt;
&lt;br /&gt;
    . /etc/X11/xinit/xinitrc&lt;br /&gt;
&lt;br /&gt;
to read as&lt;br /&gt;
&lt;br /&gt;
    # . /etc/X11/xinit/xinitrc&lt;br /&gt;
&lt;br /&gt;
Next you need to create a new sessions preference to load the user file.&lt;br /&gt;
&lt;br /&gt;
For Debian [lenny] go to System &amp;gt; Preferences &amp;gt; Sessions.&lt;br /&gt;
Add a new startup program and add the command &lt;br /&gt;
    sh /home/yourusername/.xinitrc&lt;br /&gt;
click ok.&lt;br /&gt;
&lt;br /&gt;
For Ubuntu use System &amp;gt; Preferences &amp;gt; Startup Applications.&lt;br /&gt;
add the same startup program as above.&lt;br /&gt;
&lt;br /&gt;
--[[User:Jeremy!|Jeremy!]] 14:49, 29 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Screen rotation for X41 and X61 tablets==&lt;br /&gt;
&lt;br /&gt;
[http://www.ziva-vatra.com/index.php?aid=56&amp;amp;id=U29mdHdhcmU= ROTgui - Python program for screen rotation].&lt;br /&gt;
&lt;br /&gt;
The above is a simple program that you bind to a key (I bound it to the &amp;quot;rotate&amp;quot; button on the screen) that will let you rotate the screen 4 ways (90, 180, 270 and 0 degrees).&lt;br /&gt;
&lt;br /&gt;
I prefer manually selecting when I want to rotate the screen because I don't want to accidentally rotate it while moving the laptop around. &lt;br /&gt;
&lt;br /&gt;
The site says it's for an X41, but I can confirm that it works on my X61 as well! (Only tried on Ubuntu, but being a Python program, it should work on other OS-es as well).&lt;br /&gt;
&lt;br /&gt;
The code also has a python module, that will allow you to script your own screen control, if you'd rather not use the GUI (or want to use keybindings/write your own interface on top of it). &lt;br /&gt;
&lt;br /&gt;
--[[User:Ogi|Ogi]] 10:05, 6 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==xrandr Rotation==&lt;br /&gt;
&lt;br /&gt;
There is work underway to create a [https://code.edge.launchpad.net/~karl.hegbloom/tabuntu/tablet-screen-rotation-support Tablet Screen Rotation Support] package for Ubuntu. Because I can afford only one tablet computer, and since this is relatively new and not many others have put any work into it yet, so far it mainly supports the Lenovo Thinkpad X61 Tablet. The next phase of development involves refactoring in such a way that it can easily be expanded to support other brands and models of tablet computer. The planned mechanism is similar to that used by the scripts in the Debian acpi-support package.&lt;br /&gt;
&lt;br /&gt;
So far, it supports auto-rotation on conversion from laptop to tablet mode, including rebinding the navpad keys and turning the logical orientation of the Wacom tablet to match. It is done as an event called when the X Server has changed it's xRandR orientation. The actual work is carried out by a quick set of shell scripts that can easily be adapted and extended. The idea is that no matter what piece of software actually caused the X Server to rotate, the same things need to happen whenever it does. So the best place to hook in the support event is on an event handler for the RandR Rotate event. The programs and packaging are simple, and the source is available at the URL above. I encourage you to get a copy and learn from it while helping make it work for a new kind of tablet no other developer has created support for yet! If you can write an essay, you can write the necessary program.&lt;br /&gt;
&lt;br /&gt;
Because this ThinkWiki page is one of the sources I drew from when I initially created tablet-screen-rotation-support. The following scripts by Gtx, radix, and Papertiger probably contain some elements in common.  --[[User:KarlHegbloom|KarlHegbloom]] 21:55, 9 February 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== xrotate support scripts ===&lt;br /&gt;
&lt;br /&gt;
linuxwacom is very buggy. I needed some time to get the tablet work with &amp;quot;xrandr -r&amp;quot;. I use the script below to do screen rotation. copy the source an put it in /usr/local/bin/xrotate. You may change output and devices to fit to you're system (the default values work fine for an x41 tablet)&lt;br /&gt;
&lt;br /&gt;
you can use &amp;quot;xrotate +&amp;quot; to rotate the screen CCW or &amp;quot;xrotate -&amp;quot; to rotate clockwise. use &amp;quot;xrotate x&amp;quot; where x is&lt;br /&gt;
* 0 to set rotation to normal&lt;br /&gt;
* 1 to set rotation to left&lt;br /&gt;
* 2 to set rotation to inverted&lt;br /&gt;
* 3 to set rotation to right&lt;br /&gt;
&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  &lt;br /&gt;
  output=LVDS&lt;br /&gt;
  if [ &amp;quot;$XROT_OUTPUT&amp;quot; ]&lt;br /&gt;
  then    &lt;br /&gt;
          output=$XROT_OUTPUT;&lt;br /&gt;
  fi&lt;br /&gt;
  devices=&amp;quot;stylus cursor&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  geomnbr=0&lt;br /&gt;
  xrandr=normal&lt;br /&gt;
  wacom=normal&lt;br /&gt;
  if [ &amp;quot;$1&amp;quot; == &amp;quot;-&amp;quot; ] || [ &amp;quot;$1&amp;quot; == &amp;quot;+&amp;quot; ] || ! [ &amp;quot;$1&amp;quot; ];&lt;br /&gt;
  then    &lt;br /&gt;
          operator=&amp;quot;$1&amp;quot;;&lt;br /&gt;
          [ &amp;quot;$1&amp;quot; ] || operator='+';&lt;br /&gt;
          case `xrandr --verbose | grep &amp;quot;^$output &amp;quot; | sed &amp;quot;s/^[^ ]* [^ ]* [^ ]* ([^(]*) \([a-z]*\).*/\1/&amp;quot;` in&lt;br /&gt;
                  normal)         geom=0;;&lt;br /&gt;
                  left)           geom=1;;&lt;br /&gt;
                  inverted)       geom=2;;&lt;br /&gt;
                  right)          geom=3;;&lt;br /&gt;
          esac&lt;br /&gt;
          let geom=${geom}${operator}1+4&lt;br /&gt;
          let geom=${geom}%4&lt;br /&gt;
  else    &lt;br /&gt;
          geom=&amp;quot;$1&amp;quot;&lt;br /&gt;
  fi&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  case $geom in&lt;br /&gt;
          1)      wacom=2; xrandr=left ;;&lt;br /&gt;
          2)      wacom=3; xrandr=inverted ;;&lt;br /&gt;
          3)      wacom=1; xrandr=right ;;&lt;br /&gt;
          *)      wacom=0; xrandr=normal ;;&lt;br /&gt;
  esac&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;xrandr to $xrandr, xsetwacom to $wacom&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
  &lt;br /&gt;
  if xrandr --output &amp;quot;$output&amp;quot; --rotate &amp;quot;$xrandr&amp;quot;; then&lt;br /&gt;
          for d in $devices&lt;br /&gt;
          do      &lt;br /&gt;
                  xsetwacom set &amp;quot;$device&amp;quot; Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
          done&lt;br /&gt;
  fi&lt;br /&gt;
  &lt;br /&gt;
  #workaround for linuxwacom bug&lt;br /&gt;
  if [ &amp;quot;`xsetwacom get stylus Mode`&amp;quot; == '1' ]; then&lt;br /&gt;
          for d in $devices&lt;br /&gt;
          do      &lt;br /&gt;
                  xsetwacom set stylus CoreEvent &amp;quot;off&amp;quot;&lt;br /&gt;
                  xsetwacom set stylus Mode &amp;quot;off&amp;quot;&lt;br /&gt;
          done&lt;br /&gt;
          { sleep 1;&lt;br /&gt;
          for d in $devices&lt;br /&gt;
          do      &lt;br /&gt;
                  xsetwacom set stylus Mode &amp;quot;on&amp;quot;&lt;br /&gt;
                  xsetwacom set stylus CoreEvent &amp;quot;on&amp;quot;&lt;br /&gt;
          done; } &amp;amp;&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
--[[User:Gtx|Gtx]] 13:34, 22 April 2008 (CEST)&lt;br /&gt;
&lt;br /&gt;
modified script for linuxwacom 0.8.1-1.&lt;br /&gt;
 &lt;br /&gt;
   #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 output=&amp;quot;(normal left inverted right)&amp;quot; #LVDS&lt;br /&gt;
  # if [ &amp;quot;$XROT_OUTPUT&amp;quot; ]&lt;br /&gt;
  # then     &lt;br /&gt;
  #         output=$XROT_OUTPUT;&lt;br /&gt;
  # fi&lt;br /&gt;
 devices=&amp;quot;stylus cursor&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 geomnbr=0&lt;br /&gt;
 xrandr=normal&lt;br /&gt;
 wacom=normal&lt;br /&gt;
 if [ &amp;quot;$1&amp;quot; == &amp;quot;-&amp;quot; ] || [ &amp;quot;$1&amp;quot; == &amp;quot;+&amp;quot; ] || ! [ &amp;quot;$1&amp;quot; ];&lt;br /&gt;
 then    &lt;br /&gt;
         operator=&amp;quot;$1&amp;quot;;&lt;br /&gt;
         [ &amp;quot;$1&amp;quot; ] || operator='+';&lt;br /&gt;
         case `xrandr --verbose | grep &amp;quot;$output&amp;quot; | sed &amp;quot;s/^[^ ]* [^ ]* [^ ]* ([^(]*) \([a-z]*\).*/\1/&amp;quot;` in&lt;br /&gt;
                 normal)         geom=0;;&lt;br /&gt;
                 left)          geom=1;;&lt;br /&gt;
                 inverted)       geom=2;;&lt;br /&gt;
                 right)          geom=3;;&lt;br /&gt;
         esac&lt;br /&gt;
         let geom=${geom}${operator}1+4&lt;br /&gt;
         let geom=${geom}%4	&lt;br /&gt;
 else    &lt;br /&gt;
         geom=&amp;quot;$1&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 case $geom in&lt;br /&gt;
         1)      wacom=2; xrandr=left ;;&lt;br /&gt;
         2)      wacom=3; xrandr=inverted ;;&lt;br /&gt;
         3)      wacom=1; xrandr=right ;;&lt;br /&gt;
         *)      wacom=0; xrandr=normal ;;&lt;br /&gt;
 esac&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;xrandr to $xrandr, xsetwacom to $wacom&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
 &lt;br /&gt;
 if xrandr -o &amp;quot;$xrandr&amp;quot;; then&lt;br /&gt;
         for d in $devices&lt;br /&gt;
         do      &lt;br /&gt;
                 xsetwacom set &amp;quot;stylus&amp;quot; Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
         done&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 #workaround for linuxwacom bug&lt;br /&gt;
 if [ &amp;quot;`xsetwacom get stylus Mode`&amp;quot; == '1' ]; then&lt;br /&gt;
         for d in $devices&lt;br /&gt;
         do      &lt;br /&gt;
                 xsetwacom set stylus CoreEvent &amp;quot;off&amp;quot;&lt;br /&gt;
                 xsetwacom set stylus Mode &amp;quot;off&amp;quot;&lt;br /&gt;
         done&lt;br /&gt;
         { sleep 1;&lt;br /&gt;
         for d in $devices&lt;br /&gt;
         do      &lt;br /&gt;
                 xsetwacom set stylus Mode &amp;quot;on&amp;quot;&lt;br /&gt;
                 xsetwacom set stylus CoreEvent &amp;quot;on&amp;quot;&lt;br /&gt;
         done; } &amp;amp;&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:radix|radix]] 13:15, 28 August 2008 (CEST)&lt;br /&gt;
&lt;br /&gt;
Additional code for rotating the 4 navigation keys on the display frame.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 key_up=111&lt;br /&gt;
 key_down=116&lt;br /&gt;
 key_left=113&lt;br /&gt;
 key_right=114&lt;br /&gt;
&lt;br /&gt;
 case $geom in&lt;br /&gt;
         1)      xmodmap -e &amp;quot;keycode $key_up = Right&amp;quot;;xmodmap -e &amp;quot;keycode $key_left = Up&amp;quot;;xmodmap -e &amp;quot;keycode $key_right = Down&amp;quot;;xmodmap -e &amp;quot;keycode $key_down = Left&amp;quot;;;&lt;br /&gt;
         2)      xmodmap -e &amp;quot;keycode $key_up = Down&amp;quot;;xmodmap -e &amp;quot;keycode $key_left = Right&amp;quot;;xmodmap -e &amp;quot;keycode $key_right = Left&amp;quot;;xmodmap -e &amp;quot;keycode $key_down = Up&amp;quot;;;&lt;br /&gt;
         3)      xmodmap -e &amp;quot;keycode $key_up = Left&amp;quot;;xmodmap -e &amp;quot;keycode $key_left = Down&amp;quot;;xmodmap -e &amp;quot;keycode $key_right = Up&amp;quot;;xmodmap -e &amp;quot;keycode $key_down = Right&amp;quot;;;&lt;br /&gt;
         *)      xmodmap -e &amp;quot;keycode $key_up = Up&amp;quot;;xmodmap -e &amp;quot;keycode $key_left = Left&amp;quot;;xmodmap -e &amp;quot;keycode $key_right = Right&amp;quot;;xmodmap -e &amp;quot;keycode $key_down = Down&amp;quot;;;&lt;br /&gt;
 esac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--[[User:Papertiger|Papertiger]] 22:24, 12 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== modified script ===&lt;br /&gt;
On my X200 Tablet i have a &amp;quot;invert&amp;quot; tablet button and a &amp;quot;flip&amp;quot; button, so i modified the the script for my needs. This scripts also works with xrandr program version 1.3.2 and xsetwacom 0.10.3 under Debian Testing (Squeeze). You can call the script with &amp;quot;./tablet.sh flip&amp;quot; or &amp;quot;./tablet.sh invert&amp;quot;. I mapped these two functions on the hardware buttons. The full Tutorial can be found on my blog: http://dominikschuermann.de/index.php/2010/05/thinkpad-x200-tablet-for-debian-testing/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# config&lt;br /&gt;
output=&amp;quot;LVDS1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# get current rotation&lt;br /&gt;
current=`xrandr --verbose | grep &amp;quot;$output&amp;quot; | sed &amp;quot;s/^[^ ]* [^ ]* [^ ]* ([^(]*) \([a-z]*\).*/\1/&amp;quot;`&lt;br /&gt;
case $current in&lt;br /&gt;
  normal)    geom=0;;&lt;br /&gt;
  left)      geom=1;;&lt;br /&gt;
  inverted)  geom=2;;&lt;br /&gt;
  right)     geom=3;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$1&amp;quot; == &amp;quot;invert&amp;quot; ] || [ &amp;quot;$1&amp;quot; == &amp;quot;flip&amp;quot; ];&lt;br /&gt;
then&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  # based on current rotation set new rotation&lt;br /&gt;
  if [ &amp;quot;$1&amp;quot; == &amp;quot;invert&amp;quot; ];&lt;br /&gt;
  then&lt;br /&gt;
  &lt;br /&gt;
    # invert&lt;br /&gt;
    case $geom in&lt;br /&gt;
      0)  wacom=half; xrandr=inverted;;&lt;br /&gt;
      1)  wacom=cw; xrandr=right;;&lt;br /&gt;
      2)  wacom=none; xrandr=normal;;&lt;br /&gt;
      3)  wacom=ccw; xrandr=left;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
  else&lt;br /&gt;
    &lt;br /&gt;
    # flip&lt;br /&gt;
    case $geom in&lt;br /&gt;
      0)  wacom=cw; xrandr=right;;&lt;br /&gt;
      1)  wacom=half; xrandr=inverted;;&lt;br /&gt;
      2)  wacom=ccw; xrandr=left;;&lt;br /&gt;
      3)  wacom=none; xrandr=normal;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  echo &amp;quot;xrandr to $xrandr, xsetwacom to $wacom&amp;quot; &amp;gt;&amp;amp;2&lt;br /&gt;
&lt;br /&gt;
  # rotate display&lt;br /&gt;
  xrandr -o $xrandr&lt;br /&gt;
&lt;br /&gt;
  # rotate wacom&lt;br /&gt;
  xsetwacom set &amp;quot;stylus&amp;quot; Rotate $wacom&lt;br /&gt;
  xsetwacom set &amp;quot;eraser&amp;quot; Rotate $wacom&lt;br /&gt;
  xsetwacom set &amp;quot;touch&amp;quot; Rotate $wacom&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
  echo &amp;quot;possible parameters: flip, invert&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--[[User:Dominiks|Dominiks]] 18:47, 17 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== another modified script (X41) ===&lt;br /&gt;
I'm using this script to rotate the screen on my X41 (1866-WG4). The rotation is either absolute using the arguments ''normal'', ''inverted'', ''left'' and ''right'' or relative to the current orientation using ''cw'' or ''ccw''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  &lt;br /&gt;
  xrandr=normal&lt;br /&gt;
  wacom=NONE&lt;br /&gt;
  &lt;br /&gt;
  case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  	normal)&lt;br /&gt;
  		xrandr=normal&lt;br /&gt;
  		wacom=NONE&lt;br /&gt;
  		;;&lt;br /&gt;
  	inverted)&lt;br /&gt;
  		xrandr=inverted&lt;br /&gt;
  		wacom=HALF&lt;br /&gt;
  		;;&lt;br /&gt;
  	right)&lt;br /&gt;
  		xrandr=right&lt;br /&gt;
  		wacom=CW&lt;br /&gt;
  		;;&lt;br /&gt;
  	left)&lt;br /&gt;
  		xrandr=left&lt;br /&gt;
  		wacom=CCW&lt;br /&gt;
  		;;&lt;br /&gt;
  	cw|ccw)&lt;br /&gt;
  		case `xrandr --verbose -q -o normal --dryrun | grep &amp;quot;Current rotation&amp;quot; | sed &amp;quot;s/Current\ rotation\ \-\ //g&amp;quot;` in&lt;br /&gt;
  			normal)&lt;br /&gt;
  				if [ &amp;quot;$1&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrandr=right&lt;br /&gt;
  					wacom=CW&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=left&lt;br /&gt;
  					wacom=CCW&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  			left)&lt;br /&gt;
  				if [ &amp;quot;$1&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrand=normal&lt;br /&gt;
  					wacom=NONE&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=inverted&lt;br /&gt;
  					wacom=HALF&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  			inverted)&lt;br /&gt;
  				if [ &amp;quot;$1&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrandr=left&lt;br /&gt;
  					wacom=CCW&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=right&lt;br /&gt;
  					wacom=CW&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  			right)&lt;br /&gt;
  				if [ &amp;quot;$1&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrandr=inverted&lt;br /&gt;
  					wacom=HALF&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=normal&lt;br /&gt;
  					wacom=NONE&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  		esac&lt;br /&gt;
  		;;&lt;br /&gt;
  	*)&lt;br /&gt;
  		echo &amp;quot;Usage: $0 {normal|left|right|inverted|cw|ccw}&amp;quot;&lt;br /&gt;
  		exit 1&lt;br /&gt;
  		;;&lt;br /&gt;
  esac&lt;br /&gt;
   &lt;br /&gt;
  if xrandr --output LVDS1 --rotate &amp;quot;$xrandr&amp;quot;; then&lt;br /&gt;
  	xsetwacom --set stylus0 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	xsetwacom --set cursor0 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	xsetwacom --set eraser0 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	exit 0&lt;br /&gt;
  fi&lt;br /&gt;
  &lt;br /&gt;
  exit 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will have to change lines 69 to 73 to suit your configuration. ''LVDS1'' is the laptop screen as returned by xrandr; ''stylus0'', ''cursor0'' and ''eraser0'' are what I have called the wacom devices in my xorg.conf.&lt;br /&gt;
The software I'm using on my X41 is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $ xrandr -v&lt;br /&gt;
  xrandr program version       1.3.3&lt;br /&gt;
  Server reports RandR version 1.3&lt;br /&gt;
  &lt;br /&gt;
  $ xsetwacom -V&lt;br /&gt;
  0.10.5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am using the ''intel'' driver for the graphics adapter; unfortunately, display rotation is &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; possible with the kernel's intel framebuffer driver and Xorg's ''fbdev''. Both xrandr and xsetwacom were installed from debian sid repositories, xsetwacom came with the ''xserver-xorg-input-wacom'' package, &amp;lt;u&amp;gt;not ''wacom-tools''&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
--[[User:mk|mk]] 16.51, 6 August 2010 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== X41 tablet with UBUNTU 10.10 ===&lt;br /&gt;
&lt;br /&gt;
On my thinkpad X41 tablet with Ubuntu 10.10 i got this message with the previous script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cannot find device 'stylus0'.&lt;br /&gt;
Cannot find device 'cursor0'.&lt;br /&gt;
Cannot find device 'eraser0'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to get it work I had to change this script a little bit (I didn't need to change or create an &amp;quot;xorg.conf&amp;quot; or anything else, I only used this script):&lt;br /&gt;
&lt;br /&gt;
1. Type in a terminal: {{cmduser|xinput}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
maxi@maxi-ThinkPad-X41-Tablet:~$ xinput --list&lt;br /&gt;
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]&lt;br /&gt;
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]&lt;br /&gt;
⎜   ↳ TPPS/2 IBM TrackPoint                   	id=10	[slave  pointer  (2)]&lt;br /&gt;
⎜   ↳ Serial Wacom Tablet eraser              	id=12	[slave  pointer  (2)]&lt;br /&gt;
⎜   ↳ Serial Wacom Tablet stylus              	id=13	[slave  pointer  (2)]&lt;br /&gt;
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]&lt;br /&gt;
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]&lt;br /&gt;
    ↳ Power Button                            	id=6	[slave  keyboard (3)]&lt;br /&gt;
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]&lt;br /&gt;
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]&lt;br /&gt;
    ↳ AT Translated Set 2 keyboard            	id=9	[slave  keyboard (3)]&lt;br /&gt;
    ↳ ThinkPad Extra Buttons                  	id=11	[slave  keyboard (3)]&lt;br /&gt;
maxi@maxi-ThinkPad-X41-Tablet:~$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So you know the id numbers of your Eraser (12) and Stylus (13)&lt;br /&gt;
&lt;br /&gt;
2. Modify the script given in this article: Instead of &amp;quot;Eraser&amp;quot; and &amp;quot;Stylus&amp;quot; use your id-numbers:&lt;br /&gt;
Change&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if xrandr --output LVDS1 --rotate &amp;quot;$xrandr&amp;quot;; then&lt;br /&gt;
  	xsetwacom --set stylus0 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	xsetwacom --set cursor0 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	xsetwacom --set eraser0 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	exit 0&lt;br /&gt;
  fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
into&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  if xrandr --output LVDS1 --rotate &amp;quot;$xrandr&amp;quot;; then&lt;br /&gt;
  	xsetwacom --set 13 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
#  	xsetwacom --set cursor0 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	xsetwacom --set 12 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	exit 0&lt;br /&gt;
  fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So in total, you should have the following script saved in a file (for example xrandr in your homefolder /home/&amp;quot;username&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
  &lt;br /&gt;
  xrandr=normal&lt;br /&gt;
  wacom=NONE&lt;br /&gt;
  &lt;br /&gt;
  case &amp;quot;$1&amp;quot; in&lt;br /&gt;
  	normal)&lt;br /&gt;
  		xrandr=normal&lt;br /&gt;
  		wacom=NONE&lt;br /&gt;
  		;;&lt;br /&gt;
  	inverted)&lt;br /&gt;
  		xrandr=inverted&lt;br /&gt;
  		wacom=HALF&lt;br /&gt;
  		;;&lt;br /&gt;
  	right)&lt;br /&gt;
  		xrandr=right&lt;br /&gt;
  		wacom=CW&lt;br /&gt;
  		;;&lt;br /&gt;
  	left)&lt;br /&gt;
  		xrandr=left&lt;br /&gt;
  		wacom=CCW&lt;br /&gt;
  		;;&lt;br /&gt;
  	cw|ccw)&lt;br /&gt;
  		case `xrandr --verbose -q -o normal --dryrun | grep &amp;quot;Current rotation&amp;quot; | sed &amp;quot;s/Current\ rotation\ \-\ //g&amp;quot;` in&lt;br /&gt;
  			normal)&lt;br /&gt;
  				if [ &amp;quot;$1&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrandr=right&lt;br /&gt;
  					wacom=CW&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=left&lt;br /&gt;
  					wacom=CCW&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  			left)&lt;br /&gt;
  				if [ &amp;quot;$1&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrand=normal&lt;br /&gt;
  					wacom=NONE&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=inverted&lt;br /&gt;
  					wacom=HALF&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  			inverted)&lt;br /&gt;
  				if [ &amp;quot;$1&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrandr=left&lt;br /&gt;
  					wacom=CCW&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=right&lt;br /&gt;
  					wacom=CW&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  			right)&lt;br /&gt;
  				if [ &amp;quot;$1&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrandr=inverted&lt;br /&gt;
  					wacom=HALF&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=normal&lt;br /&gt;
  					wacom=NONE&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  		esac&lt;br /&gt;
  		;;&lt;br /&gt;
  	*)&lt;br /&gt;
  		echo &amp;quot;Usage: $0 {normal|left|right|inverted|cw|ccw}&amp;quot;&lt;br /&gt;
  		exit 1&lt;br /&gt;
  		;;&lt;br /&gt;
  esac&lt;br /&gt;
   &lt;br /&gt;
  if xrandr --output LVDS1 --rotate &amp;quot;$xrandr&amp;quot;; then&lt;br /&gt;
  	xsetwacom --set 13 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
#  	xsetwacom --set cursor Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	xsetwacom --set 12 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	exit 0&lt;br /&gt;
  fi&lt;br /&gt;
  &lt;br /&gt;
  exit 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you saved it as &amp;quot;xrandr&amp;quot;, open a terminal, go to the folder, in which you saved &amp;quot;xrandr&amp;quot;, and type&lt;br /&gt;
{{cmduser|chmod +x xrandr}}&lt;br /&gt;
&lt;br /&gt;
in order to be able to use this script with typing in an terminal&lt;br /&gt;
{{cmduser|./xrandr right}} for right rotation and {{cmduser|./xrandr normal}} for left.&lt;br /&gt;
&lt;br /&gt;
--[[User:klob]] 11.40, 24 October 2010 (CEST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to easily switch between two orientations, you can use the following script. You can assign this script to the corresponding button on the tablet. It os working on my Thinkpad X61 tablet. If you remove the &amp;quot;yes&amp;quot; after flipflop= the script works as the script above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# wether to run in flipflop-Mode. Leave blank if not.&lt;br /&gt;
# In flipflop mode you can easily switch between two preferred orientations.&lt;br /&gt;
#&lt;br /&gt;
flipflop=yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
par=$1&lt;br /&gt;
semaphore=/tmp/rotate.sem&lt;br /&gt;
if [ -n &amp;quot;$flipflop&amp;quot; ]; then&lt;br /&gt;
  # only if variable $flipflop is set&lt;br /&gt;
  if [ -f $semaphore ]; then &lt;br /&gt;
    # semaphore exists&lt;br /&gt;
    rm $semaphore&lt;br /&gt;
    par=normal&lt;br /&gt;
  else&lt;br /&gt;
    # semaphore dont exist -&amp;gt; create it&lt;br /&gt;
    touch $semaphore&lt;br /&gt;
    par=right&lt;br /&gt;
  fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  xrandr=normal&lt;br /&gt;
  wacom=NONE&lt;br /&gt;
  &lt;br /&gt;
  case &amp;quot;$par&amp;quot; in&lt;br /&gt;
  	normal)&lt;br /&gt;
  		xrandr=normal&lt;br /&gt;
  		wacom=NONE&lt;br /&gt;
  		;;&lt;br /&gt;
  	inverted)&lt;br /&gt;
  		xrandr=inverted&lt;br /&gt;
  		wacom=HALF&lt;br /&gt;
  		;;&lt;br /&gt;
  	right)&lt;br /&gt;
  		xrandr=right&lt;br /&gt;
  		wacom=CW&lt;br /&gt;
  		;;&lt;br /&gt;
  	left)&lt;br /&gt;
  		xrandr=left&lt;br /&gt;
  		wacom=CCW&lt;br /&gt;
  		;;&lt;br /&gt;
  	cw|ccw)&lt;br /&gt;
  		case `xrandr --verbose -q -o normal --dryrun | grep &amp;quot;Current rotation&amp;quot; | sed &amp;quot;s/Current\ rotation\ \-\ //g&amp;quot;` in&lt;br /&gt;
  			normal)&lt;br /&gt;
  				if [ &amp;quot;$par&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrandr=right&lt;br /&gt;
  					wacom=CW&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=left&lt;br /&gt;
  					wacom=CCW&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  			left)&lt;br /&gt;
  				if [ &amp;quot;$par&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrand=normal&lt;br /&gt;
  					wacom=NONE&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=inverted&lt;br /&gt;
  					wacom=HALF&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  			inverted)&lt;br /&gt;
  				if [ &amp;quot;$par&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrandr=left&lt;br /&gt;
  					wacom=CCW&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=right&lt;br /&gt;
  					wacom=CW&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  			right)&lt;br /&gt;
  				if [ &amp;quot;$par&amp;quot; = &amp;quot;cw&amp;quot; ]; then&lt;br /&gt;
  					xrandr=inverted&lt;br /&gt;
  					wacom=HALF&lt;br /&gt;
  				else&lt;br /&gt;
  					xrandr=normal&lt;br /&gt;
  					wacom=NONE&lt;br /&gt;
  				fi&lt;br /&gt;
  				;;&lt;br /&gt;
  		esac&lt;br /&gt;
  		;;&lt;br /&gt;
  	*)&lt;br /&gt;
  		echo $flipflop&lt;br /&gt;
  		if [ -z $flipflop ]; then&lt;br /&gt;
  			# only if variable flipflop is not set&lt;br /&gt;
	  		echo &amp;quot;Usage: $0 {normal|left|right|inverted|cw|ccw}&amp;quot;&lt;br /&gt;
  			exit 1&lt;br /&gt;
  		fi&lt;br /&gt;
  		;;&lt;br /&gt;
  esac&lt;br /&gt;
   &lt;br /&gt;
  if xrandr --output LVDS1 --rotate &amp;quot;$xrandr&amp;quot;; then&lt;br /&gt;
  	xsetwacom --set 13 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
#  	xsetwacom --set cursor Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	xsetwacom --set 12 Rotate &amp;quot;$wacom&amp;quot;&lt;br /&gt;
  	exit 0&lt;br /&gt;
  fi&lt;br /&gt;
  &lt;br /&gt;
  exit 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
--[[User:dcjfm]] 10.20, 23 November 2010 (CEST):&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
If the stylus still doesn't work try to reset the bios. This fixed it for me. --[[User:Gtx|Gtx]] 08:22, 21 April 2008 (CEST)&lt;br /&gt;
&lt;br /&gt;
Ubuntu 11.10 (Oneiric Ocelot): &lt;br /&gt;
Per the thread at [http://ubuntuforums.org/showthread.php?t=1862595 Ubuntuforums], comment out or remove /lib/udev/rules.d/40-inputattach.rules to get the stylus functioning.&lt;br /&gt;
&lt;br /&gt;
[https://launchpad.net/magick-rotation Magick-Rotation] is useful for auto-rotating the screen  but may require switching the cw / ccw notations to match the stylus orientation to that of the screen ([https://answers.launchpad.net/magick-rotation/+question/174153 bug]). --[[User:wseltzer|wseltzer]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Components]]&lt;/div&gt;</summary>
		<author><name>Trevie</name></author>
		
	</entry>
</feed>