个人工具

UbuntuHelp:WacomTabletIssue

来自Ubuntu中文

跳转至: 导航, 搜索

Wacom/Tablet/Tablet PC

Note : for up-to-date information under Ubuntu 6.06 Dapper Drake, please use https://wiki.ubuntu.com/Wacom instead. Issue: The wacom driver doesn't get loaded properly Name of Hard/Software: Tablet hardware supported by the wacom driver

Ubuntu 6.06 Dapper Drake

On Ubuntu Dapper, installing an USB Wacom tablet is straightforward. Remember to plug your tablet before you boot, it makes things simpler :)

  1. Using Synaptic package manager[[FootNote(System>Administration>Synaptic Package Manager. You need to have administrative right to install the packages)]], check if the packages xserver-xorg-input-wacom and wacom-tools are already installed - if not install them. If you prefer using the command line, you can also execute:
    sudo apt-get install xserver-xorg-input-wacom wacom-tools
  2. Make a symbolic link between /dev/input/wacom (created by wacom-tools udev scripts) and /dev/wacom (pointed to by /etc/X11/xorg.conf)FootNote(Alternatively, you could edit /etc/X11/xorg.conf and change all /dev/wacom occurences into /dev/input/wacom, but the first solution is cleaner and leaves your xorg.conf unedited):
    sudo ln -s /dev/input/wacom /dev/wacom

You should be ready to go after you have restarted XFootNote(Ctrl-Alt-Tab). Remember to configure the "Extended input devices" in your drawing application (Gimp or Inkscape for example), however you can already check if it's working by moving your stylus on the tablet : the mouse cursor should go through the whole screen.

In case this doesn't work

  • check your /etc/X11/xorg.conf, you should see some new entries with the name "wacom", they point to /dev/wacom ;
  • create directly a symbolic link /dev/wacom pointing to the exact event in /dev/inputFootNote(this is not the recommended solution, because sometimes your tablet will appear under an other event). You will have to guess on which /dev/input/event# (where # is a number, usually 2 or 3) your tablet appears[[FootNote(You can check this by installing the package wacom-tools, then using in a terminal the command sudo wacdump /dev/input/event#,replacing # by the number of the event you want to check.)]], then create the symlink by typing in a terminal:
sudo ln -s /dev/input/event# /dev/wacom (remember # is a number, so you might for example have to type: sudo ln -s /dev/input/event3 /dev/wacom).

The rest of this document contains more information if you still can't use your tablet or if you're still using Hoary or Breezy

Other ways to set up you tablet

