Wacom Bamboo on CentOS (Linux)

In the following I documented all steps I did, with all blind alleys. For me a compilation of the driver hosted at http://linuxwacom.sourceforge.net/ finally worked, see below.

You may also check http://linuxwacom.sourceforge.net/index.php/howto/debwacomnosrc first. This could have saved me a lot of work.  Nevertheless my way might be useful for you some how…

Main message: Ensure that both wacom_drv.so and the kernel module are build when you configure the source. Then setup the udef stuff such that /dev/input/wacom*** is referring to your tablet. Finally the xorg.conf has to be modified. Once the kernel driver worked, I could use the pad like a mouse. The wacom_drv.so and the xorg.conf had to be loaded/modified in order for the pad to work with all its extra features. Good Luck!

Quick help

Check the kernel-driver:

dmesg | grep wacom

Check the xorg-stuff:

(should list the eraser/stylus devices)

xidump -l

(check whether the driver /usr/lib/xorg/modules/input/wacom_drv.so is loaded correctly)

cat /var/log/Xorg.0.log | grep wacom

(check whether the udev stuff works and registers a wacom-xxx device)

ls /dev/input/

(check whether the device realy gets data)

wacdump /dev/input/wacom-touch

The Xorg-driver is loaded, but the extended functions cannot be used

I checked and found out, that the wacom-device did not receive any data

wacdump /dev/input/wacom-touch

However, another device obtained all data well

wacdump /dev/input/event2

My steps towards a working Wacom Bamboo

There are drivers for the Wacom tablets for Linux, i.e. http://linuxwacom.sourceforge.net/. I know that my Bamboo tablet works with ubuntu (at least since 10.04) without any further drivers, etc. But today I want to install it at work on a CentOS machine (http://www.centos.org/).

I am running version 5.4. Checked with the command

