Difference between revisions of "Wacom tablet"

From ArchWiki
Jump to navigation Jump to search
(updates udev restart from "https://wiki.archlinux.org/index.php/Udev")
(→‎VirtualBox: Updates wacom website link)
 
(238 intermediate revisions by 69 users not shown)
Line 1: Line 1:
[[Category:Input devices (English)]]
+
[[Category:Input devices]]
[[Category:HOWTOs (English)]]
+
[[ja:Wacom タブレット]]
 +
[[zh-hans:Wacom tablet]]
 +
[[Wikipedia:Wacom (company)|Wacom]] does not officially support Linux. Linux support is provided by the [https://linuxwacom.github.io/ Linux Wacom Project]. Supported devices are listed on the [https://github.com/linuxwacom/input-wacom/wiki/Device-IDs Device IDs] page with a version number in the ''input-wacom'' column.
  
= Introduction =
+
== Installation ==
  
Before we begin, I would like to point out that this guide was started for ''USB'' based Wacom tablets, so much of the info in here focuses on that. For an ''internal'' tablet device (like the serial devices found in many Tablet PCs) a static Xorg is recommended in case autodetection doesn't work. For ''USB'' devices, you can setup both static ''Xorg'' configuration, meaning things may not work if later on you plug your Wacom tablet into a different ''USB'' port, or follow the dynamic instructions further down.
+
The Arch Linux [[kernels]] include the [https://github.com/linuxwacom/input-wacom input-wacom] driver.
  
It's also worth to mention that this wiki article is very much influenced by the very helpful [http://en.gentoo-wiki.com/wiki/HOWTO_Wacom_Tablet Gentoo Linux Wiki - HOWTO Wacom Tablet], which I recommend anyone visit if they would like to learn about things that are not covered here.
+
Ensure your kernel recognizes your tablet. Connect your tablet via USB or [[Bluetooth]]. It should show up in {{ic|dmesg {{!}} grep -i wacom}} and be listed in {{ic|/proc/bus/input/devices}} (and if you use USB in the {{ic|lsusb}} output). If it does not, your only chance is that your tablet is supported by a more recent driver than the one in your kernel. In that case [[install]] the {{AUR|input-wacom-dkms}} package.
  
== Try Autodetection First ==
+
[[Install]] the [[X]] driver, {{Pkg|xf86-input-wacom}}, and restart X so the new [[udev]] rules take effect.
  
Newer versions of X might be able to automatically detect and configure your device. Before going any further, try installing the xf86-input-wacom package, reboot your system, and (re-)start X. With the arrival of Xorg 1.8 that dropped support for [[HAL]] in favor of udev, autodetection might be broken for sometablets as fitting udev rules might not exist yet, so you need to write your own.
+
The command {{ic|xsetwacom list devices}} should now list some devices. If it does not, see [[#Manual setup]].
  
If you have linuxwacom or linuxwacom-dev and X fails to start, remove those packages first. They are known to cause problems with newer version of X. xf86-input-wacom is the only package you need to install the kernel drivers.
+
The {{Pkg|kcm-wacomtablet}} package provides a [[KDE]] graphical user interface for tablet configuration and supports tablet-specific profiles and hotplugging.
  
Test if your device was recognized completely (i.e., that both pen and eraser work, if applicable), by opening gimp or xournal and checking the extended input devices section, or whatever tablet-related configuration is supported by the software of your choice.
+
Support for the following Wacom tablets is provided via {{AUR|tuhi-git}}:
 +
* Bamboo Spark
 +
* Bamboo Slate
 +
* Intuos Pro Paper
  
= Installing =
+
Consult README for the details of initial configuration. For setups with more than one monitor you'll probably want to fix aspect ratio using {{ic|Coordinate Transformation Matrix}} as described at [https://github.com/linuxwacom/xf86-input-wacom/wiki/Dual-and-Multi-Monitor-Set-Up dual and multimonitor set up].
  
== Install Linuxwacom ==
+
== Configuration ==
  
Thanks to [http://linuxwacom.sourceforge.net The Linux Wacom Project], you only need to install the ''xf86-input-wacom'' package, which contains everything needed to use a Wacom tablet on Linux. The ''linuxwacom'' package in AUR only contains tools, not the kernel driver, and is not needed to make your tablet work normally.
+
The Xorg driver can be temporarily configured with {{ic|xsetwacom}}, see {{man|1|xsetwacom}}. Changes are lost after X server restarts or replugging your tablet.
  
==Dynamic Xorg setup with udev==
+
List the available devices:
Again thanks to [http://gentoo-wiki.com/HOWTO_Wacom_Tablet Gentoo Linux Wiki - HOWTO Wacom Tablet] for the information! This was done with a ''Volito2'', and so reflects the experiences with that tablet, but it should work for any tablet supported by the linuxwacom project.
 
  
{{Note | The linuxwacom package from AUR already includes a udev-rules-file, so you might skip this part and move on to the {{Filename|xorg.conf}} configuration if you're using the linuxwacom package from AUR.}}
+
{{hc|$ xsetwacom list devices|
 +
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH
 +
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD     
 +
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS   
 +
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER
 +
}}
  
Install ''udev'' from the repositories (when using Xorg > 1.8, this is a dependency and will already be installed).
+
For the {{ic|get}} and {{ic|set}} commands, devices can be specified by name or id. Scripts should use names because ids can change after X server restarts or replugging.
Run the ''lsusb'' command. It should return something like this
 
  
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd
+
=== Permanent configuration ===
Bus 002 Device 006: ID 03eb:0902 Atmel Corp.
+
 
Bus 002 Device 005: ID 0bc2:0503 Seagate RSS LLC
+
{{Note|Because ''xorg.conf'' lacks options ''xsetwacom'' has and only lets you map buttons to mouse buttons, you may want to [[autostart]] a script with ''xsetwacom'' commands instead of using ''xorg.conf''.}}
Bus 002 Device 004: ID 05e3:0660 Genesys Logic, Inc. USB 2.0 Hub
+
 
Bus 002 Device 001: ID 1d6b:0002
+
Configuration can be made persistent in [[xorg.conf]] and {{man|5|xorg.conf}}.
Bus 003 Device 001: ID 1d6b:0001
+
 
Bus 001 Device 003: ID 06a3:8000 Saitek PLC
+
You firstly need to find out your product names:
Bus 001 Device 002: ID 045e:00d1 Microsoft Corp.
+
 
Bus 001 Device 001: ID 1d6b:0001
+
{{hc|$ grep "Using input driver 'wacom'" /var/log/Xorg.0.log|
You can see from here my tablet among other devices. We are interested in the tablet and mouse - unless there is no mouse attached to the said computer of course.
+
[ 25059.351] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen'
Next make the file {{Filename|10-local.rules}} in ''/etc/udev/rules.d''. You need to add these two lines
+
[ 25059.409] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pad'
 +
[ 25059.428] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen eraser'
 +
[ 25059.429] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen cursor'
 +
}}
 +
 
 +
For these product names the sections would be:
 +
 
 +
{{hc|/etc/X11/xorg.conf.d/72-wacom-options.conf|
 +
Section "InputClass"
 +
Identifier "WACOM OPTIONS pen"
 +
MatchDriver "wacom"
 +
MatchProduct "Pen"
 +
NoMatchProduct "eraser"
 +
NoMatchProduct "cursor"
 +
EndSection
 +
 
 +
Section "InputClass"
 +
Identifier "WACOM OPTIONS pad"
 +
MatchDriver "wacom"
 +
MatchProduct "Pad"
 +
EndSection
 +
 
 +
Section "InputClass"
 +
Identifier "WACOM OPTIONS eraser"
 +
MatchDriver "wacom"
 +
MatchProduct "eraser"
 +
EndSection
 +
 
 +
Section "InputClass"
 +
Identifier "WACOM OPTIONS cursor"
 +
MatchDriver "wacom"
 +
MatchProduct "cursor"
 +
EndSection
 +
}}
 +
 
 +
* The options described in {{man|4|wacom}} can be added to sections.
 +
* The product name needs to contain the {{ic|MatchProduct}} value in order for a section to match. Matching of parent devices requires negative matching.
 +
* The {{ic|Identifier}} can be arbitrary and is printed into the Xorg log when the section matches. Giving your identifiers a common prefix lets you easily [[grep]] for what sections were matched: {{bc|grep "WACOM OPT" /var/log/Xorg.0.log}}
 +
* Configuration changes require a X server restart to take effect.
 +
 
 +
{{Note|''xorg.conf'' options can differ from ''xsetwacom'' options.}}
 +
 
 +
''xsetwacom'' can try to print all current settings of a device in ''xorg.conf'' format with:
 +
 
 +
$ xsetwacom get ''device'' all
 +
 
 +
=== Remapping buttons ===
  
KERNEL=="event*", SYSFS{idVendor}=="056a", NAME="input/%k", SYMLINK="input/wacom"
+
The X driver lets you remap the buttons on tablets and pens. Buttons are identified by numbers. Tablet buttons start at 1, pen buttons start at 2 (1 is the tip contact event). By default the X driver maps button ''M'' to mouse button ''M''. Because X uses buttons 4-7 as the four scrolling directions, physical buttons 4 and higher are mapped to mouse buttons 8 and higher by default. While ''xorg.conf'' uses the actual button numbers and only lets you map to mouse buttons, ''xsetwacom'' uses the translated mouse button numbers and allows mapping to multiple keycodes (but not keysyms).
KERNEL=="mouse*", SYSFS{idProduct}=="045e", NAME="input/%k", SYMLINK="input/mouse_udev"
 
Of course you need to change '056a' and '045e' to what lsusb returns for you – I used the VendorID for my tablet and the ProductID for my mouse.
 
Save the file and start udev using the command ''udevadm control restart''
 
Check to make sure that it has appeared in ''/dev/input''.
 
  
bash-3.2# cd /dev/input
+
If you have not yet remapped your buttons you can easily identify their ids with {{Pkg|xorg-xev}}, by running the following command, placing the mouse cursor on the created window and pressing a button:
bash-3.2# ls
 
by-id    event0  event2  event4  event6  event8  mouse0  mouse2      wacom
 
by-path  event1  event3  event5  event7  mice    mouse1  mouse_udev
 
You can even check that the device works by
 
  
# cat wacom
+
{{hc|$ xev -event button|
It should make lots of odd characters appear onscreen.
+
Outer window is 0x1a00001, inner window is 0x1a00002
If it works, then all that is left to do is add the relevent information to {{Filename|/etc/X11/xorg.conf}}.
 
  
Section "InputDevice"
+
ButtonPress event, serial 25, synthetic NO, window 0x1a00001,
    Driver        "wacom"
+
    root 0x2a0, subw 0x0, time 3390669, (404,422), root:(1047,444),
    Identifier    "stylus"
+
    state 0x0, button 8, same_screen YES
    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
 
Make sure that you also change the path ({{Codeline|"Device"}}) to your mouse, as it will be {{Codeline|/dev/input/mouse_udev}} now.
 
  
Section "InputDevice"
+
In this case the button number for ''xsetwacom'' is 8 and the actual button number for ''xorg.conf'' is 4.
    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
 
Add this to the ''ServerLayout'' section
 
  
InputDevice "cursor" "SendCoreEvents"
+
Alternatively, if you want an overview of your tablet's button layout you can look at your tablet's layout SVG. Firstly, find out the filename with a recursive [[grep]] search for the tablet name reported by {{ic|xsetwacom list devices}}:
InputDevice "stylus" "SendCoreEvents"
 
InputDevice "eraser" "SendCoreEvents"
 
And finally make sure to update the indentifier of your mouse in the ''ServerLayout'' section – as mine went from
 
  
InputDevice    "Mouse0" "CorePointer"
+
{{hc|$ grep -rl 'Wacom Bamboo 16FG 4x5' /usr/share/libwacom/*.tablet|2=
to
+
/usr/share/libwacom/bamboo-16fg-s-t.tablet
 +
}}
  
InputDevice    "Mouse1" "CorePointer"
+
In this case the respective layout SVG is {{ic|/usr/share/libwacom/layouts/bamboo-16fg-s-t.svg}}. The letters in the SVG correspond to the button numbers: A=1, B=2, C=3, ...
  
===Tablet PC with serial Wacom tablet device (Xorg > 1.8)===
+
==== Mapping pad buttons to function keys ====
Create /etc/udev/rules.d/10-wacom.rules with these lines:
 
  
ACTION!="add|change", GOTO="wacom_end"
+
If you want to bind your tablet buttons to different shortcuts in different applications, you may want to map your tablet buttons to function keys because applications generally do not let you bind keyboard shortcuts to mouse buttons.
    # Match all wacom tablets with a serial ID starting with WACf or FUJ*
 
    ATTRS{id}=="WACf*" ENV{NAME}="Serial Wacom Tablet", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
 
    ATTRS{id}=="FUJ*" ENV{NAME}="Serial Wacom Tablet", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
 
LABEL="wacom_end"
 
  
==Dynamic Xorg setup with HAL==
+
Firstly, map the pad buttons to mouse buttons 11 and higher so that you can distinguish them from regular mouse buttons. For example:
  
{{Note | In Xorg 1.8 and later, support for HAL is dropped. Input hotplugging will ''NOT'' work with these versions of X, you need to use udev (see above) instead. }}
+
xsetwacom set ''pad'' Button 1 11
{{Note | The linuxwacom package from AUR already includes a fitting fdi file, so you might skip this part and just try out if it works after installing linuxwacom and restarting X.}}
+
xsetwacom set ''pad'' Button 2 12
 +
...
  
To use a Wacom/WALTOP/N-Trig tablet with HAL Xorg hotplugging create {{Filename|/etc/hal/fdi/policy/10-tablet.fdi}} with this code:
+
Then map the mouse buttons to the function keys. This can be done with [[xbindkeys]] and [[xdotool]] by adding an entry like the following for every pad to your {{ic|~/.xbindkeysrc}}:
  
  <?xml version="1.0" encoding="UTF-8"?> &lt;!-- -*- SGML -*- -->
+
  "xdotool key F21"
 +
  b:11
 
   
 
   
  <deviceinfo version="0.2">
+
  "xdotool key F22"
  <device>
+
  b:12
    <match key="info.capabilities" contains="input">
+
...
      <match key="info.product" contains="Wacom">
+
 
        <merge key="input.x11_driver" type="string">wacom</merge>
+
==== The syntax ====
        <merge key="input.x11_options.Type" type="string">stylus</merge>
 
      </match>
 
      <match key="info.product" contains="WALTOP">
 
        <merge key="input.x11_driver" type="string">wacom</merge>
 
        <merge key="input.x11_options.Type" type="string">stylus</merge>
 
      </match>
 
    </match>
 
    <!-- N-Trig Duosense Electromagnetic Digitizer -->
 
    <match key="info.product" contains="HID 1b96:0001">
 
      <match key="info.parent" contains="if0">
 
      <merge key="input.x11_driver" type="string">wacom</merge>
 
      <merge key="input.x11_options.Type" type="string">stylus</merge>
 
      </match>
 
    </match>
 
  </device>
 
  </deviceinfo>
 
  
Then kill your X server, restart HAL and start the X server again.
+
The syntax of {{ic|xsetwacom}} is flexible but not very well documented. The general mapping syntax (extracted from the source code) for xsetwacom 0.17.0 is the following.
  
Following fdi file is known to work with the Bamboo Fun tablet (model CTE-650). Using this file corrects several problems with the stylus that appear when using the default fdi file above. Create the file {{Filename|/etc/hal/fdi/policy/10-tablet.fdi}} with the following contents:
+
  KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]
 +
 
 +
  KEYWORD + ARGS:
 +
    key [+,-]KEY [[+,-]KEY ...]  where +:key down, -:key up, no prefix:down and up
 +
    button BUTTON [BUTTON ...]  (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)
 +
    modetoggle                  toggle absolute/relative tablet mode
 +
    displaytoggle                toggle cursor movement among all displays which include individual screens
 +
                                plus the whole desktop for the selected tool if it is not a pad.
 +
                                When the tool is a pad, the function applies to all tools that are asssociated
 +
                                with the tablet
 +
 
 +
  BUTTON: button ID as integer number
 +
 
 +
  KEY: MODIFIER, SPECIALKEY or ASCIIKEY
 +
  MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)
 +
    ctrl=ctl=control, meta, alt, shift, super, hyper
 +
  SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn
 +
  ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)
  
<?xml version="1.0" encoding="UTF-8"?>
+
==== Some examples ====
<!-- this is probably a bit imprecise -->
 
<deviceinfo version="0.2">
 
  <device>
 
    <match key="info.category" contains="input">
 
      <match key="info.product" contains_outof="Wacom">
 
        <merge key="input.x11_driver" type="string">wacom</merge>
 
        <merge key="input.x11_options.Type" type="string">pad</merge>
 
        <append key="info.callouts.add" type="strlist">hal-setup-wacom</append>
 
        <append key="wacom.types" type="strlist">eraser</append>
 
        <append key="wacom.types" type="strlist">cursor</append>
 
        <append key="wacom.types" type="strlist">stylus</append>
 
      </match>
 
    </match>
 
    <match key="info.capabilities" contains="serial">
 
      <match key="@info.parent:pnp.id" contains_outof="WACf001;WACf002;WACf003;WACf004;WACf005;WACf006;WACf007;WACf008;WACf009;WACf00a;WACf00b;WACf00c;FUJ02e5">
 
        <append key="info.capabilities" type="strlist">input</append>
 
        <merge key="input.x11_driver" type="string">wacom</merge>
 
        <merge key="input.x11_options.Type" type="string">pad</merge>
 
        <merge key="input.x11_options.ForceDevice" type="string">ISDV4</merge>
 
        <merge key="input.device" type="copy_property">serial.device</merge>
 
        <append key="info.callouts.add" type="strlist">hal-setup-wacom</append>
 
        <append key="wacom.types" type="strlist">stylus</append>
 
        <match key="@info.parent:pnp.id" contains_outof="WACf008;WACf009">
 
          <!-- Serial tablets with touch capabilities -->
 
          <append key="wacom.types" type="strlist">touch</append>
 
        </match>
 
      </match>
 
    </match>
 
  </device>
 
  <!-- Match the Wacom Bluetooth A5 pen tablet -->
 
  <device>
 
    <match key="info.capabilities" contains="input.mouse">
 
      <match key="info.product" contains="WACOM">
 
        <match key="info.product" contains="Tablet">
 
          <merge key="input.x11_driver" type="string">wacom</merge>
 
          <merge key="input.x11_options.Type" type="string">pad</merge>
 
          <append key="info.callouts.add" type="strlist">hal-setup-wacom</append>
 
          <append key="wacom.types" type="strlist">eraser</append>
 
          <append key="wacom.types" type="strlist">cursor</append>
 
          <append key="wacom.types" type="strlist">stylus</append>
 
        </match>
 
      </match>
 
    </match>
 
  </device>
 
</deviceinfo>
 
  
=== Calibrating Tablet ===
+
  $ xsetwacom set ''pad'' Button 1 3 # right mouse button
 +
  $ xsetwacom set ''pad'' Button 1 "key +ctrl z -ctrl"
 +
  $ xsetwacom get ''pad'' Button 1
 +
  key +Control_L +z -z -Control_L
 +
  $ xsetwacom set ''pad'' Button 1 "key +shift button 1 key -shift"
  
In order for calibration to work even when the screen is rotated (this applies for both serial and USB tablets), the wacom-names script is useful. It renames your X input devices so that they can be recognized by the linuxwacom driver. Download it from [http://ubuntuforums.org/attachment.php?attachmentid=109824&d=1239742307 here]. You need to be a Ubuntu forums member to download it. If you are not, here is the script. Remember, it was originally intended for Ubuntu so the instructions do not all apply to us Archers:
+
Even little macros are possible:
  
# wacom-names script by Roger E. Critchlow, Jr. (4-12-09)
+
   $ xsetwacom set ''pad'' Button 1 "key +shift h -shift e l l o"
#   modified by gali98/Favux (4-14-09)
+
 
#
+
{{Note|If you try to run a script with {{ic|xsetwacom}} commands from a udev rule, you might find that it will not work, as the Wacom input devices will not be ready at the time. A workaround is to add {{ic|sleep 1}} at the beginning of your script.}}
# Place the wacom-names script in  /etc/init.d/wacom-names and link it as
+
 
# /etc/rc{2,3,4,5}.d/S27wacom-names.
+
==== Execute custom commands ====
# Use "sudo update-rc.d wacom start 27 2 3 4 5 ." or "sudo update-rc.d wacom defaults 27".
+
 
# Using S27 starts the script after hal and before gdm. This allows us to modify the hal
+
{{Style|Duplicates [[Xbindkeys]]. There are alternatives to xbindkeys.}}
# properties before the xserver sees them for the first time.
+
 
#
+
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install [[xbindkeys]].
# The script renames the input devices back to what wacomcpl and xsetwacom expect them to
+
 
# be, so rotation and interactive calibration work. It also enables xorg.conf & .xinitrc
+
To get well defined button codes add the following to your permanent configuration file, e.g. {{ic|/etc/X11/xorg.conf.d/52-wacom-options.conf}} in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.
# style configuration of Wacom features like the stylus button(s) and calibration.
+
 
#
+
  # Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)
# The script needs to be executable.  chmod +x wacom-names
+
  Option "Button1" "10"
+
  Option "Button2" "11"
#! /bin/sh
+
  Option "Button3" "12"
## find any wacom devices
+
  Option "Button4" "13"
for udi in `hal-find-by-property --key input.x11_driver --string wacom`
+
 
do
+
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.
type=`hal-get-property --udi $udi --key input.x11_options.Type`
+
 
## rewrite the names that the Xserver will use
+
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration
hal-set-property --udi $udi --key info.product --string $type
+
 
#
+
  $ xbindkeys --defaults > ~/.xbindkeysrc
## To add a xorg.conf or xsetwacom (.xinitrc) style configuration, say mapping a stylus
+
 
## button, you could add to the script:
+
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example
#case $type in
+
 
#stylus|eraser)
+
  "firefox"
## eg: map stylus button 2 to mouse button 3 (right click)
+
      m:0x10 + b:10  (mouse)
#hal-set-property --udi $udi --key input.x11_options.Button2 --string 3
+
  "xterm"
#
+
      m:0x10 + b:11  (mouse)
  #;;
+
  "xdotool key ctrl-z"
#esac
+
      m:0x10 + b:12  (mouse)
done
+
  "send-notify Test "No need for escaping the quotes""
 +
      m:0x10 + b:13  (mouse)
 +
 
 +
=== Adjusting aspect ratios ===
 +
 
 +
Drawing areas of tablets are generally more square than the usual widescreen display with a 16:9 aspect ratio, leading to a slight vertical compression of your input. To resolve such an aspect ratio mismatch you need to compromise by either reducing the drawing area height (called ''Force Proportions'' on Windows) or reducing the screen area width. The former wastes drawing area and the latter prevents you from reaching the right edge of your screen with your Stylus. It is probably still a compromise worth to be made because it prevents your strokes from being skewed.
 +
 
 +
Find out your tablet's resolution by running:
 +
 
 +
  $ xsetwacom get ''stylus'' Area
 +
 
 +
==== Reducing the drawing area height ====
  
Copy and paste and (or directly) save it as wacom-names to '''/etc/rc.d''' and make it an executable.
+
Run:
# chmod +x /etc/rc.d/wacom-names
 
  
Add wacom-names to the DAEMONS line in your {{Filename|[[rc.conf]]}}. Make sure to put it after HAL, and do not background HAL, because this script will not work if it runs before HAL has started. For example:
+
  $ xsetwacom set ''stylus'' Area 0 0 ''tablet_width'' ''height''
  DAEMONS=(syslog-ng @crond hal @acpid @alsa @gpm wacom-names)
 
  
Reboot your computer. From here you can either keep wacom-names in your rc.conf if your rotation script calls on xsetwacom directly, or if you just need the calibration data, you can now use wacomcpl.
+
where ''height'' is ''tablet_width * screen_height / screen_width''.
  
If you are looking for more information, this [http://ubuntuforums.org/showthread.php?t=1038949 thread] at the Ubuntu forums is incredibly useful, and also provided the link to Rec's wacom-names script.
+
The tablet resolution can be reset back to the default using:
  
== Static Xorg config ==
+
$ xsetwacom set ''stylus'' ResetArea
{{Note | Static configuration is deprecated by the X.org project. If you are using a version of Xorg 1.8 or newer, try configuring with udev (see above) first. If you are using a using Xorg older than 1.8, consider using HAL (see above) instead. These approaches will give you the ability for hotplugging and automatic configuration.}}
 
  
This is a static ''Xorg'' configuration, meaning things may not work if later on you plug your Wacom tablet into a different USB port.
+
==== Reducing the screen area width ====
  
InputDevice    "cursor" "SendCoreEvents"
+
Run:
InputDevice    "stylus" "SendCoreEvents"
 
InputDevice    "eraser" "SendCoreEvents"
 
Firstly, add these to the ''ServerLayout'' section of your ''Xorg'' config ({{Filename|/etc/X11/xorg.conf}}).
 
  
  $ cat /proc/bus/input/devices
+
  $ xsetwacom set ''stylus'' MapToOutput ''WIDTH''x''SCREEN_HEIGHT''+0+0
Now we need to determine the location of your tablet ''device''. Run the command above, and take note of the ''event'' number of the ''Handlers'' row. We will use this to set the correct device in our ''Xorg'' config below. If you are using a serial tablet, chances are that there will not be any such device displayed here. Try
 
$ cat /dev/ttyS0
 
  
and move the pen on the tablet. If pen movement makes garbage characters show up on screen, this is your tablet device. In this case, use this as the "Device" option as seen below.
+
where ''WIDTH'' is ''screen_height * tablet_width / tablet_height''.
  
I: Bus=0003 Vendor=056a Product=0016 Version=0403
+
=== LEDs ===
N: Name="Wacom Graphire4 6x8"
 
P: Phys=
 
S: Sysfs=/class/input/input7
 
H: Handlers=mouse2 event7 ts2
 
B: EV=1f
 
B: KEY=1c63 0 70011 0 0 0 0 0 0 0 0
 
B: REL=100
 
B: ABS=100 3000003
 
B: MSC=1
 
Here is an example of the output for my ''Graphire4'' tablet. From this, we can determine that my tablet device goes through {{Filename|/dev/input/event7}}.
 
  
Section "InputDevice"
+
See the [https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-driver-wacom sysfs-driver-wacom] documentation. To make changes without requiring root permissions you will likely want to create a [[udev]] rule like so:
Identifier  "stylus"
 
Driver      "wacom"
 
Option      "Type" "stylus"
 
Option      "Device" "/dev/input/event7" #for serial tablet, this might be e.g. "/dev/ttyS0" instead
 
Option      "USB" "on" #remove this line for serial tablets
 
Option      "Mode" "Absolute"
 
Option      "Vendor" "WACOM"
 
Option      "Threshold" "5"
 
EndSection
 
 
Section "InputDevice"
 
Identifier  "eraser"
 
Driver      "wacom"
 
Option      "Type" "eraser"
 
Option      "Device" "/dev/input/event7" #for serial tablet, this might be e.g. "/dev/ttyS0" instead
 
Option      "USB" "on" #remove this line for serial tablets
 
Option      "Mode" "Absolute"
 
Option      "Vendor" "WACOM"
 
Option      "Threshold" "5"
 
EndSection
 
 
Section "InputDevice"
 
Identifier  "cursor"
 
Driver      "wacom"
 
Option      "Type" "cursor"
 
Option      "Device" "/dev/input/event7" #for serial tablet, this might be e.g. "/dev/ttyS0" instead
 
Option      "USB" "on" #remove this line for serial tablets
 
Option      "Mode" "Absolute"
 
Option      "Vendor" "WACOM"
 
EndSection
 
Now update your ''Xorg'' config ({{Filename|/etc/X11/xorg.conf}}) as above.
 
  
To learn about each of the Wacom tablet ''Xorg'' options checkout the ''man pages'' found at [http://linuxwacom.sourceforge.net/index.php/howto/inputdev Linux Wacom Project HOWTO - 5.1 - Adding the InputDevices].
+
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki>
 +
# Give the users group permissions to set Wacom device LEDs.
 +
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"
 +
</nowiki>}}
  
I recommend you checkout [http://linuxwacom.sourceforge.net/index.php/howto/x11 Linux Wacom Project HOWTO - 5.0 - Configuring X11], I also recommend you checkout [http://gentoo-wiki.com/HOWTO_Wacom_Tablet#Xorg Gentoo Linux Wiki - HOWTO Wacom Tablet - Installing - Xorg].
+
Setting the Intuos OLEDs can be done using {{AUR|i4oled}} from the AUR.
  
==== TwinView Setup ====
+
=== TwinView setup ===
  
If you are going to use two Monitors the aspect ratio while using the Tablet might feel unnatural. In order to fix this you need to add
+
If you are going to use two monitors the aspect ratio while using the tablet might feel unnatural. In order to fix this you need to add:
  
 
  Option "TwinView" "horizontal"
 
  Option "TwinView" "horizontal"
  
To all of your Wacom-InputDevice entries in the {{Filename|xorg.conf}} file.
+
to all of your Wacom-InputDevice entries in the ''xorg.conf'' file. You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 here].{{Dead link|2018|09|05}}
You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 HERE]
+
 
 +
==== Temporary TwinView setup ====
 +
 
 +
For temporary mapping of a Wacom device to a single display ''while preserving the aspect ratio'', [https://gist.github.com/Quackmatic/6c19fe907945d735c045 this script] may be used. This will letter-box the surface area of the device as required to ensure the input is not stretched on the display. This script may be executed in your {{ic|.xinitrc}} file for it to automatically run.
 +
 
 +
=== xrandr setup ===
 +
 
 +
{{Style|Wording can be improved, personal writing style.}}
 +
 
 +
[[xrandr]] sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio. For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 Arch Linux forum].
 +
 
 +
If you just want to map the tablet to one of your screens, first find out what the screens are called:
 +
 
 +
$ xrandr
 +
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
 +
HDMI-0 disconnected (normal left inverted right x axis y axis)
 +
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
 +
  1920x1080      60.0*+
 +
  1680x1050      60.0 
 +
  ...
 +
VGA-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm
 +
  1920x1080      60.0*+
 +
  1680x1050      60.0 
 +
  ...
 +
 
 +
Then you need to know what is the ID of your tablet.
 +
 
 +
$ xsetwacom list devices
 +
WALTOP International Corp. Slim Tablet stylus  id: 12  type: STYLUS
 +
 
 +
In my case I want to map the tablet (ID: 12) to the screen on the right, which is ''VGA-0''. I can do that with this command
 +
 
 +
$ xsetwacom set 12 MapToOutput VGA-0
 +
 
 +
This should work immediately, no root necessary.
 +
 
 +
Should this fail when using the NVIDIA binary driver, using ''HEAD-0'', ''HEAD-1'' and so on to refer to the monitors may work.
 +
 
 +
If xsetwacom replies with "Unable to find an output ..." an X11 geometry string of the form {{ic|WIDTHxHEIGHT+X+Y}} can be specified instead of the screen identifier. In this example
  
==== Xrandr Setup ====
+
$ xsetwacom set 12 MapToOutput 1920x1080+1920+0
xrandr sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio.
 
For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 archlinux forum].
 
  
=== Graphire4 buttons ===
+
should also map the tablet to the screen on the right.
  
InputDevice    "pad" "SendCoreEvents"
+
Alternatively, you can use [https://bitbucket.org/denilsonsa/small_scripts/src/3380435f92646190f860b87f566a39d0e215034c/xsetwacom_my_preferences.sh?at=default this bash script] to quickly map the tablet to one of your screens (or the entire desktop) and fix the aspect ratio.
Add this to the ''ServerLayout'' section of your ''Xorg'' config ({{Filename|/etc/X11/xorg.conf}}).
 
  
*Note, it was mentioned at [http://gentoo-wiki.com/HOWTO_Wacom_Tablet#Graphire4_buttons Gentoo Linux Wiki - HOWTO Wacom Tablet - Installing - Xorg - Graphire4 buttons] that there was information somewhere advising NOT to add "SendCoreEvents" to the line above, but it was also said that without this these buttons will not work.
+
In case ''xsetwacom'' does not work, you can try ''xinput''.
  
Section "InputDevice"
+
First, you need to find your tablet's ID.
Identifier  "pad"
+
 
Driver      "wacom"
+
$ xinput list
Option      "Type" "pad"
+
 
Option      "Device" "/dev/input/event7"  #for serial tablet, this might be e.g. "/dev/ttyS0" instead
+
In my case, the output is:
Option      "USB" "on"#remove this line for serial tablets
 
Option      "ButtonsOnly" "on"
 
EndSection
 
Now update your ''Xorg'' config ({{Filename|/etc/X11/xorg.conf}}) as above.
 
  
I recommend you checkout [http://gentoo-wiki.com/HOWTO_Wacom_Tablet#Graphire4_buttons Gentoo Linux Wiki - HOWTO Wacom Tablet - Installing - Xorg - Graphire4 buttons].
+
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
 +
⎜  ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
 +
⎜  ↳ Wacom Intuos PT S 2 Finger                id=11  [slave  pointer  (2)]
 +
⎜  ↳ Wacom Intuos PT S 2 Pad                  id=12  [slave  pointer  (2)]
 +
⎜  ↳ USB Keyboard                              id=14  [slave  pointer  (2)]
 +
⎜  ↳ SynPS/2 Synaptics TouchPad                id=16  [slave  pointer  (2)]
 +
⎜  ↳ TPPS/2 IBM TrackPoint                    id=17  [slave  pointer  (2)]
 +
⎜  ↳ SteelSeries Kinzu V2 Gaming Mouse        id=9    [slave  pointer  (2)]
 +
⎜  ↳ Wacom Intuos PT S 2 Pen Pen (0x6281780c)  id=20  [slave  pointer  (2)]
 +
⎣ Virtual core keyboard                        id=3    [master keyboard (2)]
 +
    ↳ Virtual core XTEST keyboard              id=5    [slave  keyboard (3)]
 +
    ↳ Power Button                              id=6    [slave  keyboard (3)]
 +
    ↳ Video Bus                                id=7    [slave  keyboard (3)]
 +
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
 +
    ↳ Wacom Intuos PT S 2 Pen                  id=10  [slave  keyboard (3)]
 +
    ↳ USB Keyboard                              id=13  [slave  keyboard (3)]
 +
    ↳ AT Translated Set 2 keyboard              id=15  [slave  keyboard (3)]
 +
    ↳ ThinkPad Extra Buttons                    id=18  [slave  keyboard (3)]
 +
    ↳ USB Keyboard                              id=19  [slave  keyboard (3)]
  
=== Tablet devices still do not appear ===
+
This mean, my tablet's ID is ''20''. Now we map it with ''VGA-0'' screen:
  
Start ''Xorg'' with tablet connected. Then look at logs ({{Filename|/var/log/Xorg.0.log}}) and search for those errors:
+
$ xinput map-to-output 20 VGA-0
  
  Error opening /dev/input/wacom : Success
+
=== Pressure curve ===
  (EE) xf86OpenSerial: Cannot open device /dev/input/wacom
 
          No such file or directory.
 
  
This error will show even when device exists.
+
Use the [https://linuxwacom.github.io/bezier.html Wacom Pressure Curve and Threshold Graph] to find P1=red (eg. 50,0) and P2=purple (eg. 100,80) of your desired curve. The x-axis is the input pressure you apply to the pen; the y-axis is the output pressure the application is given.
  
Second error is
+
You can change the pressure curve with:
  
  usbDetect: can not ioctl version
+
$ xsetwacom set ''stylus'' PressureCurve ''x1 y1 x2 y2''
  Wacom xf86WcmWrite error : Invalid argument
 
  
If there are those errors, check if your wacom device is {{Filename|/dev/input/ts3}} or another ts device (or symlink to this device). If it is, then device is handled by Compaq touchscreen emulation. This is ''tsdev'' module.
+
== Application-specific configuration ==
Just unload the module
 
  
  # modprobe -r tsdev
+
=== Blender ===
  
and add this module to blacklist in {{Filename|/etc/rc.conf}}.
+
To enable pad buttons and extra pen buttons in [[Blender]], you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.
  
= WALTOP tablet support by the Wacom drivers =
+
Provided example (for Bamboo fun) adapted to ''Sculpt'' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]{{Dead link|2018|06|23}}
  
Since lately Wacom drivers cannot be started with WALTOP tablets, although the functionality is present. This is due to a vendor check in the ''wacom '' X.org driver. To bypass this check, download the ''linuxwacom'' sources (for example, the ''linuxwacom-cvs'' package from AUR) and apply a similar patch to {{Filename|src/xdrv/wcmUSB.c}}:
+
It remaps:
 +
* Left tablet buttons to {{ic|Shift}} and {{ic|Ctrl}} ''(pan/tilt/zoom/smooth/invert)''
 +
* Right tablet buttons to {{ic|F}} ''(brush size/strenght)'' and {{ic|Ctrl-z}} ''(undo)''
 +
* Top pen button ton {{ic|m}} ''(mask control)''
  
% cat wcmUSB.c.diff
+
=== GIMP ===
528,529c528,529
 
< /* vendor is wacom */
 
< if (sID[1] == 0x056A)
 
---
 
> /* vendor is wacom or waltop*/
 
> if (sID[1] == 0x056A || sID[1] == 0x172f)
 
  
 +
To enable proper usage, and pressure sensitive painting in [[GIMP]], just go to ''Edit > Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.
  
= The GIMP =
+
* Please take note that if present, the ''pad'' ''device'' should be kept disabled as I do not think GIMP supports such things. Alternatively, to use such features of your tablet you should map them to keyboard commands with a program such as [http://hem.bredband.net/devel/wacom/ Wacom ExpressKeys].
  
To enabled proper usage, and pressure sensitive painting in [http://www.gimp.org The GIMP], just go to ''Preferences &rarr; Input Devices &rarr; Configure Extended Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' '''devices''', set the '''mode''' to ''Screen'', and remember to save.
+
* You should also take note that the tool selected for the ''stylus'' is independent to that of the ''eraser''. This can actually be quite handy, as you can have the ''eraser'' set to be used as any tool you like.
  
*Please take note that if present, the ''pad'' '''device''' should be kept disabled as I don't think The GIMP supports such things. Alternatively, to use such features of your tablet you should map them to keyboard commands with a program such as [http://hem.bredband.net/devel/wacom/ Wacom ExpressKeys].
+
For more information checkout the ''Setting up GIMP'' section of [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp].
  
*You should also take note that the tool selected for the ''stylus'' is independent to that of the ''eraser''. This can actually be quite handy, as you can have the ''eraser'' set to be used as any tool you like.
+
If the above was not enough, you may want to try setting up the tablet's stylus (and eraser) as a second mouse pointer (separating it from your mouse) by using the {{ic|xinput create-master}} and {{ic|xinput reattach}} commands. It can help when GIMP does not start painting even if the stylus touches the tablet.
  
I recommend you checkout [http://linuxwacom.sourceforge.net/index.php/howto/gimp Linux Wacom Project HOWTO - 10.0 - Working With Gimp], and the ''Setting up GIMP'' section of [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp].
+
=== Inkscape ===
  
= Inkscape =
+
Pressure sensitivity in [[Inkscape]] is enabled the same way as in GIMP. Go to ''Edit > Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' ''devices'', set the ''mode'' to ''Screen'', and remember to save.
  
As in The GIMP, to do the same simply got to ''File &rarr; Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' '''devices''', set the '''mode''' to ''Screen'', and remember to save.
+
=== Krita ===
  
= Krita =
+
If your tablet does not draw in Krita (clicks/pressure are not registered) but works in the brush selection dialog which has a small test area, try putting Krita in full-screen or canvas-only mode.
 
 
 
 
Krita 2.0 and later only require that QT is able to use your tablet to function properly. If your tablet is not working in Krita, then make sure to check it's working in QT first. The effect of tablet pressure can then be tweaked in the painttop configuration, for example by selecting opacity, then selecting pressure from the drop down and adjusting the curve to your preference.
+
Krita only requires that Qt is able to use your tablet to function properly. If your tablet is not working in Krita, then make sure to check it is working in Qt first. The effect of tablet pressure can then be tweaked in the painttop configuration, for example by selecting opacity, then selecting pressure from the drop down and adjusting the curve to your preference.
 +
 
 +
=== VirtualBox ===
 +
 
 +
First, make sure that your tablet works well under Arch. Then, download and install the last driver from [https://www.wacom.com/en-cl/support/bamboo-support Wacom website] on the guest OS. Shutdown the virtual machine, go to ''Settings > USB''. Select ''Add Filter From Device'' and select your tablet (e.g. WACOM CTE-440-U V4.0-3 [0403]). Select ''Edit Filter'', and change the last item ''Remote'' to ''Any''.
 +
 
 +
== Troubleshooting ==
 +
 
 +
Newer tablets' drivers might not be in the kernel yet, and additional manipulations might be needed. A notable example is the newer Intuos line of tablets (Draw/Comic/Photo).
 +
 
 +
=== Unknown device_type ===
 +
 
 +
If your tablet does not get recognized by {{ic|xsetwacom}} and {{ic|dmesg}} complains about an unknown device_type, then you need to install a patched version of input-wacom.
 +
 
 +
Download and install the for-4.4 branch from [http://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].
 +
Your device should be recognized after you run
 +
   
 +
  # rmmod wacom
 +
  # insmod /lib/modules/YOUR_KERNEL/kernel/drivers/hid/wacom.ko.gz
 +
 
 +
=== Tablet recognized but xsetwacom and similar tools do not display it ===
 +
 
 +
Your logs indicate that the correct driver is selected, and the tablet works. However, when running {{ic|xsetwacom list devices}} or use similar tools that depend on the correct driver, you get an empty list.
 +
 
 +
A reason might be the execution order of your xorg configuration. {{ic|/usr/share/X11/xorg.conf.d}} gets executed first, then {{ic|/etc/X11/xorg.conf.d}}. The package {{pkg|xf86-input-wacom}} contains the file {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}}. If there is a catchall for tablets, executed after this file, the previously selected {{ic|wacom}} driver will be overwritten with a generic one that does not work with xsetwacom et. al.
 +
 
 +
To make sure, check the rules contained in the files executed after {{ic|/usr/share/X11/xorg.conf.d/70-wacom.conf}} for anything that looks like graphics tablets.
 +
 
 +
=== Manual setup ===
 +
 
 +
A manual configuration is done in {{ic|/etc/X11/xorg.conf}} or in a separate file in the {{ic|/etc/X11/xorg.conf.d/}} directory. The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver. The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port. Therefore it is wise to not refer to the device using its concrete {{ic|event??}} interface ('''static''' configuration) but by letting ''udev'' dynamically create a symbolic link to the correct {{ic|event}} file ('''dynamic''' configuration).
 +
 
 +
==== Dynamic with udev ====
 +
 
 +
{{Note|In AUR there is wacom-udev package, which includes udev-rules-file. You might skip this part and move on to the {{ic|xorg.conf}} configuration if you are using the wacom-udev package from AUR.}}
 +
 
 +
Assuming ''udev'' is already installed you simply need to install {{AUR|wacom-udev}}{{Broken package link|{{aur-mirror|wacom-udev}}}} from the [[AUR]].
 +
 
 +
===== USB-devices =====
 +
 
 +
After (re-)plugging in your ''USB''-tablet (or at least after rebooting) some symbolic links should appear in {{ic|/dev/input}} referring to your tablet device.
 +
 
 +
  $ ls /dev/input/wacom*
 +
  /dev/input/wacom  /dev/input/wacom-stylus  /dev/input/wacom-touch
 +
 
 +
If not, your device is likely to be not yet included in the ''udev'' configuration from ''wacom-udev'' which resides in {{ic|/usr/lib/udev/rules.d/wacom.rules}}. Copy the file to {{ic|/etc/udev/rules.d/wacom.rules}} and modify it there.
 +
 
 +
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.
 +
The two id's can be determined using
 +
 
 +
$ lsusb | grep -i wacom
 +
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd
 +
 
 +
In this example idVendor is 056a and idProduct 0062. In case you have device with touch (e.g. Bamboo Pen&Touch) you might need to add a second line for the touch input interface. For details check the linuxwacom wiki [http://linuxwacom.sourceforge.net/wiki/index.php/Fixed_device_files_with_udev Fixed device files with udev].
 +
 
 +
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules'' Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared. Note that you may need to plug-in the tablet again for the device to appear.
 +
 
 +
The files of further interest for the ''Xorg'' configuration are {{ic|/dev/input/wacom}} and for a touch-device also {{ic|/dev/input/wacom_touch}}.
 +
 
 +
===== Serial devices =====
 +
 
 +
The {{AUR|wacom-udev}}{{Broken package link|{{aur-mirror|wacom-udev}}}} should also include support for serial devices. Users of serial tablets might be also interested in the inputattach tool from {{Pkg|linuxconsole}} package. The inputattach command allows to bind serial device into /dev/input tree, for example with:
 +
 
 +
  # inputattach --w8001 /dev/ttyS0
 +
 
 +
See ''man inputattach'' for help about available options. As for USB devices one should end up with a file {{ic|/dev/input/wacom}} and proceed with the ''Xorg'' configuration.
 +
 
 +
==== Static setup ====
 +
 
 +
Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup. However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work. A static [[Xorg]] setup is usually not able to recognize your Wacom tablet when it is connected to a different ''USB'' port or even after unplugging and replugging it into the same port, and as such it should be considered as deprecated.
  
For earlier versions of Krita, simply go to ''Settings &rarr; Configure Krita...'' Click on ''Tablet'' and then like in Inkscape and GIMP set ''stylus'' and any others' mode to screen.
+
If you insist in using a static setup just refer to your tablet in the ''Xorg'' configuration in the next section using the correct {{ic|/dev/input/event??}} files as one can find out by looking into {{ic|/proc/bus/input/devices}}.
  
== Bamboo ==
+
==== Xorg configuration ====
  
{{Note | Some users reported problems with linuxwacom 0.8.1-1 and Bamboo. Their Cursor jumped around when trying to use the stylus-tilt to avoid that problem simply use linuxwacom 0.8.0 (You can simply edit the pkgver in the PKGBUILD).}}
+
In either case, dynamic or static setup you got now one or two files in {{ic|/dev/input/}} which refer to the correct input event devices of your tablet. All that is left to do is add the relevant information to {{ic|/etc/X11/xorg.conf}}, or a dedicated file under  {{ic|/etc/X11/xorg.conf.d/}}. The exact configuration depends on your tablet's features of course. {{ic|xsetwacom list devices}} might give helpful information on what ''InputDevice'' sections are needed for your tablet.
  
If you use an older version of linuxwacom it could happen that you will not be able to use your pen with GIMP or Inkscape when configured as above since the stylus is firing a button2 event instead of a button1 event, same with the eraser. To correct this add (don't just copy and paste the whole section, just add the part about the buttons) these lines to the appropriate section of your xorg.conf.
+
An example configuration for a ''Volito2'' might look like this
  
 
  Section "InputDevice"
 
  Section "InputDevice"
Driver        "wacom"
+
    Driver        "wacom"
Identifier    "stylus"
+
    Identifier    "stylus"
Option        "Button1"      "1" #this line is important
+
    Option        "Device"      "/dev/input/wacom"  # or the corresponding event?? for a static setup
Option        "Button2"      "1" #this line is important
+
    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"  # or the corresponding event?? for a static setup
 +
    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"  # or the corresponding event?? for a static setup
 +
    Option        "Type"        "cursor"
 +
    Option        "USB"          "on"                  # USB ONLY
 +
    Option        "Mode"        "Relative"            # other option: "Absolute"
 +
    Option        "Vendor"      "WACOM"
 
  EndSection
 
  EndSection
 +
 +
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.
  
 
  Section "InputDevice"
 
  Section "InputDevice"
Driver       "wacom"
+
    Identifier  "Mouse1"
Identifier    "eraser"
+
    Driver     "mouse"
Option       "Button1"      "1" #this line is important
+
    Option      "CorePointer"
Option       "Button2"      "1" #this line is important
+
    Option     "Device"             "/dev/input/mouse_udev"
 +
    Option     "SendCoreEvents"    "true"
 +
    Option      "Protocol"          "IMPS/2"
 +
    Option     "ZAxisMapping"       "4 5"
 +
     Option      "Buttons"            "5"
 
  EndSection
 
  EndSection
  
Be adviced that this way pressure sensitive painting in GIMP and Inkscape will work but the lower button of the pen will also fire a button1 event same as the stylus and eraser. You can not configure any other button for Button2, it got to be the same as Button1! There is no need to add these lines to the cursor section since the bamboo doesn't ship a mouse, still i advice you not to remove the cursor device as an input device, not even from the serverlayout section. That lead to an unstable xserver in my case.
+
Add this to the ''ServerLayout'' section
  
If you are relying on hotplugging, the default fdi file contained in the packages xf86-input-wacom and linuxwacom will most likely not fully support your Bamboo tablet (e.g. stylus not working properly). Refer to the section on hotplugging above for a custom fdi file that supports the Bamboo (tested with model CTE-650).
+
InputDevice "cursor" "SendCoreEvents"
 +
InputDevice "stylus" "SendCoreEvents"
 +
InputDevice "eraser" "SendCoreEvents"
  
= Wacom and VirtualBox =
+
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from
  
''My current setup is :
+
InputDevice    "Mouse0" "CorePointer"
  Guest OS: Windows XP
+
 
  Tablet: Wacom Graphire4
+
to
  Linux Driver: xf86-input-wacom 0.8.4-1''
+
 
 +
InputDevice    "Mouse1" "CorePointer"
  
First, make sure that your tablet works well under Arch. Then, download and install the last driver from [http://www.wacom.com/downloads/drivers.php Wacom website] on the guest OS. Shutdown the virtual machine, go to '''Settings > USB'''. Select '''Add Filter From Device''' and select your tablet (e.g. WACOM CTE-440-U V4.0-3 [0403]). Select '''Edit Filter''', and change the last item '''Remote''' to '''Any'''.
+
=== Mouse Moving Erratically due to Proximity Sensor ===
  
= Linuxwacom 0.8.1 bug =
+
You can disable the mouse jumping due to a proximity sensor detecting a non-existing stylus. You can find your device with xinput --list, and after seeing the Stylus, disable it with: xinput disable "Your Device Name".  This only works if you are not currently using a stylus.
  
If you have trouble with the linuxwacom 0.8.1 beta/developer version driver as reported [http://bbs.archlinux.org/viewtopic.php?pid=421375 HERE], such as when you apply pressure the cursor freezes then you should try the linuxwacom 0.8.0 production version. Just download the existing PKGBUILD and other files from the [http://aur.archlinux.org/packages/linuxwacom/linuxwacom/ AUR] and change '''pkgver''' from 0.8.1 to '''0.8.0''', and the first '''md5sum''' from 4b78f1b66f6e9097a393cf1e3cdf87a3 to '''1d89b464392515492bb7b97c20e68d4e'''.
+
== See also ==
  
= References =
+
* [[List of applications/Documents#Stylus note-taking]]
*[http://gentoo-wiki.com/HOWTO_Wacom_Tablet Gentoo Linux Wiki - HOWTO Wacom Tablet]
+
* [https://github.com/linuxwacom/input-wacom/wiki input-wacom Wiki]
*[http://linuxwacom.sourceforge.net/index.php/howto/main Linux Wacom Project HOWTO]
+
* [https://github.com/linuxwacom/xf86-input-wacom/wiki xf86-input-wacom Wiki] (out of date)
*[http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]
+
* [http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]
 +
* [https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]
 
* [http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]
 
* [http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]

Latest revision as of 08:18, 7 August 2019

Wacom does not officially support Linux. Linux support is provided by the Linux Wacom Project. Supported devices are listed on the Device IDs page with a version number in the input-wacom column.

Installation

The Arch Linux kernels include the input-wacom driver.

Ensure your kernel recognizes your tablet. Connect your tablet via USB or Bluetooth. It should show up in dmesg | grep -i wacom and be listed in /proc/bus/input/devices (and if you use USB in the lsusb output). If it does not, your only chance is that your tablet is supported by a more recent driver than the one in your kernel. In that case install the input-wacom-dkmsAUR package.

Install the X driver, xf86-input-wacom, and restart X so the new udev rules take effect.

The command xsetwacom list devices should now list some devices. If it does not, see #Manual setup.

The kcm-wacomtablet package provides a KDE graphical user interface for tablet configuration and supports tablet-specific profiles and hotplugging.

Support for the following Wacom tablets is provided via tuhi-gitAUR:

  • Bamboo Spark
  • Bamboo Slate
  • Intuos Pro Paper

Consult README for the details of initial configuration. For setups with more than one monitor you'll probably want to fix aspect ratio using Coordinate Transformation Matrix as described at dual and multimonitor set up.

Configuration

The Xorg driver can be temporarily configured with xsetwacom, see xsetwacom(1). Changes are lost after X server restarts or replugging your tablet.

List the available devices:

$ xsetwacom list devices
Wacom Bamboo 16FG 4x5 Finger touch	id: 12	type: TOUCH
Wacom Bamboo 16FG 4x5 Finger pad	id: 13	type: PAD       
Wacom Bamboo 16FG 4x5 Pen stylus	id: 17	type: STYLUS    
Wacom Bamboo 16FG 4x5 Pen eraser	id: 18	type: ERASER

For the get and set commands, devices can be specified by name or id. Scripts should use names because ids can change after X server restarts or replugging.

Permanent configuration

Note: Because xorg.conf lacks options xsetwacom has and only lets you map buttons to mouse buttons, you may want to autostart a script with xsetwacom commands instead of using xorg.conf.

Configuration can be made persistent in xorg.conf and xorg.conf(5).

You firstly need to find out your product names:

$ grep "Using input driver 'wacom'" /var/log/Xorg.0.log
[ 25059.351] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen'
[ 25059.409] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pad'
[ 25059.428] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen eraser'
[ 25059.429] (II) Using input driver 'wacom' for 'Wacom Intuos BT M Pen cursor'

For these product names the sections would be:

/etc/X11/xorg.conf.d/72-wacom-options.conf
Section "InputClass"
	Identifier "WACOM OPTIONS pen"
	MatchDriver "wacom"
	MatchProduct "Pen"
	NoMatchProduct "eraser"
	NoMatchProduct "cursor"
EndSection

Section "InputClass"
	Identifier "WACOM OPTIONS pad"
	MatchDriver "wacom"
	MatchProduct "Pad"
EndSection

Section "InputClass"
	Identifier "WACOM OPTIONS eraser"
	MatchDriver "wacom"
	MatchProduct "eraser"
EndSection

Section "InputClass"
	Identifier "WACOM OPTIONS cursor"
	MatchDriver "wacom"
	MatchProduct "cursor"
EndSection
  • The options described in wacom(4) can be added to sections.
  • The product name needs to contain the MatchProduct value in order for a section to match. Matching of parent devices requires negative matching.
  • The Identifier can be arbitrary and is printed into the Xorg log when the section matches. Giving your identifiers a common prefix lets you easily grep for what sections were matched:
    grep "WACOM OPT" /var/log/Xorg.0.log
  • Configuration changes require a X server restart to take effect.
Note: xorg.conf options can differ from xsetwacom options.

xsetwacom can try to print all current settings of a device in xorg.conf format with:

$ xsetwacom get device all

Remapping buttons

The X driver lets you remap the buttons on tablets and pens. Buttons are identified by numbers. Tablet buttons start at 1, pen buttons start at 2 (1 is the tip contact event). By default the X driver maps button M to mouse button M. Because X uses buttons 4-7 as the four scrolling directions, physical buttons 4 and higher are mapped to mouse buttons 8 and higher by default. While xorg.conf uses the actual button numbers and only lets you map to mouse buttons, xsetwacom uses the translated mouse button numbers and allows mapping to multiple keycodes (but not keysyms).

If you have not yet remapped your buttons you can easily identify their ids with xorg-xev, by running the following command, placing the mouse cursor on the created window and pressing a button:

$ xev -event button
Outer window is 0x1a00001, inner window is 0x1a00002

ButtonPress event, serial 25, synthetic NO, window 0x1a00001,
    root 0x2a0, subw 0x0, time 3390669, (404,422), root:(1047,444),
    state 0x0, button 8, same_screen YES

In this case the button number for xsetwacom is 8 and the actual button number for xorg.conf is 4.

Alternatively, if you want an overview of your tablet's button layout you can look at your tablet's layout SVG. Firstly, find out the filename with a recursive grep search for the tablet name reported by xsetwacom list devices:

$ grep -rl 'Wacom Bamboo 16FG 4x5' /usr/share/libwacom/*.tablet
/usr/share/libwacom/bamboo-16fg-s-t.tablet

In this case the respective layout SVG is /usr/share/libwacom/layouts/bamboo-16fg-s-t.svg. The letters in the SVG correspond to the button numbers: A=1, B=2, C=3, ...

Mapping pad buttons to function keys

If you want to bind your tablet buttons to different shortcuts in different applications, you may want to map your tablet buttons to function keys because applications generally do not let you bind keyboard shortcuts to mouse buttons.

Firstly, map the pad buttons to mouse buttons 11 and higher so that you can distinguish them from regular mouse buttons. For example:

xsetwacom set pad Button 1 11
xsetwacom set pad Button 2 12
...

Then map the mouse buttons to the function keys. This can be done with xbindkeys and xdotool by adding an entry like the following for every pad to your ~/.xbindkeysrc:

"xdotool key F21"
  b:11

"xdotool key F22"
  b:12
...

The syntax

The syntax of xsetwacom is flexible but not very well documented. The general mapping syntax (extracted from the source code) for xsetwacom 0.17.0 is the following.

 KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]
 
 KEYWORD + ARGS:
   key [+,-]KEY [[+,-]KEY ...]  where +:key down, -:key up, no prefix:down and up
   button BUTTON [BUTTON ...]   (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)
   modetoggle                   toggle absolute/relative tablet mode 
   displaytoggle                toggle cursor movement among all displays which include individual screens
                                plus the whole desktop for the selected tool if it is not a pad.
                                When the tool is a pad, the function applies to all tools that are asssociated
                                with the tablet
 
 BUTTON: button ID as integer number
 
 KEY: MODIFIER, SPECIALKEY or ASCIIKEY
 MODIFIER: (each can be prefix with an l or an r for the left/right modifier (no prefix = left)
    ctrl=ctl=control, meta, alt, shift, super, hyper
 SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn
 ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)

Some examples

 $ xsetwacom set pad Button 1 3 # right mouse button
 $ xsetwacom set pad Button 1 "key +ctrl z -ctrl"
 $ xsetwacom get pad Button 1
 key +Control_L +z -z -Control_L
 $ xsetwacom set pad Button 1 "key +shift button 1 key -shift"

Even little macros are possible:

 $ xsetwacom set pad Button 1 "key +shift h -shift e l l o"
Note: If you try to run a script with xsetwacom commands from a udev rule, you might find that it will not work, as the Wacom input devices will not be ready at the time. A workaround is to add sleep 1 at the beginning of your script.

Execute custom commands

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: Duplicates Xbindkeys. There are alternatives to xbindkeys. (Discuss in Talk:Wacom tablet#)

Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install xbindkeys.

To get well defined button codes add the following to your permanent configuration file, e.g. /etc/X11/xorg.conf.d/52-wacom-options.conf in the InputClass section of your pad device. Map the tablet's buttons to some unused button ids.

 # Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)
 Option "Button1" "10"
 Option "Button2" "11"
 Option "Button3" "12"
 Option "Button4" "13"

Then restart your Xorg server and verify the buttons using xev or xbindkeys -mk.

Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration

 $ xbindkeys --defaults > ~/.xbindkeysrc

Then add your custom key mapping to ~/.xbindkeysrc, for example

 "firefox"
     m:0x10 + b:10   (mouse)
 "xterm"
     m:0x10 + b:11   (mouse)
 "xdotool key ctrl-z"
     m:0x10 + b:12   (mouse)
 "send-notify Test "No need for escaping the quotes""
     m:0x10 + b:13   (mouse)

Adjusting aspect ratios

Drawing areas of tablets are generally more square than the usual widescreen display with a 16:9 aspect ratio, leading to a slight vertical compression of your input. To resolve such an aspect ratio mismatch you need to compromise by either reducing the drawing area height (called Force Proportions on Windows) or reducing the screen area width. The former wastes drawing area and the latter prevents you from reaching the right edge of your screen with your Stylus. It is probably still a compromise worth to be made because it prevents your strokes from being skewed.

Find out your tablet's resolution by running:

$ xsetwacom get stylus Area

Reducing the drawing area height

Run:

$ xsetwacom set stylus Area 0 0 tablet_width height

where height is tablet_width * screen_height / screen_width.

The tablet resolution can be reset back to the default using:

$ xsetwacom set stylus ResetArea

Reducing the screen area width

Run:

$ xsetwacom set stylus MapToOutput WIDTHxSCREEN_HEIGHT+0+0

where WIDTH is screen_height * tablet_width / tablet_height.

LEDs

See the sysfs-driver-wacom documentation. To make changes without requiring root permissions you will likely want to create a udev rule like so:

/etc/udev/rules.d/99-wacom.rules
# Give the users group permissions to set Wacom device LEDs.
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"

Setting the Intuos OLEDs can be done using i4oledAUR from the AUR.

TwinView setup

If you are going to use two monitors the aspect ratio while using the tablet might feel unnatural. In order to fix this you need to add:

Option "TwinView" "horizontal"

to all of your Wacom-InputDevice entries in the xorg.conf file. You may read more about that here.[dead link 2018-09-05]

Temporary TwinView setup

For temporary mapping of a Wacom device to a single display while preserving the aspect ratio, this script may be used. This will letter-box the surface area of the device as required to ensure the input is not stretched on the display. This script may be executed in your .xinitrc file for it to automatically run.

xrandr setup

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: Wording can be improved, personal writing style. (Discuss in Talk:Wacom tablet#)

xrandr sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio. For a solution see this thread: Arch Linux forum.

If you just want to map the tablet to one of your screens, first find out what the screens are called:

$ xrandr
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
  1920x1080      60.0*+
  1680x1050      60.0  
  ...
VGA-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm
  1920x1080      60.0*+
  1680x1050      60.0  
  ...

Then you need to know what is the ID of your tablet.

$ xsetwacom list devices
WALTOP International Corp. Slim Tablet stylus   id: 12  type: STYLUS

In my case I want to map the tablet (ID: 12) to the screen on the right, which is VGA-0. I can do that with this command

$ xsetwacom set 12 MapToOutput VGA-0

This should work immediately, no root necessary.

Should this fail when using the NVIDIA binary driver, using HEAD-0, HEAD-1 and so on to refer to the monitors may work.

If xsetwacom replies with "Unable to find an output ..." an X11 geometry string of the form WIDTHxHEIGHT+X+Y can be specified instead of the screen identifier. In this example

$ xsetwacom set 12 MapToOutput 1920x1080+1920+0

should also map the tablet to the screen on the right.

Alternatively, you can use this bash script to quickly map the tablet to one of your screens (or the entire desktop) and fix the aspect ratio.

In case xsetwacom does not work, you can try xinput.

First, you need to find your tablet's ID.

$ xinput list

In my case, the output is:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Wacom Intuos PT S 2 Finger                id=11   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos PT S 2 Pad                   id=12   [slave  pointer  (2)]
⎜   ↳ USB Keyboard                              id=14   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=17   [slave  pointer  (2)]
⎜   ↳ SteelSeries Kinzu V2 Gaming Mouse         id=9    [slave  pointer  (2)]
⎜   ↳ Wacom Intuos PT S 2 Pen Pen (0x6281780c)  id=20   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Wacom Intuos PT S 2 Pen                   id=10   [slave  keyboard (3)]
    ↳ USB Keyboard                              id=13   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=15   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=18   [slave  keyboard (3)]
    ↳ USB Keyboard                              id=19   [slave  keyboard (3)]

This mean, my tablet's ID is 20. Now we map it with VGA-0 screen:

$ xinput map-to-output 20 VGA-0

Pressure curve

Use the Wacom Pressure Curve and Threshold Graph to find P1=red (eg. 50,0) and P2=purple (eg. 100,80) of your desired curve. The x-axis is the input pressure you apply to the pen; the y-axis is the output pressure the application is given.

You can change the pressure curve with:

$ xsetwacom set stylus PressureCurve x1 y1 x2 y2

Application-specific configuration

Blender

To enable pad buttons and extra pen buttons in Blender, you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.

Provided example (for Bamboo fun) adapted to Sculpt mode: blender_sculpt.sh[dead link 2018-06-23]

It remaps:

  • Left tablet buttons to Shift and Ctrl (pan/tilt/zoom/smooth/invert)
  • Right tablet buttons to F (brush size/strenght) and Ctrl-z (undo)
  • Top pen button ton m (mask control)

GIMP

To enable proper usage, and pressure sensitive painting in GIMP, just go to Edit > Input Devices. Now for each of your eraser, stylus, and cursor devices, set the mode to Screen, and remember to save.

  • Please take note that if present, the pad device should be kept disabled as I do not think GIMP supports such things. Alternatively, to use such features of your tablet you should map them to keyboard commands with a program such as Wacom ExpressKeys.
  • You should also take note that the tool selected for the stylus is independent to that of the eraser. This can actually be quite handy, as you can have the eraser set to be used as any tool you like.

For more information checkout the Setting up GIMP section of GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp.

If the above was not enough, you may want to try setting up the tablet's stylus (and eraser) as a second mouse pointer (separating it from your mouse) by using the xinput create-master and xinput reattach commands. It can help when GIMP does not start painting even if the stylus touches the tablet.

Inkscape

Pressure sensitivity in Inkscape is enabled the same way as in GIMP. Go to Edit > Input Devices.... Now for each of your eraser, stylus, and cursor devices, set the mode to Screen, and remember to save.

Krita

If your tablet does not draw in Krita (clicks/pressure are not registered) but works in the brush selection dialog which has a small test area, try putting Krita in full-screen or canvas-only mode.

Krita only requires that Qt is able to use your tablet to function properly. If your tablet is not working in Krita, then make sure to check it is working in Qt first. The effect of tablet pressure can then be tweaked in the painttop configuration, for example by selecting opacity, then selecting pressure from the drop down and adjusting the curve to your preference.

VirtualBox

First, make sure that your tablet works well under Arch. Then, download and install the last driver from Wacom website on the guest OS. Shutdown the virtual machine, go to Settings > USB. Select Add Filter From Device and select your tablet (e.g. WACOM CTE-440-U V4.0-3 [0403]). Select Edit Filter, and change the last item Remote to Any.

Troubleshooting

Newer tablets' drivers might not be in the kernel yet, and additional manipulations might be needed. A notable example is the newer Intuos line of tablets (Draw/Comic/Photo).

Unknown device_type

If your tablet does not get recognized by xsetwacom and dmesg complains about an unknown device_type, then you need to install a patched version of input-wacom.

Download and install the for-4.4 branch from SourceForge. Your device should be recognized after you run

 # rmmod wacom
 # insmod /lib/modules/YOUR_KERNEL/kernel/drivers/hid/wacom.ko.gz

Tablet recognized but xsetwacom and similar tools do not display it

Your logs indicate that the correct driver is selected, and the tablet works. However, when running xsetwacom list devices or use similar tools that depend on the correct driver, you get an empty list.

A reason might be the execution order of your xorg configuration. /usr/share/X11/xorg.conf.d gets executed first, then /etc/X11/xorg.conf.d. The package xf86-input-wacom contains the file /usr/share/X11/xorg.conf.d/70-wacom.conf. If there is a catchall for tablets, executed after this file, the previously selected wacom driver will be overwritten with a generic one that does not work with xsetwacom et. al.

To make sure, check the rules contained in the files executed after /usr/share/X11/xorg.conf.d/70-wacom.conf for anything that looks like graphics tablets.

Manual setup

A manual configuration is done in /etc/X11/xorg.conf or in a separate file in the /etc/X11/xorg.conf.d/ directory. The Wacom tablet device is accessed using a input event interface in /dev/input/ which is provided by the kernel driver. The interface number event?? is likely to change when unplugging and replugging into the same or especially a different USB port. Therefore it is wise to not refer to the device using its concrete event?? interface (static configuration) but by letting udev dynamically create a symbolic link to the correct event file (dynamic configuration).

Dynamic with udev

Note: In AUR there is wacom-udev package, which includes udev-rules-file. You might skip this part and move on to the xorg.conf configuration if you are using the wacom-udev package from AUR.

Assuming udev is already installed you simply need to install wacom-udevAUR[broken link: archived in aur-mirror] from the AUR.

USB-devices

After (re-)plugging in your USB-tablet (or at least after rebooting) some symbolic links should appear in /dev/input referring to your tablet device.

 $ ls /dev/input/wacom* 
 /dev/input/wacom  /dev/input/wacom-stylus  /dev/input/wacom-touch

If not, your device is likely to be not yet included in the udev configuration from wacom-udev which resides in /usr/lib/udev/rules.d/wacom.rules. Copy the file to /etc/udev/rules.d/wacom.rules and modify it there.

Add your device to the file by duplicating some line of another device and adapting idVendor,idProduct and the symlink name to your device. The two id's can be determined using

$ lsusb | grep -i wacom
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd

In this example idVendor is 056a and idProduct 0062. In case you have device with touch (e.g. Bamboo Pen&Touch) you might need to add a second line for the touch input interface. For details check the linuxwacom wiki Fixed device files with udev.

Save the file and reload udev's configuration profile using the command udevadm control --reload-rules Check again the content of /dev/input to make sure that the wacom symlinks appeared. Note that you may need to plug-in the tablet again for the device to appear.

The files of further interest for the Xorg configuration are /dev/input/wacom and for a touch-device also /dev/input/wacom_touch.

Serial devices

The wacom-udevAUR[broken link: archived in aur-mirror] should also include support for serial devices. Users of serial tablets might be also interested in the inputattach tool from linuxconsole package. The inputattach command allows to bind serial device into /dev/input tree, for example with:

 # inputattach --w8001 /dev/ttyS0

See man inputattach for help about available options. As for USB devices one should end up with a file /dev/input/wacom and proceed with the Xorg configuration.

Static setup

Usually it is recommended to rely on Xorg's auto-detection or to use a dynamic setup. However for an internal tablet device one might consider a static Xorg setup in case autodetection does not work. A static Xorg setup is usually not able to recognize your Wacom tablet when it is connected to a different USB port or even after unplugging and replugging it into the same port, and as such it should be considered as deprecated.

If you insist in using a static setup just refer to your tablet in the Xorg configuration in the next section using the correct /dev/input/event?? files as one can find out by looking into /proc/bus/input/devices.

Xorg configuration

In either case, dynamic or static setup you got now one or two files in /dev/input/ which refer to the correct input event devices of your tablet. All that is left to do is add the relevant information to /etc/X11/xorg.conf, or a dedicated file under /etc/X11/xorg.conf.d/. The exact configuration depends on your tablet's features of course. xsetwacom list devices might give helpful information on what InputDevice sections are needed for your tablet.

An example configuration for a Volito2 might look like this

Section "InputDevice"
    Driver        "wacom"
    Identifier    "stylus"
    Option        "Device"       "/dev/input/wacom"   # or the corresponding event?? for a static setup
    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"   # or the corresponding event?? for a static setup
    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"   # or the corresponding event?? for a static setup
    Option        "Type"         "cursor"
    Option        "USB"          "on"                  # USB ONLY
    Option        "Mode"         "Relative"            # other option: "Absolute"
    Option        "Vendor"       "WACOM"
EndSection

Make sure that you also change the path ("Device") to your mouse, as it will be /dev/input/mouse_udev now.

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

Add this to the ServerLayout section

InputDevice "cursor" "SendCoreEvents" 
InputDevice "stylus" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"

And finally make sure to update the identifier of your mouse in the ServerLayout section – as mine went from

InputDevice    "Mouse0" "CorePointer"

to

InputDevice    "Mouse1" "CorePointer"

Mouse Moving Erratically due to Proximity Sensor

You can disable the mouse jumping due to a proximity sensor detecting a non-existing stylus. You can find your device with xinput --list, and after seeing the Stylus, disable it with: xinput disable "Your Device Name". This only works if you are not currently using a stylus.

See also