Gentoo Wiki ArchivesGentoo Wiki

Wacom_Tablet


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Contents

Introduction

This article is going to explain how to properly set up a Wacom Tablet.
Thanks to TFKyle of ##gentoo-pub for helping me along the way.

Warning: To all the Wacom Bamboo users out there: the Bamboo tablet is supported from kernel 2.6.23 and up.

Installing

Linuxwacom

Check if you need the usb USE-flag, you might need to change your /etc/make.conf for this.

emerge -pv linuxwacom

Then build the package:

emerge linuxwacom

Now you have to recompile your kernel to include Wacom support and Event Interface support.

Note that you may be required to recompile xorg-x11 with the 'sdk' use flag to compile linuxwacom succesfully.

Kernel

Once in menuconfig, we have to compile the devices used to control the Wacom tablet.

Linux Kernel Configuration: Enabling devices in older kernels
Device Drivers --->
    Input device support --->
        <*> Event interface
    USB Support --->
        <M> Wacom Intuos/Graphire tablet support


Linux Kernel Configuration: Enabling devices in the latest 2.6.20+ kernels
Device Drivers --->
    Input device support --->
        <*> Event interface
        [*] Tablets --->
             <M> Wacom Intuos/Graphire tablet support (USB)

Exit menuconfig and make the kernel.

make && make modules_install

Normally everyone has Event interface support compiled in so all you need is the Wacom driver itself.

Try modprobeing the module:

modprobe wacom

If you see errors (check with dmesg), install your new kernel and reboot to apply the changes.

If you have a Bamboo tablet, keep reading.

You can check if your kernel recognizes your tablet:

Code: Check tablet being recognized
cat /proc/bus/input/devices
#  cat /proc/bus/input/devices
...

N: Name="Wacom Volito"
P: Phys=
S: Sysfs=/class/input/input7
U: Uniq=
H: Handlers=mouse2 event7
B: EV=f
B: KEY=1c43 0 70000 0 0 0 0 0 0 0 0
B: REL=100
B: ABS=100 3000003


Kernel Bamboo Support

Note: If you are a Wacom Bamboo Fun user the /drivers/input/tablet/wacom_wac.c file is missing the 0x17 id of the bamboo fun you'll have to add it manually or wait to be included in the kernel if you add the id manually (modify the static struct usb_device_id wacom_ids[] at the end of the file). You can skip the remainder of this section and move on to setserial.
Note: Although this makes my pad being recognized, I needed to upgrade to 2.6.25 to get any input from it with cat /dev/input wacom.


Note: If you are not a Wacom Bamboo user, or if you are a Bamboo user but you are using a 2.6.23 or higher kernel, skip the remainder of this section and move on

So here you are, with your shiny new Bamboo tablet and no support for it (yet). We will start by getting the 0.7.8 linuxwacom package and removing the old crud if you had it installed already:

emerge --unmerge linuxwacom
Note: This might just do the trick to get 0.8.0-r3 installed:
echo "x11-drivers/linuxwacom ~x86" >> /etc/portage/package.keywords
emerge -av linuxwacom

If you need a newer version follow the steps below.

Now get the latest linuxwacom from the site: http://linuxwacom.sourceforge.net/index.php/dl Extract, configure, compile and install it:

tar xvjf linuxwacom-*.tar.bz2
cd linuxwacom-*
./configure <-- Check the result of configure at the end to see if it detected everything like it should
make
make install

Now, patch the kernel. I used the 2.6.22 Gentoo kernel as base. In the directory driver/input/tablets are a number of wacom_* files. You can find the same files in the linuxwacom directory under src/2.6.19/wacom_*. Backup the old kernel files and then copy the files into your kernel tree:

cp -R /usr/src/linux/drivers/input/tablets ~/kernel_backup
cp ~/linuxwacom-*/src/2.6.19/wacom_* /usr/src/linux/drivers/input/tablets

