Ubuntu: Wacom Tablet Hotplugging

September 1st, 2008 § 4 comments

Update 11-04-2008: The release version of Ubuntu 8.10 Intrepid should work out of the box, so you don’t need to do any of this. However, only the stylus works. If linuxwacom comes out with an update to use the eraser and tablet buttons, you might need to manually install the linuxwacom driver, but right now, enjoy the “it just works” philosophy. :)

Ubuntu 8.10 “Intrepid Ibis” will use Xorg 7.4′s input hotplugging, allowing auto-detection of input devices (e.g. keyboards, mice, tablets) during an X session. (Previously, input devices were only detected at the startup of an X session.)

Note that there are still a number of bugs with hotplugging:

  • you must install the latest linuxwacom driver to get correct clicking
  • hotplugging will only recognize the stylus events (so no eraser or express buttons)
  • unplugging the tablet causes X to crash. Edit 9-20-08: There is a line in the linuxwacom source you need to edit to fix this (see step 4 of Manual Installation below). [linuxwacom post] Edit 11-04-08: Intrepid updated the linuxwacom driver that ships with Intrepid, so you don’t need to install the updated linuxwacom driver.

Installing LinuxWacom driver in Intrepid
(based off the Hardy linuxwacom install thread, here. Tested on Intrepid alpha 6 LiveCD)

Easy Method:

  1. Download my install_linuxwacom script
  2. Run the script
    chmod +x install_linuxwacom
    ./install_linuxwacom
  3. Enjoy!

Manual Installation Steps:

  1. Install required packages
    sudo apt-get update
    sudo apt-get install linux-headers-$(uname -r) build-essential x11proto-core-dev libxau-dev libxdmcp-dev x11proto-input-dev x11proto-kb-dev xtrans-dev libx11-dev x11proto-xext-dev libxext-dev libxi-dev linux-libc-dev libc6-dev libncurses5-dev xserver-xorg-dev tk-dev tcl-dev -y
  2. Download latest linuxwacom-dev package from linuxwacom (0.8.1-4 as of this writing)
    wget -nd http://prdownloads.sourceforge.net/linuxwacom/
    linuxwacom-0.8.1-4.tar.bz2
  3. Extract the source
    tar xjvf linuxwacom-0.8.1-4.tar.bz2
    cd linuxwacom-0.8.1-4
  4. To fix the X crashing when unplugging the tablet, edit line 381 of src/xdrv/wcmConfig.c replacing WCM_UNINIT_CALLED with WCM_XORG_XSERVER_1_4
    sed -i -e '381s/WCM_UNINIT_CALLED/WCM_XORG_XSERVER_1_4/' src/xdrv/wcmConfig.c
  5. Compile the driver
    ./configure --enable-wacom
    make
    sudo make install
  6. (Optional) You can test the kernel module before installing it. Plug in your tablet and see if it works correctly after executing these commands.
    sudo rmmod wacom
    sudo insmod src/2.6.26/wacom.ko

    If it doesn’t work, you can reload the original driver. (Or just reboot your computer)

    sudo rmmod wacom
    sudo modprobe wacom
  7. Install the kernel module (and backup the original). (Note: The 2.6.26 module works with Intrepid’s 2.6.27 kernel)
    cp /lib/modules/$(uname -r)/kernel/drivers/input/tablet/wacom.ko wacom.ko.$(uname -r)
    sudo cp src/2.6.26/wacom.ko /lib/modules/$(uname -r)/kernel/drivers/input/tablet/wacom.ko
  8. Reload the kernel module with the new version
    sudo rmmod wacom
    sudo modprobe wacom
  9. Enjoy!

Configuration notes:

Since input devices use hotplugging, they are not configured in the usual /etc/X11/xorg.conf. Instead, they have fdi files so HAL passes the parameters to xserver. (Any input settings in the xorg.conf file will be ignored.) [Intrepid alpha 6 page]

Currently, only the stylus events work since HAL can only create one device, and there are bugs in the linuxwacom driver causing X to crash when the tablet is unplugged. [wacomlinux post]

Wacom config file: /usr/share/hal/fdi/policy/20thirdparty/10-wacom.fdi

List HAL devices: hal-device or lshal

Intrepid Wacom Bugs:
260675 [intrepid] Wacom Xorg module is incompadible with the kernel module shiped in kernel packages.
262780 Wacom tablet is behaving wierdly in Intrepid
263315 Wacom driver segfaults

Installation References:
Ubuntu Forums: Installing LinuxWacom in Hardy
Ubuntu Wiki: Install LinuxWacom Driver
Ubuntu Wiki: Wacom
Ubuntu Wiki: X/Input Hotplugging

HAL / fdi References:
Example fdi file configuration : explains basics of a fdi file
Input Hotplugging Info : how the new X input hotplug system works
HAL 0.5.10 Specification : HAL manages the devices attached to your computer
ubuntu wiki: x config : see section on “Input Configuration With HAL”

Tagged , , , , , , , , , , , , , , , , , , , , ,

  • Pingback: XInputHotplug Teil 3: Erfolg mit Einschränkungen « DoppelHertz

  • Sid

    Hi,
    I just configured my USB wacom tablet in intrepid ibex… i have the touch pad scroll 2 buttons and Stylus and its buttons working… Unplugging when X is on makes the pad loose the functionality of proximity detection and the absolute mode changes to relative…(It becomes a dumb old mouse).. But stylus buttons and touch pad buttons are still working…. Is it possible to get those functionality without system restart or possibly x restart??

  • http://groups.google.com/group/sci.med.diseases.hepatitis/browse_thread/thread/df2fd503ce65235b Pissing Razor Blades

    well.. it’s like I thought!

  • Pingback: Ugo Sangiorgi » How to get your TabletPC working on Ubuntu Intrepid