Wacom Graphire2 USB, X, and the Gimp
⇐ Back to X
Questions, comments, or corrections? Send me a message.
After a lot of headaches, I finally got my Wacom Graphire2 USB tablet working under X (XFree 4.2) and the gimp, including the mouse and wheel. The biggest problem I had was my kernel, I had 2.4.17 which apparently won't work right for the tablet because the usbmouse driver will see it and grab it first, which won't let the wacom driver get it. I finally upgraded to 2.4.20, and it works now. The modules you'll need to load are:
- usb-uhci (or your usb chipset driver)
- usbmouse
- mousedev
- wacom
- evdev
usb.c: registered new driver usb_mouse usbmouse.c: v1.6:USB HID Boot Protocol mouse driver mice: PS/2 mouse device common for all mice usb.c: registered new driver wacom usb-uhci.c: interrupt, status 3, frame# 159 input0: Wacom Graphire2 4x5 on usb1:2.0 wacom.c: v1.21.3 Vojtech Pavlik <vojtech@suse.cz> wacom.c: USB Wacom Graphire and Wacom Intuos tablet driverIf wacom.c does not report your tablet then it's not going to work in X either, so don't even bother. Once you do get the kernel to see it though, you need to configure X for it. You can get the latest wacom driver for X from http://people.mandrakesoft.com/~flepied/projects/wacom/, even in precompiled binaries if you don't want to recompile all of X. The site also has some instructions but I'll show my configuration here. First you have to add the devices to your XF86Config:
Section "Module" # your modules here Load "wacom" EndSection # now the xinput devices Section "InputDevice" Identifier "MouseUSB" Driver "mouse" Option "Protocol" "imps/2" Option "Device" "/dev/input/mice" Option "Emulate3Buttons" # Adds support for wheel Option "ZAxisMapping" "4 5" EndSection # Settings for wacom pen Section "InputDevice" Identifier "WacomStylus" Driver "wacom" Option "Type" "stylus" Option "Mode" "Absolute" Option "USB" "on" Option "Device" "/dev/input/event0" Option "Threshold" "20" Option "HistorySize" "200" Option "Suppress" "30" #Option "TopX" "0" #Option "TopY" "0" #Option "BottomX" "10206" #Option "BottomY" "7422" EndSection # Settings for wacom eraser Section "InputDevice" Identifier "WacomErasor" Driver "wacom" Option "Type" "eraser" Option "Mode" "Absolute" Option "USB" "on" Option "Device" "/dev/input/event0" Option "Threshold" "20" Option "HistorySize" "200" Option "Suppress" "30" Endsection # Settings for wacom cursor (mouse) Section "InputDevice" Identifier "WacomCursor" Driver "wacom" Option "Type" "cursor" Option "Mode" "Relative" Option "USB" "on" Option "Device" "/dev/input/event0" Endsection # again for CORE mode # Settings for wacom pen Section "InputDevice" Identifier "WacomStylusC" Driver "wacom" Option "Type" "stylus" Option "Mode" "Absolute" Option "USB" "on" Option "Device" "/dev/input/event0" Option "Threshold" "20" Option "HistorySize" "200" Option "Suppress" "30" #Option "TopX" "0" #Option "TopY" "0" #Option "BottomX" "10206" #Option "BottomY" "7422" EndSection # Settings for wacom eraser Section "InputDevice" Identifier "WacomErasorC" Driver "wacom" Option "Type" "eraser" Option "Mode" "Absolute" Option "USB" "on" Option "Device" "/dev/input/event0" Option "Threshold" "20" Option "HistorySize" "200" Option "Suppress" "30" Endsection # Settings for wacom cursor (mouse) Section "InputDevice" Identifier "WacomCursorC" Driver "wacom" Option "Type" "cursor" Option "Mode" "Relative" Option "USB" "on" Option "Device" "/dev/input/event0" Endsection Section "ServerLayout" # your layout options (keyboard,mouse,etc) InputDevice "MouseUSB" "SendCoreEvents" InputDevice "WacomStylus" InputDevice "WacomErasor" InputDevice "WacomCursor" InputDevice "WacomStylusC" "AlwaysCore" InputDevice "WacomErasorC" "AlwaysCore" InputDevice "WacomCursorC" "AlwaysCore" EndSectionThe ServerLayout and Module sections show only the stuff you need to ADD, you need to keep any existing options in place. The reason I have the wacom devices in twice is because this way you can use them as a core pointer (e.g. mouse) without X having to know to switch between xinput mode and core mode. I had problems with the gimp if I didn't, my cursor would get stuck inside the drawing window and I couldn't change window focus or switch input devices without clicking on the buttons on the pen. And that wasn't reliable either, usually causing gimp to crash. Very annoying, but adding the extra duplicate devices fixed all that. The USB mouse section is there because I also use regular USB mice, and this setup lets them all work together, you could have a PS/2 mouse, USB mouse, and the tablet.
I did have a problem with the wheel initially, it was working backwords, e.g down was up and up was down when scrolling. Not horrible, but annoying. Running:
xinput set-button-map WacomCursor 1 xinput set-button-map MouseUSB 1 2 3 5 4Another possible fix from Scott Farmer is to switch the "4 5" to "5 4" in the ZAxisMapping, which makes sense.
Fixed that and it works fine now. xinput by Frederic Lepied doesn't come with X, but can be downloaded at ftp://ftp.x.org/contrib/utilities/xinput-1.2.tar.gz. To get the tablet working in gimp, look under File :: Dialogs :: Input Devices. All the xinput devices set up earlier should appear here, if not then either the tablet is not seen by X, or gtk is not configured for xinput support. Most distros do that for you, but Slackware didn't and I had to recompile. Configure gtk with ./configure --enable-xinput=xfree if you need to rebuild gtk. Then after installing it, gimp should show the devices. To configure them, set all of the non-core devices to "Screen" mode, and they will appear in the File :: Dialogs :: Device Status window. This is the main status window when using a tablet, and shows all current xinput devices and what tools are set up for them.
If you find that the gimp doesn't notice you switching from pen to eraser or always assumes core pointer, you may need to download the latest xfree wacom driver, available from the maintainter. Once you've gotten this far, it's all set up. Just create a new image, then use the pen to draw. Tools are assigned to each device by middle-click dragging them to the device status window, or just tapping them with the right tool, e.g. tap the erasor with the erasor end and the ink tool with the pen end. Now you can erase just by turning the pen over!
For more information, and probably more detailed and accurate, see the Wacom Tablet HOWTO from the Linux Documentation Project.