Wacom Tablet

From Gentoo-en
Jump to: navigation, search

This guide is obsolete!

This guide explains how to install drivers and configure X for Wacom tablets, which provide pen input for computers.

Introduction

Linuxwacom is the project that provides all source components required to make wacom tablets work. It provides kernel module, xorg-driver and utilities to test and configure wacom tablets. To use wacom tablet you need kernel driver (module), xorg-driver and in some cases configure xorg-server.

Wacom tablets can use USB or serial port. Use lsusb (from sys-apps/usbutils) to check that your tablet is connected through USB. If there is nothing it's possible that tablet is connected through serial port (e.g. /dev/ttyS1 here). This both cases have different configuration so keep in mind what tablet you have during reading this guide.


Kernel module (configuration)

To use USB attached wacom tablet you need wacom kernel module. Fortunately it is provided in stock kernel and it's possible all you need is to go in /usr/src/linux, run make menuconfig and make sure wacom tablets support is enabled:

Linux Kernel Configuration: Wacom drivers
  Input device support  --->
    [*]   Tablets  ---> 
      <M>   Wacom Intuos/Graphire tablet support (USB)


Some newer tablets may not be supported by in-tree kernel driver. In such case do not select above option but use kernel module from sys-kernel/linuxwacom-module package:

emerge sys-kernel/linuxwacom-module


Tablets (like mine, lenovo X61) that use serial port don't need wacom driver at all. They use 8250_pnp module for that. Check that your kernel has this module enabled:

Linux Kernel Configuration: 8250/16550 PNP device support
  Device Drivers  --->
    Character devices  ---> 
      Serial drivers  --->
        <M>   8250/16550 PNP device support

Install xorg driver and support tools

Add wacom to INPUT_DEVICES:

File: /etc/make.conf
INPUT_DEVICES="keyboard mouse evdev wacom"

Then re-merge xorg-drivers:

emerge -av1 x11-base/xorg-drivers

Configure the system

With x11-base/xorg-server-1.5.3-r5 the Wacom tablets are automatically detected by HAL. Just stop at this point and try to reload - it's very possible everything will work out of box!

>=xorg-server-1.8 deprecated hal autodetection in favor of udev based autodetection, thus it's possible that required udev rules are not installed. Also it's possible that you'll need to add additional configuration. Take a look at really nice Archlinux wacom page for further details.

Versions of X before 1.5.3-r5 require this configuration (but better upgrade!):

Modify your Xorg.conf file as directed on the http://linuxwacom.sourceforge.net/ pages. Ubuntu also has a good Xorg.conf file.

When working with separate-x configuration you need to add extra option: Option "ScreenNo" "0" to each wacom Section in "InputDevice". If you want it to default to second screen use 1 instead of 0.

Reboot

Now that everything is prepared, reboot to your new kernel.

Test

After the reboot move the stylus to the tablet. Ideally, the cursor follows the stylus and you can highlight text in a terminal window, move windows and perform other general operations. By default, Bamboo tablets are configured to work in absolute mode.

If it doesn't work for you, check if the wacom module was properly loaded. The following command should list the wacom module:

lsmod | grep wacom
wacom          12345     0

You should find entries like these in /var/log/Xorg.0.log:

File: /var/log/Xorg.0.log
...
(II) LoadModule: "wacom"
(II) Loading /usr/lib64/xorg/modules/input//wacom_drv.so
(II) Module wacom: vendor="X.Org Foundation"
        compiled for 4.3.99.902, module version = 1.0.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 0.7
(II) Wacom driver level: 47-0.7.8 $