cat /etc/*release*

The first thing I did was updating the system via the package updater tool. After a restart my x-server failed, however the automatic reconfiguration tool fixed everything without problems. After the update my new CentOS version is now 5.5 (the most recent one by now) Nevertheless my Wacom Bamboo does not work automatically…

The first step was

yum install *wacom*

which did install the packages wacomexpresskeys and linuxwacom-devel which seem to me not too important.  Therefore I made the following checks according to http://linuxwacom.sourceforge.net/index.php/howto/testtablet

more /proc/bus/usb/devices

The answer was the follwing:

T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=056a ProdID=0017 Rev= 1.16
S:  Manufacturer=Wacom Co.,Ltd.
S:  Product=CTE-450
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 80mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=   9 Ivl=4ms

This means, I have to ensure that a driver takes care of my Wacom… The package

yum info linuxwacom

seems to take care of wacom stuff and I found:

Installed Packages
Name       : linuxwacom
Arch       : i386
Version    : 0.7.8.3
Release    : 8.el5
Size       : 592 k
Repo       : installed
Summary    : Wacom Drivers from Linux Wacom Project
URL        : http://linuxwacom.sourceforge.net
License    : GPL/X11
Description: The Linux Wacom Project manages the drivers, libraries, and
: documentation for configuring and running Wacom tablets under the
: Linux operating system. It contains diagnostic applications as well
: as X.org XInput drivers.

Now I tried the section http://linuxwacom.sourceforge.net/index.php/howto/loadwacom since the driver seems to be installed. However, on CentOS modeprobe and rmmod does not work, one has to give the path explicitly, see also the hints in http://linuxwacom.sourceforge.net/index.php/howto/root . My output was the following

# /sbin/rmmod wacom
ERROR: Module wacom does not exist in /proc/modules
# /sbin/modprobe usb-uhci
# /sbin/modprobe input
FATAL: Module input not found.
# /sbin/modprobe mousedev
FATAL: Module mousedev not found.
# /sbin/modprobe wacom
# /sbin/modprobe evdev
FATAL: Module evdev not found.

So next I checked: grep -i wacom /var/log/messages | tail with the result

kernel: usbcore: registered new driver wacom
kernel: drivers/usb/input/wacom.c: v1.45:USB Wacom Graphire and Wacom Intuos tablet driver

Nevertheless the tablet did not work and I checked again more /proc/bus/usb/devices with the result:

T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=056a ProdID=0017 Rev= 1.16
S:  Manufacturer=Wacom Co.,Ltd.
S:  Product=CTE-450
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 80mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=   9 Ivl=4ms

So still the driver was not associated with my tablet..

Kernel version issues

See http://linuxwacom.sourceforge.net/index.php/howto/kernel

Note: If your system is running on a 2.6.9 or older kernel and you want to use a new Wacom device, upgrading to a newer version (preferablely 2.6.18 or later) is required since we do not support kernels older than 2.6.9 any more.

My kernel is given by cat /proc/version as

Linux version 2.6.18-194.32.1.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Wed Jan 5 17:53:09 EST 2011

So no problems should arise from the kernel…

Compiling the new driver

So I downloaded the Code from http://linuxwacom.sourceforge.net/index.php/howto/download

First I wanted to check, whether my tablet is supported, see http://linuxwacom.sourceforge.net/index.php/howto/newtablet.

So I took my data  Vendor=056a ProdID=0017 Rev= 1.16 (vendor seems to be correct) and in the source directory I used find | grep “wacom_wac.c” to locate the position of the file. In this source file I found (among other stuff)

const struct usb_device_id wacom_ids[] = {  …
{ USB_DEVICE_WACOM(0x17) }, …

So it seems that this driver supports my device. So I started with

http://linuxwacom.sourceforge.net/index.php/howto/install

I removed the original driver using

yum erase linuxwacom

with the output

Removing:
linuxwacom                    i386              0.7.8.3-8.el5                installed              592 k
Removing for dependencies:
wacomexpresskeys              i386              0.4.1-1.el5                  installed              125 k

Then I followed http://linuxwacom.sourceforge.net/index.php/howto/install and produced the output

# ./uninstall
Please remove linuxwacom package if your system has an existing one
Removing Wacom X driver related utility programs….
Wacom X driver related utility programs have been removed
# ./install
Installing Wacom man page……
Installed under /usr/share/man/man4

Installing wacom_drv….
WARNING: Can not install Wacom X driver (wacom_drv)
since the proper directory has not been found

You need to compile and install wacom.(k)o manually if your kernel is out of date.

After adding your Wacom tools into /etc/X11/xorg.conf, please restart X server or simply reboot your system to run the new Wacom X driver.

So I will rebuild the driver from scratch… I started with http://linuxwacom.sourceforge.net/index.php/howto/install and downloaded the getwacom.py script. Note that I could not run the script as a su, I had to be the normal user…

Using xxx for download and compile path.
We are about to:
Check the Latest Version of Linuxwacom
Do you wish to continue? (Y/n):Y
Checking for latest version…
Traceback (most recent call last):
File “getwacom.py”, line 322, in ?
main()
File “getwacom.py”, line 108, in main
wacomversion = re.findall(r”(linuxwacom[\w\d\-\.][0-9-]\.[0-9\-]\.[0-9\-]+)”, getLatestWacomUrl())[0]
IndexError: list index out of range

Anyhow, I will do it manually now.

Configuration of the code

According to http://wiki.centos.org/HowTos/I_need_the_Kernel_Source#head-7cb967afe95d0c9be0f9f1e1b874ecad494cb6ba I installed the kernel-development packages

yum install *kernel*devel*

Then I tried a first run of

./configure –enable-wacom=yes

which succeeded.

—————————————-
BUILD ENVIRONMENT:
architecture – i386-redhat-linux
linux kernel – yes 2.6.18
kernel source – yes /lib/modules/2.6.18-194.32.1.el5/build
XFree86 source – no
Xorg SDK – no
XSERVER64 – no
dlloader – yes
XLib – yes /usr/lib
xf86config – no
TCL – no
TK – no
ncurses – yesBUILD OPTIONS:
wacom.o – yes
wacdump – yes
xidump – yes
libwacomcfg – yes
libwacomxi – no
xsetwacom – yes
wacomxrrd – no
hid.o – no
wacom_drv.so – no /usr/lib/xorg/modules/input
wacom_drv.o – no
wacom*_drv quirks –
—————————————-

Now I have to get the kernel-driver running, see http://linuxwacom.sourceforge.net/index.php/howto/buildwacom6
Next step:
make
Then I moved to the src-directory and did http://linuxwacom.sourceforge.net/index.php/howto/testwacom this again:

# /sbin/rmmod wacom
ERROR: Module wacom does not exist in /proc/modules
# /sbin/insmod ./wacom.ko

AND IT WORKED!!!!!! The pad is working 🙂 Here is the check:
more /proc/bus/usb/devices
It produced:

T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=01 Dev#=  4 Spd=12  MxCh= 0 D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1 P:  Vendor=056a ProdID=0017 Rev= 1.16 S:  Manufacturer=Wacom Co.,Ltd. S:  Product=CTE-450 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 80mA I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=wacom E:  Ad=81(I) Atr=03(Int.) MxPS=   9 Ivl=4ms

Install the wacom driver

So I need to install the driver now permanently http://linuxwacom.sourceforge.net/index.php/howto/installwacom

First I searched for old copies:

locate wacom.ko
/lib/modules/2.6.18-164.11.1.el5/kernel/drivers/usb/input/wacom.ko
/lib/modules/2.6.18-164.9.1.el5/kernel/drivers/usb/input/wacom.ko
/lib/modules/2.6.18-194.32.1.el5/kernel/drivers/usb/input/wacom.ko
uname -r
2.6.18-194.32.1.el5

So I replaced this driver: 

cp /lib/modules/2.6.18-194.32.1.el5/kernel/drivers/usb/input/wacom.ko ./wacom.ko.bak
mv ./wacom.ko /lib/modules/2.6.18-194.32.1.el5/kernel/drivers/usb/input/wacom.ko

And finally 

/sbin/depmod -e

Now a restart… …and everything is still working!!! (and also hotplugging is no problem…) 

2nd Step: Configuring the pad

After I managed to install the kernel module, the pad is working with minimal functions: The pen works as a mouse (both sides), I have to really touch the pad with the pen, etc. Now I want to configure it more nicely..

Basic tests

First of all I installed the basic tools using (from the above session where I also compiled the kernel module)

make install

Then I checked the raw output: (the device may be different) http://linuxwacom.sourceforge.net/index.php/howto/wacdump 

wacdump  /dev/input/event2
And everything worked properly: Distinction between touch and no touch, coordinates, different pen types, pressure… 

Try to use wacomcpl to do the Configurations (not successful)

I wanted to use the gui-tool http://linuxwacom.sourceforge.net/index.php/howto/wacomcpl

However, I could not find it… So I searched for wacomcpl

locate wacomcpl

moved to this directory and 

./wacomcpl
wacomcpl: using TCLLIBPATH=”[list  /usr/local/lib ]”
./wacomcpl: line 20: /usr/local/bin/wacomcpl-exec: No such file or directory
cp wacomcpl-exec /usr/local/bin/
./wacomcpl
wacomcpl: using TCLLIBPATH=”[list  /usr/local/lib ]”
Error in startup script: can’t find package LIBWACOMXI
while executing
“package require LIBWACOMXI”
(file “/usr/local/bin/wacomcpl-exec” line 40)

The problem seems to be (of course), that during the compilation I had no tcl/tk support… http://linuxwacom.sourceforge.net/index.php/howto/cpl So I first installed tcl/tk 

yum search tcl
yum search tk

and I found that I had to use 

yum install tcl-devel.i386
yum install tk-devel.i386

After this I reconfigured the source using sh configure: 

—————————————-
BUILD ENVIRONMENT:
architecture – i386-redhat-linux
linux kernel – yes 2.6.18
kernel source – yes /lib/modules/2.6.18-194.32.1.el5/build
XFree86 source – no
Xorg SDK – no
XSERVER64 – no
dlloader – yes
XLib – yes /usr/lib
xf86config – no
TCL – yes /usr/include
TK – yes /usr/include
ncurses – yes

And now I did again make and make install and after that I could use wacomcpl. However, It did not find my tablet, so this was of little use.. 

Manual configuration

So next I tried to configure it manually… First I looked at the xorg.conf-file. Backup:

cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak2

Then I followed http://linuxwacom.sourceforge.net/index.php/howto/inputdev and http://linuxwacom.sourceforge.net/index.php/howto/srvlayout 

My old xorg.conf was:

# Xorg configuration created by system-config-display
Section “ServerLayout”
Identifier     “single head configuration”
Screen      0  “Screen0” 0 0
InputDevice    “Keyboard0” “CoreKeyboard”
EndSection
Section “InputDevice”
Identifier  “Keyboard0”
Driver      “kbd”
Option        “XkbModel” “pc105”
Option        “XkbLayout” “us”
EndSection
Section “Device”
Identifier  “Videocard0”
Driver      “nv”
EndSection
Section “Screen”
Identifier “Screen0”
Device     “Videocard0”
DefaultDepth     24
SubSection “Display”
Viewport   0 0
Depth     24
Modes    “1600×1024” “1440×900” “1400×1050” “1280×1024” “1280×960” “1280×800” “1152×864” “1024×768” “800×600” “640×480”
EndSubSection
EndSection

Now I changed this (only added/changed part): 

# Xorg configuration created by system-config-display
Section “ServerLayout”
Identifier     “single head configuration”
Screen      0  “Screen0” 0 0
InputDevice    “Keyboard0” “CoreKeyboard”
InputDevice    “stylus”    “SendCoreEvents”
InputDevice    “eraser”    “SendCoreEvents”
EndSection
Section “InputDevice”
Identifier  “Keyboard0”
Driver      “kbd”
Option        “XkbModel” “pc105”
Option        “XkbLayout” “us”
EndSection
Section “InputDevice”
Driver        “wacom”
Identifier    “stylus”
Option        “Device”        “/dev/input/event2”    # USB ONLY
Option        “Type”          “stylus”
Option        “USB”           “on”                  # USB ONLY
EndSection
Section “InputDevice”
Driver        “wacom”
Identifier    “eraser”
Option        “Device”        “/dev/input/event2”    # USB ONLY
Option        “Type”          “eraser”
Option        “USB”           “on”                  # USB ONLY
EndSection

Finally the x-server is restarted: http://linuxwacom.sourceforge.net/index.php/howto/restartx I had no problems, the X-server is now running again, however, so far nothing changed.  So I checked the following according to

http://linuxwacom.sourceforge.net/index.php/howto/ptrstat

xsetpointer -l
“”     [XPointer]
“Keyboard0”     [XKeyboard]

Which showed that there are still issues. After searching the web I found out that I have to install the xorg-driver: (http://wiki.gimpforum.de/wiki/Wacom_Linux_Installation#Treiber_einrichten)

locate wacom_drv.so
./wacom/linuxwacom-0.8.8-10/prebuilt/32/wacom_drv.so
./wacom/linuxwacom-0.8.8-10/prebuilt/64/wacom_drv.so
# cd wacom/linuxwacom-0.8.8-10/prebuilt/32/
# cp wacom_drv.so /usr/lib/xorg/modules/input/

Up to now I used /dev/input/event2 as the device (which I found out by hand). So now we change this to /dev/input/wacom. To this end we setup the following

# touch /etc/udev/rules.d/65-wacom.rules
# echo KERNEL==”event[0-9]*”, SYSFS{idVendor}==”056a”, SYMLINK+=”input/wacom” > /etc/udev/rules.d/65-wacom.rules
# less /etc/udev/rules.d/65-wacom.rules

And I changed the xorg.conf according to:

Section “ServerLayout”
Identifier     “single head configuration”
Screen      0  “Screen0” 0 0
InputDevice    “Keyboard0” “CoreKeyboard”
InputDevice    “pen”       “SendCoreEvents”
InputDevice    “eraser”    “SendCoreEvents”
EndSection

Section “InputDevice”
Identifier  “Keyboard0”
Driver      “kbd”
Option        “XkbModel” “pc105”
Option        “XkbLayout” “us”
EndSection

Section “InputDevice”
Driver        “wacom”
Identifier    “pen”
Option        “Device”        “/dev/input/wacom”    # USB ONLY
Option        “Type”          “stylus”
Option        “USB”           “on”                  # USB ONLY
EndSection

Section “InputDevice”
Driver        “wacom”
Identifier    “eraser”
Option        “Device”        “/dev/input/wacom”    # USB ONLY
Option        “Type”          “eraser”
Option        “USB”           “on”                  # USB ONLY
EndSection

After a restart nothing changed.

xidump -l
<default pointer>              disabled
Keyboard0                      keyboard

and also

ls /dev/input
event0  event1  event2  event3  mice  mouse0  mouse1

did not show any wacom device… So I checked the log files

cat /var/log/Xorg.0.log | grep wacom
(II) LoadModule: “wacom”
(II) Loading /usr/lib/xorg/modules/input/wacom_drv.so
dlopen: /usr/lib/xorg/modules/input/wacom_drv.so: undefined symbol: GetMotionHistory
(EE) Failed to load /usr/lib/xorg/modules/input/wacom_drv.so
(II) UnloadModule: “wacom”
(EE) Failed to load module “wacom” (loader failed, 7)
(EE) No Input driver matching `wacom’
(EE) No Input driver matching `wacom’

Finally working configuration for udev:

I followed http://linuxwacom.sourceforge.net/index.php/howto/newwacom

and wrote to /etc/udev/rules.d/65-wacom.rules

# udev rules for wacom tablets.

KERNEL!="event[0-9]*", GOTO="wacom_end"

# Multiple interface support for stylus and touch devices.
DRIVERS=="wacom", ATTRS{bInterfaceNumber}=="00", ENV{WACOM_TYPE}="stylus"
DRIVERS=="wacom", ATTRS{bInterfaceNumber}=="01", ENV{WACOM_TYPE}="touch"

# Convenience links for the common case of a single tablet.  We could do just this:
#ATTRS{idVendor}=="056a", SYMLINK+="input/wacom-$env{WACOM_TYPE}"
# but for legacy reasons, we keep the input/wacom link as the generic stylus device.
ATTRS{idVendor}=="056a", ENV{WACOM_TYPE}!="touch", SYMLINK+="input/wacom"
ATTRS{idVendor}=="056a", ENV{WACOM_TYPE}=="touch", SYMLINK+="input/wacom-touch"

# Check and repossess the device if a module other than the wacom one
# is already bound to it.
ATTRS{idVendor}=="056a", ACTION=="add", RUN+="check_driver wacom $devpath $env{ID_BUS}"

LABEL="wacom_end"

After doing this I obtained

/dev/input/
event0  event1  event2  event3  mice  mouse0  mouse1  wacom-touch

and also

wacdump /dev/input/wacom-touch

showed my pad working..

Then  I reconfigured the xorg.conf file: http://linuxwacom.sourceforge.net/index.php/howto/inputdev

Section “ServerLayout”
Identifier     “single head configuration”
Screen      0  “Screen0” 0 0
InputDevice    “Keyboard0” “CoreKeyboard”
InputDevice    “stylus”       “SendCoreEvents”
InputDevice    “eraser”    “SendCoreEvents”
EndSection

Section “InputDevice”
Identifier  “Keyboard0”
Driver      “kbd”
Option        “XkbModel” “pc105”
Option        “XkbLayout” “us”
EndSection

Section “InputDevice”
Driver        “wacom”
Identifier    “stylus”
Option        “Device”        “/dev/input/wacom-touch”    # USB ONLY
Option        “Type”          “stylus”
Option        “USB”           “on”                  # USB ONLY
EndSection

Section “InputDevice”
Driver        “wacom”
Identifier    “eraser”
Option        “Device”        “/dev/input/wacom-touch”    # USB ONLY
Option        “Type”          “eraser”
Option        “USB”           “on”                  # USB ONLY
EndSection

Section “Device”
Identifier  “Videocard0”
Driver      “nv”
EndSection

Section “Screen”
Identifier “Screen0”
Device     “Videocard0”
DefaultDepth     24
SubSection “Display”
Viewport   0 0
Depth     24
Modes    “1600×1024” “1440×900” “1400×1050” “1280×1024” “1280×960” “1280×800” “1152×864” “1024×768” “800×600” “640×480”
EndSubSection
EndSection

Setting up the xorg-driver

So the problem reported earlier is still unsolved

cat /var/log/Xorg.0.log | grep wacom
(II) LoadModule: “wacom”
(II) Loading /usr/lib/xorg/modules/input/wacom_drv.so
dlopen: /usr/lib/xorg/modules/input/wacom_drv.so: undefined symbol: GetMotionHistory
(EE) Failed to load /usr/lib/xorg/modules/input/wacom_drv.so
(II) UnloadModule: “wacom”
(EE) Failed to load module “wacom” (loader failed, 7)
(EE) No Input driver matching `wacom’
(EE) No Input driver matching `wacom’

So we are back to http://linuxwacom.sourceforge.net/index.php/howto/config

I first installed

yum install libXi-devel.i386

yum install xorg-x11-server-sdk.i386

After this sh configure put out

BUILD OPTIONS:
wacom.o – no
wacdump – yes
xidump – yes
libwacomcfg – yes
libwacomxi – yes
xsetwacom – yes
wacomxrrd – no
hid.o – no
wacom_drv.so – yes /usr/lib/xorg/modules/input
wacom_drv.o – no
wacom*_drv quirks – libc-wrapper key-events dixScreenOrigins

The important point is, that now wacom_drv.so is build!!!

make

cp ./wacom_drv.so /usr/lib/xorg/modules/input/

For the last command one has to be in the right directory where wacom_drv.so is located…

Now we succeeded:

cat /var/log/Xorg.0.log | grep wacom
(II) LoadModule: “wacom”
(II) Loading /usr/lib/xorg/modules/input/wacom_drv.so
(II) Module wacom: vendor=”X.Org Foundation”
(**) Option “Device” “/dev/input/wacom-touch”
(**) stylus device is /dev/input/wacom-touch
(**) Option “Device” “/dev/input/wacom-touch”
(**) eraser device is /dev/input/wacom-touch

and also

xidump -l
<default pointer>              disabled
eraser                         extension
stylus                         extension
Keyboard0                      keyboard

now the pad is working much better, the mouse  is changed already if the pen is not touching it!

Working with gimp

http://linuxwacom.sourceforge.net/index.php/howto/gimp

Gimp now works with both pen sides, the pad has all its functionality I would have expected…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: