LDP/LDP/howto/linuxdoc/Wacom-USB-mini-HOWTO.sgml

606 lines
20 KiB
Plaintext

<!doctype linuxdoc system>
<!-- LinuxDoc file was created by LyX 1.0 (C) 1995-1999 by <tiamat> Thu Jun 1 17:18:06 2000
-->
<article>
<title>Wacom Graphire USB Mini-HOWTO
</title>
<author>Arnaud Claden
</author>
<date>01 June 2000
</date>
<abstract>This is the Wacom Graphire USB Mini-HOWTO. This document describes how
to setup a Wacom Graphire USB tablet for use with Linux (console and X), starting
with the kernel configuration to the application level. But information should
be accurate for the Intuos USB tablet.
</abstract>
<toc>
<sect>Copyright
<p>Copyright (c) 2000 by Arnaud Claden &lt;tiamat@club-internet.fr&gt;
</p>
<p>This document describes the installation of Wacom tablets under linux.
You may use, disseminate, and reproduce this document freely, provided you:
</p>
<p>
<enum>
<item>Do not omit or alter this copyright notice.
<item>Do not omit or alter the version number and date.
<item>Do not omit or alter the document's pointer to the current WWW version.
<item>Clearly mark any condensed, altered or modified versions as such.
</enum></p>
<sect>Introduction
<p>This document is a guide to getting your Wacom Graphire USB tablet to working
with Linux. Beware, this is a quite difficult task, but this guide will guide
you, step-by-step, through the process.
</p>
<p>This work is mainly derived from the Wacom Tablet HOWTO by Stephan Runkel,
but brings some precisions about all the USB configuration that is absent from
the original document. If you want more precision about general Wacom Tablets,
please read Stephan Runkel's HOWTO.
</p>
<p>I have written this document because I've had many difficulties in setting
up my brand new Graphire tablet with Linux, but now it works quite well on
my Toshiba 4030CDT Laptop.
</p>
<sect1>New versions of this document
<p>New version of this document will be made available at the following location
:
</p>
<p>http://perso.club-internet.fr/tiamat/computer/howto/Wacom_USB-Mini_HOWTO.html
</p>
<sect1>Feedback and Corrections
<p>Comments, corrections, and additions will greatly be appreciated. I can
be contacted at:
</p>
<p>&lt;tiamat@club-internet.fr&gt;
</p>
<sect1>Acknowledgements
<p>I wish to thank everyone that work on the USB part of the kernel, and special
thanks go to Vojtech Pavlik for his work on the wacom module.
</p>
<p>Of course, I thank Stephan Runkel for his great Wacom Tablet HOWTO that
helped me much in the configuration process.
</p>
<p>Special thanks also go to Frederic Lepied for his work on the xf86Wacom
module.
</p>
<sect1>Disclaimer
<p>The information in this document is correct to the best of my knowledge,
but there's a always a chance I've made some mistakes, so don't follow everything
too blindly, especially if it seems wrong. Nothing here should have a detrimental
effect on your computer, but just in case I take no responsibility for any
damages incurred from the use of the information contained herein.This document
is not a kernel howto, so I'll take the assumption that you know how to download/install
a new kernel, and how to configure/compile it.
</p>
<sect>Requirements
<sect1>Hardware
<p>The main part is, of course, a computer with at least one USB port and
a Wacom Graphire USB tablet.
</p>
<sect1>Kernel
<p>I've used the latest development kernel for my installation : linux-2.3.99-pre6.
It's quite stable and has all the necessary features. You can also find some
downports, which are patches for old 2.2.x kernels. You can find all the infos
on the backport at http://www.suse.cz/development/usb-backport
</p>
<sect1>Console Software
<p>For the Linux console, the only program you need is gpm, available at ftp://ftp.prosa.it/pub/gpm
</p>
<sect1>XWindow
<p>For having all the abilities of your tablet, you'll need to use XInput.
More specifically you'll need the xf86Wacom.so module (that is shipped with
the most recent versions of XFRee86 starting from 3.3.5). Alternately, you
may need the xf86WacomUSB.so, which is a work-in-progress of adapting the original
xf86Wacom.so to use the USB. I'll speak of it later in this document.
</p>
<sect1>Others
<p>The applications supporting XInput are :
</p>
<p>
<enum>
<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. You can obtain Gimp from http://www.gimp.org
<item>gsumi - a simple B/W drawing program that supports drawing / erasing with
pressure and tilt sensitivity. Get it from the gsumi web page: http://www.gtk.org/&tilde;otaylor/gsumi/
<item>xink (By Ralph Levien) - another rudimentary drawing program for X. xink
is available from: ftp://kiwi.cs.berkeley.edu/pub/raph/xink.tar.gz
<item>RasMol - a molecular visualization program that supports a hardware dial
box using XInput. look at http://www.umass.edu/microbio/rasmol/distrib/rasman.htm
.
<item>xinput (by Frederic Lepied) - a very useful utility for configuring and
testing XInput devices. xinput is available from: ftp://ftp.x.org/contrib/utilities/xinput-1.2.tar.gz
</enum></p>
<sect>Kernel and hard stuff
<sect1>Kernel configuration
<p>Like I said earlier, the options I'll give come from the 2.3.99pre6 kernel.
If everything is not exactly the same, I think that taking a good guess should
help ;)
</p>
<p><bf>** Reminder : &lsqb;&rsqb; stands for Yes/No options, and &lt;&gt; stands
for Yes/No/Module **</bf>
</p>
<p>First of all, you have to enable the experimental code :
</p>
<p><bf>Code Maturity level options ---&gt;</bf>
</p>
<p><bf>&lsqb;*&rsqb; Prompt for development and/or incomplete code/drivers
</bf>
</p>
<p>If you don't, you won't have access to some of the drivers.
</p>
<p>Then, move on to the USB section.
</p>
<p><bf>USB support ---&gt;</bf>
</p>
<p><bf>&lt;*&gt; Support for USB</bf>
</p>
<p><bf>&lsqb;*&rsqb; USB verbose debug messages</bf>
</p>
<p><bf>--- Miscellaneous USB options</bf>
</p>
<p><bf>&lsqb;*&rsqb; Preliminary USB device filesystem</bf>
</p>
<p>With this option, you'll activate the new features of the /dev/usb/* (which,
of course, you'll have to create : to be seen later)
</p>
<p><bf>--- USB controllers</bf>
</p>
<p><bf>&lt;*&gt; UHCI (Intel PIIX4, VIA, ...) support</bf>
</p>
<p><bf>&lt; &gt; OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support</bf>
</p>
<p>You must choose one of these, and only one. So, if one doesn't work, then
choose the other. Chances are that, if you use an x86 system, you'll take the
UHCI driver.
</p>
<p><bf>--- USB Devices</bf>
</p>
<p><bf>&lt; &gt; USB Printer support</bf>
</p>
<p><bf>&lt; &gt; USB Scanner support</bf>
</p>
<p><bf>&lt; &gt; USB Audio support</bf>
</p>
<p><bf>&lt; &gt; USB Modem (CDC ACM) support</bf>
</p>
<p>If you have one of these, feel free to activate the options
</p>
<p><bf>&lt;M&gt; USB Serial Converter support</bf>
</p>
<p>This options must be activated for the Wacom tablet to work.
</p>
<p><bf>&lsqb;*&rsqb; USB Generic Serial Driver</bf>
</p>
<p><bf>&lsqb; &rsqb; USB Handspring Visor Driver</bf>
</p>
<p><bf>&lsqb; &rsqb; USB ConnectTech WhiteHEAT Serial Driver (EXPERIMENTAL)
</bf>
</p>
<p><bf>&lsqb; &rsqb; USB FTDI Single Port Serial Driver (EXPERIMENTAL)</bf>
</p>
<p><bf>&lsqb; &rsqb; USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)
</bf>
</p>
<p><bf>&lsqb; &rsqb; USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)</bf>
</p>
<p><bf>&lsqb;*&rsqb; USB Serial Converter verbose debug</bf>
</p>
<p>If you want to have all the messages (which can be very helpful in the
beginning). When satisfied with the functionning, you can deactivate it.
</p>
<p><bf>&lt; &gt; USB Kodak DC-2xx Camera support</bf>
</p>
<p><bf>&lt; &gt; USB Mustek MDC800 Digital Camera support (EXPERIMENTAL)</bf>
</p>
<p><bf>&lt; &gt; USB Mass Storage support (EXPERIMENTAL)</bf>
</p>
<p><bf>&lt; &gt; USS720 parport driver</bf>
</p>
<p><bf>&lt; &gt; DABUSB driver</bf>
</p>
<p><bf>&lt; &gt; PLUSB Prolific USB-Network driver (EXPERIMENTAL)</bf>
</p>
<p><bf>&lt; &gt; USB ADMtek Pegasus-based device support (EXPERIMENTAL)</bf>
</p>
<p><bf>&lt; &gt; USB Diamond Rio500 support (EXPERIMENTAL)</bf>
</p>
<p><bf>--- USB HID</bf>
</p>
<p>The HID is kinda the interface between you and your devices, so you MUST
activate it.
</p>
<p><bf>&lt;M&gt; USB Human Interface Device (HID) support</bf>
</p>
<p><bf>&lt; &gt; USB HIDBP Keyboard support</bf>
</p>
<p><bf>&lt; &gt; USB HIDBP Mouse support</bf>
</p>
<p><bf>&lt;M&gt; Wacom Intuos/Graphire tablet support</bf>
</p>
<p>There we go, the Wacom support should be activated (unless you read this
just for fun ;) )
</p>
<p><bf>&lt; &gt; Logitech WingMan Force joystick support</bf>
</p>
<p><bf>&lt; &gt; Keyboard support</bf>
</p>
<p><bf>&lt;M&gt; Mouse support</bf>
</p>
<p>To be activated to use the Wacom Intuos/Graphire mouse
</p>
<p><bf>(1024) Horizontal screen resolution</bf>
</p>
<p><bf>(768) Vertical screen resolution</bf>
</p>
<p><bf>&lt;M &gt; Joystick support</bf>
</p>
<p><bf>&lt;M&gt; Event interface support</bf>
</p>
<sect1>Kernel compilation
<p>Now the easy stuff :
</p>
<p>When you exit the configuration do as they say
</p>
<p><bf>make dep bzImage modules modules_install</bf>
</p>
<p>Type it just like this and the computer will run all the steps one after
the other.
</p>
<p>Then copy the file bzImage to /boot, copy the System.map to /boot, edit
your lilo.conf to point to your new kernel and type <bf>/sbin/lilo</bf> at the prompt.
</p>
<p><bf>** Of course all of this (kernel config, kernel compilation and lilo tweaking
must be done as root) **</bf>
</p>
<sect1>Before rebooting
<sect2>FStab
<p>If you want to avoid error messages at the next reboot, you'll have to
do the following :
</p>
<p>Edit the file /etc/fstab and add the following lines
</p>
<p><bf>none /proc/bus/usb usbdevfs defaults 0 0
</bf>
</p>
<p>This one is to activate the usb device filesystem
</p>
<p><bf>none /var/shm shm defaults 0 0
</bf>
</p>
<p>This one is because of a change in the shared memory stuff in the kernel.
</p>
<sect2>USB related devices
<p>Next, if you want to be able to use the USB :
</p>
<p><bf>mkdir /dev/input</bf>
</p>
<p><bf>mknod /dev/input/mouse0 c 13 32</bf>
</p>
<p>This will activate the mouse support
</p>
<p><bf>mknod /dev/input/event0 c 13 64</bf>
</p>
<p><bf>mknod /dev/input/event1 c 13 65</bf>
</p>
<p><bf>mknod /dev/input/event2 c 13 66</bf>
</p>
<p><bf>mknod /dev/input/event3 c 13 67</bf>
</p>
<p>These will activate the stylus : moves, pressure, button and eraser.
</p>
<sect2>Modules configuration
<p>Edit the file /etc/modules.conf and add the following line :
</p>
<p><bf>alias char-major-13 usbcore</bf>
</p>
<sect2>What I did next
<p>Next I added in the /etc/rc.d/boot.local file (remember, I use a SuSE distribution,
but you should fine an equivalent for RedHat in /etc/rc.d/init.d/boot.local
or /etc/rc.d/init.d/rc.local)
</p>
<p><bf>/sbin/modprobe wacom</bf>
</p>
<p><bf>/sbin/modprobe mousedev</bf>
</p>
<p><bf>/sbin/modprobe evdev</bf>
</p>
<p>Just to be sure the modules will load at boot time.
</p>
<sect2>Last but not least
<p>Reboot ;)
</p>
<p>Check your boot messages (<bf>dmesg | less</bf>), and see if there are no errors
related to USB. It may be because you've chosen UHCI and your system is an
OHCI one.
</p>
<p>On my system, the following messages are shown :
</p>
<p><bf>..... </bf>
</p>
<p><bf>..... </bf>
</p>
<p><bf>usb.c: registered new driver usbdevfs </bf>
</p>
<p><bf>usb.c: registered new driver hub </bf>
</p>
<p><bf>usb-uhci.c: &dollar;Revision: 1.9 &dollar; time 17:54:28 May 8 2000
</bf>
</p>
<p><bf>usb-uhci.c: High bandwidth mode enabled </bf>
</p>
<p><bf>usb-uhci.c: Intel USB controller: setting latency timer to 0 </bf>
</p>
<p><bf>usb-uhci.c: USB UHCI at I/O 0xffe0, IRQ 11 </bf>
</p>
<p><bf>usb-uhci.c: Detected 2 ports </bf>
</p>
<p><bf>usb.c: new USB bus registered, assigned bus number 1 </bf>
</p>
<p><bf>usb.c: USB new device connect, assigned device number 1 </bf>
</p>
<p><bf>usb.c: kmalloc IF c3fcd2e0, numif 1 </bf>
</p>
<p><bf>usb.c: new device strings: Mfr=0, Product=2, SerialNumber=1 </bf>
</p>
<p><bf>usb.c: USB device number 1 default language ID 0x0 </bf>
</p>
<p><bf>Product: USB UHCI Root Hub </bf>
</p>
<p><bf>SerialNumber: ffe0 </bf>
</p>
<p><bf>hub.c: USB hub found </bf>
</p>
<p><bf>hub.c: 2 ports detected </bf>
</p>
<p><bf>hub.c: ganged power switching </bf>
</p>
<p><bf>hub.c: standalone hub </bf>
</p>
<p><bf>hub.c: global over-current protection </bf>
</p>
<p><bf>hub.c: power on to power good time: 2ms </bf>
</p>
<p><bf>hub.c: hub controller current requirement: 0mA </bf>
</p>
<p><bf>hub.c: port 1 is removable </bf>
</p>
<p><bf>hub.c: port 2 is removable </bf>
</p>
<p><bf>hub.c: local power source is good </bf>
</p>
<p><bf>hub.c: no over-current condition exists </bf>
</p>
<p><bf>hub.c: enabling power on all ports </bf>
</p>
<p><bf>usb.c: hub driver claimed interface c3fcd2e0 </bf>
</p>
<p><bf>..... </bf>
</p>
<p><bf>..... </bf>
</p>
<p><bf>hub.c: port 1 connection change </bf>
</p>
<p><bf>usb.c: USB new device connect, assigned device number 2 </bf>
</p>
<p><bf>usb.c: kmalloc IF c3fcd620, numif 1 </bf>
</p>
<p><bf>usb.c: skipped 1 class/vendor specific interface descriptors </bf>
</p>
<p><bf>usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0 </bf>
</p>
<p><bf>usb.c: USB device number 2 default language ID 0x409 </bf>
</p>
<p><bf>Manufacturer: WACOM </bf>
</p>
<p><bf>Product: ET-0405-UV1.1-1 </bf>
</p>
<p><bf>usb.c: unhandled interfaces on device </bf>
</p>
<p><bf>usb.c: This device is not recognized by any installed USB driver.
</bf>
</p>
<p><bf>Length = 18 </bf>
</p>
<p><bf>DescriptorType = 01 </bf>
</p>
<p><bf>USB version = 1.00 </bf>
</p>
<p><bf>Vendor:Product = 056a:0010 </bf>
</p>
<p><bf>MaxPacketSize0 = 0 </bf>
</p>
<p><bf>NumConfigurations =1 </bf>
</p>
<p><bf>Device Version = 1.11 </bf>
</p>
<p><bf>Device Class:SubClass:Protocol = 00:00:00 </bf>
</p>
<p><bf>Per-interface classes </bf>
</p>
<p><bf>Configuration: </bf>
</p>
<p><bf>..... </bf>
</p>
<p><bf>.....</bf>
</p>
<p>When the kernel says "<bf>This device is not recognized by any installed USB
driver</bf>", it's because, at boot time, the wacom module is not yet loaded. But
as you can see, the whole USB bus and interfaces are recognized. So if your
system doesn't work and doesn't have such messages, try to check if you haven't
forgotten an USB option (something I indicated to be put in the kernel and
that you put as a module : if it's the case, in the <bf>/etc/rc.d/init.d/boot.local</bf>,
put the necessary modprobe <bf>BEFORE</bf> the 3 lines I indicated, for example <bf>/sbin/modprobe
usb-uhci</bf>).
</p>
<p>When the wacom module loads, here are the messages :
</p>
<p><bf>..... </bf>
</p>
<p><bf>..... </bf>
</p>
<p><bf>usb.c: registered new driver wacom </bf>
</p>
<p><bf>input0: Wacom Graphire on usb2 </bf>
</p>
<p><bf>usb.c: wacom driver claimed interface c3fcd620 </bf>
</p>
<p><bf>mouse0: PS/2 mouse device for input0 </bf>
</p>
<p><bf>mice: PS/2 mouse device common for all mice </bf>
</p>
<p><bf>event0: Event device for input0 </bf>
</p>
<p><bf>..... </bf>
</p>
<p><bf>.....</bf>
</p>
<p>Retry and check everything until you get all these messages (or corresponding
ones).
</p>
<sect>The Linux console
<p>Now that you have your USB activated, it's just about time to try it all
with gpm :
</p>
<p>If gpm is activated at boot time, you'll have to kill it : <bf>gpm -k</bf>
</p>
<p>Then try your Wacom tablet : <bf>gpm -tIMPS/2 -m /dev/input/mouse0</bf>
</p>
<p>Move your stylus, or your mouse, and TADA ... the cursor moves on the screen.
</p>
<sect>XWindow
<sect1>Having 2 mouses on the same system
<p>Have you ever dreamed of having 2 mouses on your system ? If the answer
is yes, do the following.
</p>
<p>Edit the file <bf>/etc/XF86Config</bf>
</p>
<p>The modules section should look like this
</p>
<p><bf>Section "Module"</bf>
</p>
<p><bf>Load "xf86Wacom.so"</bf>
</p>
<p><bf>EndSection</bf>
</p>
<p>Then check the XInput section :
</p>
<p><bf>Section "XInput"</bf>
</p>
<p><bf>SubSection "Mouse"</bf>
</p>
<p><bf>DeviceName "WacomTablet"</bf> --&gt; or whatever you like
</p>
<p><bf>Protocol "IMPS/2"</bf> --&gt; I didn't manage to have imwheel recognize the wheel,
but if you do, drop me an email
</p>
<p><bf>Port "/dev/input/mouse0"</bf>
</p>
<p><bf>Buttons 5</bf>
</p>
<p><bf>ZAxisMapping 4 5</bf>
</p>
<p><bf>AlwaysCore</bf> --&gt; means that the Wacom mouse is always considered as the
core pointer, ie if you move your normal mouse or the Wacom mouse (or stylus),
it'll be just the same.
</p>
<p><bf>EndSubSection</bf>
</p>
<p><bf>EndSection</bf>
</p>
<p>And there you are, the Wacom mouse (or stylus) is now considered as a second
mouse, but your normal one still works.
</p>
<sect1>Now on to the real stuff
<p>Back to the XInput section, after the parameters for the mouse, here is
the real Wacom stuff :
</p>
<p><bf>SubSection "WacomStylus"</bf>
</p>
<p><bf>Port "/dev/input/event0"</bf> --&gt; the USB event device
</p>
<p><bf>DeviceName "WacomStylus"</bf> --&gt; or whatever you want to call it
</p>
<p><bf>Mode Absolute</bf> --&gt; ie the tablet surface is equivalent to the screen
surface
</p>
<p><bf>&num;Suppress 6</bf>
</p>
<p><bf>DebugLevel 10</bf> --&gt; once everything works, set it to 0
</p>
<p><bf>&num;TiltMode</bf>
</p>
<p><bf>&num;HistorySize 200</bf>
</p>
<p><bf>&num;AlwaysCore</bf>
</p>
<p><bf>&num;KeepShape</bf>
</p>
<p><bf>&num;TopX 20412</bf> --&gt; the 4 lines are used to fine-tune the coordinate
to fit with the screen
</p>
<p><bf>&num;TopY 14730</bf>
</p>
<p><bf>&num;BottomX 0</bf>
</p>
<p><bf>&num;BottomY 0</bf>
</p>
<p><bf>EndSubSection</bf>
</p>
<p><bf>SubSection "WacomEraser"</bf>
</p>
<p><bf>DeviceName "/dev/input/event0"</bf>
</p>
<p><bf>DeviceName "WacomEraser"</bf>
</p>
<p><bf>Mode Absolute</bf>
</p>
<p><bf>EndSubSection</bf>
</p>
<p><bf>SubSection "WacomCursor"</bf>
</p>
<p><bf>Port "/dev/input/event0"</bf>
</p>
<p><bf>DeviceName "GraphireMouse"</bf>
</p>
<p><bf>Mode Absolute</bf>
</p>
<p><bf>EndSubSection</bf>
</p>
<sect1>The new module
<p>The xf86Wacom.so is not specifically written for the USB tablets, and it's
even not working correctly with these tablets. A new driver has been written
by Matsumura Namihiko &lt;po-jp@geocities.co.jp&gt; has written one named xf86WacomUSB
(available as source code at the same location than this Mini-HOWTO). However,
to be able to compile it, you'll need the kernel source code and the source
tree for XFree86 (I compiled it with success against XFree86 3.3.5, but it
should compile with 3.3.6).
</p>
<p>This driver doesn't handle all the possibilities of the tablet, and crashes
if you pass it the <bf>AlwaysCore</bf> parameter.
</p>
<p>To correct this, I'll keep in touch with Frederic Lepied for a modification
of the original module to have it handle all of the possibilities of the tablet.
</p>
<p><bf>**NEWS** At Frederic Lepied's site, you'll find a link to a new USB driver
that works perfectly well, but exclusively with the possibility to have your
tablet working as a mouse : ie either you use your tablet in The Gimp to draw,
or you use it as an XFree mouse, but not both together. I'll investigate further,
and update this document accordingly.</bf>
</p>
<sect>Further documentation
<p>For more information about Wacom tablets in general, try the great Wacom
tablet HOWTO from Stephan Runkel &lt;runkel@runkeledv.de&gt; : http://www.linuxdoc.org/HOWTO/Wacom-Tablet-HOWTO.html
</p>
<p>About the xf86Wacom.so, check Frederic Lepied's &lt;lepied@xfree86.org&gt;
: http://www.lepied.com/xfree86
</p>
<p>xf86WacomUSB.so, available at ftp://ftp.aros.org/pub
</p>
</article>