(**) stylus: always reports core events
(**) stylus device is /dev/input/wacom
(**) stylus is in absolute mode
(**) WACOM: suppress value is 2
(**) Option "USB" "on"
(**) stylus: reading USB link
(**) Option "BaudRate" "9600"
(**) Option "SendCoreEvents"
(**) eraser: always reports core events
(**) eraser device is /dev/input/wacom
(**) eraser is in absolute mode
(**) WACOM: suppress value is 2
(**) Option "USB" "on"
(**) eraser: reading USB link
(**) Option "BaudRate" "9600"
(**) Option "SendCoreEvents"
(**) cursor: always reports core events
(**) cursor device is /dev/input/wacom
(**) cursor is in relative mode
(**) WACOM: suppress value is 2
(**) Option "USB" "on"
(**) cursor: reading USB link
(**) Option "BaudRate" "9600"
(**) pad device is /dev/input/wacom
(**) pad is in absolute mode
(**) WACOM: suppress value is 2
(**) Option "USB" "on"
(**) pad: reading USB link
(**) Option "BaudRate" "9600"
(II) XINPUT: Adding extended input device "pad" (type: Wacom Pad)
(II) XINPUT: Adding extended input device "cursor" (type: Wacom Cursor)
(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 "Keyboard0" (type: KEYBOARD)
(II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)
(**) Option "Device" "/dev/input/wacom"
stylus Wacom X driver grabbed event device
(==) Wacom using pressure threshold of 30 for button 1
(==) Wacom USB Bamboo tablet speed=9600 maxX=14760 maxY=9225 maxZ=511 resX=2540 resY=2540  tilt=enabled
(==) Wacom device "stylus" top X=0 top Y=0 bottom X=14760 bottom Y=9225
(==) Wacom device "eraser" top X=0 top Y=0 bottom X=14760 bottom Y=9225
(==) Wacom device "cursor" top X=0 top Y=0 bottom X=14760 bottom Y=9225
(==) Wacom device "pad" top X=0 top Y=0 bottom X=14760 bottom Y=9225
(--) Mouse0: PnP-detected protocol: "ExplorerPS/2"
(II) Mouse0: ps2EnableDataReporting: succeeded
...


Xorg Crashes

In some cases Xorg crashes when the tablet is plugged in. This problem has also been reported and fixed by Ubuntu users. Replace /etc/hal/fdi/policy/10-linuxwacom.fdi with this content:

File: /etc/hal/fdi/policy/10-linuxwacom.fdi
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">

  <device>
    <match key="input.x11_driver" contains="wacom">
      <match key="input.x11_options.Type" contains="stylus">
        <merge key="input.x11_options.Type" type="string">stylus</merge>
        <merge key="input.x11_options.TPCButton" type="string">on</merge>
        <merge key="input.x11_options.KeepShape" type="string">on</merge>

        <merge key="input.x11_options.Threshold" type="string">1</merge>
        <merge key="input.x11_options.PressCurve" type="string">50,0,100,50</merge>
      </match>
      <match key="input.x11_options.Type" contains="eraser">
        <merge key="input.x11_options.Type" type="string">eraser</merge>
        <merge key="input.x11_options.TPCButton" type="string">on</merge>

        <merge key="input.x11_options.KeepShape" type="string">on</merge>
        <merge key="input.x11_options.Threshold" type="string">1</merge>
        <merge key="input.x11_options.PressCurve" type="string">50,0,100,50</merge>
      </match>
      <match key="input.x11_options.Type" contains="pad">
        <merge key="input.x11_options.Type" type="string">pad</merge>
      </match>
    </match>
  </device>

</deviceinfo>

Additional tests

The xsetwacom command shows only Wacom devices detected:

xsetwacom list

Use xidump (linuxwacom only) to look at the values sent by the stylus as you move it around:

xidump stylus

Use the venerable xev command to see what X events are produced by any keys or switches:

xev

Configuration of buttons and scroll ring

Gergap's Weblog describes his Wacom setup and has a script to use xsetwacom to configure the tablet buttons and scroll ring.

This Ubuntu thread includes scripts to support screen rotation on a tablet PC.

Wacom Bamboo Fun: Gergap's Weblog does it almost for the bamboo fun. If you want to reference the scroll wheel on the pad to key strokes you go with something like this:

xsetwacom set pad AbsWup "core key PgUp"
xsetwacom set pad AbsWdn "core key PgDn"

If you altered the tablets "Mode" setting you need to use RelWUp/RelWDn respectively

Application configuration

gimp

Enable the cursor, eraser, and tablet to screen: Edit/Preferences/Input Devices/Configure Extended Input Devices

If stylus behaves odd, badly or just moves wrong. Deleting the .gimp folder might help. Also noted in here: Working with gimp

There is a GimpTalk article about installing a Wacom tablet.

inkscape

Enable the pad, cursor, eraser, and tablet: File/Input Devices

krita

Enable the pad, curson, eraser, and tablet: Settings/Configure Krita/Tablet

Rivalry with Synaptics driver

If you have a Synaptics touchpad that is configured via HAL you might run into a situation where X.org seems to recognize your tablet but you will not be able to use it. Symptoms are that
xinput list
will show eraser, cursor and pad but you never get any input from the tablet. In this case HAL tries to initialize the tablet with the synaptics driver wich fails.

This situation might also occur with other touchpad drivers (tablets can have a touchpad capability).

You can check /var/log/Xorg.0.log for the following line to confirm this situation (Example for Wacom Bamboo1 tablet):

Code: Xorg.0.log
...
(EE) Wacom Bamboo1 Unable to query/initialize Synaptics hardware.
...

To fix this, you can modify the fdi-file used for the touchpad to ignore Wacom devices:

Code: synaptics.fdi (example)
<?xml version="1.0" encoding="utf-8"?>                                          
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
      <match key="info.product" contains_not="Wacom">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <merge key="input.x11_options.SHMConfig" type="string">on</merge>
        <merge key="input.x11_options.TapButton1" type="string">1</merge>
        <merge key="input.x11_options.VertEdgeScroll" type="string">1</merge>
      </match>
    </match>
  </device>
</deviceinfo>

See Also