LDP/LDP/howto/linuxdoc/Wacom-Tablet-HOWTO.sgml

1633 lines
46 KiB
Plaintext

<!doctype linuxdoc system>
<!--
Wacom Tablet HOWTO, (C) 1999 by <SR>
------------------------------------
History:
1.0.1 28.10.99: First draft
1.0.2 30.10.99: Keys section written, gimp section: keys written
1.0.3 01.11.99: wacom to Wacom, than to then, gpm section: modified "V1.18.1"
supports graphire
added "Getting max values" /
1.0.4 03.11.99: removed typos, checked tex generation
1.0.5 21.11.99: WacomErasor to WacomEraser, Mini-XF86Config: first two lines
swapped. gpm: mouse type description fixed, added asterix
explaination
1.0.6 28.03.00: Problems Section written, gpm and graphire sections updated
Copyright changed to gpl
1.0.7 29.12.00: New xFree 3.x Options MaxXYZ, ResolutionXYZ, USB link; XFree 4.x
1.0.8 12.08.01: updated email / homepage; added usb-configuration; added how
to set mouse to fake device
-->
<ARTICLE>
<TITLE>
Wacom Tablet HOWTO
</TITLE>
<AUTHOR>
Stefan Runkel
<TT>
&lt;runkel@runkel-it.de&gt;
</TT>
</AUTHOR>
<DATE>
v1.0.8, 2001-08-11
</DATE>
<ABSTRACT>
Installation of Wacom graphic tablets under linux and / or xfree86
</ABSTRACT>
<TOC>
<SECT>
Copyright
<P>
Copyright (c) 1999,2000 by Stefan Runkel
<HTMLURL url="mailto:Runkel@runkel-it.de" name="Runkel@runkel-it.de">
<P>
This document describes the installation of Wacom tablets under linux.
<NEWLINE>
It may be distributed, at your choice, under either the terms
of the GNU Public License version 2 or later or the standard Linux
Documentation Project terms. These licenses should be available from where you
got this document. Please note that since the LDP terms don't allow
modification (other than translation), modified versions can be assumed to be
distributed under the GPL.
<SECT>
Introduction
<P>
<LABEL id="_Toc465765693">
Graphic tablets are now quite inexpensive and can help allot with the work of
image manipulation. In addition to that what a mouse can do for you they have
the following features:
<ITEMIZE>
<ITEM>
pressure and tilt sensitivity
<ITEM>
high resolution motion control
<ITEM>
sub-pixel positioning
<ITEM>
an input device that looks like and is handled like a normal Pen.
</ITEMIZE>
This document addresses mainly the products from Wacom, because I own 3
different products of them and because their products are highly available in
the region of Europe.
<P>
Nevertheless I think it should be easy to adapt the shown concepts to other
products.
<P>
I have written this document because I have not found a document about this
subject which contained completely what I wanted to know.
So I got small parts of information from various people in the
net and assembled them to this HOWTO. Regarding the questions of
my readers, I must realize that this document also is not complete and never
will be. But from the same questions I can tell that it helped many people on
the way, and each new question lets this HOWTO grow.
<SECT1>
New Versions of this Document
<P>
<LABEL id= "_Toc465765694" >
The latest version of this document will be available at
<HTMLURL url="http://www.runkel-it.de/linux.htm" name="http://www.runkel-it.de/linux.htm">.
<SECT1>
Feedback and Corrections
<P>
<LABEL id="_Toc465765695">
Comments, corrections, and additions are greatly be appreciated. I can be
contacted at:
<P>
<HTMLURL url="mailto:Runkel@runkel-it.de" name="Runkel@runkel-it.de">
or at <HTMLURL url="mailto:RunkelEDV@t-online.de" name="RunkelEDV@t-online.de">
<SECT1>
Acknowledgements
<P>
<LABEL id="_Toc465765696" >
I would like to thank all authors listed in the
<REF id="_Toc465765731" name="Further Information / used documents">
Section as well as everyone who answered my questions by email.
This HOWTO reflects much of their work.
<SECT>
Requirements
<P>
<LABEL id="_Toc465765697">
This chapter is about what is needed to get your tablet working.
<SECT1>
Which Hardware is supported
<P>
<LABEL id="_Toc465765698">
First of all, you should have a tablet, of course.
The following Wacom tablets are supported:
<P>
<ITEMIZE>
<ITEM>
ArtZ II series (known in Europe as the UltraPad series -
the same UltraPad name also was used for earlier tablets that only work
partially.)
<ITEM>
ArtPad II
<ITEM>
PL300 (combined LCD screen and tablet)
<ITEM>
Pen Partner
<ITEM>
Graphire alias FAVO (mouse and pen, get at least the alpha 16 driver for full
support from <HTMLURL url="http://people.mandrakesoft.com/~flepied/projects/wacom/" name="http://people.mandrakesoft.com/~flepied/projects/wacom/">).
<ITEM> Intuos series (support may be only partial with the driver of your
distribution, get updated alpha versions from <LABEL id="_driverlepied">
Frederic Lepied's page:
<HTMLURL url="http://people.mandrakesoft.com/~flepied/projects/wacom/" name="http://people.mandrakesoft.com/~flepied/projects/wacom/">)
</ITEMIZE>
<P>
The older SD and HD series are not supported by the standard XFree86 driver,
however, a modified driver that supports these devices as well some OEM
products with embedded screens including the IBM Thinkpad 360 PE and Toshiba
T200 is available from:
<HTMLURL url="http://hwr.nici.kun.nl/pen-computing/pen-computing-formats.html" name="http://hwr.nici.kun.nl/pen-computing/pen-computing-formats.html">
<p>
<BF>USB-Devices</BF><newline>
If ordering the wacom products intuos and graphire, you can choose between
two different interfaces:<newline>
Serial and USB.<p>
<em>The Serial Interface</em><newline>
<itemize>
<item>is available for a long time, so the drivers are more stable for it
<item>can not supply power to the tablet. For graphire and small intuos, wacom
made an interface wire that plugs between the ps/2 keyboard and the computer to grap that power. Bigger intuos tablets may use an AC-adapter.
<item>does not require you to recompile the kernel or to load kernel modules.
</itemize>
<p>
<em>The USB Interface</em><newline>
<itemize>
<item>is newer, so the drivers may be still in development.
<item>can supply power to the tablet, bigger intuos tablets nevertheless may use an AC-adapter.
<item>may require you to recompile the kernel and / or to load kernel modules
The section <REF id="_Tocusbprepare" name="extra configuration steps"> later in this document tries to guide you through this process.
</itemize>
<SECT1>
Which Software is needed
<P>
<LABEL id="_Toc465765699" >
<ITEMIZE>
<ITEM>
<LABEL id="_gpm">
If you want support for the linux console, get the latest version of gpm from
<HTMLURL url="ftp://ftp.prosa.it/pub/gpm" name="ftp://ftp.prosa.it/pub/gpm">
or from
<HTMLURL url="ftp://animal.unipv.it/pub/gpm" name="ftp://animal.unipv.it/pub/gpm">
(mirror)
<P>
<ITEM>
<LABEL id="_xfree">
If you want support for XFree86, use at least version 3.3.3.1 or get the latest
from
<HTMLURL url="http://www.xfree.org/" name="http://www.xfree.org">
</ITEMIZE>
<SECT1>
Which Software is supported
<P>
<LABEL id="_Toc465765700" >
<ITEMIZE>
<ITEM>
For the linux console, the only program I know is gpm.
<P>
<ITEM>
For XFree, the keyword is XInput. This specification has to be supported by
device drivers which provide extra information. In turn, XInput has to be
understood by programs which want to use alternative pointer devices.
</ITEMIZE>
<P>
There is a big number of programs based on the gtk library. The gtk has XInput
support and makes it very easy to use.
<NEWLINE>
At least the following applications support XInput:
<P>
<ITEMIZE>
<ITEM>
The Gimp - a powerful image manipulation program in the style of Photoshop. The
1.1.x instable development version includes XInput support as a standard
feature. We are awaiting the next stable release, Version 1.2.x.
<LABEL id="_gimp">
Obtain Gimp from
<HTMLURL url="http://www.gimp.org/" name="http://www.gimp.org">
, it really deserves it !
I am sure most of you know this and it was the reason to buy a tablet.
<P>
<ITEM>
gsumi - a simple B/W drawing program that supports drawing / erasing with
pressure and tilt sensitivity.
Get it from the gsumi web page:
<HTMLURL url="http://www.gtk.org/~otaylor/gsumi/" name="http://www.gtk.org/~otaylor/gsumi/">
<P>
<ITEM>
xink (By Ralph Levien) - another rudimentary drawing program for X.
<P>
xink is available from:
<HTMLURL url="ftp://kiwi.cs.berkeley.edu/pub/raph/xink.tar.gz" name="ftp://kiwi.cs.berkeley.edu/pub/raph/xink.tar.gz">
<P>
<ITEM>
RasMol - a molecular visualization program that supports a hardware dial box
using XInput. look at
<HTMLURL url="http://www.umass.edu/microbio/rasmol/distrib/rasman.htm" name="http://www.umass.edu/microbio/rasmol/distrib/rasman.htm">
.
<P>
<ITEM>
xinput (by Frederic Lepied) - a very useful utility for configuring and testing
XInput devices.
<LABEL id="_XInput">
xinput is available from:
<HTMLURL url="ftp://ftp.x.org/contrib/utilities/xinput-1.2.tar.gz" name="ftp://ftp.x.org/contrib/utilities/xinput-1.2.tar.gz">
</ITEMIZE>
<LABEL id="_Tocusbprepare">
<SECT1>
What has to be prepared if the Tablet connects to the USB-Port
<P>
USB-Support is done in the kernel. This means that you should be able to configure and recompile the kernel.
If you do not know how, consult your local guru.<p>
<bf>The Kernel</bf><newline>
Make sure in the USB Support section of the kernel configuration you have the following set:
<tscreen><verb>
--- USB Human Interface Devices (HID)
<M> USB Human Interface Device (full HID) support
...
<M> Wacom Intuos/Graphire tablet support
</verb></tscreen>
Now recompile the kernel, either load the wacom module (which would be in /lib/modules/&lt;linux version&gt;/kernel/drivers/usb/wacom.o), or reboot, and verify that the module was loaded:
<tscreen><verb>
# grep -i wacom /var/log/boot.msg
input0: Wacom Intuos 9x12 on usb1:2.0
</verb></tscreen>
On some system you may want to grep in /var/log/messages instead.
<p>
<bf>Note:</bf><newline>
At least for the intuos series
even the latest kernel (2.4.7 as of moment of writing) doesn't have the right Wacom USB driver, so you have to get the right one and recompile the stuff. See <HTMLURL url="http://www.best.com/~sem/linux/wacom/" name="Semyon Sosin
's document"> for this. <p>
I can not tell if wacom graphire works fine with the original driver. But take
for sure that the shown __concepts__ will work for both wacom product lines.<p>
<SECT>
Tablets as Mouse-Replacement for the Linux-Console
<P>
<LABEL id="_Toc465765701">
<SECT1>
Tablets and gpm
<P>
<LABEL id="_Toc46576570a" >
The
<REF id="_gpm" name="gpm">
daemon supports allot of input devices, including tablets. If you want
a list of the supported devices of your gpm, do a
<TSCREEN><EM>
gpm -t help
</EM></TSCREEN>
and you get it.
<P>
The Wacom driver of gpm 1.18.0 and below seems to be for the very old
artpad models, the documentation does not say anything about this. I
tested it with ultrapad, penpartner, graphire and intuos models but it did not
work. I have rewritten the wacom driver for gpm, to use it you need at least
gpm version 1.18.2 . Since 1.18.2, the old wacom driver has been replaced with
my driver for wacom graphire, penpartner and ultrapad products.
<P>
However, if you own an old artpad, use gpm < 1.18.1 and try:
<TSCREEN><EM>
killall gpm ; gpm -t wacom -m /dev/ttyS0
</EM></TSCREEN>
and it should work.<p>
If you own a graphire, use gpm > 1.18.1 instead and use<p>
for the relative (mouse-like) mode:
<TSCREEN><EM>
killall gpm ; gpm -t wacom -o relative -m /dev/ttyS0
</EM></TSCREEN>
for the absolute (tablet-like) mode:
<TSCREEN><EM>
killall gpm ; gpm -t wacom -o absolute -m /dev/ttyS0
</EM></TSCREEN>
<P>Of course, you get only the buttons and the movement
function, pressure and tilt are not supported because they are not too useful
in text-based applications. <newline>
There is no support for ultrapad macro buttons or graphire mouse wheel.
<P>
If you use gpm and XFree86, you may or may not run in problems, because
normally a device can be opened only by one program at a time. There are two
solutions for that:
<P>
<ITEMIZE>
<ITEM>
The gpm repeater mode. If you start gpm with the &quot;-R protocol&quot;
option, it will repeat all data it gets
to the device /dev/gpmdata. Let us say, you have a ps2 type mouse and your gpm
call looks like:
<EM>
gpm -t ps2 -Rmman
</EM>
then gpm gets your ps2 mouse data and tries to translate this into a mman
packet, which it will emit to /dev/gpmdata. Unfortunately, gpm can translate to
only a few protocols at the time of writing. Since gpm 1.18.1, these protocols to which can be translated are marked with an asterix at the first column.
Again, do a
<EM>
gpm -t help
</EM>
to get the list.<p>
If you want to omit the translation and only get the data byte for
byte, just call
<EM>
gpm -t ps2 -R raw
</EM>
. You can then make XFree use that second device by putting the line
<EM>
Device "/dev/gpmdata"
</EM>
in your XF86Config in the pointer section or the XInput section.
<P>
<ITEM>
If you use startx, you can modify it that it does a
<EM>
gpm -k
</EM>
before the X-Server is started. This option kills a running gpm.
</ITEMIZE>
<SECT>
Tablets with XFree 3 and XFree 4
<P>
<LABEL id="_Toc465765702">
<SECT1>
Required XFree Version
<P>
<LABEL id="_Toc465765703" >
Minimum
<REF id="_xfree" name="XFree">
version should be 3.3.3.1 because this version has extended XInput support,
the second side switch works now and the blocking mouse effect has been fixed.
<P>
If you must use any prior version, XInput support should be available since
3.1.2.d.
<P>
XInput support in XFree is configured basically in a file called XF86Config.
In most cases the XF86Config file is located in /etc or in /etc/x11. I will
show now two very short configuration sections, the first works with XFree 3, the other is for XFree 4.
I will explain then what can be changed and why this is needed.
<SECT1>
Sample XF86Config snippet for XFree 3
<P>
<LABEL id="_Toc465765705" >
<TSCREEN>
<VERB>
Section "Module"
# Wacom Device Driver
Load "xf86Wacom.so"
EndSection
Section "XInput"
# Settings for Wacom pen
SubSection "WacomStylus" # type of input device
Port "/dev/ttyS0" # Serial Port
DeviceName "Pen1" # Name, choose it free
Baudrate 9600 # Usable only for intuos
Mode Absolute # Map Tablet Area to Screen
AlwaysCore # See text
HistorySize 200 # Buffer size for motion events
EndSubSection
# Settings for Wacom eraser
SubSection "WacomEraser" # type of input device
Port "/dev/ttyS0" # Serial Port
DeviceName "Eraser1" # Name, choose it free
Baudrate 9600 # Usable only for intuos
Mode Absolute # Map Tablet Area to Screen
AlwaysCore # See text
HistorySize 200 # Buffer size for motion events
EndSubSection
# Settings for Wacom cursor (mouse)
SubSection "WacomCursor" # type of input device
Port "/dev/ttyS0" # Serial Port
DeviceName "Cursor" # Name, choose it free
Baudrate 9600 # Usable only for intuos
Mode Absolute # Map Tablet Area to Screen
AlwaysCore # See text
HistorySize 200 # Buffer size for motion events
EndSubSection
EndSection
</VERB>
</TSCREEN>
<SECT1>
Sample XF86Config snippet for XFree 4
<P>
<LABEL id="_Toc465765705a" >
<TSCREEN>
<VERB>
# declare input devices, later defined
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "pen1" "AlwaysCore"
InputDevice "eraser1" "AlwaysCore"
InputDevice "cursor1" "AlwaysCore"
EndSection
Section "Module"
Load "extmod"
Load "xie"
Load "pex5"
Load "glx"
Load "dri"
Load "GLcore"
Load "dbe"
Load "record"
Load "wacom" # Wacom Device Driver
EndSection
# Settings for wacom pen
Section "InputDevice"
Identifier "pen1"
Driver "wacom"
Option "Type" "stylus"
Option "Device" "/dev/ttyS0"
Endsection
# Settings for wacom eraser
Section "InputDevice"
Identifier "eraser1"
Driver "wacom"
Option "Type" "eraser"
Option "Device" "/dev/ttyS0"
Endsection
# Settings for wacom cursor (mouse)
Section "InputDevice"
Identifier "cursor1"
Driver "wacom"
Option "Type" "cursor"
Option "Device" "/dev/ttyS0"
Endsection
</VERB>
</TSCREEN>
<SECT1>
Syntax Difference between XFree 3 and XFree 4<p>
<LABEL id="_Toc465765705b" >
Please notice the different syntax between
XFree 3 and XFree 4: <newline>
In XFree 3 configuration is done in the section "XInput" with one subsection for each device. XFree 3 has keywords.<newline>
In XFree 4 configuration is done with one section "InputDevice" for each device. All Settings are "options", with one exception: the identifier statement. The Alwayscore option goes to the Serverlayout section.<p>
Because the usage can be seen from the above examples, this difference will be considered
as clear for the rest of the document.
<SECT1>
Section Module
<P>
<LABEL id="_Toc465765706" >
XInput support in XFree is reached due to the use of modules. The wacom device
driver module file for XFree 3 is called
<REF id="_driverlepied" name="xf86Wacom.so">, for XFree 4 the filename changed to wacom_drv.o.
The files are located usually in /usr/X11R6/lib/modules/ or in /usr/X11R6/lib/modules/input. We have to specify
in the &quot;Module&quot; section that we want to load this driver (look at above snippets):<p>
XFree 3: Load &quot;xf86Wacom.so&quot; <newline>
XFree 4: Load &quot;wacom&quot;<p>
This has to appear only once per XF86Config file.
<SECT1>
Device Type (XF3) and Type (XF4)
<P>
<LABEL id="_Toc465765707">
A physical device can be:
<ITEMIZE>
<ITEM>
The tip of your pen
<ITEM>
The eraser of your pen
<ITEM>
A mouse like the Wacom products lens cursor, 4d-mouse, graphire-mouse
<ITEM>
The airbrush
</ITEMIZE>
<P>
The penpartner and graphire products simply recognize the type of a device,
but they can not distinguish them. For example, you can not use two different
pens, say, one configured red and one configured blue - all what these
products say is: &quot;I found a pen tip on my surface&quot;, or &quot;I found
an Eraser on my surface&quot;, or &quot;I found a mouse on my surface&quot;.
<P>
XInput maps the device types to devices, these device types are later
specified in XF86Config. For XFree 3 this is a subsection in the
section XInput, for XFree 4 this goes to individuell InputDevice sections.
<newline>The devicetypes are:
<ITEMIZE>
<ITEM>
<TT>
WacomStylus
</TT>
Tip of a pen or airbrush
<ITEM>
<TT>
WacomEraser
</TT>
Eraser of a pen or airbrush
<ITEM>
<TT>
WacomCursor
</TT>
Mice, like graphire mouse, lens cursor, 4d-mouse
</ITEMIZE>
As you can see from above examples, device types are specified with the keyword
&quot;Devicetype&quot; in XFree 3 and with Option &quot;Type&quot; in XFree 4.
<SECT1>
DeviceName (XF3) and Identifier (XF4)
<P>
<LABEL id="_Toc465765708" >
You must give every configured device a unique name. This name will be used
later in your program to talk to that device. You can choose this name free.
This statement is mandantory.
In XFree 3 you will use the &quot;Devicename&quot; keyword, in XFree 4 you will use the Identifier &quot;name&quot; keyword. Please notice that Identifier is not an Option !
<SECT1>
Port (XF3) and Device (XF4)
<P>
<LABEL id="_Toc465765709" >
XInput wants to know at which serial port this device can be found. This
allows me to use two different tablets at the same time, for example a graphire
connected to /dev/ttyS0 and a penpartner connected to /dev/ttyS1.<p>
<sect2>
USB Tablets
<P>
USB is treated as a serial line too,
so this statement is mandantory. If you connect your product to the USB, you have to specify this with
<REF id="_Toc465765USB" name="Option USB">.
<LABEL id="_Tocdevusb">
<p>
<bf>Example how to use the USB-Port (XF4):</bf>
<p>
<tscreen><verb>
Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/event0"
Option "Type" "stylus"
Option "Mode" "absolute"
Option "USB" "on"
Option "Tilt" "on"
EndSection
</verb></tscreen>
<p>
<sect2>
Switching The Mouse Off
<p>
Most people use both, the mouse and the tablet for core pointer functions.
However, if you want to switch your mouse off and only will use your tablet, here comes the trick for that:<newline>
First, specify AllowMouseOpenFail in section ServerFlags.
Then set the device to a file which must
not exist (fake or dummy). Do not set it to /dev/null as this will eat up
your CPU-time.
<p>
<bf>Example how to switch off the mouse (XF3):</bf>
<p>
<tscreen><verb>
Section "Pointer"
Device "/dev/fake" #Phony device file
...
EndSection
</verb></tscreen>
<p>
<bf>Example how to switch off the mouse (XF4):</bf>
<p>
<tscreen><verb>
Section "ServerLayout"
...
InputDevice "Mouse0" "CorePointer"
...
EndSection
Section "InputDevice"
Identifier "Mouse0"
...
Option "Device" "/dev/fake" #Phony
#device file
Endsection
</verb></tscreen>
<SECT1>
DebugLevel
<P>
<LABEL id="_Toc465765710" >
This statement controls how verbose the Wacom driver is. The Level goes from 0 to
10. If this statement is not given, DebugLevel 0 is used, which logs the very
less.
<P>
<bf>Example (XFree 3):</bf>
<TSCREEN>
<VERB>
SubSection "WacomStyLus" # Pen
DeviceName "PenRed" # Name, choose it free
...
DebugLevel 10 # be very verbose
...
EndSubSection
</VERB>
</TSCREEN>
<bf>Example (XFree 4):</bf>
<TSCREEN>
<VERB>
Section "InputDevice"
Identifier "PenRed" # Name, choose it free
Option "Type" "stylus"
...
Option "DebugLevel" "10" # be very verbose
...
EndSection
</VERB>
</TSCREEN>
<SECT1>
Serial Num (intuos series only)
<P>
<LABEL id="_Toc465765711" >
The intuos product is more efficient than penpartner and graphire because it
can distinguish many devices of the same type. This means that it is now
possible to use two pens, one configured red and one configured blue. As you
see, the use of device types is not enough information to handle different
pens. Therefore, each intuos device, be it a pen, ink pen, mouse, or whatever
has a serial number, which you can specify to aid XInput in resolving the
right device. This would look like:
<bf>Example (XFree 3):</bf>
<TSCREEN>
<VERB>
Section "XInput"
SubSection "WacomStylus" # Pen
DeviceName "PenRed" # Name, choose it free
...
Serial 2609917443 # Serial Number of that device
...
EndSubSection
SubSection "WacomStylus" # another Pen
DeviceName "PenBlue" # Name, choose it free
...
Serial 2609918664 # Serial Number of that device
...
EndSubSection
EndSection
</VERB>
</TSCREEN>
<P>
<bf>Example (XFree 4):</bf>
<TSCREEN>
<VERB>
Section "InputDevice"
Identifier "PenRed" # Name, choose it free
Option "Type" "stylus"
...
Option "Serial" "2609917443"
...
EndSection
Section "InputDevice"
Identifier "PenBlue" # Name, choose it free
Option "Type" "stylus"
...
Option "Serial" "2609918664"
...
EndSection
</VERB>
</TSCREEN><p>
It should be said that combined input devices like pens have only one serial
number. The driver uses the serial number it gets to recognize one specific pen
and the device type to distinguish the tip of that specific pen from its
eraser.
<P>
<SECT2>
How to find out the serial number of a device
<LABEL id="_Toc465765712">
<P>
<ENUM>
<ITEM>
Set DebugLevel to 6
<ITEM>
Start the X-Server by typing
<EM>
X 2&gt;t
</EM>
<ITEM>
Tip all devices down on the tablet and make a notice of the order you tipped
them.
<ITEM>
Kill the X-Server (usually Ctrl+Alt+Backspace)
<ITEM>
Do a
<EM>
grep serial_num t
</EM>
</ENUM>
<P>
You should get a list of your different numbers.
<P>
<SECT2>
Serial Num - Example of what has been logged (XFree 3)
<LABEL id="_Toc465765713">
<P>
<TSCREEN>
<VERB>
BEGIN xf86WcmProc dev=0x8354d60 priv=0x833e3f0 type=stylus flags=9 what=1
xf86WcmProc pWcm=0x8354d60 what=ON
END xf86WcmProc Success what=1 dev=0x8354d60 priv=0x833e3f0
device_id=0x96 serial_num=2595227137 type=cursor
[cursor] abs prox=false x=0 y=0 z=0 button=false buttons=0
</VERB>
</TSCREEN>
(serial_num is in Line 4 Word 2).<P>
<SECT1>
Mode absolute, Mode relative
<P>
<LABEL id="_Toc465765714" >
If you set a device in mode absolute, this means, that the active area of the
tablet will be mapped to the screen. Every time you go down to the tablet at
the same point with an absolute device the pointer will appear at the same
point of the screen.
<P>
If you set a device in mode relative, you will get the well known behavior of a
mouse. This means, that if you take the mouse off from the surface, move it and
go down again, the pointer does (ideally) not move.
<P>
<bf>Example (XFree 3):</bf>
<TSCREEN>
<VERB>
Section "XInput"
SubSection "WacomStylus" # Pen
DeviceName "PenRed" # Name, choose it free
...
Mode absolute
...
EndSubSection
EndSection
</VERB>
</TSCREEN><p>
<bf>Example (XFree 4):</bf>
<TSCREEN>
<VERB>
Section "InputDevice"
Identifier "PenRed" # Name, choose it free
Option "Type" "stylus"
...
Option "Mode" "absolute"
...
EndSection
</VERB>
</TSCREEN><p>
<SECT1>
Device Modes Extension, Core, AlwaysCore
<P>
<LABEL id="_Toc465765715" >
XFree knows two pointers: one with only the standard features (buttons,
moving-capabilities), which is used for selecting menus, text, clicking buttons
and doing other controlling stuff. This is the <em>Core Device</em>.
<P>
The other pointer is used by applications which want more information, like
pressure and tilt.
<NEWLINE>
This is the extension device.
<P>
Starting with version 3.3.3.1, the Statement AlwaysCore tells the driver that it should send
both types of events.<P>
If you do not specify Alwayscore in your XF86Config, then this device is
initially used as extension device, this means it is usable only in applications but you can not
control the menus of your window manager with it.
<P>
If Alwayscore is given, then your device acts as core pointer (in addition to the mouse) as well as it sends tilt and pressure information to applications which opened the device in extension mode.
<P>
You can configure two different logical devices, one in Core-Mode and one in
Extension-Mode, to the same physical device.<newline>
To do so, simply type two identical sections, only the DeviceName statement must differ. Then specify AlwaysCore
only for the last section.
<P>
<bf>Example (XFree 3):</bf>
<TSCREEN>
<VERB>
Section "XInput"
SubSection "WacomStylus" # Pen
DeviceName "PenRed" # Name, choose it free
...
AlwaysCore
...
EndSubSection
EndSection
</VERB>
</TSCREEN><p>
For XFree 4, this is not an option in the InputDevice section, it goes to the Serverlayout section and
can be one of: AlwaysCore / SendCoreEvents or CorePointer:
<bf>Example (XFree 4):</bf>
<TSCREEN>
<VERB>
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
...
InputDevice "icursor" "AlwaysCore"
EndSection</VERB>
</TSCREEN><p>
<SECT1>
HistorySize
<P>
<LABEL id="_Toc465765716" >
This statement sets the buffer size that is used to cache motion events.
<p><bf>Example (XFree 3):</bf>
<TSCREEN>
<VERB>
Section "XInput"
SubSection "WacomStylus" # Pen
DeviceName "PenRed" # Name, choose it free
...
HistorySize 200
...
EndSubSection
EndSection
</VERB>
</TSCREEN><p>
<bf>Example (XFree 4):</bf>
<TSCREEN>
<VERB>
Section "InputDevice"
Identifier "PenRed" # Name, choose it free
Option "Type" "stylus"
...
Option "HistorySize" "200"
...
EndSection
</VERB>
</TSCREEN><p>
<SECT1>
Suppress
<P>
<LABEL id="_Toc465765717" >
This statement specifies how many units the device must move before the driver
moves the pointer. This can be necessary if very large resolutions are used.
<p><bf>Example (XFree 3):</bf>
<TSCREEN>
<VERB>
Section "XInput"
SubSection "WacomStylus" # Pen
DeviceName "PenRed" # Name, choose it free
...
Suppress 10
...
EndSubSection
EndSection
</VERB>
</TSCREEN><p>
<bf>Example (XFree 4):</bf>
<TSCREEN>
<VERB>
Section "InputDevice"
Identifier "PenRed" # Name, choose it free
Option "Type" "stylus"
...
Option "Suppress" "10"
...
EndSection
</VERB>
</TSCREEN><p>
<SECT1>
TiltMode (XF3) and Tilt (XF4)
<P>
<LABEL id="_Toc465765718" >
This works only with intuos series tablets.<newline>
TiltMode enables sending of tilt information for intuos devices. If this
statement is missing, only pressure information is transferred.
<p><bf>Example (XFree 3):</bf>
<TSCREEN>
<VERB>
Section "XInput"
SubSection "WacomStylus" # Pen
DeviceName "PenRed" # Name, choose it free
...
TiltMode
...
EndSubSection
EndSection
</VERB>
</TSCREEN><p>
<bf>Example (XFree 4):</bf>
<TSCREEN>
<VERB>
Section "InputDevice"
Identifier "PenRed" # Name, choose it free
Option "Type" "stylus"
...
Option "Tilt" "on"
...
EndSection
</VERB>
</TSCREEN><p>
<SECT1>
MaxX, MaxY, MaxZ (since alpha 20)
<P>
<LABEL id="_Toc465765max" >
Max[axis] limits / owerwrites the max[axis] values normaly retrieved from the tablet.
More or less developer stuff.
<P>
<SECT1>
ResolutionX, ResolutionY, ResolutionZ (since alpha 20)
<P>
<LABEL id="_Toc465765res" >
Resolution[axis] presets the resolution[axis] values normaly retrieved from the tablet.
More or less developer stuff.
<P>
<SECT1>
TopX, TopY, BottomX, BottomY Statements
<P>
<LABEL id="_Toc465765719" >
These four statements allow to reduce the active area of the tablet. My intuos
A4 oversize, for example, is so big that you can not do painting work with it
because the ways of the pen are too long. I use these four Statements to tell
the driver that it should map only the lower left quarter of the tablet to the
screen.<newline>
It is possible to define more than one active area on the same tablet:
Define as many subsections as you need with the same Port Statement but with
different Top... statements and Devicenames. This results in multiple logical
devices all of them restricted to their individual bounds. You may use
one device in absolute mode and one in relative mode as well.<P>
<bf>Example (XFree 3):</bf>
<TSCREEN>
<VERB>
Section "XInput"
SubSection "WacomStylus" # Pen
DeviceName "PenRed" # Name, choose it free
...
TopX 0
TopY 5000
BottomX 5000
BottomY 10000
...
EndSubSection
EndSection
</VERB>
</TSCREEN><p>
<bf>Example (XFree 4):</bf>
<TSCREEN>
<VERB>
Section "InputDevice"
Identifier "PenRed" # Name, choose it free
Option "Type" "stylus"
...
Option "TopX" "0"
Option "TopY" "5000"
Option "BottomX" "5000"
Option "BottomY" "10000"
...
EndSection
</VERB>
</TSCREEN><p>
<SECT2>
Getting the maximal X, Y Values, current configuration, and the resolution
<P>
If you use the above four statements, you sometimes want to make some
calculations on the size and position of the rectangle to be defined. Often
the maximal tablet coordinates and the resolution are needed for this. To get
these values, start your server: <EM>
X 2&gt;t
</EM>.
Kill the X-Server (usually Ctrl+Alt+Backspace)
and do a
<EM>
grep &dquot;X=&dquot; t
</EM>
.You should get back the values in question.
<P>
<SECT2>Getting Resolution - Example of what has been logged<P>
<TSCREEN>
<VERB>
(--) Wacom IV tablet maximum X=5103 maximum Y=3711 X
resolution=1000 Y resolution=1000 suppress=6
(--) Wacom tablet top X=0 top Y=0 bottom X=5103 bottom Y=3711
(--) Wacom tablet top X=0 top Y=0 bottom X=5103 bottom Y=3711
(--) Wacom tablet top X=0 top Y=0 bottom X=5103 bottom Y=3711
</VERB>
</TSCREEN>
<P>
<SECT1>
KeepShape
<P>
<LABEL id="_Toc465765720">
This option uses the TopX, TopY statements (or their built in defaults, if
omitted) and adjusts the BottomX, BottomY statements so that
<ITEMIZE>
<ITEM>
The ratio height / width of the screen is the same ratio on the tablet
<ITEM>
The active area starting at TopX, TopY of the tablet is as big as it can be
with the above condition.
</ITEMIZE>
<P>
Any given BottomX, BottomY statement is ignored, because these values will be
calculated.
<P>
<bf>Example (XFree 3):</bf>
<TSCREEN>
<VERB>
Section "XInput"
SubSection "WacomStylus" # Pen
DeviceName "PenRed" # Name, choose it free
...
KeepShape
...
EndSubSection
EndSection
</VERB>
</TSCREEN><p>
<bf>Example (XFree 4):</bf>
<TSCREEN>
<VERB>
Section "InputDevice"
Identifier "PenRed" # Name, choose it free
Option "Type" "stylus"
...
Option "KeepShape" "1"
...
EndSection
</VERB>
</TSCREEN><p>
<SECT1>
Threshold
<P>
This is available since alpha 16 and is used to control the minimum pressure that is needed
to detect that a tool is pressed on the surface. It works with intuos and
graphire. Please note that the integer value has to be coded as String,
unlike all other integer values.<P>
<bf>Example (XFree 3):</bf>
<TSCREEN>
<VERB>
Section "XInput"
SubSection "WacomStylus" # Pen
DeviceName "PenRed" # Name, choose it free
...
Threshold "5"
...
EndSubSection
EndSection
</VERB>
</TSCREEN><p>
<bf>Example (XFree 4):</bf>
<TSCREEN>
<VERB>
Section "InputDevice"
Identifier "PenRed" # Name, choose it free
Option "Type" "stylus"
...
Option "Treshold" "5"
...
EndSection
</VERB>
</TSCREEN><p>
<SECT1>
USB (since alpha 20)
<P>
<LABEL id="_Toc465765USB" >
USB tells the driver that the serial line is the usb port.
This needs a Kernel 2.4 with usb enabled.
Alpha 20 driver only supports absolute devices.
<REF id="_Tocdevusb" name="Here"> is an example for use with XFree 4.<newline>
Please read the <HTMLURL url="http://perso.club-internet.fr/tiamat/computer/howto/Wacom_USB-Mini_HOWTO.html" name="Wacom-USB-mini-HOWTO"> by Arnauld Claden and the <HTMLURL url="http://www.best.com/~sem/linux/wacom/" name="USB-'Micro-HOWTO' by Semyon Sosin"> for more information on USB setup.
<P>
<SECT>
Changing configuration from within a running X-Server
<P>
<LABEL id="_Toc465765721">
<SECT1>
Setting up the Gimp to use XInput devices
<P>
<LABEL id="_Toc465765722" >
<REF id="_gimp" name="Gimp">
has built-in XInput support since Version 1.1.x.
<P>
Gimp must know which devices it should use and in what mode. You have to open
the
<EM>
File/Dialogs/Input Devices
</EM>
- dialog for setting this up. You will find two listbox-controls at the top of
that window labeled
<EM>
Device
</EM>
and
<EM>
Mode
</EM>
. Choose the device to set up from the
<EM>
Device
</EM>
control and choose a mode from the
<EM>
Mode
</EM>
-control.
<P>
The modes are:
<ITEMIZE>
<ITEM>
disabled: Gimp does not use this device.
<ITEM>
window: <newline>
Gimp uses this device, the cursor is drawn by the application. The cursor can not leave the active window.
The active area of the tablet is mapped to this window.
<ITEM>
screen:<newline>
Gimp uses this device. The cursor is drawn by the X-Server. The cursor can move over the whole screen.
The active area of the tablet is mapped to the screen.
</ITEMIZE>
<P>
If you see two cursors linked to your device, you have two solutions:
<ITEMIZE>
<ITEM>
Use mode screen but you may or may not loose the special gimp-tool cursors; If
so, all cursors will be replaced by the pen cursor.
<ITEM>
Configure two different devices in the XF86Config file, one
<EM>
AlwaysCore
</EM>
and one not. Tell gimp to use the later one in mode window. If you do so and
have one of the statements
<EM>
TopX, TopY, BottomX, BottomY
</EM>
in your XF86Config, take care to use the same adjustments for that statements in
both logical devices. If you do not, then you get confused because X draws a
cursor of the one device while the other is active. the effect of this is a
cursor, very far away from the point of action (hotspot).
</ITEMIZE>
<P>
Below the two listbox-controls there is a tab-control with the two register
tabs
<EM>
Axes
</EM>
and
<EM>
Keys
</EM>
.
<EM>
Axes
</EM>
assigns an axis a function, it is mostly not necessary to change this. But
think about a touch-screen device which is built in a table rotated by 90
degrees, then you might want to swap the x and y axis.
<P>
Some tablets have so called macro keys at the top which may hold some often used functions. The <LABEL id="_macrokeys">
<EM>
Keys
</EM>
tab lets you assign a character to a macro key. For example, you can put Ctrl+Shift+R, to a macro key. If you
activate this key, then the rulers are toggled. <newline>
The current Wacom driver supports only the macro keys of the ultrapad series,
the macro area of the intuos products is not yet usable for that.
<P>
Now we should talk about how the devices can be used. Open the
<EM>
File/Dialogs/Device Status
</EM>
-dialog. Open an image.
<P>
You set up each device independently from each other in gimp.
<P>
If you move the cursor with different devices in the image window you can see
the devices change in the Device Status dialog. If you pick a tool, brush,
pattern or color with a device, again the changes are reflected in the dialog.
You can save the settings in the Status Dialog, so that they will be restored
before your next session.
<P>
<SECT1>
The Switch Device
<P>
<LABEL id="_Toc465765723" >
This is a special device that is always present. It generates an event every
time a new device becomes the core pointer. It has a pseudo &dquot;axis&dquot;.
The &quot;value&quot; of this axis is the id of the core pointer device. I do
not know what a user can do with it - this is mainly helpful for internal use.
<SECT1>
Buttons
<P>
<LABEL id="_Toc465765724">
The buttons of the devices are as different as the devices are:
<NEWLINE>
A pen has at least a tip, but it may have one or two side switches and an
eraser. A mouse may have up to 32 buttons (but usually 3). Buttons are numbered
from 1 to the number of buttons. With the next two utilities you can change, to
what number a button is mapped.
<SECT1>
Button Mapping with xmodmap for Devices in Core Mode
<P>
<LABEL id="_Toc465765725" >
xmodmap will only modify the Core Pointer. As there is only one Core pointer at
a time, it makes no difference between the physical devices which may become
the Core Pointer. You may set this device manually with <em>xsetpointer device</em>.<p>
For the moment, let us forget the whole XInput stuff and
think of a left-hander who just wants to swap the left and right mouse buttons.
You would execute
<EM>
xmodmap -pp
</EM>
to look what the current assignment is. You
should get the following table back:
<TSCREEN>
<VERB>
Physical Button
Button Code
1 1 # ( Left Button )
2 2 # ( Right Button )
3 3 # ( Middle Button )
</VERB>
</TSCREEN>
<P>
To swap the buttons, you do a
<EM>
xmodmap -e &dquot;pointer = 2 1 3&dquot;
</EM>
, and to get
back,
<EM>
xmodmap -e &dquot;pointer = default&dquot;
</EM>
. This should work with every device
with at least two buttons. Note that the term
<EM>
&dquot;pointer = x x x&dquot;
</EM>
has to be quoted
to prevent it from being changed by the shell.
<SECT1>
Button Mapping with xinput for Devices in Extension Mode
<P>
<LABEL id="_Toc465765726" >
Back to XInput now. If you use the gimp, you may want to change the button
mapping for each device separately (may be you are happy with the mouse but
want to swap the two side-switches of the pen). Frederic Lepied has written a
utility called
<REF id="_XInput" name="xinput">
for that.
<P>
To swap the side-switches, you would do a
<EM>
xinput list
</EM>
to get a list of the
devices and their current settings. Swapping is done with
<EM>
xinput
set-button-map Pen1 1 3 2
</EM>
where
<EM>
Pen1
</EM>
is the Device to change.
<P>
Starting with XFree 3.3.2 this works also with devices that
are configured
<EM>
AlwaysCore
</EM>
in XF86Config.
<SECT1>
xsetmode - changing absolute / relative mode
<P>
<LABEL id="_Toc465765727">
<P>
With xsetmode you can change the mode of a device between absolute and relative.
<P>
<bf>Example:</bf><newline>
<EM>
xsetmode GraphireMouse ABSOLUTE
</EM>
.
<SECT1>
xsetpointer - setting the default core device
<P>
<LABEL id="_Toc465765728" >
If you have none of your devices configured
<EM>
AlwaysCore
</EM>
and you want
a device to become the core-pointer, then xsetpointer must be used.
<P>
Do a
<EM>
xsetpointer Devicename
</EM>
. The old core-device (usually the
mouse) is not usable anymore and the one you specified should be active. For
example I can make the graphire mouse the standard core device from within a
running XFree.
<P>
<EM>
xsetpointer -l
</EM>
lists all devices and the modes they are in.
<SECT1>
Keys
<P>
<LABEL id="_Toc465765729" >
Some devices have macro keys or pads on them, to which a scancode or string may be
assigned. This works only for devices in extension mode and is therefore done
in the application you want use the keys with.<p>
<EM>xinput -l</EM> gives information about the number of keys and things
like the first scancode.<p>
<SECT1>
Utilities to use more than one tablet and for toggle support on / off
<P>
<LABEL id="_Toc465765730" >
I own myself 3 tablets of Wacom and use them on my notebook. Whenever no
tablets are connected and
I start X, I have to wait very long until the driver gives up. If xdm is used,
this increases to multiple of that timeouts.
<P>
I have written two utilities which should make live easier with that:
<ITEMIZE>
<ITEM>
The shell script
<BF>
sx
</BF>
for those who use startx.
sx uses the dialog tool to present a nice menu where the user can choose:
<ITEMIZE>
<ITEM>
one of up to 10 devices (tablet, joystick, ...)
<ITEM>
for notebooks, which display to use (internal or external display)
<ITEM>
which window-manager to use
</ITEMIZE>
<P>
<ITEM>
The small gtk-application
<BF>
xinput-chooser
</BF>
for those who use xdm.
xinput-chooser presents the user a menu whenever the xdm login screen is shown,
from which one of up to ten different configurations can be chosen.
</ITEMIZE>
<P>
The concept behind this is that a XF86Config file is split in at least a
XF86Config.bare file, which holds the information common to all configurations,
and various snippets, each of them holding the special information for a
particular configuration.
<P>
The two utilities will then concat the parts back to a working configuration.
<P>
You can get this packet from
<HTMLURL url="http://www.runkel-it.de/download" name="http://www.runkel-it.de/download">
, it is named xinput_chooser_sr.
<SECT>
XFree FAQ - Problems And Questions
<P>
<LABEL id="_xfreefaq">
<SECT1>
Gnome and Gimp only work like a usual mouse, without pressure and tilt.
Gimp Input Devices Dialog shows &dquot;No Input Devices&dquot;
<P>
It seems that you have not compiled your gtk with XInput-support.
Please rebuild gtk and use <em>./configure --with-xinput=xfree</em> for building the Makefile. Then do a <em>make && make install</em>. Then rebuild your gimp
so that it uses this extendet gtk.
<SECT1>
Is the wheel of the mouse (cursor) supported ?
<P>
Yes, it generates button 4 and button 5 events.
<SECT1>
How can I find out the intuos Serial Num of my tool ?
<P>
read the section about <REF id="_Toc465765712" name="Serial_Num">
<SECT1>
How do I change the action of each button of my tool?
<P>
Read the section about <REF id="_Toc465765724" name="buttons">.
<SECT1>
How can I use the intuos/artpad/ultrapad macro area ?
<P>
You can not use the intuos macro area, sorry. <newline>
Only Artpad / Ultrapad Macro stripes work.
Read the section about <REF id="_macrokeys" name="Gimp Keys">.
<SECT1>
Is it possible to define multiple active areas on the same tablet ?
<P>
Yes, read the section about the <REF id="_Toc465765719" name="Top... Statements">
<SECT1>
Can I use more than one tablet at the same time ?
<P>
Yes, read the <REF id="_Toc465765709" name="'Port and Device' section">
<SECT1>
The Wacom Driver eats my CPU Time. Any Hint ?
<P>
This mostly happes under the following condition:<newline>
AllowMouseOpenFail was specified and the device is set to /dev/null.
Set the device to a nonexisting file instead, for example /dev/fake, and you
will get back your CPU time. See the examples for this under
the <REF id="_Toc465765709" name="'Port and Device' section">.<p>
Another reason may be that there were too many interrupts produced.<newline>
I was told, that hdparm -u1 /dev/hdx (replace x with your drive letter) may help.
<sect1>
The Cursor 'dances' around
<P>
Most Graphire's are known to be weak for that, intuos seems to be better but
still not perfect. This seems to be a hardware problem.<newline>
Possible Solutions:<p>
<itemize>
<item>Put your tablet as far as possible away from all emitting devices like
monitors, printers, computers, AC-adapters.
<item>Use a modified driver with a filter algorythm. Many of them are in development right now but none of them seem to be the cruncher.
<item>If using an IDE drive, try hdparm -u1 /dev/hdx (replace x with your drive letter)
</itemize>
<SECT>
Gpm FAQ - Problems And Questions
<P>
<LABEL id="_gpmfaq">
<SECT1>
NCurses programs only support cut and paste with my new gpm
<P>
You probably mixed a new gpm with an old gpm library.
Or You use an old client which searches the socket gpmctl in /var/run
instead in /dev. In the later case you have two options: get new clients
and recompile them or change gpm.h so that it uses /var/run instead of /dev
and recompile gpm and libgpm.<P>
<SECT>
Further Information / Used Documents
<P>
<LABEL id="_Toc465765731">
<P>
gpm:
<NEWLINE>
gpm man page, gpm FAQ, source code file mice.c
<P>
XInput:
<NEWLINE>
XInput HOWTO by Owen Taylor
<P>
XFree and Wacom:
<NEWLINE>
XF86Config man page
<P>
Frederic Lepied's site
<P>
<HTMLURL url="http://perso.club-internet.fr/tiamat/computer/howto/Wacom_USB-Mini_HOWTO.html" name="Wacom-USB-mini-HOWTO"> by Arnauld Claden
<P>
<HTMLURL url="http://www.best.com/~sem/linux/wacom/" name="USB-'Micro-HOWTO'"> by Semyon Sosin (intuos related)<P>
much, much, e-mails...
</ARTICLE>