The Linux Wacom Project
| ![]() |
![]() | |
![]() | |
Main | News | FAQ | Downloads | Documentation | Help | Development | TOC | All | May 20, 2004 |
![]() | |
![]() |
Linux Wacom Project HOWTOPermission 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. 1.0 - IntroductionThis 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. 1.1 - Success Stories
1.2 - How To Use This DocumentIn 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.
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. 1.3 - Resources and References
1.4 - Wacom Driver Theory of OperationSerial Tablet Operation - The Short Story USB Tablet Operation - The Long Story 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. 2.0 - Getting It TogetherIncidentally, 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. 2.1 - Before We StartThe 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. 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.[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 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*. 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). 2.2 - Downloading the CodeThe 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. 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.[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 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:
Stable Packages by Version and Date:
Beta Packages by Version and Date:
2.3 - Configuring the PackageThe Configure ScriptBuilding Kernel Modules - USB OnlyIn 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.Module Versioning - USB OnlyThe XFree86 XInput Driver - USB and SerialGenerally, 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 XLibVarious 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 TypeThe 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 FeaturesThe 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 OptionsThe 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.
Configuration SamplesHere 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. 2.4 - The Root AccountNormal 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]$ 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 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]$ /sbin/modprobe foo foo.o: create_module: Operation not permitted [jej@ayukawa jej]$ su Password: [root@ayukawa jej]# whoami root [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]# [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 So that leaves you with two immediate options, and one potential long-term option: Option One: Become root and add /sbin to the path. Option Two: Become root using root's environment and cd back.[jej@ayukawa src]$ su [jej@ayukawa src]# export PATH=$PATH:/sbin Option Three (recommended): Add /sbin to your personal account's path[jej@ayukawa src]$ su - [root@ayukawa root]# cd /home/jej/src/linuxwacom/src [jej@ayukawa src]$ export PATH=$PATH:/sbin [jej@ayukawa src]$ su [root@ayukawa src]# echo $PATH /bin:/usr/bin: ... :/home/jej/bin:/sbin [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. 3.0 - The USB Kernel DriverSerial 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. 3.1 - Updated wacom.cThe 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. 3.2 - Building wacom.c (for kernel 2.4)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. 3.3 - Building wacom.c (for kernel 2.6)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. 3.4 - Testing If wacom.o Will Load (for kernel 2.4 only)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. 3.5 - Installing wacom.oWhen 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. 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]$ 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 Here, I've saved the original to wacom_old.o and copied my new driver over it. You should substitute directory names as appropriate.[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 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. 3.6 - Loading the wacom Driver (for kernel 2.4 only)[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 [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) 3.7 - Testing Tablet DetectionIn 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. 3.7.1 - Plug It InThis is Redhat 8.0 (2.4.18-17.8.0): 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. 3.7.2 - Wacom Driver Does Not Get ControlIf 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. 3.7.3 - Building usbmouse.o, evdev.o, mousedev.o, and hid.o (for kernel 2.4)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: 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.[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 3.7.4 - Building usbmouse.o, evdev.o, mousedev.o, and hid.o (for kernel 2.6)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 3.7.5 - More about usbmouse.o, evdev.o, mousedev.o, and hid.oIf 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. 3.7.6 - Unknown Tablet?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. The next section assumes you have things working up to this point. 3.8 - Viewing the Raw Data[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) [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> 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. 4.0 - Using wacdump[jej@ayukawa linuxwacom]$ ./configure ... ---------------------------------------- BUILD OPTIONS: wacom.o - no wacdump - yes hid.o - no usbmouse.o - no wacom_drv.o - no ---------------------------------------- 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. 5.0 - Configuring XFree86Two 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.5.1 - Adding the InputDevicesSection "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 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) 5.2 - Mouse1There 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." 5.3 - ServerLayoutSection "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 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. 5.4 - Updating wacom_drv.oThere 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. 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.[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. 5.5 - Restart XFinally, restart X. You may wish to do this from runlevel 3 for testing purposes. 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]# init 3 ...processes starting and stopping... [root@ayukawa root]# startx 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.[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 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. 5.6 - Check the Pointer Status[root@ayukawa log]# xsetpointer -l "eraser" [XExtensionDevice] "stylus" [XExtensionDevice] "cursor" [XExtensionDevice] "Mouse0" [XPointer] "keyboard" [XKeyboard] 6.0 - Using xidump[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 ... ---------------------------------------- [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 [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> [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: 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 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. 7.0 - Using xsetwacomHowever, 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: Below is a list of the parameters and their values used by xsetwacom set command:[jej@ayukawa linuxwacom]$xsetwacom set Stylus TPCButton on 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 8.0 - Using wacomcplHowever, 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. 9.0 - Working With Gimp10.0 - ContactsJohn 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. 11.0 - AppendixThis section is for everything that is either not critical or simply too complex to describe in the document above without becoming overly distracting. 11.1 - Building wacom_drv.o From ScratchIntroductionI should tell you out-right that this is a time consuming process.
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 SourceOn 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 SourceThis 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 DriverThe 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. 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 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 [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 ProcessBy 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
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. 11.2 - Building wacom_drv.o On Debian StableThe 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. 11.3 - Building wacom driver On PowerMacThe 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 11.4 - GNU Free Document LicenseVersion 1.2, November 2002Copyright (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 1. APPLICABILITY AND DEFINITIONS
7. AGGREGATION WITH INDEPENDENT WORKS 10. FUTURE REVISIONS OF THIS LICENSE HOW TO USE THIS LICENSE FOR YOUR DOCUMENTS 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". with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. |