Recently, I acquired a rather old Wacom Intuos A5 tablet, for reasons I won’t delve into at the moment.
It’s an old serial model, and although I don’t have a serial port anymore, I do have a USB-to-serial adapter, which thought would probably work fine with the X.org driver produced by the linuxwacom project, since they do mention support for serial tablets on their website.
I plugged it in, followed the linuxwacom documentation about setting everything up in xorg.conf, and fired up the X server. Nothing happened… So I started digging in the wacom driver source.
First Obstacle: Prolific PL2303 USB Serial Port
The first problem I encountered was with my USB-serial adaptor. Apparently, the wacom driver used a TCIOCGSERIAL ioctl, which is supposed to return information on a serial device, to determine if it’s talking to a serial or a USB device. If the ioctl fails, it thinks it’s not talking to a serial device, and starts talking USB HID to the tablet.
Unfortunately, the pl2303 driver in the linux kernel (as of version 126.96.36.199 that I tested) does not implement the aforementioned ioctl, even though it’s supposed to present a proper serial port to the system. So I had to hack the kernel, and add that ioctl in the pl2303 driver (patch against 188.8.131.52).
(edit: my pl2303 patch got included in linux 2.6.34, so you don’t need the patch any more)
Sadly however, although now the wacom driver realized that it was dealing with a serial device, the tablet still didn’t work…
Second Obstacle: The linuxwacom Driver
After a lot of digging around the source of multiple wacom driver versions, it turns out the guys at the linuxwacom project removed the code for old serial tablets from the driver sometime last year!
I tried installing a few older versions of the driver (anything prior to 0.9.1 had the serial code), but they would not compile with the much newer X.org headers in my system. Apparently some changes with the XInput extension broke the old driver. So I started hacking again.
First I tried back-porting the XInput changes from the newer wacom driver to the old 0.8.4 version, but although I managed to compile it, it would segfault upon being loaded by the X server. Evidently I screwed something up during the backport, which I could have probably fixed eventually, but I realized that it’s a bad idea to get stuck to the old wacom driver.
So instead I started from scratch in the opposite direction, re-integrating the old serial code from 0.8.4 to the most recent 0.10.4 wacom driver.
And indeed after a few hours of hacking, I managed to get my serial Wacom Intuos to work perfectly! Here’s the patch in case anyone needs it.
I must say it’s an impressive input device, pressure-sensitivity, tilt sensing, everything works perfectly. The only problem is that I still can’t draw any more than I could on paper :)