What is needed for the fix: linuwacom-0.6.4.tar.gz from linuxwacom project, the kernel source, skill about the commandline Or, you could just install an 2.6.10 image from hoary (with pinning), which should require no hotplug/blacklist editing, nor doing anything special. you just need to add the correct device to your XF86Config-4, which you can do by either using udev to create a device with a good name, or using wacdump on all files matching /dev/input/event* to see which is the tablet. Someone please clean this up - the point is that the instructions below are outdated and incomplete. Note for the Intuos 3 on Ubuntu 5.10 Breezy No need to build anything. Download the last linuxwacom from linuxwacom project, then copy the already compiled version of the xorg driver (wacom_drv.so in the prebuilt directory) to /usr/lib/xorg/modules/input. Then edit your /etc/X11/xorg.conf file accordingly; the kernel is up-to-date enough for Intuos 3 tablets (you might have to compile a kernel if you have a Graphire 4, but I haven't tested it). Note for the Intuos 3 on Ubuntu 5.04 Hoary On Ubuntu 5.04 Hoary I still had to build a custom kernel to get the Intuos 3 working. I used the 2.6.10 Ubuntu kernel sources and followed the Linux Wacom Project Howto http://linuxwacom.sourceforge.net/index.php/howto/main (I replaced evdev.c mousedev.c usbmouse.c hid-core.c and wacom.c in the kernel sources with the according files from the Linux Wacom Project like described in the Howto 3.7.) Step by step instructions: Note: I haven't been able to test this with any other tablet hardware then Wacom Volito, but this should be general for all tablets that are supported by the wacom driver (that includes some Tablet PC) Note: I have tested this on two different computers, a PIII (laptop) and a Athlon, works great on both. As of the latest release of ubuntu (Warthog is the latest when this Howto was written) wacom tablet doesn't work right out-of-the-box. Most of the stuff for wacom is there but some small issues that are quite easy to fix, still exist. This howto will try to explain for a relative technical user what steps you can take to get your tablet to work with your Ubuntu(Warthog) installation. The steps are quite easy but you should know how to edit some configuration files and it is good if you have some understanding what /dev is and what "kernel modules" are. Note: my hardware is x86-based, but this should applied to PPC to if your tablet doesn't work there too.

1. Look if your tablet gets discovered or the secrets from kernelland

First make sure your tablet is hooked up the usb-port of your computer, it doesn't mather if you had it hooked up before boot or if you plugged it in afterwards. The hotplug system should have found it and tried to load the drivers for it (in the wrong way of course but we get to the solution of that later. First of we will just make sure your tablet is supported) When you have made sure your tablet is hooked up write the following command and watch for the output

  [email protected] ~ $ dmesg | grep wacom
  usbcore: registered new driver wacom
  drivers/usb/input/wacom.c: v1.40 - 2.6.6-dwb-0.1:USB Wacom Graphire and Wacom Intuos tablet driver

Your output may differ some depending on your tablet model but the line "drivers/usb/input/wacom.c" is the most important part. It shows that hotplug found the device and loaded the driver. You can now try to move around the pen/pointer on your tablet and you will probably get some movement from the pointer on the screen (if you have the graphical interface started). You will notice that the pointer stays up in the right corner even if you move your pointer around on the tablet.

2. Fix the first problem or Wo! it's ALIVE!

The problem to this seams to be that the evdev driver gets loaded to early and some how sets the options for the tablet wrong. This should not happen, the evdev specificaly blacklist wacom tablets to leave the real wacom tablet to take care of it. But still something evdev does upsets the wacom-driver. evdev is still needed (it takes care of the buttons on the pen) but should only be loaded by the wacom tablets module. The fix to this is quite easy, just open the file /etc/hotplug/blacklist and add a new line with "evdev", this make sure the hotplug system doesn't load the evdev for the tablet but insted lets the wacom module load it. Note: Actually this shouldn't upset anything other of your system (like usb joypads/joysticks that also uses the evdev to register the buttons on those devices), since all modules that needs the evdev should load it on it's own. But I can be wrong, is there any hardware that only uses the evdev and there for blacklisting makes that hardware not work with hotpluging with evdev on the blacklist? sudo nano /etc/hotplug/blacklist Now reboot your system to get all wrong modules unloaded and the drivers-register cleanly reseted. When the system has come up again and you have the graphical interface loaded, try to move around your pen on the tablet. you should now get pointer movement on the whole screen as you move around the pen. Some of you might notice that the pointer doesn't move so smoothly around the screen, I did. This seams to have to do with the wacom-module in ubuntu(warthtog) that is not the latest from the linuxwacom-project. If you get smooth movement you can skipp the next section and go to section 4. Note: This did not work for me (Ed Mack), using the stock kernel for a Graphire3. My cursor was still stuck in the corner of the screen. To fix this, instead of just copying wacom.c into the kernel source as in the next step, I copied the following files:

evdev.c    > linux-source/drivers/input
mousedev.c > linux-source/drivers/input
hid-core.c > linux-source/drivers/usb/input
wacom.c    > linux-source/drivers/usb/input

Please read on for further details on doing so. Note: I (Artis Rozentals) got a Volito to work by building mousedev.c (from linuxwacom 0.6.6, read the included README) against kernel headers and replacing the stock kernel's mousedev.ko. You might want to try this if you want to avoid recompiling the whole kernel. See QuickAndDirtyWacomSolution for step-by-step instructions. Note: I (Claire) didn't understand what you (Artis) made. I tried to build the whole linuxwacomproject without success. I would like to avoid recompiling the whole kernel. Will Wacom be better supported into hoary?

3. Fix the driver or Everything is smooth, mon!

This step involves compiling of a new kernel. I will not go in to the steps how to configure and compile a custom kernel. There are three different documents how to compile a custom kernel for ubuntu. There are documents on The Linux Documentation Project site on how to configure a custom kernel if you want to add/remove some drivers from your custom kernel. https://www.ubuntulinux.org/wiki/KernelHowto https://www.ubuntulinux.org/wiki/KernelBuildpackageDetailedHowto (More in-depth) But what you have to do, what ever method you use to compile a custom kernel is to replace the wacom.c in the kernel source. First of go to linuxwacom-projects homepage http://linuxwacom.sf.net/ and do wnload the latest release (0.6.6 as of writing this howto). This page lists all the releases, with the most recent at the bottom: http://prdownloads.sourceforge.net/linuxwacom/

.unpack the package
.go to linuxwaco-0.6.4/src/2.6.6
.copy/move the wacom.c from there to drivers/usb/input in your
linux-source-driectory  
.compile and install your kernel
.make sure that your new kernel is the one that is booted in grub
.reboot

You should now have smooth movement when you move around your pen on the tablet. But the default action for X in ubuntu right now is to treat the tablet as a normal mouse. That is, no presure sensativity or other tablet related things. Note: I have compiled a ubuntu-kernel (the official way like ubuntu compiles the official kernels) with the wacom-driver changed. Maybe I could somehow make it avaible here. nothing in that kernel is changed accept the drivers I replaced with the drivers from linuxwacom. I have only compiled the kernel for the -686 branch thou. My debfile: linux-image-2.6.8.1-3-686_2.6.8.1-16_i386.deb Note: since I compiled the driver the "official" way, maby i only need to put the wacom.ko up for link and a little note how to place it in the right directory in /lib/moduels/... and it should work for everyone that uses the -686 kernel from the branch? Or am I wrong? will loading of my driver not work with the official 686 kernel even if I have compiled it the official way? - Probably better to provide a .deb

4. Fix xinput or doodle time!

By now you should have a your tablet working and movement of the pointer when using the tablet should be smooth. Now we will add some configurations to make tablet register as a xinput device in X to get presure sensitivity and other stuff. First of you have to find out what dev-entry your wacom have so we talk with the right device. It is usualy /dev/input/eventX (where X can be any number depending on how many input devices you have) The problem is that you moste probebly have at least two other input devices (keytable, usb-mouse), maybe more. And sometimes the wacom tablet gets a event entry before the usb mouse and other times the other way around. This also depends on when you pluged in the device. udev is a wonderfull knew invention to fix this an many other problems in linux. We are going to make use of this wonderfull knew tool to make life easier for us. Go to /sys/bus/usb grep for WACOM (or the maker of your specific table, not sure what the makers of tablet pc pen-inputs might be called) you should get someting like this

 [email protected] ~ $ cd /sys/bus/usb
 [email protected] /sys/bus/usb $ grep -r "WACOM" *
 devices/1-2/manufacturer:WACOM
 devices/usb1/1-2/manufacturer:WACOM
 drivers/usb/1-2/manufacturer:WACOM
 drivers/usb/usb1/1-2/manufacturer:WACOM
 [email protected] /sys/bus/usb $

Go to the catalogue in the first entry in this case devices/1-2 look for the entry in the file "product" and write this information down You should get something like this

 [email protected] /sys/bus/usb $ cd devices/1-2
 [email protected] /sys/bus/usb/devices/1-2 $ cat product
 FT-0405-UV1.4-1

Of course this will differ for you, this is the product id for Wacom Volito. Other devices like Wacom Graphire will have another product id. now open /etc/udev/rules.d/udev.rules with your favorit editor and add this line early in the file (or just make sure it is before the "# input devices" entry in the file)

 #Wacom Tablet
 BUS="usb" , SYSFS{manufacturer}="WACOM",SYSFS{product}="FT-0405-UV1.4-1", NAME="wacom0"

Replace WACOM with your manufacture and FT-0405-UV1.4-1 with your information from the producte-file earlier. Note: ubuntu has a somewhat faulty installation of udev, rules in the /etc/udevs/rules.d/ should be added with number in front like 50-udev.rules This way you can add a new file like 40-wacom.rules and it will be runned by udevd before 50-udev.rules, This is much more elegant then go in and edit the udev.rules and by hand make sure it gets run before the more udev-general rules. Note: One with a little more knowledge about udev.rules should write a more general line for tablets that register tablets what ever maker/product-id like /dev/input/tabletX, and also make sure that you can have more then one tablet connected and they get incremental entries tablet0, tablet1 and so on. Note: The best would be if the user could somehow even edit this by them self if the liked to, maybe through HAL-device-manager? But this might be a little overkill and most normal users shouldn't have to touch this. For more information on writing udev rules, see http://www.reactivated.net/udevrules.php You know have to unplug your wacom tablet, unload udev and wacom module and restart udev or you could reboot to get the new dev-entry register. But wait with this until we also have added the appropriate lines to XF86Config. Open up your /etc/X11/XF86Config-4 file with your favorite editor

 [email protected] ~ $ sudo nano /etc/X11/XF86Config-4

Find where the Section "!InputDevice" starts. Find the last Section "!InputDevice" entry and go to the line after that sections EndSection Add a new line and put in the following information

 Section "!InputDevice"
  Driver        "wacom"
  Identifier    "cursor"
  Option        "Device"        "/dev/wacom0"
  Option        "Type"          "cursor"
  Option        "Mode"          "relative"            # So it acts like a normal mouse
  Option        "USB"           "on"                  
  Option        "ForceDevice"   "ISDV4"               # For Tablet PC ONLY
 EndSection

 Section "!InputDevice"
  Driver        "wacom"
  Identifier    "stylus"
  Option        "Device"        "/dev/wacom0"
  Option        "Type"          "stylus"
  Option        "USB"           "on"                  
  Option        "ForceDevice"   "ISDV4"               # For Tablet PC ONLY
 EndSection

 Section "!InputDevice"
  Driver        "wacom"
  Identifier    "eraser"
  Option        "Device"        "/dev/wacom0"
  Option        "Type"          "eraser"
  Option        "USB"           "on"                  
  Option        "!ForceDevice"   "ISDV4"               # For Tablet PC ONLY
 !EndSection

and then later in the XF86Config-4 file in the section Section "!ServerLayout" add some lines, would look something like this:

 Section "!ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
        !InputDevice     "Generic Keyboard"
        !InputDevice     "Configured Mouse"
        !InputDevice     "cursor"    "!SendCoreEvents" # Add this line
        !InputDevice     "stylus"    "!SendCoreEvents" # Add this line
        !InputDevice     "eraser"    "!SendCoreEvents" # Add this line
 !EndSection

Now either logout and restart X (if you have done the above steps with unplugging and restarting of udevd) with ctrl+alt+backspace, or reboot. If you plug-in the tablet after the graphical interface has been started you have to restart X by logout and hit ctrl+alt+backspace when you get the login screen. You can do some more tweaking of your tablet Read more about it here: http://linuxwacom.sourceforge.net/index.php/howto/x11 Setting up The Gimp to support tablets is easy. From the main window goto File->Preferences; then in the Input Devices section (on the left), press 'Configure Extended Input Devices'. For each device in the dropdown list, choose it and change Mode from Disabled to Screen. The current version of The Gimp included in Ubuntu does not handle tablet input very nicely, but the newest stable version (as of writing, 2.2) is very smooth indeed, and is a worthwhile upgrade. Before building from source, sudo apt-get build-dep gimp will get all the build requirements. Note: I think you can use some xset command to add xinput devices after X has been started. But I also think latest x.org release has better hotplug support so. Note: I have notice that sometimes X upsets the wacom driver, then you have to kill X, unload wacom and evdev and replug the tablet and the start X again. Note (Wouter): With an USB Tablet and an USB mouse, you might have to change the mouse settings in the XF86Config-4 or xorg.conf too. Change this entry in the mouse-section:

 Option          "Device"                "/dev/input/mice"

to

 Option          "Device"                "/dev/input/mouse1" 

or perhaps mouse0 or mouse2 in your case. I also had to change the /dev/input/event0 for the Wacom tablet to /dev/input/event2, but I didn't have to recompile the kernel. Pfew... You can check which mouse? or event? to use by opening a root terminal and typing:

 sudo xxd /dev/input/mouse0 

(or mouse1 or event0 etc) and after that moving your mouse or pen. If various characters appear in the terminal as you move, you have the right one. Links: http://linuxwacom.sf.net/ https://www.ubuntulinux.org/wiki/KernelHowto https://www.ubuntulinux.org/wiki/KernelBuildpackageDetailedHowto http://www.reactivated.net/udevrules.php