Ofcourse, substitute the paths with the ones you used on your system.

Now build the modules and install the modules (assuming you followed the guide this far):

make clean modules modules_install

If you had the module loaded (like I did), remove it and insert the new one:

rmmod wacom
modprobe wacom
dmesg

In dmesg, the last line should be something like:

drivers/input/tablet/wacom_sys.c: v1.46-pc0.1:USB Wacom Graphire and Wacom Intuos tablet driver

If you see (note the version number):

drivers/input/tablet/wacom_sys.c: v1.46:USB Wacom Graphire and Wacom Intuos tablet driver

Then something is going wrong: 1.46 or older are the non-Bamboo drivers, the 1.46-pc0.1 is the one adding Bamboo support.

To check if it worked:

cat /proc/bus/usb/devices | grep -A5 056a | grep Driver | grep wacom

If you see a line ending with Driver=wacom then everything is peachy and bob's your uncle (aka the wacom driver latched onto the device and is working) - otherwise retrace your steps and check out the documentation on the linuxwacom project site: http://linuxwacom.sourceforge.net/index.php/howto/main

setserial

Sometimes the touchscreens (and the tablets) are connected to some weird ports you're not likely to find. For this reason you should use setserial, which takes a port and tells a device to connect to that port. We're going to select /dev/ttyS0 because it's tested but it may be possible to select other ports.

First emerge setserial

# emerge setserial

and then connect the ports

# setserial /dev/ttyS0 port 0x338 autoconfig

Remember to use /dev/ttyS0 in the Device options of the InputDevice section of your Xorg file.

Xorg Configuration

First of All, you have to check if you compiled xorg-server with "wacom" in INPUT_DEVICES= var. If not, you should make

#INPUT_DEVICES="wacom" emerge xorg-server -p

Make sure that you have all your INPUT_DEVICES flags like "keyboard" and "mouse" and you have not flags with minus; if you have them, then you should add it do INPUT_DEVICES= var.

example:

# INPUT_DEVICES="keyboard mouse wacom" emerge xorg-server

To test our devices cd to the directory /dev/input and see if they were created.

# cd /dev/input
localhost input # ls
event0  event2  mice    mouse_udev
event1  event3  mouse0  wacom
Note: You can actually "see" the devices work by reading their output on your screen.
# cat wacom

