At UDS I ran into Chase Douglas, one of Ubuntu’s multitouch developers, and asked him about getting multitouch working on a Lenovo X201 tablet, while he didn’t have a specific answer he gave me enough pieces of the puzzle (wacom_w8001 and inputattach) to sort it out.
In addition to the Wacom kernel driver for USB devices (wacom) there is a separate one for serial devices (wacom_w8001). While you could load the driver with ‘modprobe wacom_w8001′. I wanted to load it automatically so I used a udev rule. First, I needed to find the serial port the device is attached to by looking at dmesg:
[ 27.584535] input: Wacom Serial Penabled 2FG Touchscreen as /devices/pnp0/00:0b/tty/ttyS4/serio2/input/input6
Then I wanted to find the id of the serial device:
cat /sys/class/tty/ttyS4/device/id
Just in case it happens to change ports! The udev rule then looks like:
SUBSYSTEM==”tty”, KERNEL==”ttyS[0-9]*”, ATTRS{id}==”WACf00c”, RUN+=”/sbin/modprobe wacom_w8001″
To actually communicate with the serial device it seems that you need a program called inputattach. Unfortunately, the version of inputattach in Natty doesn’t have support for Wacom serial devices. Luckily, I found a patch in a Fedora bug adding support for it though. I built a new version of inputattach with that patch and the device showed up in the output of ‘sudo lsinput’! I then added running inputattach to the udev rule:
ACTION==”add|change”, SUBSYSTEM==”tty”, KERNEL==”ttyS[0-9]*”, ATTRS{id}==”WACf00c”, RUN+=”/usr/bin/inputattach –daemon –w8001 /dev/%k”
There was still a bit more work to do though. Chase had also mentioned that I’d want to use the evdev X driver instead of the wacom one. Looking in /usr/share/X11/xorg.conf.d/ there are various conf files for loading drivers for devices. I wrote one for my specific device:
Section "InputClass"
Identifier "Wacom serial class"
MatchProduct "Wacom Serial Penabled 2FG Touchscreen"
Driver "evdev"
EndSection
I then used geistest in a terminal to confirm that it was working by watching its output. Granted its only two finger touch but its twice as good as one! Woohoo!
My friend Kees also has a Lenovo X200 laptop with a serial Wacom touchscreen and while the id of the serial device is different the same steps worked for him. When we were testing inputattach we noticed that would it die during a suspend resume cycle. Kees found the source of the bug and has submitted a patch to upstream and added an Ubuntu patch to Oneiric’s version of inputattach. He also threw it in his PPA.
I’m now busy configuring ginn for moving forward and backward between pages when reading comic books in tablet mode.
Thanks for the info, I’ll add it to the upstream documentation and make sure the corresponding package in Oneiric includes the appropriate rules!
Thank you for this interesting post. I own myself a X201T laptop running Debian, with a tablet identified as WACf00c. I tried to follow your indications, but I have some troubles: evdev complains that it does not know how to use the wacom device (called ‘Wacom Serial Touchscreen’ here). See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632961.
Can you precise what versions of the kernel/udev/evdev X11 driver you use? What is the two-digit index of your udev rule (is it loaded before the inputattach rule?) and your xorg.conf snippet? Do you have any other advice I may try? Thank you in advance!
After upgrading to Oneiric I was having issues using my touchscreen. Come to find out it was because I had two udev rules running inputattach, my local one and the one from the inputattach package. I removed the inputattach line from my udev rule, 99-local.rules, rebooted and was able to use my touchscreen again.