Linux Wacom Project HOWTO Navigation:
MAIN NEXT INDEX ALL
Copyright (C) 2002-2004 - John E. Joganic
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled
GNU Free Documentation License.
This document began in November 2002 as a HOWTO for setting up a USB
Wacom Intuos2 on Redhat 8.0. It has since grown to cover all Wacom
tablets, USB and serial, running on various different Linux
distributions. As of December 2002, this project has transformed into
the Linux Wacom Project. Work on this
document is on-going so if you find an error, have a question, or have
something to add, please send an email to:
linuxwacom-discuss@lists.sf.net.
Originally, this document dealt only with Redhat 8.0. I will extend this
to cover as many different distributions as possible, but I can personally
only test on machines at my disposal. At present, that means Redhat 8.0,
9.0, and Mandrake 9.0. If you have success stories for a distribution or
version not mentioned, let me know so I can update the document.
In terms of document organization, if you have not figured it out already,
you can browse the document one page at a time, or you can click on the
ALL link and view the entire
thing in one long page.
Where the guide differs between distributions or packages, I have added a
comment which appears indented with a light blue background.
Also, it bears mentioning since it's a detail often missed: there are
two drivers in the Linux Wacom Project- wacom.o and wacom_drv.o. The first
driver is the USB kernel driver. The second driver is the XFree86 Wacom
driver. Serial users need only be concerned with the wacom_drv.o driver.
USB users need both. If you try to use the wacom_drv.o driver in place of
the wacom.o kernel driver or visa-versa, things generally won't work.
Next, this document was written with the
assumption that you are starting from
scratch with a relatively recent distribution of the Linux kernel. Also,
if you have already added lines to your XFree86 configuration file
(XF86Config or XF86Config-4),
you should comment them out and restart X. Since we'll be stepping through
the entire process, we need X to ignore the tablet until we're ready.
Otherwise, X will just get in the way.
Finally, if you know what you're doing, you can leave your X settings
intact, print this out, switch to runlevel 3, and follow along from the
console. The newer packages should have an HTML version of this
document in the docs directory. And of course, there's always
lynx for the gurus out there, which is
why this document is written out in plain vanilla HTML.
| The
Linux Wacom Project | This site hosts the current version of this
document as well as drivers, development tools, and mailing lists. |
| Lepied's Wacom XInput
driver for XFree86 | This page contains the original driver and
some additional help for serial tablet users. |
| Lepied's
Wacom Mailing List Archive | This is an archive of Lepied's driver
mailing list. This list is mostly deprecated, with new lists being available
at SourceForge.net. Also, you are forewarned that posting directly to the
mailing list web page does not mail to the list. Many posts are missed this
way. |
| Subscribe to
Lepied's Wacom Mailing List | If you want to post to the old list,
this link will subscribe you. All new traffic, including announcements,
discussion, and development related issues is now on the linuxwacom-announce,
linuxwacom-discuss, and linuxwacom-devel mailing lists hosted at SourceForge.
See the Linux Wacom Project
web page for details. |
| Dean Townsley's Linux on the Acer Travelmate C100 |
This page contains the steps to setup, install, and configure an Acer Travelmate
C100, one of the Tablet PCs with Wacom digitizer. |
|
Stefan Runkel's
Wacom Tablet HOWTO | This page is a bit old, but it covers
a lot of details that I mention only briefly. Good reading, even if it
is possibly outdated. |
| Wacom Webpage |
The Wacom web site contains little information about the Linux drivers,
but you can look at their nifty new tablets. |
| pxh: Graphire
USB | This page is devoted to a Graphire-specific XFree86
driver. |
| A
Webpage Dealing with Cintiq (Wacom PL-500 in particular) on Linux |
This website deals with getting the Cintiq running. Code for the serial
and USB Cintiq tablets is available in linuxwacom 0.5.4-beta and 0.6.0. |
| Wacom
Intuos USB Micro-HOWTO | An older webpage which may not be relevent
anymore, but was useful to me when I got started. |
|
Wacom
Intuos USB on Linux | Another page that was useful to me when I
started. |
| Wacom
Software Developer Support | This page contains some documentation
for the older tablets. |
Wacom tablets are available in serial and USB configurations. They are
also sold as embedded products in certain tablet PC's. I will cover all
three types, but the serial case is the most straightforward,
so we'll start there.
Serial Tablet Operation - The Short Story
When a Wacom serial tablet is connected to a COM port, software can
interact with it directly by opening the appropriate device, usually
/dev/ttyS0. The XFree86 Wacom driver (wacom_drv.o) does precisely this,
and all stylus movements are converted into XInput events for programs
like the Gimp to turn into fluid brush strokes.
Wacom tablets are capable of handling a number of different data
protocols, and the Linux Wacom Project code currently utilitizes two,
Wacom Protocol IV and Protocol V. Each operates with a fixed-sized
packet, the length of which depends on the model and ROM version.
When the serial tablet is reset, it defaults to a standard baud rate,
often 9600 baud. From there, the device type can be queried, and if the
tablet supports it, the baud rate increased to a higher value. Additionally,
model parameters like tablet size can be queried directly to determine
which features are available.
Once configured, the tablet streams data back to the application as
tools are brought into and out of proximity, are pressed against the
tablet surface, or are tilted or inverted.
USB Tablet Operation - The Long Story
Initially at least, the USB Wacom tablet is an HID compliant device, and when
first connected to the computer, will identify itself as such.
Unfortunately, this is not what you want because in this mode, you will not
get any of the fancy features. The hid-core.c, mousedev.c, and usbmouse.c kernel
drivers contain exceptions for the wacom; when the device is detected, they ignore
the tablet. In this way, the more sophisticated wacom driver has the
opportunity to assume control.
The first thing that the driver does is register itself with the USB
subsystem and wait for work to do. When the user plugs the device in, or
the device is first detected, the USB subsystem shops the vendor and
device identifier around, checking it against different drivers. The
wacom driver takes responsibility for the tablet and then notifies the
event system that it will be providing data. It then asks the tablet to
switch from HID-compliant mode to "mode 2", a wacom-specific protocol which
allows for values like pressure, Z rotation,
and tilt. As information arrives, the wacom driver dutifully converts
the data into real-world values and hands it on to the event system.
From here, any usermode application can get access to the event data
by opening /dev/input/event0. A stream of events including mouse movements,
clicks, and proximity updates can be read from the device. Similar to the
serial case, XFree86's Wacom driver (wacom_drv.o) has the ability to read
this device, and performs filtering on the data before convert the Linux
input events into XInput events.
By breaking the responsibility for the data into three distinct levels,
the kernel code remains simple and robust, the applications generalized,
and the fancy features commonly accessible to all GUI applications in the
X window system itself. This document walks down the entire data path from
the USB kernel driver to the gimp application.
Embedded Device Operation - Tablet PC with Wacom Digitizer
The Wacom digitizers embedded in Tablet PCs utilitizes a special
protocol IV, ISDV4. Similar to the conventional serial tablets,
tablet PCs use a serial controller (UART). But, normally, they are not set
to any serial ports. They are effectively serial devices, but require
special configuration (setserial) under Linux.
This section is devoted to preparing your system for the installation.
Every distribution handles kernel modules and file locations a bit differently,
so the goal here is to return everything to a known state.
In some cases, your distribution may have automatically loaded certain
modules which you will now need to unload.
USB users will need to pay specific attention to discussions related to
kernel drivers and modules. Serial tablet users have it much easier, and
can bypass this. Both users will need to make changes to the XFree86
configuration file.
Incidentally, some distributions detect new hardware on boot. If you
allow Redhat's "anaconda" for instance
to automatically configure (or remove) your USB tablet, it may undo some of
the settings you will make here. Until Redhat's installation program
recognizes Wacom tablets as non-HID devices by default, you are best off in
my opinion to not allow it to configure the device. Just a warning.
From the beginning, let's make certain that we are on the
same page. First, unplug your serial or USB Wacom. If you have Wacom
related lines in your XF86Config or XF86Config-4 files already, you should
comment them out or remove them. In particular, this includes InputDevice
sections with a driver set to "wacom" and their corresponding InputDevice
lines in ServerLayout. When that's done, restart X.
It would be a wise idea at this time to check your XFree log file for
references to wacom, wcm, or tablet. If X persists in trying to interact
with the tablet, things will only be problematic later. The log file is
often found at /var/log/XFree86.0.log.
The remaining instructions deal with unloading old USB driver modules
from the kernel. Serial users can skip forward to the
Downloading the Code page.
USB users should unload the old modules.
[jej@ayukawa jej]$ su -
[root@ayukawa root]# lsmod | grep wacom
wacom 8020 0 (unused)
input 5920 0 [evdev wacom mousedev keybdev hid]
usbcore 77024 1 [wacom usb-storage snd printer hid usb-uhci]
[root@ayukawa root]# rmmod wacom evdev
The kernel now knows nothing about the Wacom or how to handle event-based
input devices. If you get an error unloading (busy driver perhaps), try
rebooting.
Check the presence of the input devices in the /dev/input directory.
You should find approximately 114 devices with names such as event*, mouse*,
keyboard, js*, and ttyACM*.
On some distributions, Mandrake 9.0 for instance, the /dev directory is
managed by devfs; Redhat 8.0 does not use it. When devfs is running, the
/dev/input directory may be present, but its contents may be missing if
the evdev driver is not loaded. This is perfectly fine. If you are not
using devfs and the /dev/input directory or mouse0/event0 devices are not
present, your distribution may be lacking these devices. This could be an
oversight, or it could be an indication that your distribution is too old.
I believe you can verify whether devfs is running by executing mount
and looking for "none on /dev type devfs (rw)" or similar.
We are interested in two devices, mouse0 and event0.
[root@ayukawa root]# cd /dev/input
[root@ayukawa input]# ls -la mouse0 event0
crw------- 1 root root 13, 64 Aug 30 16:31 event0
crw------- 1 root root 13, 32 Aug 30 16:31 mouse0
[root@ayukawa input]# xxd mouse0
xxd: mouse0: No such device
[root@ayukawa input]# xxd event0
xxd: event0: No such device
If after executing xxd mouse0 you did not
receive the "xxd: mouse0: No such device" message, then the input device
is still loaded; go back and try running rmmod evdev again.
Once the new drivers are compiled and installed, this command will stream
information from the Wacom tablet. mouse0 behaves like a PS/2 style mouse.
event0 provides extensive information about the tablet including position,
tilt, pressure, and buttons. It can also track at least two different tools
simultaneously (Intuos and Intuos2).
The file linuxwacom-0.6.2.tar.bz2 is the stable package and contains
files that you will need to get your serial or USB tablet working. The
current beta package linuxwacom-0.5.4-beta.tar.bz2 is also available and may be
used by people who are willing to risk an occasional kernel panic to help
test new features. I will never put a beta package on this site that I am
not running myself on my primary development machine, so you can be certain
that if there are any obvious show stoppers, they will be fixed before you
get to see them.
Unpacking the tarball is usually a one-step process, but I show both
steps in case the typical -jxf option doesn't work with tar.
[jej@ayukawa jej]$ bunzip2 linuxwacom-0.6.2.tar.bz2
[jej@ayukawa jej]$ tar -xf linuxwacom-0.6.2.tar
[jej@ayukawa jej]$ cd linuxwacom-0.6.2
Once in the package directory, you need only to configure and build the code.
This is described in more detail as you continue. The executables and
wacom_drv.o are installed automatically; the kernel drivers have different
installation procedures depend on the kernel source you use.
If you are interested, the following tables contain the package contents
and release dates. Otherwise, let's continue.
Stable files included for linuxwacom-0.6.2:
| File | Comment |
| configure | - configure script for distribution independent builds |
| prebuilt/wacom_drv.o_4.2k2.4 | - binary XFree86 wacom driver for XFree86 4.2 and kernel 2.4 |
| prebuilt/wacom_drv.o_4.2k2.6 | - binary XFree86 wacom driver for XFree86 4.2 and kernel 2.6 |
| prebuilt/wacom_drv.o_4.3k2.4 | - binary XFree86 wacom driver for XFree86 4.3 and kernel 2.4 |
| prebuilt/wacom_drv.o_4.3k2.6 | - binary XFree86 wacom driver for XFree86 4.3 and kernel 2.6 |
| src/wacom.c | - a stable, working kernel driver |
| src/wacdump.c | - a simple program for displaying tablet event data directly using ncurses |
| src/xidump.c | - a diagnostic program for displaying XInput event data |
| src/wacscrn.c | - curses library for wacdump |
| src/wactablet.c | - wacom tablet library for wacdump |
| src/wacusb.c | - wacom USB protocol library for wacdump |
| src/wacserial.c | - wacom serial protocol library for wacdump |
| src/wactablet.h | - wacom tablet library for wacdump |
| src/wacusb.h | - wacom USB protocol library for wacdump |
| src/wacserial.h | - wacom serial protocol library for wacdump |
| src/2.4/usbmouse.c | - replacement kernel driver for kernel older than 2.4.22 (tested on 2.4.18/19/20), use only if needed |
| src/2.4/hid-core.c | - replacement kernel driver for kernel older than 2.4.22 (tested on 2.4.18/19/20), use only if needed |
| src/2.4/evdev.c | - replacement kernel driver for kernel older than 2.4.22 (tested on 2.4.18/19/20), use only if needed |
| src/2.4/mousedev.c | - replacement kernel driver for kernel older than 2.4.22 (tested on 2.4.18/19/20), use only if needed |
| src/2.4/input.c | - replacement kernel driver for kernel older than 2.4.22 (tested on 2.4.18/19/20), use only if needed |
| src/2.4.22/usbmouse.c | - replacement kernel driver for kernel 2.4.22 or newer (tested on 2.4.22/23/24), use only if needed |
| src/2.4.22/hid-core.c | - replacement kernel driver for kernel 2.4.22 or newer (tested on 2.4.22/23/24), use only if needed |
| src/2.4.22/evdev.c | - replacement kernel driver for kernel 2.4.22 or newer (tested on 2.4.22/23/24), use only if needed |
| src/2.4.22/mousedev.c | - replacement kernel driver for kernel 2.4.22 or newer (tested on 2.4.22/23/24), use only if needed |
| src/2.4.22/input.c | - replacement kernel driver for kernel 2.4.22 or newer (tested on 2.4.22/23/24), use only if needed |
| src/2.6/usbmouse.c | - replacement kernel driver for kernel 2.6.0/1 (tested on 2.6.0), use only if needed |
| src/2.6/hid-core.c | - replacement kernel driver for kernel 2.6.0/1 (tested on 2.6.0), use only if needed |
| src/2.6/evdev.c | - replacement kernel driver for kernel 2.6.0/1 (tested on 2.6.0), use only if needed |
| src/2.6/mousedev.c | - replacement kernel driver for kernel 2.6.0/1 (tested on 2.6.0), use only if needed |
| src/2.6.2/usbmouse.c | - replacement kernel driver for kernel 2.6.2/3 (tested on 2.6.2 and 2.6.3), use only if needed |
| src/2.6.2/hid-core.c | - replacement kernel driver for kernel 2.6.2/3 (tested on 2.6.2 and 2.6.3), use only if needed |
| src/2.6.2/evdev.c | - replacement kernel driver for kernel 2.6.2/3 (tested on 2.6.2 and 2.6.3), use only if needed |
| src/2.6.2/mousedev.c | - replacement kernel driver for kernel 2.6.2/3 (tested on 2.6.2 and 2.6.3), use only if needed |
| src/xf86Wacom.c | - source for wacom_drv.o; requires XFree86 build environment to compile. Binary available in prebuilt directory. |
| src/xf86Wacom.h | - source for wacom_drv.o; requires XFree86 build environment to compile. |
| src/wcmCommon.c | - source for wacom_drv.o; requires XFree86 build environment to compile. Common to USB and serial tablets |
| src/wcmCompat.c | - source for wacom_drv.o; requires XFree86 build environment to compile. XFree86 3.x and 4.x support |
| src/wcmConfig.c | - source for wacom_drv.o; requires XFree86 build environment to compile. Configuration setup |
| src/wcmFilter.c | - source for wacom_drv.o; requires XFree86 build environment to compile. Raw data filters |
| src/wcmFilter.h | - source for wacom_drv.o; requires XFree86 build environment to compile. Raw data filters |
| src/wcmISDV4.c | - source for wacom_drv.o; requires XFree86 build environment to compile. General Tablet PC |
| src/wcmSerial.c | - source for wacom_drv.o; requires XFree86 build environment to compile. Serial tablet support |
| src/wcmSerial.h | - source for wacom_drv.o; requires XFree86 build environment to compile. Serial tablet support |
| src/wcmUSB.c | - source for wacom_drv.o; requires XFree86 build environment to compile. USB tablet support |
| src/xsetwacom.c | - a command line configuration tool for wacom XFree86 driver |
| src/wacomcfg.c | - configuration option library for xsetwacom |
| src/Xwacom.h | - configuration option library for xsetwacom |
| src/wacomxi/wacomcpl-exec | - a graphic configuration tool for wacom XFree86 driver |
| src/wacomxi/wacomxi.c | - calibration library for xsetwacom |
| src/wacomxi/wacomxi.h | - calibration library for xsetwacom |
| prebuilt/install | - installer for the executables and XFree86 wacom driver to a system identical to the development system. |
| prebuilt/uninstall | - unistaller for the executables |
| GPL | - the GNU General Public License, in case you did not already have twenty or more lying around |
Stable Packages by Version and Date:
Beta Packages by Version and Date:
| File | | Date | Comment |
| linuxwacom-0.5.4-beta.tar.bz2 | - | 2003-12-22 | General Tablet PC support. 2.6.0 kernel support. |
| linuxwacom-0.5.3-beta.tar.gz | - | 2003-11-12 | Added wacomcpl utility. 2.4.22 kernel support. TwinView support. |
| linuxwacom-0.5.2-beta.tar.gz | - | 2003-07-10 | Fixed Intuos filter code. 2.5 kernel support. Minor bug fixes. |
| linuxwacom-0.5.1-beta.tar.gz | - | 2003-06-15 | Completely refactored data path, configurability. |
| linuxwacom-0.5.0-beta.tar.gz | - | 2003-02-12 | Updated PL code. Numerous tweaks. |
| linuxwacom-0.3.7-beta.tar.gz | - | 2003-01-26 | Many build related problems fixed. Acer C100 code added. |
| linuxwacom-0.3.6-beta.tar.gz | - | 2003-01-06 | Fixed
unknown report #99, cleaner wacdump refresh fixed 2D mouse buttons for serial
Intuos, updated volito ranges, unknown report no longer error. |
| linuxwacom-0.3.5-beta.tar.gz | - | 2002-12-31 | Fixed unknown report #1, added modprobe, new ID's |
| linuxwacom-0.3.4-beta.tar.gz | - | 2002-12-22 | New name, same as wacpack-0.3.3-beta |
| wacpack-0.3.3-beta.tar.gz | - | 2002-12-22 | Serial Intuos2, serial wacdump, Volito added, USB mouse wheel direction fixed, kernel 2.4.20 friendly |
| wacpack-0.3.2-beta.tar.gz | - | 2002-12-15 | Fix for 4D mice and working beta driver shell |
| wacpack-0.3.1-beta.tar.gz | - | 2002-12-13 | Fix for 2D mice and relative events in wacdump |
| wacpack-0.3.0-beta.tar.gz | - | 2002-11-24 | Configure-based package |
| wacpack-0.1g-beta.tar.gz | - | 2002-11-14 | wacdump updated; displays ranges, cleaner output |
| wacpack-0.1f-beta.tar.gz | - | 2002-11-14 | build environment for xf86Wacom added |
| wacpack-0.1e-beta.tar.gz | - | 2002-11-11 | fixed range for I2-6x8 |
| wacpack-0.1d-beta.tar.gz | - | 2002-11-10 | updated wacdump, fixed range for I2-12x12 |
| wacpack-0.1c-beta.tar.gz | - | 2002-11-09 | updates to range, pressure, and mouse events |
This section describes how to configure the package. You can run the
configure script now as the samples below demonstrate, or later when you reach
the section of the document that explains what specifically needs to be
configured and why. This page is provided largely as a reference.
Versions of linuxwacom-0.2.1 and greater are based on GNU's configure script
based build environment. By default, xidump, wacdump, xsetwacom, and wacomcpl
are built. Additional options include replacement kernel drivers for hid,
mousedev, evdev, and usbmouse as well as building the XFree86 driver from scratch.
Lastly, remember that for every --enable option, there is also an equivalent
--disable option.
In order to build kernel modules, you will need the kernel source installed
on your system. If you are running on Redhat or Mandrake, you can get it by
installing the kernel-source RPM.
The kernel source directory is assumed to be either /usr/src/linux-2.4
or /usr/src/linux. If your kernel sources are elsewhere, you will need to
specify the directory with the --with-kernel option described below.
For kernel 2.6, you need to configure the kernel modules (wacom, hid,
mousedev, usbmouse, evdev) under your kernel source directory before configuring
linuxwacom.
The script attempts to discover if the kernel is using module versioning
by detecting the presence of version numbers in the hid.o module of the
currently active kernel. Recent package versions also check for hid.o.gz
which exist on Mandrake systems. The configure script may not be able to d
etermine if kernel module versioning should be enabled or not, in which case
it will say "unknown, assuming no."
If module versioning is disabled when it should be enabled, depmod will
complain about missing symbols but otherwise, things will probably work fine.
If it is enabled when it should be disabled, the code may not compile,
and it almost certainly will not load properly. If the configure script fails
to determine the correct value, the default action of disabling module
versioning is the better choice, and you can allows enable it manually and
rebuild if depmod complains.
Generally, you will not need to build wacom_drv.o since it ships in
binary form in the prebuilt directory. There are 4 prebuilt binaries for
XFree86 4.2 and 4.3 corresponding to kernel 2.4 and 2.6, respectively. If no
one works for you, building from source may be your only option. See the
Building wacom_drv.o From Scratch page
for more information.
Library Dependencies - ncurses and XLib
Various utilities in the linuxwacom package require not only specific
libraries, but their development header files as well. The ncurses package
is one such example. Most distributions install the ncurses libraries by
default, but the header files are often located in a separate package. You
will need both. On Redhat 8.0, they can be found in the ncurses-devel RPM.
Similarly, if you wish to test your tablet using xidump to view
XFree86 input events, you will need the XFree86 development headers.
On Redhat, they are contained in the XFree86-devel package.
If any packages are missing, the configuration will warn you and disable
building any programs that depend on them.
Processor Type
The processor type is determined by the script and used to build the
kernel modules. If it guesses incorrectly, or you would prefer a different
setting, use the --with-arch option described below.
Linux Specific Features
The Linux wacom driver uses the Linux input subsystem, as does the
USB portions of the XFree86 driver. Consequently, if you are building on a
non-Linux system, the USB code will not work for you. This is detected,
and a comment to that effect is added to the configuration summary. I
recognize that FreeBSD and similar systems have USB support; however,
until someone can bridge the gap between the FreeBSD kernel and the
XFree86 driver, the problem is largely unsolved. Contributions are of
course welcome. The Linux-specific features can be enabled/disabled
using the --with-linux argument.
Configuration Options
The following options are provided as reference. You will probably not
need to use any of these options, but more obscure systems may need all
of them. Each section of the document identifies which options are
necessary and when.
| Option | Default |
Builds |
| --enable-wacom | no |
wacom.o kernel driver |
| --enable-wacdump | yes |
wacdump LinuxInput event monitor |
| --enable-xidump | yes |
xidump XInput event monitor |
| --enable-libwacomcfg | yes |
libwacomcfg Dynamic library for xsetwacom |
| --enable-libwacomxi | yes |
libwacomxi Dynamic library for wacomcpl |
| --enable-xsetwacom | yes |
xsetwacom XFree86 wacom driver configuration comannd |
| --enable-hid | no |
hid.o replacement kernel driver (not normally necessary) |
| --enable-usbmouse | no |
usbmouse.o replacement kernel driver (not normally necessary) |
| --enable-evdev | no |
evdev.o replacement kernel driver (not normally necessary) |
| --enable-mousedev | no |
mousedev.o replacement kernel driver (not normally necessary) |
| --enable-wacomdrv | yes |
wacom_drv.o XFree86 driver (binary is available in prebuilt directory) |
| --enable-modver=yes|no | best guess |
enables kernel module versioning; usually guesses correctly, but
can be enabled or disabled if not |
| --with-kernel=dir | best guess |
Specifies the kernel source directory if configure cannot guess correctl. |
| --with-xf86=dir | none |
Specifies the XFree86 build directory |
| --with-tcl=dir | /usr |
Specifies the tcl directory. The tcl's include and lib directories
should be under this directory. If tcl.h is not in dir/include, it
will be searched under dir directly |
| --with-tk=dir | /usr |
Specifies the tk directory. If tk is under the same directory as tcl,
this option can be eliminated. Otherwise, the tk's include and lib directories
should be under this directory. If tk.h is not in dir/include, it
will be searched under dir directly |
| --with-arch=arch | best guess |
Specifies the architecture if configure guesses incorrectly |
| --with-linux=yes|no | best guess |
Specifies if compiled on a Linux system; USB code is Linux specific |
| --with-xlib=yes|no | best guess |
Specifies if building xlib-based programs; xidump uses XInput headers |
Configuration Samples
Here is a sample output of the script on a Redhat 8.0 system:
[jej@ayukawa linuxwacom]$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
checking for processor type... i686
checking for kernel module versioning... yes
checking for kernel sources... /usr/src/linux
checking for XLib include directory... found
checking for XLib header files... found
...
checking for ncurses.h... yes
...
----------------------------------------
BUILD ENVIRONMENT:
architecture - i686
linux kernel - yes 2.4
module versioning - yes
kernel source - yes /usr/src/linux
XFree86 - no
XLib - yes
TCL - yes /usr
TK - yes /usr
XFree86v3 - no
ncurses - yes
GTK - 2.0.6
BUILD OPTIONS:
wacom.o - no
wacdump - yes
xidump - yes
libwacomcfg - yes
libwacomxi - yes
xsetwacom - yes
hid.o - no
usbmouse.o - no
evdev.o - no
mousedev.o - no
input.o - no
tabletdev.o - no
wacom_drv.o - no
wacom_drv-v3.o - no
----------------------------------------
The configure script is pretty simple, so if you find any problems and
are inclined to fix them, please send me your patch so I can include the
change in future releases.
The following sample command-line will build everything but wacdump
while disabling module versioning. It also has a user-specified kernel
source directory:
[jej@ayukawa linuxwacom]$ ./configure --enable-hid --enable-usbmouse \
--enable-evdev --enable-moudedev --enable-input --enable-wacom \
--with-xf86=/usr/src/redhat/BUILD/XFree86-4.2.0 \
--with-kernel=/home/jej/src/linux --with-tcl=/usr/local/ActiveTcl \
--disable-modver --disable-wacdump
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
checking for processor type... i686
checking for kernel module versioning... yes
checking for kernel sources... /usr/src/linux-2.4
checking for valid XFree86 build environment... ok
...
----------------------------------------
BUILD ENVIRONMENT:
architecture - i686
linux kernel - yes 2.4
module versioning - no
kernel source - yes /home/jej/src/linux
XFree86 - yes /usr/src/redhat/BUILD/XFree86-4.2.0
XLib - yes
TCL - yes /usr/local/ActiveTcl
TK - yes /usr/local/ActiveTcl
ncurses - yes
GTK - 2.0.6
BUILD OPTIONS:
wacom.o - yes
wacdump - no
xidump - yes
libwacomcfg - yes
libwacomxi - yes
xsetwacom - yes
hid.o - yes
usbmouse.o - yes
evdev.o - yes
mousedev.o - yes
input.o - yes
tabletdev.o - no
wacom_drv.o - yes
wacom_drv-v3.o - no
----------------------------------------
Notice that the configure script guessed module versioning was enabled
by default, but was disabled by the command-line option --disable-modver.
Similarly, the wacdump program which is enabled by default was also disabled.
All the kernel modules and the XFree86 wacom driver are enabled.
If the configure script fails to find something that it is looking for,
it may disable some options that you previously enabled on the command-line.
If this happens, check the output for a warning like the following:
***
*** WARNING:
*** Unable to compile wacom_drv.o without XF86 build environment
*** wacom_drv.o will not be built
***
In this particular case, the XFree86 driver was enabled, but the
--with-xf86 option was not specified. Without the build environment,
the module cannot be compiled and was consequently disabled.
If you are comfortable with the root account, paths, the /sbin directory,
and programs like modprobe, you can skip this section. This is largely
to clarify some things for people who are new to Linux and get tripped up
with the root account and paths. This is not meant to be a tutorial, so if
this is over your head, I would recommend reading a book on Linux command line
usage. All examples in this document assume the bash shell.
Many of the procedures in this document need root access, and the
commands that are executed are located in places on the system that are
not normally accessed by typical users. In order to run the modprobe
command, for instance, you must have root access. Additionally, if the
/sbin directory which contains modprobe does not appear in your
path, you must specify the full pathname, /sbin/modprobe, to run the command.
Here is an example of the problem, followed by solutions.
[jej@ayukawa jej]$ modprobe foo
bash: modprobe: command not found
[jej@ayukawa jej]$ locate modprobe
/sbin/modprobe
[jej@ayukawa jej]$ echo $PATH
/bin:/usr/bin: ... :/home/jej/bin
Normal users do not have /sbin in their path, so running modprobe
directly fails. Running the program using the full pathname (/sbin/modprobe)
will solve this, as will adding /sbin to the path. But there is another
problem, as we will see:
[jej@ayukawa jej]$ /sbin/modprobe foo
foo.o: create_module: Operation not permitted
Normal users are not allowed to run this command. For that, we need
to be root. The su command stands for "substitute user" since
it can be used to become any user on the system, but it is generally
known by the incorrect but very memorable mnemonic "superuser."
[jej@ayukawa jej]$ su
Password:
[root@ayukawa jej]# whoami
root
Note the change to the root account, and the additional change from
$ to # on the prompt. I maintain this convention in all the examples in
this document, so if you get an "access denied" error, check the prompt.
You probably need to be root.
Now that we have root access, is /sbin in our path? No. We have only
been granted the privileges of root; we are not really in the root
account's environment. Most notably, the home directory ($HOME) changes,
but the path ($PATH) stays the same. Thus, becoming root is not sufficient to
run modprobe without the full pathname, but does solve the access
problem.
[root@ayukawa jej]# modprobe foo
bash: modprobe: command not found
[root@ayukawa jej]# export PATH=$PATH:/sbin
[root@ayukawa jej]# modprobe foo
[root@ayukawa jej]#
In this example, the user adds the /sbin directory to the path and can run
modprobe normally. export is a bash shell command that changes
aspects of your environment; in this case, /sbin is appended to the path. In
the highly unlikely event that you are using a different shell, which for
novice users seems unwise to me, you would need to use a different command.
Redhat, Mandrake, and similar distributions all use bash by default, so it is
unlikely that you would be using anything else.
At any rate, changing the path is a reasonably good solution, if you can
remember the syntax of the export command.
Another approach to this problem is to do more than just "be root," but to
run in the root account's environment. This is accomplished with the
"su -" command and provides you with root's normal path, including the /sbin
directory. The unfortunate side-effect is that you wind up in root's home
directory, requiring you to cd back to the original directory in
which you were working.
[jej@ayukawa src]$ pwd
/home/jej/src/linuxwacom/src
[jej@ayukawa src]$ su -
[root@ayukawa root]# cd /home/jej/src/linuxwacom/src
[root@ayukawa src]# echo $PATH
/bin:/sbin:/usr/bin: ... :/root/bin
Here, the user starts in the package's src directory, but upon invoking
"su -" is magically shuttled off to root's home directory. A quick
cd back to the package directory and all is better. And, as
demonstrated above, the path conveniently contains /sbin.
So that leaves you with two immediate options, and one potential
long-term option:
Option One: Become root and add /sbin to the path.
[jej@ayukawa src]$ su
[jej@ayukawa src]# export PATH=$PATH:/sbin
Option Two: Become root using root's environment and cd back.
[jej@ayukawa src]$ su -
[root@ayukawa root]# cd /home/jej/src/linuxwacom/src
Option Three (recommended): Add /sbin to your personal account's path
[jej@ayukawa src]$ export PATH=$PATH:/sbin
[jej@ayukawa src]$ su
[root@ayukawa src]# echo $PATH
/bin:/usr/bin: ... :/home/jej/bin:/sbin
By adding the path early in the session, it becomes available every time
you su to root later on. You could also add the export
command to the .bash_profile file in your home directory and have the
path set automatically when you log in.
To exit from the root account and return to your normal account, you can
use the exit command or type Ctrl-D on an empty line.
[root@ayukawa src]# exit
[jej@ayukawa src]$
If any of this is not explained clearly, drop me a line and let me know
where you got stuck. I'd be happy to clarify directly and update this page
for future readers.
Serial tablet users rejoice: you can skip this entire section. Please
go to the Using wacdump page for details on viewing the tablet output.
USB users stay put; we need to tweak your kernel.
Kernel modules must be recompiled for each new kernel so I can't
just provide binaries. By the time you read this, my present kernel
will be entirely out of date with yours.
In any event, many new features are available in the latest drivers
from the Linux Wacom Project, so I wholly recommend using them over the
drivers provided by your standard distribution. Rest assured, efforts
are being made to get these changes merged back into the Linux kernel.
The wacom.c driver that is available in linuxwacom-0.6.2.tar.bz2 has a
number of updates which cannot be found in many distributions yet.
This driver supports the three new tablets: CintiqPartner, Graphire3,
and Volito.
The driver also contains additional debugging code which may be useful in
diagnosing data flow problems of which there are many, unfortunately.
To build the wacom.o kernel module, you need configure the package with
--enable-wacom option. The kernel sources are required as described on
the configuration page. Here's how the configuration should generally look:
[jej@ayukawa linuxwacom]$ ./configure --enable-wacom
...
checking for valid kernel source tree... ok
...
----------------------------------------
BUILD ENVIRONMENT:
architecture - i686
linux kernel - yes 2.4
module versioning - yes
kernel - yes /usr/src/linux
XFree86 - no
XLib - yes /usr/X11R6
TCL - yes /usr
TK - yes /usr
XFree86v3 - no
ncurses - yes
GTK - 2.0.6
BUILD OPTIONS:
wacom.o - yes
wacdump - yes
xidump - yes
libwacomcfg - yes
libwacomxi - yes
xsetwacom - yes
hid.o - no
usbmouse.o - no
evdev.o - no
mousedev.o - no
input.o - no
tabletdev.o - no
wacom_drv.o - no
wacom_drv-v3.o - no
----------------------------------------
As shown above, the kernel directory was detected and the wacom.o
module will be built. If the kernel option shows "no", you will need
to specify the --with-kernel option and the correct directory.
To build the driver, just run make.
The output will be a file called wacom.o. It is located in the
linuxwacom package's src/2.4 directory for versions older than 2.4.22.
For versions 2.4.22 or newer, it is in src/2.4.22 directory. This is
your replacement driver.
To build the wacom.o kernel module, you need to configure wacom as a kernel
module under your kernel source tree first. The kernel sources are required
as described on the configuration page.
Then, you need to configure the package with --enable-wacom option.
Here's how the configuration should generally look:
[jej@ayukawa linuxwacom]$ ./configure --enable-wacom
...
checking for valid kernel source tree... ok
...
----------------------------------------
BUILD ENVIRONMENT:
architecture - i686
linux kernel - yes 2.6.2
module versioning - yes
kernel - yes /usr/src/linux
XFree86 - no
XLib - yes /usr/X11R6
TCL - yes /usr
TK - yes /usr
XFree86v3 - no
ncurses - yes
GTK - 2.0.6
BUILD OPTIONS:
wacom.o - yes
wacdump - yes
xidump - yes
libwacomcfg - yes
libwacomxi - yes
xsetwacom - yes
hid.o - no
usbmouse.o - no
evdev.o - no
mousedev.o - no
input.o - no
tabletdev.o - no
wacom_drv.o - no
wacom_drv-v3.o - no
----------------------------------------
As shown above, the kernel directory was detected and the wacom.o
module will be built. If the kernel option shows "no", you will need
to specify the --with-kernel option and the correct directory.
To build the driver, just run make.
The original wacom.c at your kernel source tree is backed up as
wacom.c.2.6. The wacom.c at linuxwacom package's src/2.6.x is copied to
your kernel source tree. All the building process is done in your kernel
source tree. If everything works properly, you'll see the following from
the make:
[jej@ayukawa linuxwacom]$ make
...
Making all in 2.6.2
make[3]: Entering directory `/home/jej/linuxwacom/src/2.6.2'
if test ! -f /home/jej/linuxwacom/src/2.6.2/wacom.o; then \
cd /usr/src/linux; make; cd /home/jej/linuxwacom/src/2.6.2; \
cp -f /usr/src/linux/drivers/usb/input/wacom.o .; \
fi
make[4]: Entering directory `/usr/src/linux'
make[5]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
CC [M] drivers/usb/input/wacom.o
Kernel: arch/i386/boot/bzImage is ready
Building modules, stage 2.
MODPOST
LD [M] drivers/usb/input/wacom.ko
make[4]: Leaving directory `/usr/src/linux'
make[3]: Leaving directory `/home/jej/linuxwacom/src/2.6.2'
...
The output will be a file called wacom.ko. In the above case, it is
located at /usr/src/linux/drivers/usb/input.
Before we install the wacom driver, we need to test that it will load
properly. We do this by loading the driver manually. We will also
need to be root to do this.
WARNING: there is a small chance that this will bomb your kernel,
so we run sync to write all the stale buffers to the disk. People
using ext3 have little to worry about, but it's always good to be prepared
for the worst. At the very least, save your work.
[root@ayukawa linuxwacom]# sync
From the package's src directory, we unload any previous modules and
load the new one.
[root@ayukawa linuxwacom]# cd src
[root@ayukawa src]# rmmod wacom
[root@ayukawa src]# insmod ./wacom.o # for those about to rock, we salute you.
Well, if you did not bomb, then good. And if you did, well, sorry. So
far, we have not had any reports of this happening, so please send in yours.
Incidentally, if you run "insmod wacom.o" and happen to be in the
wrong directory, the old driver reloads, sometimes without warning. I
therefore changed this to read "insmod ./wacom.o" which seems to prevent
this from happening. To be certain, you can check the log file for the
correct version number.
[root@ayukawa src]# tail /var/log/messages
May 20 20:34:41 ayukawa kernel: usb.c: registered new driver wacom
May 20 20:34:41 ayukawa kernel: Reporting max 30480, 31680
May 20 20:34:41 ayukawa kernel: wacom.c: Setting tablet report for tablet data
May 20 20:34:41 ayukawa kernel: input0: Wacom Intuos2 12x12 on usb2:3.0
May 20 20:34:41 ayukawa kernel: wacom.c: $1.30-j0.6.2 Vojtech Pavlik <vojtech@suse.cz>
May 20 20:34:41 ayukawa kernel: wacom.c: USB Wacom Graphire and Wacom Intuos tablet driver (MODIFIED-DEBUG)
The important detail is the version number. A version number like "1.30"
is an original kernel version and not from the linuxwacom package. The
correct version should also have the -j0.6.2 portion as
well. Also, future versions of the driver will say "LINUXWACOM-DEBUG" or
similar rather than "MODIFIED-DEBUG" as shown above. This is to help
differentiate between the stock kernel driver and those available from the
Linux Wacom Project.
If you get errors inserting the module, then you may need to reconfigure
and build with module versioning disabled. If it loads without a hitch,
move on to the next part.
For Kernel 2.4.x:
To install or not to install, that is the question.
Since the driver is in memory, you can pretty much use it this way
throughout the rest of this document. Anywhere you see
"modprobe wacom", you'll instead need to "insmod ./wacom.o".
You'll also need to be careful that you are in the package's src directory.
If you instead use the less-specific command "insmod wacom.o" from a
directory other than the package's
src directory, insmod will load the driver from the kernel modules
directory instead. The result is that you'll be using the wrong driver.
Why would you not install the driver? Well, for one, you may be using
a beta driver, and if the system crashes (you get an Oops or things come
unglued in other ways), it would be nice to reboot and have the original
drivers load instead.
When should I install the driver? When you're comfortable that the
driver will not crash your system. The linuxwacom tarballs will be marked
as beta if I am not absolutely convinced that they are stable. On the
other hand, the new features will be in beta tarballs before they are
marked stable, so there you have it. For the first time through this document,
I would recommend installing the files found in the stable tarball. If you
really know what you're doing, just load the drivers manually like in the
previous section Testing If wacom.o Will Load (for kernel 2.4 only).
On some distributions, Mandrake included, the wacom.o driver
that appears in the kernel modules directory appears to be compressed. If
you cannot find wacom.o using the method below, try locating wacom.o.gz
instead. People who encountered this problem were able to run gzip on the
module and copy that instead.
Installing the driver requires knowing where it belongs. A
little research will help here. By using the locate command, you
can find all copies of the original driver on the computer.
jej@ayukawa wacom]$ locate wacom.o
/lib/modules/2.4.18-14/kernel/drivers/usb/wacom.o
/lib/modules/2.4.18-18.8.0/kernel/drivers/usb/wacom.o
[jej@ayukawa wacom]$ uname -r
2.4.18-18.8.0
On this computer, there are two kernels installed. uname identifies
the currently active kernel as 2.4.18-18.8.0. The correct driver to replace
is therefore at /lib/modules/2.4.18-18.8.0/kernel/drivers/usb/wacom.o. You
will need to be root to replace this file, and it is a very good idea to
make a backup copy.
[jej@ayukawa wacom]$ su -
[jej@ayukawa root]# cd /lib/modules/2.4.18-18.8.0/kernel/drivers/usb
[jej@ayukawa usb]# cp wacom.o /home/jej/src/wacom/wacom_old.o
[jej@ayukawa usb]# cp /home/jej/src/wacom/wacom.o wacom.o
Here, I've saved the original to wacom_old.o and copied my new driver over it.
You should substitute directory names as appropriate.
NOTE: Don't leave the backup copy in the same directory as the
original. depmod will treat both as valid drivers, regardless
of their names. Copy the original somewhere outside of the kernel module
directory to ensure that this does not happen. In at least one case,
the backup driver was loaded instead of the new one due to a curious
dependency issue.
Finally, it is always a good thing to update the module dependencies.
This is where you find out if the module was compiled without kernel module
versioning. The following command, even if it generates errors is relatively
benign. If it fails, then there is no harm done. It just means that you will
have to load modules in the correct order since the system will not be able to
guess for you.
[jej@ayukawa usb]# depmod -e
If you get no errors and no output, everything is fine, and the module was
compiled, linked, and installed properly. If you received unresolved symbols
like usb_set_idle or printk, then you need to reconfigure with module
versioning enabled and recompile. Or not. As I said, it is not critical.
For Kernel 2.6.x:
[jej@ayukawa wacom]$su
[jej@ayukawa wacom]#cd your-kernel-src-dir
[jej@ayukawa linux]#make install
[jej@ayukawa linux]#make modules_install
[jej@ayukawa linux]#reboot
The original wacom.c from your kernel source was backed up at
your-kernel-src-dir/drivers/usb/input/wacom.c.2.6. If there
is anything wrong with the new wacom driver, do the following:
[jej@ayukawa wacom]$cd your-kernel-src-dir
[jej@ayukawa linux]$cp drivers/usb/input/wacom.c.2.6 drivers/usb/input/wacom.c
[jej@ayukawa linux]$make
[jej@ayukawa linux]#su
[jej@ayukawa linux]#make install
[jej@ayukawa linux]#make modules_install
[jej@ayukawa linux]#reboot
Then post a message to the group so someone can help you out.
If you have installed the driver, now is the time to test whether it will
load when needed. If you have not installed it, but are instead using insmod,
substitute insmod mydir/src/wacom.o where you see
modprobe wacom below. It is important that you use the correct
wacom.o file, the one you just built, since insmod may load the old driver
if it cannot find the one you have specified.
I am assuming
that you are using a USB device, so you will also need to modprobe for
either usb-uhci or usb-ohci depending on your hardware. Try them both!
The wrong module will cough up an error for you.
The important features of the stylus are available through the Linux event
drivers, so load those too. With some clever additions to /etc/modules.conf,
you can probably have these automatically loading for you whenever the tablet
is activated. So far, I haven't figured out how to make this work reliably,
so I've added the commands to my /etc/rc.d/rc.local file.
[jej@ayukawa usb]# rmmod wacom
[jej@ayukawa usb]# modprobe usb-uhci (or usb-ohci)
[jej@ayukawa usb]# modprobe input
[jej@ayukawa usb]# modprobe mousedev
[jej@ayukawa usb]# modprobe wacom (or insmod mydir/src/wacom.o)
[jej@ayukawa usb]# modprobe evdev
Check the system log for status messages pertaining to the wacom.
Here's a copy of the messages from my version of the driver.
[jej@ayukawa usb]# grep -i wacom /var/log/messages | tail
May 20 21:23:35 ayukawa kernel: usb.c: registered new driver wacom
May 20 21:23:35 ayukawa kernel: wacom.c: v1.30-j0.6.2 Vojtech Pavlik <vojtech@suse.cz>
May 20 21:23:35 ayukawa kernel: wacom.c: USB Wacom Graphire and Wacom Intuos tablet driver (MODIFIED)
The original driver was version 1.30. This version number
is 1.30-j0.6.2 so the correct driver was loaded.
In this section we will plug the tablet into the computer and determine
which driver, if any, claims control over the tablet. There are at least
three drivers that are interested: 1) hid.o which may think it is an HID
device, 2) usbmouse.o which may think it is an HID mouse, and 3) the wacom
driver which should identify the tablet as its own. Any number of problems
may be experienced here, so be prepared to spend some time looking at the
logs. A good way to do this, if you are running X, is to open a separate
xterm, su to root, and run tail -f /var/log/messages. The console
window will stream anything that is appended to the log.
Test the tablet detection by plugging the wacom into the USB port and
checking /var/log/messages again. You should see a flurry of activity. The
exact output depends a lot on your particular kernel and distribution.
This is Redhat 8.0 (2.4.18-17.8.0):
[jej@ayukawa usb]# tail /var/log/messages
May 20 21:26:11 ayukawa kernel: hub.c: USB new device connect on bus2/2, assigned device number 2
May 20 21:26:11 ayukawa kernel: input0: Wacom Intuos2 12x12 on usb2:2.0
May 20 21:26:14 ayukawa /etc/hotplug/usb.agent: Setup wacom hid for USB product 56a/44/115
May 20 21:26:14 ayukawa /etc/hotplug/usb.agent: Setup mousedev for USB product 56a/44/115
And here it is again on Redhat 7.2 (2.4.18-17.7.x):
[jej@sasami root]# tail /var/log/messages
May 20 21:28:38 sasami kernel: hub.c: USB new device connect on bus1/1, assigned device number 2
May 20 21:28:38 sasami kernel: input0: Wacom Intuos2 12x12 on usb1:2.0
May 20 21:28:39 sasami kernel: usb.c: registered new driver hiddev
May 20 21:28:39 sasami kernel: usb.c: registered new driver hid
May 20 21:28:39 sasami kernel: hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
May 20 21:28:39 sasami kernel: hid-core.c: USB HID support drivers
May 20 21:28:39 sasami kernel: mice: PS/2 mouse device common for all mice
If all went well like above, the USB device was successfully detected and
handled by the wacom driver; secondly, it was assigned input0. This
presumably means that information like pressure and tilt will be received on
/dev/input/event0. Lastly, the tablet was setup with mousedev or the generic
PS/2 USB mouse driver, so that information should appear on /dev/input/mouse0.
If instead you got any of the following lines in your log, the wacom
driver did not get control. Either hid or usbmouse did.
input0,hiddev0: USB HID v1.00 Mouse [Tablet XD-0608-U] on usb1:5.0
input0: Tablet XD-1212-U on usb2:2.0
The next section describes what to do if the wacom driver did not get
control. Otherwise, skip on to
Viewing the Raw Data.
If the wacom driver did not get control, and instead you see
"Tablet XD-1212-U" or similar in its place, then this section is for
you. Otherwise, consider yourself lucky and skip on to the next section,
Viewing the Raw Data. For the unlucky,
there is a good possibility that your kernel is slightly out of date and
that your usbmouse.c and hid-core.c files need some help.
When the Tablet XD-1212-U driver comes up, either usbmouse.o or hid.o
has discovered your tablet, decided it was an HID device, and grabbed it.
This is bad news because HID tablets seem to only output relative
coordinates and nothing about pressure. You are in good company though
because a number of people have reported this, even on some fairly
up-to-date distributions. Now let's fix it.
In the linuxwacom-0.6.2.tar.bz2
file, you will find mousedev.c, usbmouse.c, hid-core.c, evdev.c, and input.c
files which have special exceptions for wacom. These files are not built
by default, so you will need to reconfigure the package and run make again.
[jej@ayukawa wacom]$./configure --enable-hid --enable-usbmouse --enable-mousedev --enable-evdev --enable-input --with-kernel=your-kernel-src-dir
...
BUILD OPTIONS:
hid.o - yes
usbmouse.o - yes
evdev.o - yes
mousedev.o - yes
input.o - yes
...
[jej@ayukawa wacom]$ make
If your kernel is older than 2.4.22, the modules will be built using the
sources at src/2.4. If your kernel is 2.4.22 or newer, the modules will
be built using the sources at src/2.4.22. input.o is only needed for kernels older than 2.4.22.
First off, if the code does not build, and you cannot chase the problem
down yourself, send me a line. If your kernel is much older than 2.4.18,
then you may have to resign yourself to the fact that the 2.4.19 drivers
are not going to work for you. I would recommend upgrading your kernel.
Before installing the drivers, please backup the originals. Then,
use the following steps to install the drivers into the proper directories.
Use locate as you did for the wacom.o file if necessary.
For systems with kernel 2.4 and older than kernel 2.4.22:
[jej@ayukawa wacom]$su
[jej@ayukawa wacom]#cd src/2.4
[jej@ayukawa 2.4]#cp hid.o /lib/modules/your-kernel-ver/kernel/drivers/usb
[jej@ayukawa 2.4]#cp usbmouse.o /lib/modules/your-kernel-ver/kernel/drivers/usb
[jej@ayukawa 2.4]#cp evdev.o /lib/modules/your-kernel-ver/kernel/drivers/input
[jej@ayukawa 2.4]#cp mousedev.o /lib/modules/your-kernel-ver/kernel/drivers/input
[jej@ayukawa 2.4]#cp input.o /lib/modules/your-kernel-ver/kernel/drivers/input
[jej@ayukawa 2.4]#reboot
For systems with kernel 2.4.22 or newer:
[jej@ayukawa wacom]$su
[jej@ayukawa wacom]#cd src/2.4.22
[jej@ayukawa 2.4.22]#cp hid.o /lib/modules/your-kernel-ver/kernel/drivers/usb
[jej@ayukawa 2.4.22]#cp usbmouse.o /lib/modules/your-kernel-ver/kernel/drivers/usb
[jej@ayukawa 2.4.22]#cp evdev.o /lib/modules/your-kernel-ver/kernel/drivers/input
[jej@ayukawa 2.4.22]#cp mousedev.o /lib/modules/your-kernel-ver/kernel/drivers/input
[jej@ayukawa 2.4.22]#reboot
As before with some other distributions, if the files in the
kernel module directory are compressed, you'll need to run gzip on the .o
files to get .o.gz files.
In the linuxwacom-0.6.2.tar.bz2
file, you will find mousedev.c, usbmouse.c, hid-core.c, and evdev.c files
which have special exceptions for wacom. These files are not built by default,
so you will need to reconfigure the package and run make again. As for wacom.c, you need to configure the kernel modules (hid and
evdev) under your kernel source tree before configuring linuxwacom. [jej@ayukawa wacom]$./configure --enable-hid --enable-usbmouse --enable-mousedev --enable-evdev --with-kernel=your-kernel-src-dir
...
BUILD OPTIONS:
hid.o - yes
usbmouse.o - yes
evdev.o - yes
mousedev.o - yes
input.o - no
...
Kernels 2.6.0/1 are handled in src/2.6. Kernels 2.6.2/3 are at src/2.6.2.
New 2.6 directories will be created when compatibility issue occurs. The original mousedev.c, usbmouse.c, hid-core.c, and evdev.c at your
kernel source tree is backed up as mousedev.c.2.6, usbmouse.c.2.6, hid-core.c.2.6,
and evdev.c.2.6. The proper *.c's at linuxwacom/src/2.6.x are copied to
your kernel source tree. All the building process is done in your kernel
source tree. If everything works properly, you'll see the following from
the make: [jej@ayukawa linuxwacom]$ make
...
Making all in 2.6.2
make[3]: Entering directory `/home/jej/linuxwacom/src/2.6.2'
if test ! -f /home/jej/linuxwacom/src/2.6.2/wacom.o; then \
cd /usr/src/linux; make; cd /home/jej/linuxwacom/src/2.6.2; \
cp -f /usr/src/linux/drivers/usb/input/wacom.o .; \
fi
make[4]: Entering directory `/usr/src/linux'
make[5]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
CC drivers/input/mousedev.o
LD drivers/input/built-in.o
CC [M] drivers/input/evdev.o
CC [M] drivers/usb/input/hid-core.o
CC [M] drivers/usb/input/hid-input.o
LD [M] drivers/usb/input/hid.o
LD drivers/built-in.o
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD vmlinux
AS arch/i386/boot/setup.o
LD arch/i386/boot/setup
OBJCOPY arch/i386/boot/compressed/vmlinux.bin
GZIP arch/i386/boot/compressed/vmlinux.bin.gz
LD arch/i386/boot/compressed/piggy.o
LD arch/i386/boot/compressed/vmlinux
OBJCOPY arch/i386/boot/vmlinux.bin
BUILD arch/i386/boot/bzImage
Root device is (3, 2)
Boot sector 512 bytes.
Setup is 4847 bytes.
System is 1105 kB
Kernel: arch/i386/boot/bzImage is ready
Building modules, stage 2.
MODPOST
CC drivers/input/evdev.mod.o
LD [M] drivers/input/evdev.ko
CC drivers/usb/input/hid.mod.o
LD [M] drivers/usb/input/hid.ko
make[4]: Leaving directory `/usr/src/linux'
...
Then, use the following steps to install the drivers:
[jej@ayukawa wacom]$su
[jej@ayukawa wacom]#cd your-kernel-src-dir
[jej@ayukawa linux]#make install
[jej@ayukawa linux]#make modules_install
[jej@ayukawa linux]#reboot
Incidentally, the usbmouse.o, evdev.o, mousedev.o, and hid.o files may not be necessary if you don't use USB mouse and will not load usbmouse, hid, and mousedev.
However, it is required to build those modules/objects if you use a USB
mouse. There are code to ignore Wacom tablet as a HID device which are not
in the kernel.org source tree. The included hid-core.c contains a lot of wacom
related code. The included usbmouse.c and mousedev.c have code to ignore
wacom tablet as a mouse so wacom driver (wacom.o) can take control of it.
The included evdev.c handles the reconnection of a replugged tablet. It
works like this: assuming that you have configured the usb tablet and it
was up and running. But, by some reason you unplugged the tablet. The inluded
evdev.c will enable you to replugged the tablet and use it without reloading
the drivers or rebooting the system. If after installing the drivers, the wacom
driver is not getting control of the tablet, there is a possibility that
your tablet is not listed in any of the driver files. If so, continue on
to the next section. Otherwise, if you are up and running, skip to Viewing the Raw Data.
To determine whether your device is listed in the driver, we need to determine
the device identifier. It can be discovered by doing the following:
[root@ayukawa root]# grep -i 56a /var/log/messages | tail -10
May 20 21:03:09 ayukawa /etc/hotplug/usb.agent: Setup mousedev for USB product 56a/44/115
May 20 21:27:48 ayukawa kernel: usb.c: USB device 2 (vend/prod 0x56a/0x44) is not claimed by any active driver.
In this case, the tablet identifier is 56a/44 (also written 0x56a/0x44).
The model is determined by the second number; the Intuos2 12x12 is 0x44 for
instance.
In the wacom.c file, you will find a table called "wacom_ids." Look for
your device identifier. Only the identifiers listed are handled by the
wacom driver, so if it is missing, it needs to be added. Also look in
hid-core.c. It has a table called "hid_blacklist" which identifies devices
to ignore. The code is a little strange, but PENPARTNER is 0x00, GRAPHIRE is
0x10, INTUOS is 0x20, PL is 0x30, and INTUOS2 is 0x40. A table entry like
INTUOS2 + 4 would therefore be 0x44.
If you've gotten this far, and still cannot get it to work, send me email
with your device identifier and as much of an explanation of where things did
and did not work as described. I'll see what I can do about at least finding
out why it did not work. Then we can go on to solutions.
The next section assumes you have things working up to this point.
View the raw data from the tablet, by returning to the /dev/input
directory and streaming the data directly from the device. Be patient
here because this is where a lot of people are getting stuck.
[root@ayukawa usb]# cd /dev/input
[root@ayukawa input]# xxd event0
0000000: e65d c33d 597d 0100 0100 4101 0100 0000 .].=Y}....A.....
0000010: e65d c33d 5c7d 0100 0400 0000 b701 2800 .].=\}........(.
0000020: e65d c33d d9bb 0100 0100 4101 0000 0000 .].=......A.....
0000030: e65d c33d dcbb 0100 0400 0000 b701 2800 .].=..........(.
(Ctrl-C)
First off, you have to move the mouse or tap the pen to get any output.
If the tablet is mapped to event0, a continuously data stream will be
displayed while you move the mouse or pen on the tablet. Second, you
might not get anything at all. Don't panic. This seems to happen
occasionally. If absolutely no output occurs, try event1 and event2.
It is reported on Fedora Core 2 the event0 used for
kernel 2.4 is represented as event2 when switching to kernel 2.6.1-1.65.
If no output occurs on those ports, reload the drive:
[jej@sasami root]# rmmod wacom
[jej@sasami root]# modprobe wacom (or insmod mydir/src/wacom.o)
[jej@sasami root]# tail /var/log/messages
May 20 17:31:31 sasami kernel: usb.c: deregistering driver wacom
May 20 17:31:34 sasami kernel: usb.c: registered new driver wacom
May 20 17:31:35 sasami kernel: input0: Wacom Intuos2 12x12 on usb1:2.0
May 20 17:31:35 sasami kernel: wacom.c: v1.30-j0.6.2 Vojtech Pavlik <vojtech@suse.cz>
The device driver and the tablet occassionally get out of
sync with the tablet thinking it's still in HID mode when in fact it
should be in "mode 2." By unloading and reloading the driver manually,
the initialization code has another opportunity to get it right. Try the
xxd /dev/input/event0 again. This time, it
should work. If not, send me some email.
Incidentally, if you have a program running that is connected to
/dev/input/event0 (like X or wacdump for instance), it is possible that
the tablet will not reattach back to the same event. I have seen the
wacom reattach to /dev/input/event1 when unloading and reloading the
wacom driver with wacdump running for instance. So, try xxd on event1
or event2 if event0 fails.
You should also try running xxd on /dev/input/mouse0.
You should get streams of data when the mouse and pen are moved
around the surface of the tablet. It is this device that X will
look at for mouse movement. Use Ctrl-C to exit xxd.
The wacdump program parses and displays raw data from the Linux event
subsystem or serial port. It is very handy for verifying that your
tablet works without having to hassle with XFree86. Generally, you
must be root to run it unless you've set the permissions on the
appropriate device such that you can read them.
Building wacdump
Serial users who have been following along will not have built wacdump by
this point while USB users should already have it.
wacdump is enabled by default in the configure script, so let's do that now:
[jej@ayukawa linuxwacom]$ ./configure
...
----------------------------------------
BUILD OPTIONS:
wacom.o - no
wacdump - yes
hid.o - no
usbmouse.o - no
wacom_drv.o - no
----------------------------------------
As shown above, the build options indicate that wacdump will be built. If
not, then scroll back through the configuration to see if there aren't any
errors or warnings that would explain this.
Next, run make. The output will be a file called wacdump in the
linuxwacom package's src directory. Running make install, will install
it under /usr/local/bin.
Running wacdump
In the case of USB tablets, this program can run simultaneously with X,
but it's best if X has not been configured for the tablet yet. X will
not share the serial port with wacdump, so serial users should comment out the
wacom InputDevice sections from XF86Config (and/or XF86Config-4) before
using. Alternatively, you could move your serial tablet to COM2 and
try /dev/ttyS1 instead.
The command line usage of wacdump is pretty simple:
Usage: wacdump [options] device
Options:
-h, --help - usage
-c, --class device_cls - use specified class (see below)
-f, --force device_name - use specified device (see below)
-l, --list - list all supported devices
-v, --verbose - increase log output; multiple OK
-V, --version - display version number
--logfile log_file - output log to file
Example devices:
/dev/input/event0 - usb tablet device
/dev/ttyS0 - serial tablet on com1
/dev/ttyUSB0 - serial tablet on USB adapter
Supported device classes:
serial, usb
Supported device names:
serial: art, art2, dig, dig2, pp, gr, pl, int, int2, c100
usb: pp, gr, gr2, int, int2, pl, vol
Older versions of wacdump assumed the device to be /dev/input/event0.
This is now deprecated. You should instead specify which device to use
on the command line directly. If you get an end-of-file error or the
device does not exist, then the wacom may be attached to a different event.
Serial users may experience a timeout error which indicates that either
the tablet is not responding or XFree86 has it open. Access denied errors
probably indicate that
you are not root.
If you get different types of errors, let me know so we can get them
documented.
Serial users are advised that now is a good time to plug in your tablet,
if you haven't already.
Let's run wacdump. Here are some command line examples:
[jej@ayukawa src]$ ./wacdump /dev/input/event0 # typical USB tablet
[jej@ayukawa src]$ ./wacdump /dev/input/event1 # USB tablet on event1
Here is a sample command line for Tablet PC. Since Tablet PC normally doesn't explicitly
set its Wacom digitizer to a serial port, you probably need to run setserial. It is
not necessary to run setserial for standard Wacom tablets. The IO port may be different
for your Tablet PC.
[jej@ayukawa src]$ setserial /dev/ttyS2 ioport 0x93f8 autoconfig
[jej@ayukawa src]$ ./wacdump -f c100 /dev/ttyS2 # Wacom digitizer on fake COM3
When you run wacdump, it will attempt to initialize and query the tablet.
For a number of reasons, it may not display anything immediately, but if you
place a mouse or pen near the surface, the screen should update.
You will then be presented with a screen similar to the following:
wacdump v0.4.0
MODEL=Wacom Intuos2 12x12 ROM=1.1-5
CLS=USB VNDR=Wacom DEV=Intuos2 SUB=XD-1212-U
TOOLTYPE=NONE SERIAL=0x00000000
IN_PROX=+00000 (+00000 .. +00000) BUTTON=+00000 (+00000 .. +00000)
POS_X=+00000 (+00000 .. +30480) POS_Y=+00000 (+00000 .. +31680)
ROT_Z=+00000 (-00900 .. +00899) DISTANCE=+00000 (+00000 .. +00015)
PRESSURE=+00000 (+00000 .. +01023) TILT_X=+00000 (+00000 .. +00127)
TILT_Y=+00000 (+00000 .. +00127) ABSWHEEL=+00000 (+00000 .. +01023)
RELWHEEL=+00000 (-00001 .. +00001) THROTTLE=+00000 (-01023 .. +01023)
LEFT= MIDDLE= RIGHT= EXTRA=
SIDE= TOUCH= STYLUS= STYLUS2=
The top portion identifies the tablet, and unless you specifically
override the device type with the -f option, it should be auto-detected
from the tablet directly. In this case, the model is XD-1212-U, a USB
Intuos2 12x12.
The next section describes the dynamic attributes of the tablet,
including the current position of the pointer, the type of tool in proximity
to the surface, its pressure, and tilt. Some tablets provide serial numbers
for their styluses. When a button is pressed, the button heading will change
to something like "STYLUS=DOWN".
Some tablet tools report wheel movements as single increments forward and
reverse, while others provide absolute positions. The 4D mouse has a throttle
instead of a wheel. All three cases are reported independently.
Different tablets will have different options. Here is the lowly ArtPadII
for comparison.
wacdump v0.4.0
MODEL=Wacom ArtPadII 4x5 ROM=1.3-6
CLS=Serial VNDR=Wacom DEV=ArtPadII SUB=KT-0405-R
TOOLTYPE=NONE IN_PROX=+00000 (+00000 .. +00000)
BUTTON=+00000 (+00000 .. +00000) POS_X=+00000 (+00000 .. +06400)
POS_Y=+00000 (+00000 .. +04800) PRESSURE=+00000 (+00000 .. +00255)
LEFT= MIDDLE= RIGHT= EXTRA=
SIDE= TOUCH= STYLUS= STYLUS2=
Notice that this tablet has no tilt, and the pressure range is
considerably reduced. This version of wacdump does not distinguish
between tablets with mice, so the left, right, and middle buttons are
present, even though the tablet itself has no mouse. This will likely
change in the future.
Out of Range Values
If you get X and Y coordinates, pressures, or tilt values outside of the
ranges specified, please let me know as soon as possible. Bad range values
can prevent the XFree86 driver from working correctly. It is helpful if you
can determine the true maximum values and send them along with your tablet
type and model number. A text-mode copy of the screen would be even better.
Two steps must be completed to get X to recognize your tablet. First,
you need to add some lines to XF86Config to inform X of the tablet's
existence. Second, you need to update the XInput driver that pertains
to the tablet since the one that ships with XFree86 is not very functional.
Neither driver holds a candle to the windows driver though, so you'll
have to take what you get for the time being. Updates to the XFree86 driver
are available in the stable and beta releases on the
Downloading the Code page. You may
also check Lepied's Wacom Site which
has source code up to version 26 as of this writing.
The X Window system identifies the stylus and eraser on your tablet as
XInput devices. Applications that want to know the absolute position of
your stylus can request that information directly, and this generally
bypasses whatever the mouse happens to be doing at the time. This design
is not without problems though. For one, changing your setup or adding
a new tool requires making changes to the XF86Config file and restarting
X. This should be fixed in the future.
For now however, add the InputDevice sections to your XF86Config file. This
assumes you are running XFree86 4.x. On some distributions,
this file is called XF86Config-4. Notice that the serial and USB
configurations are different, so only include the appropriate lines. For
Tablet PCs, options "Device" and "ForceDevice" should be included. You
should also change the device (e.g. ttyS0) to the correct one for your
tablet; the default serial and USB devices are given. All the new driver
options are listed in the manual page below.
Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/ttyS0" # SERIAL ONLY
Option "Device" "/dev/input/event0" # USB ONLY
Option "Type" "cursor"
Option "USB" "on" # USB ONLY
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/ttyS0" # SERIAL ONLY
Option "Device" "/dev/input/event0" # USB ONLY
Option "Type" "stylus"
Option "USB" "on" # USB ONLY
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/ttyS0" # SERIAL ONLY
Option "Device" "/dev/input/event0" # USB ONLY
Option "Type" "eraser"
Option "USB" "on" # USB ONLY
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
The above three sections identify the cursor, stylus, and eraser devices
to XInput. Notice that all three reference the same device /dev/ttyS0 or
/dev/input/event0 depending on whether its a serial or USB tablet.
The configuration options listed by your system's man page is way out of date.
Below is an updated wacom man page. We will commit this page to XFree86 CVS
repository as soon as we get enough positive feedbacks from users like you.
WACOM(4x) XFree86 WACOM(4x)
NAME
wacom - Wacom input driver
SYNOPSIS
Section "InputDevice"
Identifier "idevname"
Driver "wacom"
Option "Device" "devpath"
...
EndSection
DESCRIPTION
wacom is an XFree86 input driver for Wacom devices.
The wacom driver functions as a pointer input device, and may be used
as the X server's core pointer.
SUPPORTED HARDWARE
This driver supports the Wacom IV and Wacom V protocols. Preliminary
support is available for USB devices on some Linux platforms.
CONFIGURATION DETAILS
Please refer to XF86Config(5x) for general configuration details and
for options that can be used with all input drivers. This section only
covers configuration details specific to this driver.
Multiple instances of the Wacom devices can cohabit. It can be useful
to define multiple devices with different active zones. Each device
supports the following entries:
Option "Type" "stylus"|"eraser"|"cursor"
sets the type of tool the device represent. This option is
mandatory.
Option "Device" "path"
sets the path to the special file which represents serial
line where the tablet is plugged. You have to specify it
for each subsection with the same value if you want to have
multiple devices with the same tablet. This option is
mandatory.
Option "USB" "on"
tells the driver to dialog with the tablet the USB way.
This option is only available on some Linux platforms.
Option "ForceDevice" "ISDV4"
tells the driver to dialog with the tablet the Tablet PC
way. Tablet PC is a serial tablet using a special Wacom IV
protocol, called ISDV4 protocol.
Option "DeviceName" "name"
sets the name of the X device.
Option "Suppress" "Inumber"
sets the position increment under which not to transmit
coordinates. This entry must be specified only in the
first Wacom subsection if you have multiple devices for one
tablet. If you don’t specify this entry, the default value,
which is 2, will be used. To disable suppression, the entry
should be specified as 0.
Option "Mode" "Relative"|"Absolute"
sets the mode of the device.
Option "Tilt" "on"
enables tilt report if your tablet supports it (ROM version
1.4 and above). If this is enabled, multiple devices at
the same time will not be reported.
Option "TopX" "number"
X coordinate of the top corner of the active zone.
Option "TopY" "number"
Y coordinate of the top corner of the active zone.
Option "BottomX" "number"
X coordinate of the bottom corner of the active zone.
Option "BottomY" "number"
Y coordinate of the bottom corner of the active zone.
Option "ButtonsOnly" "on"
disables the device's motion events.
Option "ButtonM" "N"
reports a button N click when button M is pressed, where M
is one of the wacom supported button numbers, it can be 1
to 16 and N can be an integer between 1 and 19. The default
value for button M is M. When N is less than 17, button M
is assigned to the function of button N. When N is 17,
button M is a left-double-click. When N is 18, button M is
ignored, i.e., no button event will be reported when
clicking on button M. When N is 19, button M is assigned to
Mode Toggle, switching between relative and absolute mode,
which is especially useful to switch windows in a multi-
monitor environment.
Option "TPCButton" "on"
enables the stylus buttons as Tablet PC buttons, i.e.,
reports stylus button event only when its tip is pressed.
Option "Speed" "Rspeed"
sets the cursor's relative movement speed to Rspeed. The
default value is 1.0. A Rspeed greater than 1.0 will speed
up the cursor's relative movement. A Rspeed less than 1.0
but greater than 0 will slow down the cursor's relative
movement. A Rspeed too close to 0 is not recommanded.
Option "Twinview" "horizontal"|"vertical"|"none"
sets the orientation of TwinView. The default is "none".
Option "TVResolution" "res1,res2"
specifies different resolutions for the two screens in
TwinView setup. For example, if the resolution of screen 1
(res1) is 1024x768 and screen 2 (res2) is 1280x1024, the
option will be set to:
Option "TVResolution" "1024x768,1280x1024"
Option "ScreenNo" "n"
In a multi-monitor environment, specifies the screen number
in which the cursor can move.
Option "Rotate" "CW"|"CCW"|"NONE"
rotates the Tablet PC's screen orientation, clockwise or
anti-clockwise. The default is "NONE".
Option "PressCurve" "x1,y1,x2,y2"
sets pressure curve by control points x1, y1, x2, and y2.
Their values are in range from 0..100. The input for
linear curve (default) is "0,0,100,100";
slightly depressed curve (firmer) might be "5,0,100,95";
slightly raised curve (softer) might be "0,5,95,100".
Option "KeepShape" "on"
When this option is enabled, the active zone begins
according to TopX and TopY. The bottom corner is adjusted
to keep the ratio width/height of the active zone the same
as the screen while maximizing the area described by TopX,
TopY, BottomX, BottomY.
Option "DebugLevel" "number"
sets the level of debugging info reported. There are 11
levels, specified by the integers between 1 and 11.
Option "Serial" "number"
sets the serial number associated with the physical device.
This allows to have multiple devices of the same type (i.e.
multiple pens). This option is only available on wacom V
devices (Intuos). To see which serial number belongs to a
device, you have to set the DebugLevel to 6 and watch the
output of the X server.
Option "Threshold" "number"
sets the pressure threshold used to generate a button 1
events of stylus devices for some models of tablets (Intuos
and Graphire).
SEE ALSO
XFree86(1), XF86Config(5x), xf86config(1), Xserver(1), X(7x).
AUTHORS
Frederic Lepied <lepied@xfree86.org>
4.4.0 Version WACOM(4x)
This section largely deals with interaction problems between the mouse1
device and USB tablets. Serial users can ignore this part.
If you have a USB mouse and are also using a USB tablet, you may need
to change your mouse1 InputDevice section to something other than
/dev/input/mice.
The wacom tablet appears as a mouse to the Linux kernel, and consequently,
the "mice" device combines the input from all your mice, including the tablet.
This will not give you the behavior you want. A better choice is to specify
the precise USB device from which you want to receive mouse events, namely
/dev/input/mouse0 or /dev/input/mouse1. This is known to have happened
for a Logitech USB mouse on RedHat 8.0.
If you do not have a USB mouse, adding the Mouse1 device
is probably not something you want to do.
Despite this, Redhat's Anaconda program will do it for you if
you boot the machine with the tablet plugged in. You'll need to be
careful about this.
When you use the mouse1 input device, the data flows from the USB wacom
kernel driver, through the event subsystem, down into the mousedev driver,
out the /dev/input/mouse0 device, and finally into the XInput mouse driver.
You effectively lose all your absolute positioning information because the
mousedev driver converts it into relative data. Additionally, the XFree86
wacom driver does not get control of the cursor because mouse1 is providing
those events.
Therefore, if you have a Mouse1 section, leave it. Redhat 8.0 at least,
expects it to be there; however, if you do not have a USB mouse and you
are using a USB tablet, you will not be using this section, so make
certain that it is commented out of the ServerLayout section covered next.
There is one exception however. If you have no other mouse
device in your ServerLayout section, do not remove Mouse1. XFree86
will not start without at least one core pointer, and the tablet
does not count unless it is specifically identified as a "CorePointer"
rather than merely "SendCoreEvents."
The ServerLayout section describes what devices the X server will use.
Modify the ServerLayout section to reflect the new devices. Make certain
to comment out the Mouse1 device if determined necessary from the previous
page.
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "cursor" "SendCoreEvents"
InputDevice "stylus" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
#InputDevice "Mouse1" "SendCoreEvents"
#InputDevice "tablet" "SendCoreEvents"
EndSection
This section determines which devices are actually used by the server.
In the case above, the cursor, stylus, and eraser devices are selected while
the mouse1 and tablet devices are commented out. At present, this is the
correct configuration for proper operation of the tablet whether you are
using the beta package or the production package.
You can configure one of your Wacom devices as a Core Pointer if you don't
have a regular mouse on your system. However, you lose the Wacom specific
functions, such as pressure sensitivity and absolute mode when you use that device.
You have completed the XF86Config file changes. By aware that if you reboot
your computer with the Wacom plugged in and Redhat's Anaconda program notices,
it will treat the tablet as a USB mouse and reconfigure this file incorrectly.
You may need to go back and check the file to ensure that everything is
still correct afterwards. Rebooting with the device detached seems to
reverse the process, but again, you should check the file to be certain.
My recommendation is to tell Anaconda to ignore the tablet until the device
detection works properly.
There are a number of wacom_drv.o files about. XFree86 is shipping
version 23. Redhat 8.0 is shipping version 25. Lepied's page has the
source code for 26, but the binary identifies itself as 23ss1. The
Downloading the Code page currently
offers source and binary for 26-j0.6.2 in the stable package
and 26-j0.5.26 in the beta version. In total, I recommend
using the drivers in the packages that I provide since they correspond with
what is shown in this document. Any new functionality that gets added will
be built on top of these files as well.
Note: the binary wacom_drv.o file is located in the prebuilt directory
of the stable and beta packages. Instructions for rebuilding from source
are available in the Appendix under Building wacom_drv.o From Scratch if you are a developer yourself or the binary is not
compatible with your system.
With that said, locate and replace wacom_drv.o. Using locate,
we find the driver in the XFree86 tree. This directory is pretty standard,
so it is unlikely that your file will be located elsewhere. Note the
assumption is that you are using XFree86 4.x. Anything from the 3.x version
probably won't work.
[root@ayukawa root]# locate wacom_drv.o
/usr/X11R6/lib/modules/input/wacom_drv.o
[root@ayukawa root]# cd /usr/X11R6/lib/modules/input
[root@ayukawa input]# cp wacom_drv.o /home/jej/src/wacom/wacom_drv_old.o
[root@ayukawa input]# cp /home/jej/src/wacom/prebuilt/wacom_drv.o_vxkvk wacom_drv.o
where vx stands for your XFree86 version and vk stands for your kernel version.
The old file is copied away, and replaced with the newer version. The
binary modules are presently built on a Redhat 8.0 system using gcc 3.2 under
glibc. This should work for most, if not all, major distributions. If it
does not load on yours, please let me know.
Finally, restart X. You may wish to do this from runlevel 3 for
testing purposes.
[root@ayukawa root]# init 3
...processes starting and stopping...
[root@ayukawa root]# startx
If the X server dies, you can always back-out the changes to the XF86Config
file and try again. Worse case, copy the wacom_drv_old.o file back to
its original place. But first, look at the XFree86 log file for clues.
You might want to do this even if everything works correctly. When things
are running right, the following lines appear in my log file.
[root@ayukawa root]# grep -i wacom /var/log/XFree86.0.log
(II) LoadModule: "wacom"
(II) Loading /usr/X11R6/lib/modules/input/wacom_drv.o
(II) Module wacom: vendor="The XFree86 Project"
(II) Wacom driver level: 26-j0.6.2 $
(II) XINPUT: Adding extended input device "eraser" (type: Wacom Eraser)
(II) XINPUT: Adding extended input device "stylus" (type: Wacom Stylus)
(II) XINPUT: Adding extended input device "cursor" (type: Wacom Cursor)
(==) Wacom Kernel Input device name: "Wacom Intuos2 12x12"
(==) Wacom tablet maximum X=30480 maximum Y=30480 X resolution=0 Y resolution=0
suppress=0
(==) Wacom Cursor top X=0 top Y=0 bottom X=30480 bottom Y=30480
(==) Wacom Stylus top X=0 top Y=0 bottom X=30480 bottom Y=30480
(==) Wacom Eraser top X=0 top Y=0 bottom X=30480 bottom Y=30480
Notice the driver version 26-j0.6.2 above. This is the new stable
wacom_drv.o driver. The beta driver is currently 26-j0.5.26.
First things first, you should lift the mouse off the tablet and place it
back down. This seems to help reset things internally. When you replace the
mouse, the cursor should jump to that portion of the screen. If everything is
working correctly, the mouse should work in absolute mode with the four
corners of the tablet corresponding with the four corners of the screen. If
the cursor stops short of an edge, then the kernel driver limits are probably
incorrect. Please let me know so that I can update the driver.
Next, remove the mouse and try using the eraser end of the stylus.
Hovering over the surface of the tablet should move the cursor. Touching the
eraser tip to the surface should generate a click. If you invert the
pen and use the stylus tip, you should get a similar result. If the pen
tip generates spurious touch events, you will need to increase the threshold
value in the InputDevice section. Wacdump is useful for determining the
appropriate value.
Lastly, if you would like more logging, the parameter "DebugLevel" can be
set to values between 1 and 11, with 11 being way too much, and 1 being fairly
useful.
You can check the XInput pointer status by using xsetpointer
as below. The man page states that calling xsetpointer with the name of
a particular device will set it as the primary pointing device. So far,
that has not been the case in my experience; however, that is the subject
of current development, so try it, and if it doesn't work, stay tuned.
[root@ayukawa log]# xsetpointer -l
"eraser" [XExtensionDevice]
"stylus" [XExtensionDevice]
"cursor" [XExtensionDevice]
"Mouse0" [XPointer]
"keyboard" [XKeyboard]
The xidump program is similar to wacdump, but it parses and displays
event data from the XFree86 XInput extension rather than from the tablet
itself. This is useful for seeing what programs like gimp and gsumi are
receiving from X.
Presently, xidump will display proximity and motion events for
the stylus, cursor, and eraser input devices. xidump supports different
display modes with "curses" and "raw" modes already implemented and a
GTK-based graphical mode in the works. The curses mode is probably the
most useful in terms of verifying that the tablet is functioning correctly
in the XFree environment; however, the raw mode has the additional benefit
of being able to verify the order, timing, and history of events.
Since xidump uses the same XInput interface that gimp and gsumi use
to get tablet data, the values displayed in xidump should be identical
to what they are receiving. If you are having trouble with pressure in
gimp, chances are that xidump will demonstrate the same problem.
xidump does not require root access to use.
Building xidump
xidump builds by default so if you've configured and built the project
in previous steps, you probably have it already. If not, we can build it now.
xidump requires the XLib and XInput header files to be present on
the system. On Redhat 8.0, these files are located in the XFree86-devel
RPM package. Other distributions may be organized differently, and
people who build X from source probably get them by default. When
configuring, check that XLib is detected in the build environment,
and if not, refer to the warnings and "checking for" messages for
additional clues.
The preferred display mode for xidump uses ncurses. To compile it, you
will need the ncurses header files. On Redhat 8.0, these files are located
in the ncurses-devel package. Without ncurses, xidump defaults to raw mode
automatically.
[jej@ayukawa linuxwacom]$ ./configure
checking for XLib include directory... found
checking for XLib header files... found
checking for ncurses.h... yes
...
----------------------------------------
BUILD ENVIRONMENT:
...
XLib - yes
ncurses - yes
...
BUILD OPTIONS:
...
xidump - yes
...
----------------------------------------
The configuration above indicates that the XLib and ncurses header files
were found and xidump will be built. If ncurses.h is not found, xidump
will still build, but it will also warn you that ncurses will not be
available. If you encounter warnings, it is most likely that your
development environment is missing some packages.
When you run make, the xidump program will be built along with any
other programs that are specified in the build options. The output file is
called 'xidump' and is located in the linuxwacom package's src directory.
It is installed by running make install.
Running xidump
xidump takes one argument, the input device specified in your XF86Config
file. Ordinarily, this would be either stylus, cursor, or eraser, but you
can get a complete list by running xidump with the list option '-l'. xidump
has the additional feature of dumping all the device capabilities by
specifying the verbose option '-v'. Both are demonstrated below.
[jej@ayukawa src]$ ./xidump -l
eraser extension
stylus extension
cursor extension
Mouse0 disabled
keyboard keyboard
[jej@ayukawa src]$ ./xidump -l -v eraser
eraser extension
key: min=8, max=39, num=32
btn: num=1
val: axes=6 mode=abs buf=0
axis[0]: res=0, max=0, max=30480
axis[1]: res=0, max=0, max=30480
axis[2]: res=39, max=0, max=1023
axis[3]: res=1, max=-64, max=63
axis[4]: res=1, max=-64, max=63
axis[5]: res=1, max=0, max=1023
In the first dump, we see the eraser, stylus, and cursor with the
additional Mouse0 pointer and keyboard. Only the first three are
"extension" devices. Using xidump on the keyboard or mouse pointer
will generate an error since neither are XInput devices.
The second dump shows the capabilities of the eraser device including the
number of keys (32), buttons (1), and axes (6). It also shows the
mode to be absolute. In order, the axes are: x, y, pressure, tilt-x,
tilt-y, and wheel. When the cursor is used, axis 3 becomes z-rotation
instead of tilt-x.
You should be aware that xidump and gimp must take ownership of the device
in order to get real-time data. This creates a conflict if you are running
both of them simultaneously. gimp is the more clever of the two programs in
that it only "grabs" the input device if you are hovering over the gimp
drawing window. xidump is less friendly. In order to display the absolute
position across the entire screen, it creates a small "listening window,"
grabs the device immediately, and does not release it until you quit the
program. Neither program should fail, but you will not be able to draw
in gimp and run xidump at the same time if they are both using the same
input device.
We will run xidump in raw mode for the first time to see the stylus
events directly. A small window will appear on the desktop while xidump
runs; you can safely ignore it. Closing it will kill the application.
[jej@ayukawa src]$ ./xidump -u raw stylus
14.56291895: Proximity In
14.56305595: Motion: x= +5978 y=+28728 p= 0 tx= +64 ty= +64 w= +0
...
16.87158095: Motion: x= +4941 y=+27842 p= 225 tx= +41 ty= +67 w= +0
16.87164395: Button: 1 DOWN
16.87169595: Motion: x= +4964 y=+27844 p= 398 tx= +42 ty= +66 w= +0
...
17.27328395: Motion: x= +5261 y=+27543 p= 3 tx= +48 ty= +64 w= +0
17.27334395: Button: 1 UP
17.27515995: Motion: x= +5348 y=+27451 p= 4 tx= +48 ty= +63 w= +0
...
17.35933795: Motion: x= +7089 y=+27061 p= 4 tx= +48 ty= +63 w= +0
17.37444395: Proximity Out
<Ctrl-C>
The timestamp on the left is seconds elapsed; the next field is the
event type. Mostly, you will encounter motion events although I've trimmed
many of them out of this listing. As you can see from the above, the first line
is a "proximity in" event which indicates the stylus came in range of the
tablet. The last event was a "proximity out." At 16.87 seconds, I tapped
the stylus to the tablet surface as recorded by the "Button: 1 DOWN" and
subsequent "UP" message. Raw mode is useful for verifying the order and
timing of messages, but is not particularly clean. The ncurses mode works
much better.
[jej@ayukawa src]$ ./xidump stylus
InputDevice: stylus
Valuators: Absolute Axes: 6 Buffer: 0
x-axis y-axis pressure x-tilt y-tilt wheel
data: +10826 +09919 +00004 +00058 +00065 +00000
min: +00000 +00000 +00000 -00064 -00064 +00000
max: +30480 +30480 +01023 +00063 +00063 +01023
res: +00000 +00000 +00039 +00001 +00001 +00001
Proximity: IN
Focus:
Buttons: 1-DOWN
Keys:
All of the ranges are display above, include their resolutions which as
far as I know are not normally used. Only the proximity, focus, valuator,
and button events are currently implemented.
For completeness sake, here are the command line options:
Usage: xidump [options] input_device
-h, --help - usage
-v, --verbose - verbose
-V, --version - version
-l, --list - list available input devices
-u, --ui ui_type - use specified ui, see below
Use --list option for input_device choices
UI types: curses, raw
There are not many options, but the --list option is helpful for
identifying devices, and the --ui option allows you to switch between
curses and raw modes. The future GTK mode will be available in the same
manner. Adding the --verbose option increases the amount of output, and
when used in conjunction with --list, displays the device capabilities.
Out of Range Values
At present, we are discovering a number of problems with out-of-range
values. Rest assured, we are looking into it, so if you encounter them
yourself, you might consider check the mailing list for similar problems,
and if your problem is unique, let us know. When the driver is behaving
better, I'll increase the priority of this class of problem. Until then,
you'll probably just get a message back saying "sorry, and yes, we know."
The most serious problem seems to be with runaway pressure settings, so
those will get investigated first.
The xsetwacom is a command-line Wacom driver configuration tool. It
changes the pressure sensitivity, click threshold, button functions,
cursor mode and speed, and much more without having to manually modify
XF86Config file.
However, it is reported that there are systems on which you can not run
xsetwacom due to some XFree86 interface error. We did not figure out the root
cause of this problem yet. Please check Success Stories page to see if your system is in question.
If it is, you'll have to add the configuration options to your /etc/X11/XF86Config
file. Please refer Configuring XFree86
for details.
Building xsetwacom
xsetwacom uses libwacomcfg.so to communicate with Wacom XFree86 driver,
wacom_drv.o. So, libwacomcfg.so should be built and installed.
libwacomcfg.so relies on Xlib. In the configure script, it will default
the Xlib path to /usr/X11R6. If your Xlib is not installed under /usr/X11R6,
you'll need to specify the path (dir) by --with-xlib=dir. Let's see
what we get from configure:
[jej@ayukawa linuxwacom]$./configure
...
----------------------------------------
BUILD ENVIRONMENT:
architecture - i686
linux kernel - yes 2.4
module versioning - yes -DONFIG_MODVERSIONS -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h
kernel source - yes /usr/src/linux
XFree86 - no
XLib - yes /usr/X11R6
TCL - yes /usr
TK - yes /usr
XFree86v3 - no
ncurses - yes
GTK - 2.0.6
BUILD OPTIONS:
wacom.o - no
wacdump - yes
xidump - yes
libwacomcfg - yes
libwacomxi - yes
xsetwacom - yes
hid.o - no
usbmouse.o - no
evdev.o - no
mousedev.o - no
input.o - no
tabletdev.o - no
wacom_drv.o - no
wacom_drv-v3.o - no
----------------------------------------
As shown above, the build options indicate that libwacomcfg and xsetwacom
will be built. If not, then scroll back through the configuration to see
if there aren't any errors or warnings that would explain this.
Next, run make. The output will be stored in the linuxwacom
package's src and src/.libs directory. They will be installed by running
make install (you need to switch to superuser to run this command).
If wacom_drv.o was running while installing xsetwacom, xsetwacom can be
launched immediately after make install and exit (switch back
to your own account).
If wacom_drv.o is installed by the same make install as xsetwacom
is, restarting X server is required to use the newly built wacom_drv.o. We
strongly recommand to build and install the wacom_drv.o and xsetwacom from
the same release package since the out of sync wacom_drv.o and xsetwacom may
crash your X server.
Running xsetwacom
[jej@ayukawa linuxwacom]$xsetwacom
Usage: xsetwacom [options] [command [arguments...]]
Options:
-h, --help - usage
-v, --verbose - verbose output
-V, --version - version info
-d, --display disp_name - override default display
Commands:
list [dev|param] - display known devices, parameters
set dev_name param [values...] - set device parameter by name
The most used xsetwacom command is xsetwacom set dev_name param [values...],
where param is an option which will be set to values in wacom_drv.o after
excuting xsetwacom. To better understand the use of this command, let's see
some examples. Assume that you use Stylus as your Wacom tool's Identifier,
which is considered is considered as dev_name in xsetwacom command.
If you want to change Stylus's mode from absolute (default) to relative, then:
[jej@ayukawa linuxwacom]$xsetwacom set Stylus mode relative
If you want to change button 2 to left-double-click, then:
[jej@ayukawa linuxwacom]$xsetwacom set Stylus button2 17
If you want to set the pressure sensitivity a bit softer, then:
[jej@ayukawa linuxwacom]$xsetwacom set Stylus PressCurve 0,15,85,100
If you want the buttons behave the Tablet PC way, i.e., sending button event only when
button1 (the tip) is pressed, then:
[jej@ayukawa linuxwacom]$xsetwacom set Stylus TPCButton on
Below is a list of the parameters and their values used by xsetwacom set command:
param [values...] results
------------------------------------------------------------------
Mode Relative|Absolute sets the mode of the device
TopX integer sets the X coordinate of the top corner of the active zone
TopY integer sets the Y coordinate of the top corner of the active zone
BottomX integer sets the X coordinate of the bottom corner of the active zone
BottomY integer sets the Y coordinate of the bottom corner of the active zone
ButtonM integer (1 - 16) sets button M to button integer click
ButtonM 17 sets button M to left-double-click
ButtonM 18 ignores button M click
ButtonM 19 sets button M to Mode Toggle
PressCurve i1,i2,i3,i4 sets the pressure bezier curve, where i1+i4=100; i2+i4=100
DebugLevel integer (1 - 12) sets the level of debugging trace
SpeedLevel integer (1 - 11) sets relative cursor movement speed
ClickForce integer (1 - 21) sets tip/eraser pressure threshold
xyDefault resets the bounding coordinates to default in tablet units
gimp on|off turns on/off Gimp support in Xinerama-enabled environment
mmonitor on|off turns on/off across monitor movement on multi-monitor desktop
TPCButton on|off turns on/off the buttons as Tablet PC buttons
------------------------------------------------------------------
The xsetwacom commands can be added to the .xinitrc under your home
directory so next time when you login as yourself, the driver will be
set to the options you choose.
Below is an example of my .xinitrc:
[jej@ayukawa jej]$more .xinitrc
xsetwacom set Eraser0 Mode Relative
xsetwacom set Cursor0 Mode Absolute
xsetwacom set Stylus0 TopX 10
xsetwacom set Stylus0 TopY 67
xsetwacom set Stylus0 BottomX 7170
xsetwacom set Stylus0 BottomY 5778
xsetwacom set Stylus0 TPCButton 1
# run the primary system script
. /etc/X11/xinit/xinitrc
The wacomcpl is a graphic Wacom driver configuration tool. It changes
the pressure sensitivity, click threshold, button functions, cursor mode
and speed without having to manually modify XF86Config file. For Cintiq
and Tablet PC users, it is also a tool to calibrate the tablet. wacomcpl
should be launched when you login as yourself since .xinitrc, a file under
your home directory, will be updated each time you run wacomcpl. The .xinitrc
stores the preferences you selected through wacomcpl for your next login.
The goal is to give each user a chance to use his/her own preference on a
shared system.
However, it is reported that there are systems on which can not run wacomcpl
due to some XFree86 interface error. We did not figure out the root cause of
this problem yet. Please check Success Stories page to see if your system is in question.
If it is, you'll have to add the configuration options to your /etc/X11/XF86Config
file. Please refer Configuring XFree86 for details.
Building wacomcpl
wacomcpl is written in tcl/tk. It uses libwacomxi.so and xsetwacom to
communicate with Wacom XFree86 driver, wacom_drv.o. So, to run wacomcpl,
tcl/tk should be installed, libwacomxi.so and xsetwacom should be built and
installed.
libwacomxi.so and xsetwacom are enabled by default in the configure script.
By default, the script will assume that tcl/tk is installed under /usr. That
is, tcl.h and tk.h should be under /usr/include; libtcl.so.0 and libtk.so.0
should be under /usr/lib. Let's see what we get from configure:
[jej@ayukawa linuxwacom]$./configure
...
----------------------------------------
BUILD ENVIRONMENT:
architecture - i686
linux kernel - yes 2.4
module versioning - yes
kernel source - yes /usr/src/linux
XFree86 - no
XLib - yes /usr/X11R6
TCL - yes /usr
TK - yes /usr
XFree86v3 - no
ncurses - yes
GTK - 2.0.6
BUILD OPTIONS:
wacom.o - no
wacdump - yes
xidump - yes
libwacomcfg - yes
libwacomxi - yes
xsetwacom - yes
hid.o - no
usbmouse.o - no
evdev.o - no
mousedev.o - no
input.o - no
tabletdev.o - no
wacom_drv.o - no
wacom_drv-v3.o - no
----------------------------------------
As shown above, the build options indicate that libwacomxi and xsetwacom
will be built. If not, then scroll back through the configuration to see
if there aren't any errors or warnings that would explain this.
For example, on another system, I have installed tcl/tk under /usr/local/ActiveTcl.
That is, tcl.h and tk.h are under /usr/local/ActiveTcl/include. If I run configure
without options, I get:
[jej@ayukawa linuxwacom]$./configure
...
----------------------------------------
BUILD ENVIRONMENT:
architecture - i686
linux kernel - yes 2.4
module versioning - yes
kernel source - yes /usr/src/linux
XFree86 - no
XLib - yes /usr/X11R6
TCL - no
TK - no
XFree86v3 - no
ncurses - yes
GTK - 2.0.6
BUILD OPTIONS:
wacom.o - no
wacdump - yes
xidump - yes
libwacomcfg - yes
libwacomxi - no
xsetwacom - yes
hid.o - no
usbmouse.o - no
evdev.o - no
mousedev.o - no
input.o - no
tabletdev.o - no
wacom_drv.o - no
wacom_drv-v3.o - no
----------------------------------------
The build options show that libwacomxi will not be built. When I scroll
back through the configuration, I see:
...
checking for tcl header files... not found; tried /usr/include/tcl.h
***
*** WARNING:
*** The tcl development environment does not appear to
*** be installed. The header file tcl.h does not appear
*** in the include path. Do you have the tcl rpm or
*** equivalent package properly installed? Some build
*** features will be unavailable.
***
checking for tk header files... not found; tried /usr/include/tk.h and /include/tk.h
***
*** WARNING:
*** The tk development environment does not appear to
*** be installed. The header file tk.h does not appear
*** in the include path. Do you have the tk rpm or
*** equivalent package properly installed? Some build
*** features will be unavailable.
***
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
***
*** WARNING:
*** libwacomxi requires tcl environment; libwacomxi will not be built.
***
...
Then I run configure with option --with-tcl=/usr/local/ActiveTcl:
[jej@ayukawa linuxwacom]$./configure --with-tcl=/usr/local/ActiveTcl
...
----------------------------------------
BUILD ENVIRONMENT:
architecture - i686
linux kernel - yes 2.4
module versioning - yes
kernel source - yes /usr/src/linux
XFree86 - no
XLib - yes /usr/X11R6
TCL - yes /usr/local/ActiveTcl
TK - yes /usr/local/ActiveTcl
XFree86v3 - no
ncurses - yes
GTK - 2.0.6
BUILD OPTIONS:
wacom.o - no
wacdump - yes
xidump - yes
libwacomcfg - yes
libwacomxi - yes
xsetwacom - yes
hid.o - no
usbmouse.o - no
evdev.o - no
mousedev.o - no
input.o - no
tabletdev.o - no
wacom_drv.o - no
wacom_drv-v3.o - no
----------------------------------------
Note: You may need to issue the following commands before running wacomcpl:
[jej@ayukawa linuxwacom]$export LD_LIBRARY_PATH=/usr/local/ActiveTcl/lib:$LD_LIBRARY_PATH
[jej@ayukawa linuxwacom]$su
[jej@ayukawa linuxwacom]#cd /usr/local/ActiveTcl/lib
[jej@ayukawa lib]#ln -s libtcl.8.4.so libtcl.so.0
[jej@ayukawa lib]#ln -s libtk.8.4.so libtk.so.0
If your tcl and tk are installed on different paths, you'll need to
specify them separately. Suppose that your tcl is under /usr/local/tcl8.4
and your tk is under /usr/local/tk8.4, the proper configuration and setup
commands will be:
[jej@ayukawa linuxwacom]$./configure --with-tcl=/usr/local/tcl8.4 --with-tk=/usr/local/tk8.4
[jej@ayukawa linuxwacom]$export LD_LIBRARY_PATH=/usr/local/tcl8.4/lib:/usr/local/tk8.4/lib:$LD_LIBRARY_PATH
[jej@ayukawa linuxwacom]$su
[jej@ayukawa linuxwacom]#cd /usr/local/tcl8.4/lib
[jej@ayukawa lib]#ln -s libtcl.8.4.so libtcl.so.0
[jej@ayukawa lib]#cd /usr/local/tk8.4/lib
[jej@ayukawa lib]#ln -s libtk.8.4.so libtk.so.0
Next, run make. The output will be stored in the linuxwacom
package's src, src/.libs, src/wacomxi, and src/wacomxi/.libs directories.
They will be installed by running make install (you need to switch to
superuser to run this command).
Running wacomcpl
If wacom_drv.o was running while installing wacomcpl, wacomcpl can be
launched immediately after make install and exit (switch back
to your own account).
If wacom_drv.o is installed by the same make install as wacomcpl
is, restarting X server is required to use the newly built wacom_drv.o. We
strongly recommand to build and install the wacom_drv.o and wacomcpl from
the same release package since the out of sync wacom_drv.o and wacomcpl may
crash your X server.
Bring up gimp and select "File|Dialogs|Input Devices".
You will see a drop-down list with all three devices present. After enabling
them, you can see their respective statuses by calling up "File|Dialogs|Device
Status". It has been recommended that the devices be set to "Screen" mode
rather than "Window" due to a bug in Gimp which causes it to crash
unexpectedly.
I have successfully been able to use gimp with several different pens,
including the tips and erasers. Tilt does not appear to be used by gimp
at present, but pressure works fine. If the pressure is too coarse, or
doesn't kick in until too late, you may need to lower your threshold value.
The pressure curve setting can be changed through graphic tool, wacomcpl,
and command line tool, xsetwacom.
Also, a useability note with Gimp: Each input device (stylus,cursor,eraser)
has a completely different set of attributes in Gimp, and in theory, you can
even assign a unique serial number to different pens to get even
more granularity. You will experience this when
you try to use your eraser for the first time. Rather than selecting the
eraser tool, you get the rectangle selection tool instead. This is by design,
believe it or not. Gimp does not care that its an eraser, just that it's not
the pen you were just using. If you choose the eraser tool now, it will
remember that for the next time you try to use it. On the plus side, you
can set the eraser to be anything, including the Airbrush tool or Clone tool.
One tablet user has pointed out that deleting his .gimp directory and
rerunning gimp was necessary before his airbrush worked correctly. If you
are having trouble, it's worth a shot.
Good luck!
John Joganic can be contacted at the following email address:
jej@j-arkadia.com.
If at all possible, please include the word "WACOM" in the subject line.
I receive hundreds of messages a day, and this little addition will help
me find your message in the tons of spam.
This section is for everything that is either not critical or simply
too complex to describe in the document above without becoming overly
distracting.
I should tell you out-right that this is a time consuming process.
Why would you want to do this? Two reasons. One, you are a developer
and need to make changes to the source code directly. Two, your distribution
uses c libraries or configuration options that are not compatible with the
wacom_drv.o file that I provide. People running libc5 for instance, would
need to build their own driver.
You will need the X source code to rebuild the wacom_drv.o driver.
The build configuration for X generates a number of header files that are
necessary but not installed by default on most distributions. Consequently,
you will need to not only get the source, but build it, practically in its
entirety. Then, after all that, the configure script can be instructed to
hook into the X build tree and rebuild wacom_drv.o at any time without
having to rebuild X again.
Since I am running Redhat 8.0 and cannot really pull down the original
XFree86 4.2.0 source code, compile it, and expect it to work on my
system, I need to instead use the source RPM provided by Redhat. If you
choose to go this route, I provide pretty detailed instructions for making
this work. If your distribution works differently, or you are using Gentoo
where most everything is source code by default, you'll need to handle this
as best as possible according to your particular situation.
Step One: Get The Source
On Redhat 8.0, I discovered the version number for my currently installed
XFree86 packages by running rpm -q XFree86. This reported version
4.2.0-72, therefore the source package is XFree86-4.2.0-72.src.rpm.
I downloaded the package from Redhat directly and installed it to the system
as follows:
[root@sen src]# rpm -ivh XFree86-4.2.0-72.src.rpm
1:XFree86 ########################################### [100%]
This installs a number of files to the /usr/src/redhat directory,
particularly in the SOURCES and SPECS subdirectories. Other distributions
undoubtedly install elsewhere. Look for the XFree86.spec file which should
be located in the SPECS directory. This file contains all the information
necessary to patch the orginal XFree86-4.2.0 source code to the level that
Redhat is distributing in their regular binary package. The source code
and patch files are located in SOURCES.
Step Two: Build the Source
This step describes how to build the source from the RPM itself. If
you are building from some other mechanism, I honestly cannot offer much
assistance since I generally don't build my X system from scratch.
If you'd like to write up a short section on building the
server for your particular distribution, I would be happy to include it here.
Next, you don't actually have to build the entire thing. The
point at which the xf86Wacom.c driver can be built however,
is not until somewhere in the middle of the build process. The driver
depends on a number of header files that are created dynamically so until
they are generated, wacom_drv.o cannot be compiled. My solution
was to open a separate terminal in the wacom driver directory and
periodically attempt to build it. When it successfully built, I stopped
the X build process. Here's how to build the source for an RPM that's
been exploded out into the SPECS and SOURCES directories.
[root@sen root]# cd /usr/src/redhat
[root@sen redhat]# rpmbuild -bc SPECS/XFree86.spec
Not every distribution has rpmbuild; try using just rpm
instead. At some point, Redhat split the build functionality into separate
programs. If after looking through the rpm man page, you still
cannot get this to work, send me some email, and I'll look into it.
The important item is the "-bc" option of rpmbuild which unpacks,
patches, and builds the source without actually installing. While it is also
possible to simply unpack and patch using the "-bp" option, there does not
seem to be a way to just build. The "-bc" option simply deletes all the
files provided by "-bp" and recreates them again. The downside of this is
that if you wanted to simply unpack, patch, and then copy the new xf86Wacom.c
file over the old one, you'll find that the build step deletes it and starts
over again. I have gotten this to work by creating a new patch file, but
this requires a bit more effort, so I don't recommend it right off.
Step Three: Build the Original Driver
The xf86Wacom.c file is buried pretty deep in the X build tree. If it
is in a different location than the one I have provided below, try using
find . -name xf86Wacom.c from the BUILD directory.
[root@sen redhat]# cd BUILD/XFree86-4.2.0/xc/programs/Xserver/hw/xfree86/input/wacom
[root@sen wacom]# ls
Imakefile wacom.man xf86Wacom.c.Wacom-USB-driver-a25-update
Makefile xf86Wacom.c
The "a25-update" file is the original xf86Wacom.c file before Redhat's patch.
If you open xf86Wacom.c, you'll find that it is version 25, at least as
of this writing and this distribution. The presence of the Makefile means
that the configuration has at least been run for this directory. If you
have built a sufficient portion of the X source files, then all the header
files that you need have been generated, and you can build xf86Wacom.c. Try
it, and if it does not build, wait a bit. The absence of xf86Version.h
for instance, is a good indication that the build process is not ready.
[root@sen wacom]# make
rm -f xf86Wacom.o
gcc -O2 -march=i386 ... -c xf86Wacom.c
rm -f wacom_drv.o
ld -r xf86Wacom.o -o wacom_drv.o
Step Four: Automating the Build Process
By configuring the package with the --with-xf86 option set to the XFree86
build tree, you can build the driver outside of the X build tree.
[jej@ayukawa wacom]$ ./configure \
--with-xf86=/usr/src/redhat/BUILD/XFree86-4.2.0
...
BUILD ENVIRONMENT:
XFree86 - yes
BUILD OPTIONS:
wacom_drv.o - yes
[jej@ayukawa wacom]$ make
The makefile rule which builds the driver is contained within src/Makefile.am
and is modified according to the configuration to generate a rule similar to
this in src/Makefile:
xf86Wacom.o: xf86Wacom.c
gcc -O2 -march=i386 -mcpu=$(ARCHITECTURE) -pipe -ansi \
-pedantic -Wall -Wpointer-arith -fno-merge-constants \
-I. -I$(XF86_DIR)/programs/Xserver/hw/xfree86/common \
-I$(XF86_DIR)/programs/Xserver/hw/xfree86/loader \
-I$(XF86_DIR)/programs/Xserver/hw/xfree86/os-support \
-I$(XF86_DIR)/programs/Xserver/include \
-I$(XF86_DIR)/programs/Xserver/mi \
-I$(XF86_DIR)/exports/include/X11 \
-I$(XF86_DIR)/include/extensions \
-I$(XF86_DIR) \
-I$(XF86_DIR)/exports/include \
-Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE \
-D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE \
-DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY \
-DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPIXPRIV -DPANORAMIX \
-DRENDER -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV \
-DSINGLEDEPTH -DXFreeXDGA -DXvExtension -DXFree86LOADER \
-DXFree86Server -DXF86VIDMODE -DXvMCExtension \
-DSMART_SCHEDULE -DBUILDDEBUG -DXResExtension \
-DX_BYTE_ORDER=X_LITTLE_ENDIAN -DNDEBUG -DFUNCPROTO=15 \
-DNARROWPROTO -DIN_MODULE -DXFree86Module -DLINUX_INPUT \
-o xf86Wacom.o -c xf86Wacom.c
similar rules applie to wcmSerial.c, wcmUSB.c,
wcmISDV4.c, wcmCommon.c, wcmCompat.c, wcmConfig.c, and, wcmFilter.c.
The options and directories specified come directly from the output of the
make command in the previous step. All the root and parent directories have
been replaced with the macro XF86_DIR which in this case is set by the
configuration script to /usr/src/redhat/BUILD/XFree86-4.2.0/xc. If the
options that you see in your build are identical to those above, then the
default rule will work for you now. If not, you'll need to make some
alterations. You can update the Makefile.am file and rerun automake,
update the Makefile.in and rerun configure, or just update the Makefile
directly.
So long as the X build tree exists, the include directories will point to
the correct locations, and the driver will build. If space is an issue, you
can probably remove all the non-essential directories, but be careful; the
dependency tree in X is huge.
The following documentation for building wacom_drv.o on Debian Stable
was written by Timothy Klein. If you have any problems or questions,
go ahead and post them to the list, or send email to me directly. If
I cannot provide a satisfactory answer, I'll forward your email on to
Timothy.
Copyright (C) 2002 Timothy Klein
Just thought I would give you some brief notes on compiling wacom_drv.o
on Debian Stable. This must be done, as the Stable version of Debian
has XFree86 v. 4.1.0.1, and your pre-compiled module is for a later
version of X (4.2?). X complains about the server having ABI 2, and the
module having ABI 3, and refuses to load. So one must compile the
wacom_drv.o module for Debian Stable.
The good news is that, while it requires a *huge* download, and takes a
bit of time, it is easy.
-------------------------------------------------------------
Debian wacom_drv.o Compilation
1. Download the Debian source package for XFree86.
For Debian Stable there are three files:
xfree86_4.1.0-16.diff.gz
xfree86_4.1.0-16.dsc
xfree86_4.1.0.orig.tar.gz
Note that these are *big* files. The 'diff' file is 1.5 megabytes, and
the 'orig' file is 52 megabytes. So if you have a 28.8 modem
connection, this is going to be painful.
These files can be obtained automatically by using the command:
apt-get source xfree86
It is not necessary to be root to download the source package. After it
is downloaded, the package will be automatically extracted. Using this
method requires that you have a valid 'source' line in your
'/etc/apt/sources.list' file, though.
You can also just download the three packages above from your favorite
Debian mirror. If you do that, you need to extract them yourself, which
is done with the following command:
dpkg-source -x xfree86_4.1.0-16.dsc <only for manual download>
Either method will give you a 'xfree86-4.1.0' directory in the download
directory. For both this step, and the later package creation, you are
going to need tools from the 'dpkg-dev' package. So install that with
'apt-get' if you don't already have it installed.
2. Make sure you have the requisite build dependencies.
XFree86 requires certain packages to compile. It seems that 'dpkg' is
pretty good about telling you what packages it needs if they are not
installed (probably a nice script included by the Debian X maintainer).
Thus, you can just try and compile it and see what it complains about
not having and, at that point, install the needed packages with apt-get.
The other, cleaner, option is to run:
apt-get build-dep xfree86
This command will attempt to automatically install (or once in a blue
moon uninstall) all the necessary packages to compile XFree86. You need
to be 'root' to do this.
3. Begin the Build Process for xfree86
Become 'root' (or you could use fakeroot), and change into the
'xfree86-4.1.0' directory. Then run:
dpkg-buildpackage
The source will begin to compile. It will take a while. If you have a
really old machine, like a Pentium 166 or such, go on a vacation. It
may be done when you return.
4. Recompile the wacom_drv.o module.
The source you need to replace and recompile will be in the following
directory:
<download_dir>/xfree86-4.1.0/build-tree/xc/programs/Xserver/hw/xfree86/input/wacom
Replace the 'xf86Wacom.c' file therein with the one provided. While X
does need to have some configuration done for this to compile, and that
configuration is accomplished automatically by the build process, it
does not necessarily need to finish compiling the whole package. So,
once a 'Makefile' is created automatically by the build scripts in this
directory, you can attempt to run 'make' from time to time. Once it
compiles without error, you can halt the very lengthy build process of
the XFree86 package.
5. Move the wacom_drv.o module to the proper place.
That's it. Once the 'make' command compiles without error, you will
have several new files in the directory. The one we are interested in
is 'wacom_drv.o.' Now you can just move the 'wacom_drv.o' file to the
directory:
/usr/X11R6/lib/modules/input/
This will also require 'root' privileges.
HS suggested that with debian that you should be aware of:
on the next X update, the wacom_drv.o might be overwritten. So, you should use:
dpkg-divert --local --rename --divert /usr/X11R6/lib/modules/input/wacom_drv.o.orig
/usr/X11R6/lib/modules/input/wacom_drv.o (one line).
This will move the old file aside and makes sure that it will not get
overwritten on any update.
But what happens when a current wacom_drv.o would get installed that would be
sufficient to run the tablet? Just run:
dpkg-divert --delete --rename /usr/X11R6/lib/modules/input/wacom_drv.o
This should be the prefered method when files from packages get overwritten.
---------------------------------------------------------------------
You may want to add that to you HOWTO, for my fellow Debian users. And
thanks again for the very nice work on the HOWTO and the drivers.
HTH,
Tim
The following documentation for building wacom driver on PowerMac [silver]
was written by Joseph E. Sacco. If you have any problems or questions,
go ahead and post them to the list, or send email to me directly. I'll
forward your email on to Joseph.
Copyright (C) 2004 Joseph E. Sacco
System:
<< Hardware >>
* PowerMac [silver] with dual 533 MHz G4 [7410] CPU's, 1GB RAM,
(3) 73 GB SCSI drives
* Contour UniMouse [USB, optical, three button]
* Wacom Intuos Tablet [USB]: GD-1218-U
* 4-d mouse
* pen
* air brush
<< Software >>
* Yellow Dog Linux 3.0.1 [Redhat variant for PPC]
* kernel: 2.4.25-ben1
* linuxwacom-0.6.1
* XFree86-4.3.0-2.1e
* atk-1.6.0-1
* freetype-2.1.3-4
* gcc-3.3
* gtk+-2.4.0
* glib2-2.4.0
* ncurses-5.2-28
* pango-1.4.0
============================================================
I have a Wacom Intuos tablet "working" [after a fashion] on a PPC
running Yellow Dog Linux 3.0.1.
<< What works >>
* input devices:
* cursor movement
* button clicks
* wheel rotation [as seen from wacdump]
* pressure [as seen from wacdump & gimp]
* tilt [as seen from wacdump]
* applications:
* wacdump
* xev
* xinput-1.2
* gimp-1.25 & gimp-2.0
* dia-0.9.2
< What does *not* work >>
* input devices:
* Mode "Relative" for pen & air brush [should it???]
* applications:
* xidump
* xsetwacom
* wacomcpl [because of xsetwacom]
There are some issues I would like to report.
----------------------------------------------------------------------------------------------------------------------------------------
* Makefiles
The makefiles are set up for Intel architecture. Some options are not
applicable for PPC's.
[ from ./src/2.4.22/Makefile.in ]
KCFLAGS = -Wall $(DEBUG_FLAGS) -D__KERNEL__ \
-DMODULE -DEXPORT_SYMTAB $(MODS) \
-Wstrict-prototypes -Wno-trigraphs -O2 \
-fno-strict-aliasing \
-fno-common -fomit-frame-pointer -pipe \
===> -mpreferred-stack-boundary=2 \
===> -march=$(ARCHITECTURE)
The last two options are not applicable to a PPC.
A more appropriate set of flags, taken from building the 2.4.25 kernel
modules, might be:
KCFLAGS = -Wall $(DEBUG_FLAGS) -D__KERNEL__ \
-Wstrict-prototypes -Wno-trigraphs -O2 \
-fno-strict-aliasing -fno-common -fomit-frame-pointer \
-fsigned-char -msoft-float -pipe -ffixed-r2 \
-Wno-uninitialized -mmultiple -mstring \
-DMODULE -DMODVERSIONS -iwithprefix
[ from ./src/Makefile.in ]
$(XF86OBJS): xf86Wacom.c Makefile
==> gcc -O2 $(DEPFLAGS) -march=i386 -mcpu=$(ARCHITECTURE) -pipe -ansi \
-pedantic -Wall -Wpointer-arith $(NO_MERGE_CONSTANTS) \
-I. -I$(XF86_DIR)/programs/Xserver/hw/xfree86/common \
-I$(XF86_DIR)/programs/Xserver/hw/xfree86/loader \
-I$(XF86_DIR)/programs/Xserver/hw/xfree86/os-support \
-I$(XF86_DIR)/programs/Xserver/include \
-I$(XF86_DIR)/programs/Xserver/mi \
-I$(XF86_DIR)/exports/include/X11 \
-I$(XF86_DIR)/include/extensions \
-I$(XF86_DIR) \
-I$(XF86_DIR)/exports/include \
==> -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE \
-D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE \
-DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY \
-DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPIXPRIV -DPANORAMIX \
-DRENDER -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV \
-DSINGLEDEPTH -DXFreeXDGA -DXvExtension -DXFree86LOADER \
-DXFree86Server -DXF86VIDMODE -DXvMCExtension \
-DSMART_SCHEDULE -DBUILDDEBUG -DXResExtension \
-DX_BYTE_ORDER=X_LITTLE_ENDIAN -DNDEBUG -DFUNCPROTO=15 \
-DNARROWPROTO -DIN_MODULE -DXFree86Module $(LINUX_INPUT) \
-o $@ -c $(subst .o,.c,$@)
A more appropriate set of flags, taken from building XFree86-4.3.0, might be:
$(XF86OBJS): xf86Wacom.c Makefile
gcc -O2 $(DEPFLAGS) -mcpu=$(ARCHITECTURE) -pipe -ansi \
-pedantic -Wall -Wpointer-arith $(NO_MERGE_CONSTANTS) \
-I. -I$(XF86_DIR)/programs/Xserver/hw/xfree86/common \
-I$(XF86_DIR)/programs/Xserver/hw/xfree86/loader \
-I$(XF86_DIR)/programs/Xserver/hw/xfree86/os-support \
-I$(XF86_DIR)/programs/Xserver/include \
-I$(XF86_DIR)/programs/Xserver/mi \
-I$(XF86_DIR)/exports/include/X11 \
-I$(XF86_DIR)/include/extensions \
-I$(XF86_DIR) \
-I$(XF86_DIR)/exports/include \
-Dlinux -D__powerpc__ -D_POSIX_C_SOURCE=199309L \
-D_POSIX_SOURCE \
-D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE \
-DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY \
-DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPIXPRIV -DPANORAMIX \
-DRENDER -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV \
-DSINGLEDEPTH -DXFreeXDGA -DXvExtension -DXFree86LOADER \
-DXFree86Server -DXF86VIDMODE -DXvMCExtension \
-DSMART_SCHEDULE -DBUILDDEBUG -DXResExtension \
-DX_BYTE_ORDER=X_BIG_ENDIAN -DNDEBUG -DFUNCPROTO=15 \
-DNARROWPROTO -DIN_MODULE -DXFree86Module $(LINUX_INPUT) \
-o $@ -c $(subst .o,.c,$@)
where $(ARCHITECTURE) = powerppc [ppc will not work]
* Kernel modules
I experimented with different ways of building [and loading] the kernel
modules:
* evdev.o
* hid.o
* mousedev.o
* wacom.o
I settled on building the modules within the existing framework for building
the Linux kernel rather than using the makefiles provided by linuxwacom-0.6.1.
I did so to insure that I got all the PPC dependency stuff right.
* Hotplug kernel module issues
I had some issues using 'modprobe' to load the wacom kernel module that forced
me to reconfigure and rebuild the 2.4.25-ben1 kernel.
A typical YDL kernel build for a PowerMac statically links most of the input
core support into the kernel:
[from .config file provided by YDL]
# Input core support
#
CONFIG_INPUT=y
CONFIG_INPUT_KEYBDEV=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
I had initially built only wacom.o as a loadable module. The other modules
were statically linked into the kernel.
When wacom.o was loaded using:
$ /sbin/insmod wacom.o
all went well:
[output from /var/log/messages]
Mar 24 10:26:33 plantain kernel: usb.c: registered new driver wacom
Mar 24 10:26:33 plantain kernel: Reporting max 45720, 31680
Mar 24 10:26:33 plantain kernel: wacom.c: Setting tablet report for tabletdata
Mar 24 10:26:33 plantain kernel: input4: Wacom Intuos 12x18 on usb2:3.0
Mar 24 10:26:33 plantain kernel: wacom.c: v1.30-j0.6.1 Vojtech Pavlik
Mar 24 10:26:33 plantain kernel: wacom.c: USB Wacom Graphire and Wacom Intuos
tablet driver (LINUXWACOM-DEBUG)
Mar 24 10:26:33 plantain kernel: wacom_events
When wacom.o was loaded using:
$ /sbin/modprobe wacom
the module failed to load:
$ /sbin/rmmod wacom
$ /sbin/modprobe wacom
modprobe: Can't locate module evdev which is needed for wacom
I was perplexed about this failure because "evdev" was statically linked into
the kernel. I puzzled over this for a while and concluded that it had
something to do with how USB hotplug was configured.
I arrived at this conclusion by unplugging the tablet, waiting, and then
plugging it back in. I found that the tablet "worked" but there are complaints
in /var/log/messages:
Mar 24 10:34:51 plantain kernel: usb.c: USB disconnect on device 10:19.0-1
address 3
Mar 24 10:35:53 plantain kernel: hub.c: new USB device 10:19.0-1, assigned
address 4
Mar 24 10:35:53 plantain kernel: Reporting max 45720, 31680
Mar 24 10:35:53 plantain kernel: wacom.c: Setting tablet report for tablet
data
Mar 24 10:35:53 plantain kernel: input4: Wacom Intuos 12x18 on usb2:4.0
Mar 24 10:35:53 plantain kernel: wacom_intuos_irq: tool change 0x094
Mar 24 10:35:56 plantain /etc/hotplug/usb.agent: Setup wacom for USB product
56a/24/101
Mar 24 10:35:56 plantain /etc/hotplug/usb.agent: Setup evdev mousedev for USB
product 56a/24/101
Mar 24 10:35:56 plantain modprobe: modprobe: Can't locate module evdev
Mar 24 10:35:56 plantain modprobe: modprobe: Can't locate module mousedev
I really don't understand how the USB hotplug mechanisms are supposed to be
configured. Yes... I did look at the scripts in /etc/hotplug. Yes.. I did
attempt a few unsucessful modifications to usb.handmap and usb.distmap. I
pondered over this for a while and then decided on a work-around:
I reconfigured and rebuilt the kernel to dynamically load
* evdev.o
* hid.o
* mousedev.o
* wacom.o
which "eliminated" the problem.
If someone out there knows what should have been done to allow modprobe to
successfully load wacom when evdev and friends are already statically linked
into the kernel, please send me email.
* XFree86 module: wacom_drv.o
I rebuilt wacom_drv.o using the linuxwacom-0.6.1 makefile and the flags listed
above. The build was uneventful.
* Mouse1
I do not have a Mouse1 entry in XF86Config. I mention this because there is an
obscure reference in the documentation to potential mouse conflict problems
when running a USB Wacom mouse on a system with a USB mouse. The USB mouse
connected to the system and the Wacom input devices all seem to work.
On my system:
/dev/mouse is a link to /dev/input/mice
Mouse0 is configured in XF86Config as:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "ZAxisMapping" "4 5"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
EndSection
Maybe something nasty is going on that I don't know about. Thoughts???
* xidump
There are problems with xidump.
The list option seems to work:
$xidump -v -l
eraser extension
key: min=8, max=39, num=32
btn: num=1
val: axes=6 mode=abs buf=0
axis[0]: res=100000, max=0, max=45720
axis[1]: res=100000, max=0, max=29260
axis[2]: res=1, max=0, max=1023
axis[3]: res=1, max=-64, max=63
axis[4]: res=1, max=-64, max=63
axis[5]: res=1, max=0, max=1023
stylus extension
key: min=8, max=39, num=32
btn: num=4
val: axes=6 mode=abs buf=0
axis[0]: res=100000, max=0, max=45720
axis[1]: res=100000, max=0, max=29260
axis[2]: res=1, max=0, max=1023
axis[3]: res=1, max=-64, max=63
axis[4]: res=1, max=-64, max=63
axis[5]: res=1, max=0, max=1023
cursor extension
key: min=8, max=39, num=32
btn: num=16
val: axes=6 mode=rel buf=0
axis[0]: res=100000, max=0, max=45720
axis[1]: res=100000, max=0, max=31680
axis[2]: res=1, max=0, max=1023
axis[3]: res=1, max=-900, max=899
axis[4]: res=1, max=-1023, max=1023
axis[5]: res=1, max=0, max=1023
Mouse0 disabled
btn: num=5
val: axes=2 mode=rel buf=256
axis[0]: res=1, max=0, max=1599
axis[1]: res=1, max=0, max=1023
keyboard keyboard
key: min=8, max=255, num=248
The problem is with viewing the actual events:
$ xidump -u raw stylus
<< produces nothing >>
Another view of the problem is seen from running
$ xidump stylus
xidump v0.5.1
InputDevice: stylus
Valuators: Absolute Axes: 6 Buffer: 0
x-axis y-axis pressure x-tilt y-tilt wheel
data:
min: +00000 +00000 +00000 -00064 -00064 +00000
max: +45720 +29260 +01023 +00063 +00063 +01023
res: +100000 +100000 +00001 +00001 +00001 +00001
Proximity:
Focus:
Buttons:
Keys:
Note that the data line is empty. Moving the device, clicking buttons, etc.
has no effect on the display of information.
I poked around a bit using GDB. I think there is some sort of buffer-flush
problem.
<< code recompiled without optimization >>
EXP1:
gdb ./xidump
run -u raw stylus
place the pen on the tablet. move it around.
<< no output>>
EXP2:
gdb ./xidump
b main
run -u raw stylus
b 1098 [stop at Run()]
c
s [set into Run()]
b 906 [stop at DevicekeyPress()]
c [send it on its way]
place the pen on the tablet. move it around
See lots of output...
4.13480806: Button: 1 DOWN
4.14659095: Motion: x=+26974 y=+16411 p= 567 tx= -3 ty= +0 w= +0
4.15855289: Motion: x=+26962 y=+16459 p= 571 tx= -3 ty= +0 w= +0
4.17061496: Motion: x=+26972 y=+16444 p= 588 tx= -3 ty= +0 w= +0
4.18257499: Motion: x=+26971 y=+16445 p= 596 tx= -2 ty= +0 w= +0
4.19459391: Motion: x=+26970 y=+16445 p= 579 tx= -2 ty= +0 w= +0
4.20257688: Motion: x=+26970 y=+16445 p= 564 tx= -2 ty= +0 w= +0
4.21458197: Motion: x=+26970 y=+16445 p= 558 tx= -1 ty= +0 w= +0
4.25055790: Motion: x=+26970 y=+16445 p= 555 tx= -1 ty= +1 w= +0
4.27457905: Motion: x=+26970 y=+16445 p= 548 tx= +0 ty= +1 w= +0
4.28655696: Motion: x=+26970 y=+16446 p= 543 tx= +0 ty= +1 w= +0
4.29854703: Motion: x=+26970 y=+16447 p= 526 tx= +0 ty= +2 w= +0
4.31057596: Motion: x=+26970 y=+16446 p= 478 tx= +0 ty= +2 w= +0
4.31859589: Motion: x=+26970 y=+16446 p= 374 tx= +0 ty= +2 w= +0
4.33457303: Motion: x=+26970 y=+16446 p= 196 tx= +0 ty= +3 w= +0
4.34258389: Motion: x=+26970 y=+16446 p= 1 tx= +0 ty= +3 w= +0
4.34261489: Button: 1 UP
* xsetwacom
There are problems...
The 'list' command prints stuff:
$ xsetwacom list
eraser eraser
stylus stylus
cursor cursor
The set command fails:
$ xsetwacom -v set stylus FileModel
Set: sending 100 0 (0x0)
Error (5): WacomConfigSetRawParam: Unknown X error
Set: Failed to set stylus value for 'FileModel'
Looking at the code, I see that it is failing in a call to
XChangeDeviceControl() made from WacomConfigSetRawParam(). I also poked
around in this one with GDB. The X-Display gets opened properly. Things look
OK until the request is dispatched, which then returns an unknown X error.
I also tried to use xsetwacom to toggle the cursor mode between relative and
absolute. Again the command fails with an unkown X error. Note that the
XFree86 command 'xsetmode' works fine.
-Joseph
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook,
or other functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it, with or
without modifying it, either commercially or noncommercially. Secondarily,
this License preserves for the author and publisher a way to get credit for
their work, while not being considered responsible for modifications made
by others. This License is a kind of "copyleft", which means
that derivative works of the document must themselves be free in the same
sense. It complements the GNU General Public License, which is a copyleft
license designed for free software. We have designed this License in order to use it
for manuals for free software, because free software needs free documentation:
a free program should come with manuals providing the same freedoms that
the software does. But this License is not limited to software manuals; it
can be used for any textual work, regardless of subject matter or whether
it is published as a printed book. We recommend this License principally
for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work,
in any medium, that contains a notice placed by the copyright holder saying
it can be distributed under the terms of this License. Such a notice grants
a world-wide, royalty-free license, unlimited in duration, to use that work
under the conditions stated herein. The "Document", below, refers to any
such manual or work. Any member of the public is a licensee, and is addressed
as "you". You accept the license if you copy, modify or distribute the work
in a way requiring permission under copyright law. A "Modified Version" of the Document means any
work containing the Document or a portion of it, either copied verbatim,
or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a
front-matter section of the Document that deals exclusively with the relationship
of the publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly within
that overall subject. (Thus, if the Document is in part a textbook of mathematics,
a Secondary Section may not explain any mathematics.) The relationship could
be a matter of historical connection with the subject or with related matters,
or of legal, commercial, philosophical, ethical or political position regarding
them. The "Invariant Sections" are certain Secondary
Sections whose titles are designated, as being those of Invariant Sections,
in the notice that says that the Document is released under this License.
If a section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero Invariant
Sections. If the Document does not identify any Invariant Sections then there
are none. The "Cover Texts" are certain short passages of
text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice
that says that the Document is released under this License. A Front-Cover
Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable
copy, represented in a format whose specification is available to the general
public, that is suitable for revising the document straightforwardly with
generic text editors or (for images composed of pixels) generic paint programs
or (for drawings) some widely available drawing editor, and that is suitable
for input to text formatters or for automatic translation to a variety of
formats suitable for input to text formatters. A copy made in an otherwise
Transparent file format whose markup, or absence of markup, has been arranged
to thwart or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount of
text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies
include plain ASCII without markup, Texinfo input format, LaTeX input format,
SGML or XML using a publicly available DTD, and standard-conforming simple
HTML, PostScript or PDF designed for human modification. Examples of transparent
image formats include PNG, XCF and JPG. Opaque formats include proprietary
formats that can be read and edited only by proprietary word processors,
SGML or XML for which the DTD and/or processing tools are not generally available,
and the machine-generated HTML, PostScript or PDF produced by some word processors
for output purposes only. The "Title Page" means, for a printed book, the
title page itself, plus such following pages as are needed to hold, legibly,
the material this License requires to appear in the title page. For works
in formats which do not have any title page as such, "Title Page" means the
text near the most prominent appearance of the work's title, preceding the
beginning of the body of the text. A section "Entitled XYZ" means a named subunit
of the Document whose title either is precisely XYZ or contains XYZ in parentheses
following text that translates XYZ in another language. (Here XYZ stands
for a specific section name mentioned below, such as "Acknowledgements",
"Dedications", "Endorsements", or "History".) To "Preserve the Title" of
such a section when you modify the Document means that it remains a section
"Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next
to the notice which states that this License applies to the Document. These
Warranty Disclaimers are considered to be included by reference in this License,
but only as regards disclaiming warranties: any other implication that these
Warranty Disclaimers may have is void and has no effect on the meaning of
this License. 2. VERBATIM COPYING
You may copy and distribute the Document in any
medium, either commercially or noncommercially, provided that this License,
the copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other conditions
whatsoever to those of this License. You may not use technical measures to
obstruct or control the reading or further copying of the copies you make
or distribute. However, you may accept compensation in exchange for copies.
If you distribute a large enough number of copies you must also follow the
conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media
that commonly have printed covers) of the Document, numbering more than 100,
and the Document's license notice requires Cover Texts, you must enclose
the copies in covers that carry, clearly and legibly, all these Cover Texts:
Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover.
Both covers must also clearly and legibly identify you as the publisher of
these copies. The front cover must present the full title with all words
of the title equally prominent and visible. You may add other material on
the covers in addition. Copying with changes limited to the covers, as long
as they preserve the title of the Document and satisfy these conditions,
can be treated as verbatim copying in other respects. If the required texts for either cover are too
voluminous to fit legibly, you should put the first ones listed (as many
as fit reasonably) on the actual cover, and continue the rest onto adjacent
pages. If you publish or distribute Opaque copies of the
Document numbering more than 100, you must either include a machine-readable
Transparent copy along with each Opaque copy, or state in or with each Opaque
copy a computer-network location from which the general network-using public
has access to download using public-standard network protocols a complete
Transparent copy of the Document, free of added material. If you use the
latter option, you must take reasonably prudent steps, when you begin distribution
of Opaque copies in quantity, to ensure that this Transparent copy will remain
thus accessible at the stated location until at least one year after the
last time you distribute an Opaque copy (directly or through your agents
or retailers) of that edition to the public. It is requested, but not required, that you contact
the authors of the Document well before redistributing any large number of
copies, to give them a chance to provide you with an updated version of the
Document. 4. MODIFICATIONS
You may copy and distribute a Modified Version of
the Document under the conditions of sections 2 and 3 above, provided that
you release the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution and
modification of the Modified Version to whoever possesses a copy of it. In
addition, you must do these things in the Modified Version:
- A. Use in the Title Page (and on the covers, if any) a
title distinct from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section of the
Document). You may use the same title as a previous version if the original
publisher of that version gives permission.
- B. List on the Title Page, as authors, one or
more persons or entities responsible for authorship of the modifications
in the Modified Version, together with at least five of the principal authors
of the Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
- C. State on the Title page the name of the publisher of the Modified Version, as the publisher.
- D. Preserve all the copyright notices of the Document.
- E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
- F. Include, immediately after the copyright notices,
a license notice giving the public permission to use the Modified Version
under the terms of this License, in the form shown in the Addendum below.
- G. Preserve in that license notice the full lists
of Invariant Sections and required Cover Texts given in the Document's license
notice.
- H. Include an unaltered copy of this License.
- I. Preserve the section Entitled "History", Preserve
its Title, and add to it an item stating at least the title, year, new authors,
and publisher of the Modified Version as given on the Title Page. If there
is no section Entitled "History" in the Document, create one stating the
title, year, authors, and publisher of the Document as given on its Title
Page, then add an item describing the Modified Version as stated in the previous
sentence.
- J. Preserve the network location, if any, given
in the Document for public access to a Transparent copy of the Document,
and likewise the network locations given in the Document for previous versions
it was based on. These may be placed in the "History" section. You may omit
a network location for a work that was published at least four years before
the Document itself, or if the original publisher of the version it refers
to gives permission.
- K. For any section Entitled "Acknowledgements"
or "Dedications", Preserve the Title of the section, and preserve in the
section all the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
- L. Preserve all the Invariant Sections of the
Document, unaltered in their text and in their titles. Section numbers or
the equivalent are not considered part of the section titles.
- M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version.
- N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section.
- O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections
or appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all of
these sections as invariant. To do this, add their titles to the list of
Invariant Sections in the Modified Version's license notice. These titles
must be distinct from any other section titles. You may add a section Entitled "Endorsements",
provided it contains nothing but endorsements of your Modified Version by
various parties--for example, statements of peer review or that the text
has been approved by an organization as the authoritative definition of a
standard. You may add a passage of up to five words as a
Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to
the end of the list of Cover Texts in the Modified Version. Only one passage
of Front-Cover Text and one of Back-Cover Text may be added by (or through
arrangements made by) any one entity. If the Document already includes a
cover text for the same cover, previously added by you or by arrangement
made by the same entity you are acting on behalf of, you may not add another;
but you may replace the old one, on explicit permission from the previous
publisher that added the old one. The author(s) and publisher(s) of the Document
do not by this License give permission to use their names for publicity for
or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS
You may combine the Document with other documents
released under this License, under the terms defined in section 4 above for
modified versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and list
them all as Invariant Sections of your combined work in its license notice,
and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of
this License, and multiple identical Invariant Sections may be replaced with
a single copy. If there are multiple Invariant Sections with the same name
but different contents, make the title of each such section unique by adding
at the end of it, in parentheses, the name of the original author or publisher
of that section if known, or else a unique number. Make the same adjustment
to the section titles in the list of Invariant Sections in the license notice
of the combined work. In the combination, you must combine any sections
Entitled "History" in the various original documents, forming one section
Entitled "History"; likewise combine any sections Entitled "Acknowledgements",
and any sections Entitled "Dedications". You must delete all sections Entitled
"Endorsements." 6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document
and other documents released under this License, and replace the individual
copies of this License in the various documents with a single copy that is
included in the collection, provided that you follow the rules of this License
for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection,
and distribute it individually under this License, provided you insert a
copy of this License into the extracted document, and follow this License
in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives
with other separate and independent documents or works, in or on a volume
of a storage or distribution medium, is called an "aggregate" if the copyright
resulting from the compilation is not used to limit the legal rights of the
compilation's users beyond what the individual works permit. When the Document
is included an aggregate, this License does not apply to the other works
in the aggregate which are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable
to these copies of the Document, then if the Document is less than one half
of the entire aggregate, the Document's Cover Texts may be placed on covers
that bracket the Document within the aggregate, or the electronic equivalent
of covers if the Document is in electronic form. Otherwise they must appear
on printed covers that bracket the whole aggregate. 8. TRANSLATION
Translation is considered a kind of modification,
so you may distribute translations of the Document under the terms of section
4. Replacing Invariant Sections with translations requires special permission
from their copyright holders, but you may include translations of some or
all Invariant Sections in addition to the original versions of these Invariant
Sections. You may include a translation of this License, and all the license
notices in the Document, and any Warrany Disclaimers, provided that you also
include the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between the translation
and the original version of this License or a notice or disclaimer, the original
version will prevail. If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to Preserve its
Title (section 1) will typically require changing the actual title. 9. TERMINATION
You may not copy, modify, sublicense, or distribute
the Document except as expressly provided for under this License. Any other
attempt to copy, modify, sublicense or distribute the Document is void, and
will automatically terminate your rights under this License. However, parties
who have received copies, or rights, from you under this License will not
have their licenses terminated so long as such parties remain in full compliance.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised
versions of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may differ
in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing
version number. If the Document specifies that a particular numbered version
of this License "or any later version" applies to it, you have the option
of following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the Free
Software Foundation. If the Document does not specify a version number of
this License, you may choose any version ever published (not as a draft)
by the Free Software Foundation. HOW TO USE THIS LICENSE FOR YOUR DOCUMENTS
To use this License in a document you have written,
include a copy of the License in the document and put the following copyright
and license notices just after the title page: Copyright (c) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some
other combination of the three, merge those two alternatives to suit the
situation. If your document contains nontrivial examples of
program code, we recommend releasing these examples in parallel under your
choice of free software license, such as the GNU General Public License,
to permit their use in free software. |