When you move the pen over the tablet something like below should appear on your screen:

 (€((€(€(€(€((ю(ю8€ь8ьэ8ыь8ью8э€8ю€??€(€(€(€(€(€(€(ю(э(ь(ю(э(ю(ю(ю(ю(€(€(€(€?€?€??€?€

When you move the mouse nothing should happen. If you do the same trick with the mouse, the same happens but than the other way around of course. If our device(s) work, now we only need to update our /etc/X11/xorg.conf file.

File: xorg.conf_
Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "CorePointer"
    Option      "Device"             "/dev/input/mouse_udev"
    Option      "SendCoreEvents"     "true"
    Option      "Protocol"           "IMPS/2"
    Option      "ZAxisMapping"       "4 5"
    Option      "Buttons"            "5"
EndSection

Section "InputDevice"
    Driver        "wacom"
    Identifier    "stylus"
    Option        "Device"       "/dev/input/wacom"
    Option        "Type"         "stylus"
    Option        "USB"          "on"                 # USB ONLY
    Option        "Mode"         "Relative"           # other option: "Absolute"
    Option        "Vendor"       "WACOM"
    Option        "tilt"         "on"  # add this if your tablet supports tilt
    Option        "Threshold"    "5"   # the official linuxwacom howto advises this line
EndSection

Section "InputDevice"
    Driver        "wacom"
    Identifier    "eraser"
    Option        "Device"       "/dev/input/wacom"
    Option        "Type"         "eraser"
    Option        "USB"          "on"                  # USB ONLY
    Option        "Mode"         "Relative"            # other option: "Absolute"
    Option        "Vendor"       "WACOM"
    Option        "tilt"         "on"  # add this if your tablet supports tilt
    Option        "Threshold"    "5"   # the official linuxwacom howto advises this line
EndSection

Section "InputDevice"
    Driver        "wacom"
    Identifier    "cursor"
    Option        "Device"       "/dev/input/wacom"
    Option        "Type"         "cursor"
    Option        "USB"          "on"                  # USB ONLY
    Option        "Mode"         "Relative"            # other option: "Absolute"
    Option        "Vendor"       "WACOM"
EndSection


File: xorg.conf ServerLayout
# **********************************************************************
# ServerLayout sections.
# **********************************************************************

Section "ServerLayout"

    Identifier  "Simple Layout"

    Screen "Screen 1"

    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
    InputDevice "cursor" "SendCoreEvents"  # add these 3 lines
    InputDevice "stylus" "SendCoreEvents"
    InputDevice "eraser" "SendCoreEvents"

EndSection
Note: In my case it happened that the eraser and pen were reversed; switching the InputDevice lines for stylus and eraser seems to solve this issue.

Graphire4 buttons

You will probably need linuxwacom 0.7.4 or higher for this to work with xorg 7.

Add the following line to the "ServerLayout" section of your /etc/X11/xorg.conf file:

InputDevice    "pad" "SendCoreEvents"
Note: I came across info advising NOT to add "SendCoreEvents" to the line. However without it the buttons will not work. In combination with the ButtonsOnly option -see below- the problems described elsewhere will not occur.

Then you will need to add an InputDevice section. Here is what I have in my /etc/X11/xorg.conf file.

File: xorg.conf
Section "InputDevice"
        Identifier  "pad"
        Driver      "wacom"
        Option      "Type" "pad"
        Option      "Device" "/dev/input/event2"
        Option      "ButtonsOnly" "on"
        Option      "Button9" "2"
        Option      "Button13" "3"
        Option      "USB" "on"
EndSection

The important option is the one with "ButtonsOnly" "on". Without this option as soon as you activate any button on the pad the pointer will jump to the top left corner of the screen. Since there is nothing to scroll there the wheel on the pad will not seem to work. With the ButtonsOnly option the wheel on the pad should work. To get the other two buttons to do something usefull they need to be mapped. I got the Button9 and Button13 info by running:

# xidump pad

in a terminal and pressing the buttons on the pad. Do this before you map the buttons.


Intuos3 buttons

To get the two sliders and the eight buttons working on an Intuos3 you should download expresskeys and install it according to the instructions in the package. It will also tell you how to map the buttons properly etc.

For it all to work you should Add the following line to the "ServerLayout" section of your /etc/X11/xorg.conf file:

InputDevice    "pad" # It is important that pad does not send core events

And add the following InputDevice section:

File: xorg.conf
Section "InputDevice"
        Identifier  "pad"
        Driver      "wacom"
        Option      "Type" "pad"
        Option      "Device" "/dev/input/wacom"
        Option      "ButtonsOnly" "off"
        Option      "USB" "on"
EndSection

Linux Wacom tools

settings from *wacomcpl can be made permanent in xorg.conf:

File: /etc/X11/xorg.conf
Section "InputDevice"
    Driver        "wacom"
    Identifier    "stylus"
    Option        "Device"       "/dev/input/wacom"
    Option        "Type"         "stylus"
    Option        "USB"          "on"                 # USB ONLY
    Option        "Mode"         "Absolute"           # other option: "Relative"
    Option        "Vendor"       "WACOM"
    Option        "TopX"         "180"
    Option        "TopY"         "130"
    Option        "BottomX"      "10028"
    Option        "BottomY"      "7294"
EndSection
Retrieved from "http://www.gentoo-wiki.info/Wacom_Tablet"

Last modified: Thu, 04 Sep 2008 13:47:00 +1000 Hits: 42,272

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.