https://wiki.archlinux.org/api.php?action=feedcontributions&user=Rel&feedformat=atomArchWiki - User contributions [en]2024-03-29T07:35:05ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Graphics_tablet&diff=419946Graphics tablet2016-02-10T14:04:04Z<p>Rel: /* Finding out the button IDs */</p>
<hr />
<div>[[Category:Graphics tablet]]<br />
[[ja:Wacom タブレット]]<br />
{{Style|Many [[Help:Style]] issues}}<br />
This guide was started for ''USB'' based Wacom tablets, so much of the info in here focuses on that. Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup.<br />
However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work.<br />
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.<br />
<br />
== Installing ==<br />
<br />
=== Check if kernel drivers needed (usually not) ===<br />
<br />
After plugging in the tablet (in case of a USB device) check {{ic|lsusb}} and/or {{ic|<nowiki>dmesg | grep -i wacom</nowiki>}} to see if the kernel recognizes your tablet. It should also be listed in {{ic|/proc/bus/input/devices}}.<br />
<br />
In case it is not recognized, it might happen for new devices not to be supported by the current kernel. Sometimes the tablet has already support by a more recent driver than the one that comes with the kernel. In that case you may try to install {{AUR|input-wacom-dkms}} from the [[AUR]].<br />
<br />
=== Install Wacom drivers ===<br />
<br />
Thanks to [http://linuxwacom.sourceforge.net The Linux Wacom Project], you only need to install the {{Pkg|xf86-input-wacom}} package, which contains everything needed to use a Wacom tablet on Linux.<br />
<br />
{{Note|There is also {{AUR|xf86-input-wacom-git}} in AUR which provides git version of ''xf86-input-wacom'', but you might encounter some troubles. For me the buttons for example did only work with the stable release, not with the git version. So it is recommended to try ''xf86-input-wacom'' first.}}<br />
<br />
=== Automatic setup ===<br />
<br />
Newer versions of X should be able to automatically detect and configure your device. Before going any further, restart X so the new udev rules take effect. Test if your device was recognized completely (i.e., that both pen and eraser work, if applicable), by issuing command<br />
<br />
$ xsetwacom --list devices<br />
<br />
which should detect all devices with type, for example<br />
<br />
Wacom Bamboo 2FG 4x5 Pen stylus id: 8 type: STYLUS <br />
Wacom Bamboo 2FG 4x5 Pen eraser id: 9 type: ERASER <br />
Wacom Bamboo 2FG 4x5 Finger touch id: 13 type: TOUCH <br />
Wacom Bamboo 2FG 4x5 Finger pad id: 14 type: PAD <br />
<br />
You can also test it by opening {{Pkg|gimp}} or {{Pkg|xournal}} and checking the extended input devices section, or whatever tablet-related configuration is supported by the software of your choice.<br />
<br />
For this to work you do not need any {{ic|xorg.conf}} file, any configurations are made in files in the {{ic|/etc/X11/xorg.conf.d/}} folder.<br />
If everything is working you can skip the manual configuration and '''proceed''' to the configuration section to learn how to further customize your tablet.<br />
<br />
With the arrival of Xorg 1.8 support for HAL was dropped in favor of [[udev]] which might break auto-detection for some tablets as fitting udev rules might not exist yet, so you may need to write your own.<br />
<br />
If you have installed {{Pkg|libwacom}} or associated packages like {{Aur|libwacom-fedora}}{{Broken package link|{{aur-mirror|libwacom-fedora}}}} 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 X11 drivers.<br />
<br />
=== Manual setup ===<br />
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.<br />
The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver.<br />
The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port.<br />
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).<br />
<br />
====Dynamic with udev====<br />
{{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.}}<br />
<br />
Assuming ''udev'' is already installed you simply need to install {{AUR|wacom-udev}} from the [[AUR]].<br />
<br />
=====USB-devices=====<br />
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.<br />
<br />
$ ls /dev/input/wacom* <br />
/dev/input/wacom /dev/input/wacom-stylus /dev/input/wacom-touch<br />
<br />
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/10-wacom.rules}}. It is a good idea to copy the file e.g. to {{ic|10-my-wacom.rules}} before modifying it, else it might be reverted by a package upgrade.<br />
<br />
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.<br />
The two id's can by determined using<br />
<br />
$ lsusb | grep -i wacom<br />
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd<br />
<br />
In this example idVendor is 056a and idProduct 0062.<br />
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.<br />
For details check the linuxwacom wiki [http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Fixed_device_files_with_udev Fixed device files with udev].<br />
<br />
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules''<br />
Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared.<br />
Note that you may need to plug-in the tablet again for the device to appear.<br />
<br />
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}}.<br />
<br />
=====Serial devices=====<br />
The {{AUR|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:<br />
<br />
# inputattach --w8001 /dev/ttyS0<br />
<br />
See ''man inputattach'' for help about available options.<br />
As for USB devices one should end up with a file {{ic|/dev/input/wacom}} and proceed with the ''Xorg'' configuration.<br />
<br />
====Static setup====<br />
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}}.<br />
<br />
====Xorg configuration====<br />
<br />
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/}}.<br />
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.<br />
<br />
An example configuration for a ''Volito2'' might look like this<br />
<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "stylus"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "stylus"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "eraser"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "eraser"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "cursor"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "cursor"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
EndSection<br />
<br />
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse1"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse_udev"<br />
Option "SendCoreEvents" "true"<br />
Option "Protocol" "IMPS/2"<br />
Option "ZAxisMapping" "4 5"<br />
Option "Buttons" "5"<br />
EndSection<br />
Add this to the ''ServerLayout'' section<br />
<br />
InputDevice "cursor" "SendCoreEvents" <br />
InputDevice "stylus" "SendCoreEvents"<br />
InputDevice "eraser" "SendCoreEvents"<br />
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from<br />
<br />
InputDevice "Mouse0" "CorePointer"<br />
to<br />
<br />
InputDevice "Mouse1" "CorePointer"<br />
<br />
== Configuration ==<br />
<br />
=== General concepts ===<br />
<br />
The configuration can be done in two ways temporary using the `xsetwacom` tool, which is included in ''xf86-input-wacom'' or permanent in {{ic|xorg.conf}} or better in a extra file in {{ic|/etc/X11/xorg.conf.d}}.<br />
The possible options are identical so it is recommended to first use `xsetwacom` for testing and later add the final config to the ''Xorg'' configuration files.<br />
<br />
==== Temporary configuration ====<br />
<br />
For the beginning it is a good idea to inspect the default configuration and all possible options using the following commands.<br />
<br />
$ xsetwacom --list devices # list the available devices for the get/set commands<br />
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH<br />
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD <br />
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS <br />
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5" all # using the device name<br />
$ xsetwacom --get 17 all # or equivalently use the device id<br />
$ xsetwacom --list parameters # to get an explanation of the Options<br />
$ man wacom # get even more details<br />
<br />
'''Caution''', do not use the device id when writing shell scripts to set some options as the ids might change after an hotplug.<br />
<br />
Options can be changed with the {{ic|--set}} flag. Some useful examples are<br />
<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" ScrollDistance 50 # change scrolling speed<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" Gesture off # disable multitouch gestures<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" Touch off # disable touch<br />
<br />
For further configuration tips and tricks see below in [[#Specific configuration tips]].<br />
{{Note|You can reset your temporary configuration at any time by unplugging and replugging in your tablet.}}<br />
<br />
==== Permanent configuration ====<br />
<br />
To make a permanent configuration the preferred way for ''Xorg''>1.8 is to create a new file in {{ic|/etc/X11/xorg.conf.d}}<br />
e.g. {{ic|52-wacom-options.conf}} with the following content.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/52-wacom-options.conf|<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo stylus options"<br />
MatchDriver "wacom"<br />
MatchProduct "Pen"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "RawSample" "20"<br />
Option "PressCurve" "0,10,90,100"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo eraser options"<br />
MatchDriver "wacom"<br />
MatchProduct "eraser"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "RawSample" "20"<br />
Option "PressCurve" "5,0,100,95"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo touch options"<br />
MatchDriver "wacom"<br />
MatchProduct "Finger"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "ScrollDistance" "18"<br />
Option "TapTime" "220"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo pad options"<br />
MatchDriver "wacom"<br />
MatchProduct "pad"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
<br />
# Setting up buttons<br />
Option "Button1" "1"<br />
Option "Button2" "2"<br />
Option "Button3" "3"<br />
Option "Button4" "0"<br />
EndSection<br />
}}<br />
<br />
The identifiers can be set arbitrarily. The option names are (except for the buttons) identical to the ones listed by {{ic|xsetwacom --list parameters}} and especially also in {{ic|man wacom}}. As noted in [[#Remapping Buttons]] the button ids seem to be different than the ones for {{ic|xsetwacom}}.<br />
<br />
==== Changing orientation ====<br />
<br />
If you want to use your tablet in a different orientation you have to tell this to the driver, else the movements do not cause the expected results.<br />
This is done by setting the '''Rotate''' option for all devices. Possible orientations are '''none''','''cw''','''ccw''' and '''half'''.<br />
A quick way is e.g.<br />
$ for i in 12 13 17 18; do xsetwacom --set $i Rotate half; done # remember the ids might change when hotplugging<br />
<br />
or use the following script like this {{ic|./wacomrot.sh half}}<br />
<br />
{{hc|1=wacomrot.sh|2=<br />
#!/bin/bash<br />
device="Wacom Bamboo 16FG 4x5"<br />
stylus="$device Pen stylus"<br />
eraser="$device Pen eraser"<br />
touch="$device Finger touch"<br />
pad="$device Finger pad"<br />
<br />
xsetwacom --set "$stylus" Rotate $1<br />
xsetwacom --set "$eraser" Rotate $1<br />
xsetwacom --set "$touch" Rotate $1<br />
xsetwacom --set "$pad" Rotate $1<br />
}}<br />
<br />
==== Remapping Buttons ====<br />
<br />
It is possible to remap the buttons with hotkeys.<br />
<br />
*Check [http://planetedessonges.org:8010/wakey/ Simple web-based GUI for xsetwacom], supports ''bamboo small'' but more models may come.<br />
<br />
===== Finding out the button IDs =====<br />
Sometimes it needs some trial&error to find the correct button IDs. For me they even differ for {{ic|xsetwacom}} and the {{ic|xorg.conf}} configuration. Very helpful tools are {{ic|xev}} or {{ic|xbindkeys -mk}}. An easy way to proceed is to temporarily assign keystrokes to your tablet's buttons like this:<br />
<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 'key a'<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 2 'key b'<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 3 'key c'<br />
$ # and so on<br />
<br />
Then fire up {{ic|xev}} from a terminal window, place your mouse cursor above the window and hit the buttons and write down the IDs.<br />
<br />
$ xev | grep KeyPress -A 5<br />
<br />
===== The syntax =====<br />
<br />
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.<br />
<br />
KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]<br />
<br />
KEYWORD + ARGS:<br />
key [+,-]KEY [[+,-]KEY ...] where +:key down, -:key up, no prefix:down and up<br />
button BUTTON [BUTTON ...] (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)<br />
modetoggle toggle absolute/relative tablet mode <br />
displaytoggle toggle cursor movement among all displays which include individual screens<br />
plus the whole desktop for the selected tool if it is not a pad.<br />
When the tool is a pad, the function applies to all tools that are asssociated<br />
with the tablet<br />
<br />
BUTTON: button ID as integer number<br />
<br />
KEY: MODIFIER, SPECIALKEY or ASCIIKEY<br />
MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)<br />
ctrl=ctl=control, meta, alt, shift, super, hyper<br />
SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn<br />
ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)<br />
<br />
===== Some examples =====<br />
<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 3 # right mouse button<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +ctrl z -ctrl"<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1<br />
key +Control_L +z -z -Control_L<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +shift button 1 key -shift"<br />
<br />
even little macros are possible<br />
<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +shift h -shift e l l o"<br />
<br />
{{Note|There seems to be a bug in the ''xf86-input-wacom'' driver version 0.17.0, at least for my ''Wacom Bamboo Pen & Touch'', but I guess this holds in general. It causes the keystrokes not to be overwritten correctly.<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key a b c" # press button 1 -> abc<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key d" # press button 1 -> dbc WRONG!<br />
<br />
A simple workaround is to reset the mapping by mapping to "":<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "" # to reset the mapping<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key d" # press button 1 -> d<br />
<br />
}}<br />
<br />
{{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.}}<br />
<br />
===== Execute custom commands =====<br />
<br />
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install {{Pkg|xbindkeys}}.<br />
<br />
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}}<br />
in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.<br />
<br />
# Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)<br />
Option "Button1" "10"<br />
Option "Button2" "11"<br />
Option "Button3" "12"<br />
Option "Button4" "13"<br />
<br />
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.<br />
<br />
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration<br />
$ xbindkeys --defaults > ~/.xbindkeysrc<br />
<br />
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example<br />
<br />
"firefox"<br />
m:0x10 + b:10 (mouse)<br />
"xterm"<br />
m:0x10 + b:11 (mouse)<br />
"xdotool key ctrl-z"<br />
m:0x10 + b:12 (mouse)<br />
"send-notify Test "No need for escaping the quotes""<br />
m:0x10 + b:13 (mouse)<br />
<br />
==== LEDs ====<br />
<br />
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:<br />
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki><br />
# Give the users group permissions to set Wacom device LEDs.<br />
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"<br />
</nowiki>}}<br />
<br />
Setting the Intuos OLEDs can be done using [https://aur.archlinux.org/packages/i4oled/ i4oled] from the AUR.<br />
<br />
==== TwinView Setup ====<br />
<br />
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<br />
<br />
Option "TwinView" "horizontal"<br />
<br />
To all of your Wacom-InputDevice entries in the {{ic|xorg.conf}} file.<br />
You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 HERE]<br />
<br />
===== Temporary TwinView Setup =====<br />
<br />
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.<br />
<br />
==== Xrandr Setup ====<br />
xrandr sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio.<br />
For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 archlinux forum].<br />
<br />
If you just want to map the tablet to one of your screens, first find out what the screens are called<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384<br />
'''HDMI-0''' disconnected (normal left inverted right x axis y axis)<br />
'''DVI-0''' connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
'''VGA-0''' connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
Then you need to know what is the ID of your tablet.<br />
$ xsetwacom --list devices<br />
WALTOP International Corp. Slim Tablet stylus id: '''12''' type: STYLUS<br />
<br />
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<br />
$ xsetwacom --set '''12''' MapToOutput '''"VGA-0"'''<br />
This should immediately work, no root necessary.<br />
<br />
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<br />
$ xsetwacom --set '''12''' MapToOutput '''"1920x1080+1920+0"'''<br />
should also map the tablet to the screen on the right.<br />
<br />
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.<br />
<br />
=== Pressure curves ===<br />
<br />
Use [http://linuxwacom.sourceforge.net/misc/bezier.html Wacom Pressure Demo] to find P1=red (eg. 50,0), P2=purple (eg. 100,80) and Threshold=green (eg. 27) 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. ([http://250kb.de/u/150207/p/FoS1SiXuZQRP.png example curve])<br />
<br />
You can immediately test your desired values for your device (eg. "Wacom Intuos4 6x9 stylus") with<br />
<br />
xsetwacom --set "Wacom Intuos4 6x9 stylus" PressureCurve "50" "0" "100" "80"<br />
xsetwacom --set "Wacom Intuos4 6x9 stylus" Threshold "27"<br />
<br />
Later you can apply them in {{ic|/etc/X11/xorg.conf}} as shown below or you use the above shell commands in any startup script<br />
{{hc|/etc/X11/xorg.conf|<br />
Option "PressCurve" "50,0,100,80" # Custom preference<br />
Option "Threshold" "27" # sensitivity to do a "click"<br />
}}<br />
<br />
=== Force Proportions ===<br />
<br />
For standard ('''16:9''') widescreen monitors with Wacom tablets it is a typical problem that your strokes are slightly more horizontally oriented than they physically were (so for example a perfectly drawn circle with the pen will turn into a horizontal ellipse in the computer) because the tablet drawing surface proportions are larger on the vertical axis by default ('''16:10''') than your monitors aspect ratio and this inconsistency will subtly distort your strokes. It is possible to force the proportions of the drawing surface to match the aspect ratio of your monitor to solve this problem by cutting off the bottom of the drawing surface to accommodate for the differences in vertical resolution with the below options. This is an alternative to the "Force Proportions" option in the Windows driver settings. It is generally recommended to do this to ensure maximum accuracy of your tablet input.<br />
<br />
To get the tablets default values run the following command (where "device name or ID" would be for your stylus):<br />
<br />
xsetwacom --get "device name or ID" Area<br />
<br />
After this you can figure out your tablet's resolution by dividing the values with the ratio '''11.25''' (so '''21600/11.25=1920''' and '''13500/11.25=1200'''), so to convert this to '''1920x1080''' ('''16:9''') resolution, do '''1080*11.25=12150''' then to set the proportions with xsetwacom:<br />
<br />
xsetwacom --set "device name or ID" Area 0 0 21600 12150<br />
<br />
Here is how to do the same in the xorg configuration file:<br />
<br />
Option "BottomX" "21600"<br />
Option "BottomY" "12150"<br />
<br />
(An alternative formula would would be aspect ratio multiplied by '''1350'''. So '''16:9''' is '''16*1350=21600''' and '''9*1350=12150''')<br />
<br />
{{Note|There is also a KeepShape option which reportedly should do this automatically but it does not seem to work, which is why we have to do it the hard way. I do not know whether these values should be kept the same or increased on a bigger resolution monitor, but I highly suspect that they should be kept the same (e.g. the values are relative to the tablet's resolution, not the monitor's resolution; the important part is that the aspect ratio is correct, not that the resolution is a match)}}<br />
<br />
=== Using kcm-wacomtablet ===<br />
<br />
The KDE configuration module {{AUR|kcm-wacomtablet}} (or if you're on Plasma 5, {{AUR|kcm-wacomtablet-frameworks-git}}) supports easy configuration of the tablet through a graphical user interface, allowing for different profiles and proper hotplugging support. It will auto-detect the type of your tablet, and load your configuration profile automatically when the tablet is plugged in.<br />
<br />
== Application-specific configuration ==<br />
<br />
=== Blender ===<br />
<br />
To enable pad buttons and extra pen buttons in blender, you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.<br />
<br />
Provided example (for Bamboo fun) adapted to '''Sculpt''' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]<br />
<br />
It remaps<br />
*Left tablet buttons to '''Shift''' and '''Control''' ''(pan/tilt/zoom/smooth/invert)''<br />
*Right tablet buttons to '''F''' ''(brush size/strenght)'' and '''Control-z''' ''(undo)''<br />
*Top pen button ton '''m''' ''(mask control)''<br />
<br />
=== GIMP ===<br />
<br />
To enabled proper usage, and pressure sensitive painting in [http://www.gimp.org GIMP], just go to ''Edit &rarr; Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' '''devices''', set the '''mode''' to ''Screen'', and remember to save.<br />
<br />
*Please take note that if present, the ''pad'' '''device''' should be kept disabled as I do not 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].<br />
<br />
*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.<br />
<br />
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].<br />
<br />
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.<br />
<br />
=== Inkscape ===<br />
<br />
As in GIMP, to do the same simply got to ''Edit &rarr; Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' '''devices''', set the '''mode''' to ''Screen'', and remember to save.<br />
<br />
=== Krita ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== VirtualBox ===<br />
<br />
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'''.<br />
<br />
=== Web Browser Plugin ===<br />
<br />
A plugin that imitates the official Wacom web plugin can be found on the AUR as [https://aur.archlinux.org/packages/wacomwebplugin/ wacomwebplugin]. It has been tested successfully using Chromium and Firefox.<br />
<br />
With this plugin it is possible to make use of online tools such as [http://sta.sh/muro/ deviantART's Muro]. This plugin is in early stages so as always, your mileage may vary.<br />
<br />
==Troubleshooting==<br />
<br />
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).<br />
<br />
===Unknown device_type===<br />
<br />
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.<br />
<br />
Download and install the for-4.4 branch from [http://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].<br />
Your device should be recognized after you run<br />
<br />
# rmmod wacom<br />
# insmod /lib/modules/YOUR_KERNEL/extra/wacom.ko.gz<br />
<br />
===System freeze===<br />
<br />
If your system freezes when your tablet gets activated by the stylus, then you will need to [[patch]] your kernel with the patch from [https://lkml.org/lkml/2015/11/20/690 LKML].<br />
<br />
== References ==<br />
*[http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Main_Page Linux Wacom Project Wiki]<br />
*[http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]<br />
*[https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]<br />
*[http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]</div>Relhttps://wiki.archlinux.org/index.php?title=Graphics_tablet&diff=419944Graphics tablet2016-02-10T14:02:11Z<p>Rel: /* Finding out the button IDs */</p>
<hr />
<div>[[Category:Graphics tablet]]<br />
[[ja:Wacom タブレット]]<br />
{{Style|Many [[Help:Style]] issues}}<br />
This guide was started for ''USB'' based Wacom tablets, so much of the info in here focuses on that. Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup.<br />
However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work.<br />
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.<br />
<br />
== Installing ==<br />
<br />
=== Check if kernel drivers needed (usually not) ===<br />
<br />
After plugging in the tablet (in case of a USB device) check {{ic|lsusb}} and/or {{ic|<nowiki>dmesg | grep -i wacom</nowiki>}} to see if the kernel recognizes your tablet. It should also be listed in {{ic|/proc/bus/input/devices}}.<br />
<br />
In case it is not recognized, it might happen for new devices not to be supported by the current kernel. Sometimes the tablet has already support by a more recent driver than the one that comes with the kernel. In that case you may try to install {{AUR|input-wacom-dkms}} from the [[AUR]].<br />
<br />
=== Install Wacom drivers ===<br />
<br />
Thanks to [http://linuxwacom.sourceforge.net The Linux Wacom Project], you only need to install the {{Pkg|xf86-input-wacom}} package, which contains everything needed to use a Wacom tablet on Linux.<br />
<br />
{{Note|There is also {{AUR|xf86-input-wacom-git}} in AUR which provides git version of ''xf86-input-wacom'', but you might encounter some troubles. For me the buttons for example did only work with the stable release, not with the git version. So it is recommended to try ''xf86-input-wacom'' first.}}<br />
<br />
=== Automatic setup ===<br />
<br />
Newer versions of X should be able to automatically detect and configure your device. Before going any further, restart X so the new udev rules take effect. Test if your device was recognized completely (i.e., that both pen and eraser work, if applicable), by issuing command<br />
<br />
$ xsetwacom --list devices<br />
<br />
which should detect all devices with type, for example<br />
<br />
Wacom Bamboo 2FG 4x5 Pen stylus id: 8 type: STYLUS <br />
Wacom Bamboo 2FG 4x5 Pen eraser id: 9 type: ERASER <br />
Wacom Bamboo 2FG 4x5 Finger touch id: 13 type: TOUCH <br />
Wacom Bamboo 2FG 4x5 Finger pad id: 14 type: PAD <br />
<br />
You can also test it by opening {{Pkg|gimp}} or {{Pkg|xournal}} and checking the extended input devices section, or whatever tablet-related configuration is supported by the software of your choice.<br />
<br />
For this to work you do not need any {{ic|xorg.conf}} file, any configurations are made in files in the {{ic|/etc/X11/xorg.conf.d/}} folder.<br />
If everything is working you can skip the manual configuration and '''proceed''' to the configuration section to learn how to further customize your tablet.<br />
<br />
With the arrival of Xorg 1.8 support for HAL was dropped in favor of [[udev]] which might break auto-detection for some tablets as fitting udev rules might not exist yet, so you may need to write your own.<br />
<br />
If you have installed {{Pkg|libwacom}} or associated packages like {{Aur|libwacom-fedora}}{{Broken package link|{{aur-mirror|libwacom-fedora}}}} 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 X11 drivers.<br />
<br />
=== Manual setup ===<br />
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.<br />
The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver.<br />
The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port.<br />
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).<br />
<br />
====Dynamic with udev====<br />
{{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.}}<br />
<br />
Assuming ''udev'' is already installed you simply need to install {{AUR|wacom-udev}} from the [[AUR]].<br />
<br />
=====USB-devices=====<br />
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.<br />
<br />
$ ls /dev/input/wacom* <br />
/dev/input/wacom /dev/input/wacom-stylus /dev/input/wacom-touch<br />
<br />
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/10-wacom.rules}}. It is a good idea to copy the file e.g. to {{ic|10-my-wacom.rules}} before modifying it, else it might be reverted by a package upgrade.<br />
<br />
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.<br />
The two id's can by determined using<br />
<br />
$ lsusb | grep -i wacom<br />
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd<br />
<br />
In this example idVendor is 056a and idProduct 0062.<br />
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.<br />
For details check the linuxwacom wiki [http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Fixed_device_files_with_udev Fixed device files with udev].<br />
<br />
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules''<br />
Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared.<br />
Note that you may need to plug-in the tablet again for the device to appear.<br />
<br />
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}}.<br />
<br />
=====Serial devices=====<br />
The {{AUR|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:<br />
<br />
# inputattach --w8001 /dev/ttyS0<br />
<br />
See ''man inputattach'' for help about available options.<br />
As for USB devices one should end up with a file {{ic|/dev/input/wacom}} and proceed with the ''Xorg'' configuration.<br />
<br />
====Static setup====<br />
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}}.<br />
<br />
====Xorg configuration====<br />
<br />
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/}}.<br />
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.<br />
<br />
An example configuration for a ''Volito2'' might look like this<br />
<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "stylus"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "stylus"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "eraser"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "eraser"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "cursor"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "cursor"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
EndSection<br />
<br />
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse1"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse_udev"<br />
Option "SendCoreEvents" "true"<br />
Option "Protocol" "IMPS/2"<br />
Option "ZAxisMapping" "4 5"<br />
Option "Buttons" "5"<br />
EndSection<br />
Add this to the ''ServerLayout'' section<br />
<br />
InputDevice "cursor" "SendCoreEvents" <br />
InputDevice "stylus" "SendCoreEvents"<br />
InputDevice "eraser" "SendCoreEvents"<br />
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from<br />
<br />
InputDevice "Mouse0" "CorePointer"<br />
to<br />
<br />
InputDevice "Mouse1" "CorePointer"<br />
<br />
== Configuration ==<br />
<br />
=== General concepts ===<br />
<br />
The configuration can be done in two ways temporary using the `xsetwacom` tool, which is included in ''xf86-input-wacom'' or permanent in {{ic|xorg.conf}} or better in a extra file in {{ic|/etc/X11/xorg.conf.d}}.<br />
The possible options are identical so it is recommended to first use `xsetwacom` for testing and later add the final config to the ''Xorg'' configuration files.<br />
<br />
==== Temporary configuration ====<br />
<br />
For the beginning it is a good idea to inspect the default configuration and all possible options using the following commands.<br />
<br />
$ xsetwacom --list devices # list the available devices for the get/set commands<br />
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH<br />
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD <br />
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS <br />
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5" all # using the device name<br />
$ xsetwacom --get 17 all # or equivalently use the device id<br />
$ xsetwacom --list parameters # to get an explanation of the Options<br />
$ man wacom # get even more details<br />
<br />
'''Caution''', do not use the device id when writing shell scripts to set some options as the ids might change after an hotplug.<br />
<br />
Options can be changed with the {{ic|--set}} flag. Some useful examples are<br />
<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" ScrollDistance 50 # change scrolling speed<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" Gesture off # disable multitouch gestures<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" Touch off # disable touch<br />
<br />
For further configuration tips and tricks see below in [[#Specific configuration tips]].<br />
{{Note|You can reset your temporary configuration at any time by unplugging and replugging in your tablet.}}<br />
<br />
==== Permanent configuration ====<br />
<br />
To make a permanent configuration the preferred way for ''Xorg''>1.8 is to create a new file in {{ic|/etc/X11/xorg.conf.d}}<br />
e.g. {{ic|52-wacom-options.conf}} with the following content.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/52-wacom-options.conf|<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo stylus options"<br />
MatchDriver "wacom"<br />
MatchProduct "Pen"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "RawSample" "20"<br />
Option "PressCurve" "0,10,90,100"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo eraser options"<br />
MatchDriver "wacom"<br />
MatchProduct "eraser"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "RawSample" "20"<br />
Option "PressCurve" "5,0,100,95"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo touch options"<br />
MatchDriver "wacom"<br />
MatchProduct "Finger"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "ScrollDistance" "18"<br />
Option "TapTime" "220"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo pad options"<br />
MatchDriver "wacom"<br />
MatchProduct "pad"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
<br />
# Setting up buttons<br />
Option "Button1" "1"<br />
Option "Button2" "2"<br />
Option "Button3" "3"<br />
Option "Button4" "0"<br />
EndSection<br />
}}<br />
<br />
The identifiers can be set arbitrarily. The option names are (except for the buttons) identical to the ones listed by {{ic|xsetwacom --list parameters}} and especially also in {{ic|man wacom}}. As noted in [[#Remapping Buttons]] the button ids seem to be different than the ones for {{ic|xsetwacom}}.<br />
<br />
==== Changing orientation ====<br />
<br />
If you want to use your tablet in a different orientation you have to tell this to the driver, else the movements do not cause the expected results.<br />
This is done by setting the '''Rotate''' option for all devices. Possible orientations are '''none''','''cw''','''ccw''' and '''half'''.<br />
A quick way is e.g.<br />
$ for i in 12 13 17 18; do xsetwacom --set $i Rotate half; done # remember the ids might change when hotplugging<br />
<br />
or use the following script like this {{ic|./wacomrot.sh half}}<br />
<br />
{{hc|1=wacomrot.sh|2=<br />
#!/bin/bash<br />
device="Wacom Bamboo 16FG 4x5"<br />
stylus="$device Pen stylus"<br />
eraser="$device Pen eraser"<br />
touch="$device Finger touch"<br />
pad="$device Finger pad"<br />
<br />
xsetwacom --set "$stylus" Rotate $1<br />
xsetwacom --set "$eraser" Rotate $1<br />
xsetwacom --set "$touch" Rotate $1<br />
xsetwacom --set "$pad" Rotate $1<br />
}}<br />
<br />
==== Remapping Buttons ====<br />
<br />
It is possible to remap the buttons with hotkeys.<br />
<br />
*Check [http://planetedessonges.org:8010/wakey/ Simple web-based GUI for xsetwacom], supports ''bamboo small'' but more models may come.<br />
<br />
===== Finding out the button IDs =====<br />
Sometimes it needs some trial&error to find the correct button IDs. For me they even differ for {{ic|xsetwacom}} and the {{ic|xorg.conf}} configuration. Very helpful tools are {{ic|xev}} or {{ic|xbindkeys -mk}}. An easy way to proceed is to temporarily assign keystrokes to your tablet's buttons like this:<br />
<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 'a'<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 2 'b'<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 3 'c'<br />
$ # and so on<br />
<br />
Then fire up {{ic|xev}} from a terminal window, place your mouse cursor above the window and hit the buttons and write down the IDs.<br />
<br />
$ xev | grep KeyPress -A 5<br />
<br />
===== The syntax =====<br />
<br />
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.<br />
<br />
KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]<br />
<br />
KEYWORD + ARGS:<br />
key [+,-]KEY [[+,-]KEY ...] where +:key down, -:key up, no prefix:down and up<br />
button BUTTON [BUTTON ...] (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)<br />
modetoggle toggle absolute/relative tablet mode <br />
displaytoggle toggle cursor movement among all displays which include individual screens<br />
plus the whole desktop for the selected tool if it is not a pad.<br />
When the tool is a pad, the function applies to all tools that are asssociated<br />
with the tablet<br />
<br />
BUTTON: button ID as integer number<br />
<br />
KEY: MODIFIER, SPECIALKEY or ASCIIKEY<br />
MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)<br />
ctrl=ctl=control, meta, alt, shift, super, hyper<br />
SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn<br />
ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)<br />
<br />
===== Some examples =====<br />
<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 3 # right mouse button<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +ctrl z -ctrl"<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1<br />
key +Control_L +z -z -Control_L<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +shift button 1 key -shift"<br />
<br />
even little macros are possible<br />
<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +shift h -shift e l l o"<br />
<br />
{{Note|There seems to be a bug in the ''xf86-input-wacom'' driver version 0.17.0, at least for my ''Wacom Bamboo Pen & Touch'', but I guess this holds in general. It causes the keystrokes not to be overwritten correctly.<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key a b c" # press button 1 -> abc<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key d" # press button 1 -> dbc WRONG!<br />
<br />
A simple workaround is to reset the mapping by mapping to "":<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "" # to reset the mapping<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key d" # press button 1 -> d<br />
<br />
}}<br />
<br />
{{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.}}<br />
<br />
===== Execute custom commands =====<br />
<br />
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install {{Pkg|xbindkeys}}.<br />
<br />
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}}<br />
in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.<br />
<br />
# Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)<br />
Option "Button1" "10"<br />
Option "Button2" "11"<br />
Option "Button3" "12"<br />
Option "Button4" "13"<br />
<br />
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.<br />
<br />
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration<br />
$ xbindkeys --defaults > ~/.xbindkeysrc<br />
<br />
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example<br />
<br />
"firefox"<br />
m:0x10 + b:10 (mouse)<br />
"xterm"<br />
m:0x10 + b:11 (mouse)<br />
"xdotool key ctrl-z"<br />
m:0x10 + b:12 (mouse)<br />
"send-notify Test "No need for escaping the quotes""<br />
m:0x10 + b:13 (mouse)<br />
<br />
==== LEDs ====<br />
<br />
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:<br />
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki><br />
# Give the users group permissions to set Wacom device LEDs.<br />
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"<br />
</nowiki>}}<br />
<br />
Setting the Intuos OLEDs can be done using [https://aur.archlinux.org/packages/i4oled/ i4oled] from the AUR.<br />
<br />
==== TwinView Setup ====<br />
<br />
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<br />
<br />
Option "TwinView" "horizontal"<br />
<br />
To all of your Wacom-InputDevice entries in the {{ic|xorg.conf}} file.<br />
You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 HERE]<br />
<br />
===== Temporary TwinView Setup =====<br />
<br />
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.<br />
<br />
==== Xrandr Setup ====<br />
xrandr sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio.<br />
For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 archlinux forum].<br />
<br />
If you just want to map the tablet to one of your screens, first find out what the screens are called<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384<br />
'''HDMI-0''' disconnected (normal left inverted right x axis y axis)<br />
'''DVI-0''' connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
'''VGA-0''' connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
Then you need to know what is the ID of your tablet.<br />
$ xsetwacom --list devices<br />
WALTOP International Corp. Slim Tablet stylus id: '''12''' type: STYLUS<br />
<br />
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<br />
$ xsetwacom --set '''12''' MapToOutput '''"VGA-0"'''<br />
This should immediately work, no root necessary.<br />
<br />
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<br />
$ xsetwacom --set '''12''' MapToOutput '''"1920x1080+1920+0"'''<br />
should also map the tablet to the screen on the right.<br />
<br />
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.<br />
<br />
=== Pressure curves ===<br />
<br />
Use [http://linuxwacom.sourceforge.net/misc/bezier.html Wacom Pressure Demo] to find P1=red (eg. 50,0), P2=purple (eg. 100,80) and Threshold=green (eg. 27) 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. ([http://250kb.de/u/150207/p/FoS1SiXuZQRP.png example curve])<br />
<br />
You can immediately test your desired values for your device (eg. "Wacom Intuos4 6x9 stylus") with<br />
<br />
xsetwacom --set "Wacom Intuos4 6x9 stylus" PressureCurve "50" "0" "100" "80"<br />
xsetwacom --set "Wacom Intuos4 6x9 stylus" Threshold "27"<br />
<br />
Later you can apply them in {{ic|/etc/X11/xorg.conf}} as shown below or you use the above shell commands in any startup script<br />
{{hc|/etc/X11/xorg.conf|<br />
Option "PressCurve" "50,0,100,80" # Custom preference<br />
Option "Threshold" "27" # sensitivity to do a "click"<br />
}}<br />
<br />
=== Force Proportions ===<br />
<br />
For standard ('''16:9''') widescreen monitors with Wacom tablets it is a typical problem that your strokes are slightly more horizontally oriented than they physically were (so for example a perfectly drawn circle with the pen will turn into a horizontal ellipse in the computer) because the tablet drawing surface proportions are larger on the vertical axis by default ('''16:10''') than your monitors aspect ratio and this inconsistency will subtly distort your strokes. It is possible to force the proportions of the drawing surface to match the aspect ratio of your monitor to solve this problem by cutting off the bottom of the drawing surface to accommodate for the differences in vertical resolution with the below options. This is an alternative to the "Force Proportions" option in the Windows driver settings. It is generally recommended to do this to ensure maximum accuracy of your tablet input.<br />
<br />
To get the tablets default values run the following command (where "device name or ID" would be for your stylus):<br />
<br />
xsetwacom --get "device name or ID" Area<br />
<br />
After this you can figure out your tablet's resolution by dividing the values with the ratio '''11.25''' (so '''21600/11.25=1920''' and '''13500/11.25=1200'''), so to convert this to '''1920x1080''' ('''16:9''') resolution, do '''1080*11.25=12150''' then to set the proportions with xsetwacom:<br />
<br />
xsetwacom --set "device name or ID" Area 0 0 21600 12150<br />
<br />
Here is how to do the same in the xorg configuration file:<br />
<br />
Option "BottomX" "21600"<br />
Option "BottomY" "12150"<br />
<br />
(An alternative formula would would be aspect ratio multiplied by '''1350'''. So '''16:9''' is '''16*1350=21600''' and '''9*1350=12150''')<br />
<br />
{{Note|There is also a KeepShape option which reportedly should do this automatically but it does not seem to work, which is why we have to do it the hard way. I do not know whether these values should be kept the same or increased on a bigger resolution monitor, but I highly suspect that they should be kept the same (e.g. the values are relative to the tablet's resolution, not the monitor's resolution; the important part is that the aspect ratio is correct, not that the resolution is a match)}}<br />
<br />
=== Using kcm-wacomtablet ===<br />
<br />
The KDE configuration module {{AUR|kcm-wacomtablet}} (or if you're on Plasma 5, {{AUR|kcm-wacomtablet-frameworks-git}}) supports easy configuration of the tablet through a graphical user interface, allowing for different profiles and proper hotplugging support. It will auto-detect the type of your tablet, and load your configuration profile automatically when the tablet is plugged in.<br />
<br />
== Application-specific configuration ==<br />
<br />
=== Blender ===<br />
<br />
To enable pad buttons and extra pen buttons in blender, you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.<br />
<br />
Provided example (for Bamboo fun) adapted to '''Sculpt''' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]<br />
<br />
It remaps<br />
*Left tablet buttons to '''Shift''' and '''Control''' ''(pan/tilt/zoom/smooth/invert)''<br />
*Right tablet buttons to '''F''' ''(brush size/strenght)'' and '''Control-z''' ''(undo)''<br />
*Top pen button ton '''m''' ''(mask control)''<br />
<br />
=== GIMP ===<br />
<br />
To enabled proper usage, and pressure sensitive painting in [http://www.gimp.org GIMP], just go to ''Edit &rarr; Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' '''devices''', set the '''mode''' to ''Screen'', and remember to save.<br />
<br />
*Please take note that if present, the ''pad'' '''device''' should be kept disabled as I do not 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].<br />
<br />
*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.<br />
<br />
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].<br />
<br />
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.<br />
<br />
=== Inkscape ===<br />
<br />
As in GIMP, to do the same simply got to ''Edit &rarr; Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' '''devices''', set the '''mode''' to ''Screen'', and remember to save.<br />
<br />
=== Krita ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== VirtualBox ===<br />
<br />
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'''.<br />
<br />
=== Web Browser Plugin ===<br />
<br />
A plugin that imitates the official Wacom web plugin can be found on the AUR as [https://aur.archlinux.org/packages/wacomwebplugin/ wacomwebplugin]. It has been tested successfully using Chromium and Firefox.<br />
<br />
With this plugin it is possible to make use of online tools such as [http://sta.sh/muro/ deviantART's Muro]. This plugin is in early stages so as always, your mileage may vary.<br />
<br />
==Troubleshooting==<br />
<br />
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).<br />
<br />
===Unknown device_type===<br />
<br />
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.<br />
<br />
Download and install the for-4.4 branch from [http://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].<br />
Your device should be recognized after you run<br />
<br />
# rmmod wacom<br />
# insmod /lib/modules/YOUR_KERNEL/extra/wacom.ko.gz<br />
<br />
===System freeze===<br />
<br />
If your system freezes when your tablet gets activated by the stylus, then you will need to [[patch]] your kernel with the patch from [https://lkml.org/lkml/2015/11/20/690 LKML].<br />
<br />
== References ==<br />
*[http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Main_Page Linux Wacom Project Wiki]<br />
*[http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]<br />
*[https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]<br />
*[http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]</div>Relhttps://wiki.archlinux.org/index.php?title=Graphics_tablet&diff=419943Graphics tablet2016-02-10T14:00:02Z<p>Rel: /* Finding out the button IDs */</p>
<hr />
<div>[[Category:Graphics tablet]]<br />
[[ja:Wacom タブレット]]<br />
{{Style|Many [[Help:Style]] issues}}<br />
This guide was started for ''USB'' based Wacom tablets, so much of the info in here focuses on that. Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup.<br />
However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work.<br />
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.<br />
<br />
== Installing ==<br />
<br />
=== Check if kernel drivers needed (usually not) ===<br />
<br />
After plugging in the tablet (in case of a USB device) check {{ic|lsusb}} and/or {{ic|<nowiki>dmesg | grep -i wacom</nowiki>}} to see if the kernel recognizes your tablet. It should also be listed in {{ic|/proc/bus/input/devices}}.<br />
<br />
In case it is not recognized, it might happen for new devices not to be supported by the current kernel. Sometimes the tablet has already support by a more recent driver than the one that comes with the kernel. In that case you may try to install {{AUR|input-wacom-dkms}} from the [[AUR]].<br />
<br />
=== Install Wacom drivers ===<br />
<br />
Thanks to [http://linuxwacom.sourceforge.net The Linux Wacom Project], you only need to install the {{Pkg|xf86-input-wacom}} package, which contains everything needed to use a Wacom tablet on Linux.<br />
<br />
{{Note|There is also {{AUR|xf86-input-wacom-git}} in AUR which provides git version of ''xf86-input-wacom'', but you might encounter some troubles. For me the buttons for example did only work with the stable release, not with the git version. So it is recommended to try ''xf86-input-wacom'' first.}}<br />
<br />
=== Automatic setup ===<br />
<br />
Newer versions of X should be able to automatically detect and configure your device. Before going any further, restart X so the new udev rules take effect. Test if your device was recognized completely (i.e., that both pen and eraser work, if applicable), by issuing command<br />
<br />
$ xsetwacom --list devices<br />
<br />
which should detect all devices with type, for example<br />
<br />
Wacom Bamboo 2FG 4x5 Pen stylus id: 8 type: STYLUS <br />
Wacom Bamboo 2FG 4x5 Pen eraser id: 9 type: ERASER <br />
Wacom Bamboo 2FG 4x5 Finger touch id: 13 type: TOUCH <br />
Wacom Bamboo 2FG 4x5 Finger pad id: 14 type: PAD <br />
<br />
You can also test it by opening {{Pkg|gimp}} or {{Pkg|xournal}} and checking the extended input devices section, or whatever tablet-related configuration is supported by the software of your choice.<br />
<br />
For this to work you do not need any {{ic|xorg.conf}} file, any configurations are made in files in the {{ic|/etc/X11/xorg.conf.d/}} folder.<br />
If everything is working you can skip the manual configuration and '''proceed''' to the configuration section to learn how to further customize your tablet.<br />
<br />
With the arrival of Xorg 1.8 support for HAL was dropped in favor of [[udev]] which might break auto-detection for some tablets as fitting udev rules might not exist yet, so you may need to write your own.<br />
<br />
If you have installed {{Pkg|libwacom}} or associated packages like {{Aur|libwacom-fedora}}{{Broken package link|{{aur-mirror|libwacom-fedora}}}} 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 X11 drivers.<br />
<br />
=== Manual setup ===<br />
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.<br />
The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver.<br />
The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port.<br />
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).<br />
<br />
====Dynamic with udev====<br />
{{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.}}<br />
<br />
Assuming ''udev'' is already installed you simply need to install {{AUR|wacom-udev}} from the [[AUR]].<br />
<br />
=====USB-devices=====<br />
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.<br />
<br />
$ ls /dev/input/wacom* <br />
/dev/input/wacom /dev/input/wacom-stylus /dev/input/wacom-touch<br />
<br />
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/10-wacom.rules}}. It is a good idea to copy the file e.g. to {{ic|10-my-wacom.rules}} before modifying it, else it might be reverted by a package upgrade.<br />
<br />
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.<br />
The two id's can by determined using<br />
<br />
$ lsusb | grep -i wacom<br />
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd<br />
<br />
In this example idVendor is 056a and idProduct 0062.<br />
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.<br />
For details check the linuxwacom wiki [http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Fixed_device_files_with_udev Fixed device files with udev].<br />
<br />
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules''<br />
Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared.<br />
Note that you may need to plug-in the tablet again for the device to appear.<br />
<br />
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}}.<br />
<br />
=====Serial devices=====<br />
The {{AUR|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:<br />
<br />
# inputattach --w8001 /dev/ttyS0<br />
<br />
See ''man inputattach'' for help about available options.<br />
As for USB devices one should end up with a file {{ic|/dev/input/wacom}} and proceed with the ''Xorg'' configuration.<br />
<br />
====Static setup====<br />
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}}.<br />
<br />
====Xorg configuration====<br />
<br />
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/}}.<br />
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.<br />
<br />
An example configuration for a ''Volito2'' might look like this<br />
<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "stylus"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "stylus"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "eraser"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "eraser"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "cursor"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "cursor"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
EndSection<br />
<br />
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse1"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse_udev"<br />
Option "SendCoreEvents" "true"<br />
Option "Protocol" "IMPS/2"<br />
Option "ZAxisMapping" "4 5"<br />
Option "Buttons" "5"<br />
EndSection<br />
Add this to the ''ServerLayout'' section<br />
<br />
InputDevice "cursor" "SendCoreEvents" <br />
InputDevice "stylus" "SendCoreEvents"<br />
InputDevice "eraser" "SendCoreEvents"<br />
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from<br />
<br />
InputDevice "Mouse0" "CorePointer"<br />
to<br />
<br />
InputDevice "Mouse1" "CorePointer"<br />
<br />
== Configuration ==<br />
<br />
=== General concepts ===<br />
<br />
The configuration can be done in two ways temporary using the `xsetwacom` tool, which is included in ''xf86-input-wacom'' or permanent in {{ic|xorg.conf}} or better in a extra file in {{ic|/etc/X11/xorg.conf.d}}.<br />
The possible options are identical so it is recommended to first use `xsetwacom` for testing and later add the final config to the ''Xorg'' configuration files.<br />
<br />
==== Temporary configuration ====<br />
<br />
For the beginning it is a good idea to inspect the default configuration and all possible options using the following commands.<br />
<br />
$ xsetwacom --list devices # list the available devices for the get/set commands<br />
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH<br />
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD <br />
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS <br />
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5" all # using the device name<br />
$ xsetwacom --get 17 all # or equivalently use the device id<br />
$ xsetwacom --list parameters # to get an explanation of the Options<br />
$ man wacom # get even more details<br />
<br />
'''Caution''', do not use the device id when writing shell scripts to set some options as the ids might change after an hotplug.<br />
<br />
Options can be changed with the {{ic|--set}} flag. Some useful examples are<br />
<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" ScrollDistance 50 # change scrolling speed<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" Gesture off # disable multitouch gestures<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" Touch off # disable touch<br />
<br />
For further configuration tips and tricks see below in [[#Specific configuration tips]].<br />
{{Note|You can reset your temporary configuration at any time by unplugging and replugging in your tablet.}}<br />
<br />
==== Permanent configuration ====<br />
<br />
To make a permanent configuration the preferred way for ''Xorg''>1.8 is to create a new file in {{ic|/etc/X11/xorg.conf.d}}<br />
e.g. {{ic|52-wacom-options.conf}} with the following content.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/52-wacom-options.conf|<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo stylus options"<br />
MatchDriver "wacom"<br />
MatchProduct "Pen"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "RawSample" "20"<br />
Option "PressCurve" "0,10,90,100"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo eraser options"<br />
MatchDriver "wacom"<br />
MatchProduct "eraser"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "RawSample" "20"<br />
Option "PressCurve" "5,0,100,95"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo touch options"<br />
MatchDriver "wacom"<br />
MatchProduct "Finger"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "ScrollDistance" "18"<br />
Option "TapTime" "220"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo pad options"<br />
MatchDriver "wacom"<br />
MatchProduct "pad"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
<br />
# Setting up buttons<br />
Option "Button1" "1"<br />
Option "Button2" "2"<br />
Option "Button3" "3"<br />
Option "Button4" "0"<br />
EndSection<br />
}}<br />
<br />
The identifiers can be set arbitrarily. The option names are (except for the buttons) identical to the ones listed by {{ic|xsetwacom --list parameters}} and especially also in {{ic|man wacom}}. As noted in [[#Remapping Buttons]] the button ids seem to be different than the ones for {{ic|xsetwacom}}.<br />
<br />
==== Changing orientation ====<br />
<br />
If you want to use your tablet in a different orientation you have to tell this to the driver, else the movements do not cause the expected results.<br />
This is done by setting the '''Rotate''' option for all devices. Possible orientations are '''none''','''cw''','''ccw''' and '''half'''.<br />
A quick way is e.g.<br />
$ for i in 12 13 17 18; do xsetwacom --set $i Rotate half; done # remember the ids might change when hotplugging<br />
<br />
or use the following script like this {{ic|./wacomrot.sh half}}<br />
<br />
{{hc|1=wacomrot.sh|2=<br />
#!/bin/bash<br />
device="Wacom Bamboo 16FG 4x5"<br />
stylus="$device Pen stylus"<br />
eraser="$device Pen eraser"<br />
touch="$device Finger touch"<br />
pad="$device Finger pad"<br />
<br />
xsetwacom --set "$stylus" Rotate $1<br />
xsetwacom --set "$eraser" Rotate $1<br />
xsetwacom --set "$touch" Rotate $1<br />
xsetwacom --set "$pad" Rotate $1<br />
}}<br />
<br />
==== Remapping Buttons ====<br />
<br />
It is possible to remap the buttons with hotkeys.<br />
<br />
*Check [http://planetedessonges.org:8010/wakey/ Simple web-based GUI for xsetwacom], supports ''bamboo small'' but more models may come.<br />
<br />
===== Finding out the button IDs =====<br />
Sometimes it needs some trial&error to find the correct button IDs. For me they even differ for {{ic|xsetwacom}} and the {{ic|xorg.conf}} configuration. Very helpful tools are {{ic|xev}} or {{ic|xbindkeys -mk}}. An easy way to proceed is the following<br />
<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 'a'<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 2 'b'<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 3 'c'<br />
$ # and so on<br />
<br />
Then fire up {{ic|xev}} from a terminal window, place your mouse cursor above the window and hit the buttons and write down the IDs.<br />
<br />
$ xev | grep KeyPress -A 5<br />
<br />
===== The syntax =====<br />
<br />
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.<br />
<br />
KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]<br />
<br />
KEYWORD + ARGS:<br />
key [+,-]KEY [[+,-]KEY ...] where +:key down, -:key up, no prefix:down and up<br />
button BUTTON [BUTTON ...] (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)<br />
modetoggle toggle absolute/relative tablet mode <br />
displaytoggle toggle cursor movement among all displays which include individual screens<br />
plus the whole desktop for the selected tool if it is not a pad.<br />
When the tool is a pad, the function applies to all tools that are asssociated<br />
with the tablet<br />
<br />
BUTTON: button ID as integer number<br />
<br />
KEY: MODIFIER, SPECIALKEY or ASCIIKEY<br />
MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)<br />
ctrl=ctl=control, meta, alt, shift, super, hyper<br />
SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn<br />
ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)<br />
<br />
===== Some examples =====<br />
<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 3 # right mouse button<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +ctrl z -ctrl"<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1<br />
key +Control_L +z -z -Control_L<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +shift button 1 key -shift"<br />
<br />
even little macros are possible<br />
<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +shift h -shift e l l o"<br />
<br />
{{Note|There seems to be a bug in the ''xf86-input-wacom'' driver version 0.17.0, at least for my ''Wacom Bamboo Pen & Touch'', but I guess this holds in general. It causes the keystrokes not to be overwritten correctly.<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key a b c" # press button 1 -> abc<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key d" # press button 1 -> dbc WRONG!<br />
<br />
A simple workaround is to reset the mapping by mapping to "":<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "" # to reset the mapping<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key d" # press button 1 -> d<br />
<br />
}}<br />
<br />
{{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.}}<br />
<br />
===== Execute custom commands =====<br />
<br />
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install {{Pkg|xbindkeys}}.<br />
<br />
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}}<br />
in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.<br />
<br />
# Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)<br />
Option "Button1" "10"<br />
Option "Button2" "11"<br />
Option "Button3" "12"<br />
Option "Button4" "13"<br />
<br />
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.<br />
<br />
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration<br />
$ xbindkeys --defaults > ~/.xbindkeysrc<br />
<br />
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example<br />
<br />
"firefox"<br />
m:0x10 + b:10 (mouse)<br />
"xterm"<br />
m:0x10 + b:11 (mouse)<br />
"xdotool key ctrl-z"<br />
m:0x10 + b:12 (mouse)<br />
"send-notify Test "No need for escaping the quotes""<br />
m:0x10 + b:13 (mouse)<br />
<br />
==== LEDs ====<br />
<br />
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:<br />
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki><br />
# Give the users group permissions to set Wacom device LEDs.<br />
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"<br />
</nowiki>}}<br />
<br />
Setting the Intuos OLEDs can be done using [https://aur.archlinux.org/packages/i4oled/ i4oled] from the AUR.<br />
<br />
==== TwinView Setup ====<br />
<br />
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<br />
<br />
Option "TwinView" "horizontal"<br />
<br />
To all of your Wacom-InputDevice entries in the {{ic|xorg.conf}} file.<br />
You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 HERE]<br />
<br />
===== Temporary TwinView Setup =====<br />
<br />
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.<br />
<br />
==== Xrandr Setup ====<br />
xrandr sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio.<br />
For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 archlinux forum].<br />
<br />
If you just want to map the tablet to one of your screens, first find out what the screens are called<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384<br />
'''HDMI-0''' disconnected (normal left inverted right x axis y axis)<br />
'''DVI-0''' connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
'''VGA-0''' connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
Then you need to know what is the ID of your tablet.<br />
$ xsetwacom --list devices<br />
WALTOP International Corp. Slim Tablet stylus id: '''12''' type: STYLUS<br />
<br />
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<br />
$ xsetwacom --set '''12''' MapToOutput '''"VGA-0"'''<br />
This should immediately work, no root necessary.<br />
<br />
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<br />
$ xsetwacom --set '''12''' MapToOutput '''"1920x1080+1920+0"'''<br />
should also map the tablet to the screen on the right.<br />
<br />
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.<br />
<br />
=== Pressure curves ===<br />
<br />
Use [http://linuxwacom.sourceforge.net/misc/bezier.html Wacom Pressure Demo] to find P1=red (eg. 50,0), P2=purple (eg. 100,80) and Threshold=green (eg. 27) 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. ([http://250kb.de/u/150207/p/FoS1SiXuZQRP.png example curve])<br />
<br />
You can immediately test your desired values for your device (eg. "Wacom Intuos4 6x9 stylus") with<br />
<br />
xsetwacom --set "Wacom Intuos4 6x9 stylus" PressureCurve "50" "0" "100" "80"<br />
xsetwacom --set "Wacom Intuos4 6x9 stylus" Threshold "27"<br />
<br />
Later you can apply them in {{ic|/etc/X11/xorg.conf}} as shown below or you use the above shell commands in any startup script<br />
{{hc|/etc/X11/xorg.conf|<br />
Option "PressCurve" "50,0,100,80" # Custom preference<br />
Option "Threshold" "27" # sensitivity to do a "click"<br />
}}<br />
<br />
=== Force Proportions ===<br />
<br />
For standard ('''16:9''') widescreen monitors with Wacom tablets it is a typical problem that your strokes are slightly more horizontally oriented than they physically were (so for example a perfectly drawn circle with the pen will turn into a horizontal ellipse in the computer) because the tablet drawing surface proportions are larger on the vertical axis by default ('''16:10''') than your monitors aspect ratio and this inconsistency will subtly distort your strokes. It is possible to force the proportions of the drawing surface to match the aspect ratio of your monitor to solve this problem by cutting off the bottom of the drawing surface to accommodate for the differences in vertical resolution with the below options. This is an alternative to the "Force Proportions" option in the Windows driver settings. It is generally recommended to do this to ensure maximum accuracy of your tablet input.<br />
<br />
To get the tablets default values run the following command (where "device name or ID" would be for your stylus):<br />
<br />
xsetwacom --get "device name or ID" Area<br />
<br />
After this you can figure out your tablet's resolution by dividing the values with the ratio '''11.25''' (so '''21600/11.25=1920''' and '''13500/11.25=1200'''), so to convert this to '''1920x1080''' ('''16:9''') resolution, do '''1080*11.25=12150''' then to set the proportions with xsetwacom:<br />
<br />
xsetwacom --set "device name or ID" Area 0 0 21600 12150<br />
<br />
Here is how to do the same in the xorg configuration file:<br />
<br />
Option "BottomX" "21600"<br />
Option "BottomY" "12150"<br />
<br />
(An alternative formula would would be aspect ratio multiplied by '''1350'''. So '''16:9''' is '''16*1350=21600''' and '''9*1350=12150''')<br />
<br />
{{Note|There is also a KeepShape option which reportedly should do this automatically but it does not seem to work, which is why we have to do it the hard way. I do not know whether these values should be kept the same or increased on a bigger resolution monitor, but I highly suspect that they should be kept the same (e.g. the values are relative to the tablet's resolution, not the monitor's resolution; the important part is that the aspect ratio is correct, not that the resolution is a match)}}<br />
<br />
=== Using kcm-wacomtablet ===<br />
<br />
The KDE configuration module {{AUR|kcm-wacomtablet}} (or if you're on Plasma 5, {{AUR|kcm-wacomtablet-frameworks-git}}) supports easy configuration of the tablet through a graphical user interface, allowing for different profiles and proper hotplugging support. It will auto-detect the type of your tablet, and load your configuration profile automatically when the tablet is plugged in.<br />
<br />
== Application-specific configuration ==<br />
<br />
=== Blender ===<br />
<br />
To enable pad buttons and extra pen buttons in blender, you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.<br />
<br />
Provided example (for Bamboo fun) adapted to '''Sculpt''' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]<br />
<br />
It remaps<br />
*Left tablet buttons to '''Shift''' and '''Control''' ''(pan/tilt/zoom/smooth/invert)''<br />
*Right tablet buttons to '''F''' ''(brush size/strenght)'' and '''Control-z''' ''(undo)''<br />
*Top pen button ton '''m''' ''(mask control)''<br />
<br />
=== GIMP ===<br />
<br />
To enabled proper usage, and pressure sensitive painting in [http://www.gimp.org GIMP], just go to ''Edit &rarr; Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' '''devices''', set the '''mode''' to ''Screen'', and remember to save.<br />
<br />
*Please take note that if present, the ''pad'' '''device''' should be kept disabled as I do not 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].<br />
<br />
*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.<br />
<br />
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].<br />
<br />
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.<br />
<br />
=== Inkscape ===<br />
<br />
As in GIMP, to do the same simply got to ''Edit &rarr; Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' '''devices''', set the '''mode''' to ''Screen'', and remember to save.<br />
<br />
=== Krita ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== VirtualBox ===<br />
<br />
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'''.<br />
<br />
=== Web Browser Plugin ===<br />
<br />
A plugin that imitates the official Wacom web plugin can be found on the AUR as [https://aur.archlinux.org/packages/wacomwebplugin/ wacomwebplugin]. It has been tested successfully using Chromium and Firefox.<br />
<br />
With this plugin it is possible to make use of online tools such as [http://sta.sh/muro/ deviantART's Muro]. This plugin is in early stages so as always, your mileage may vary.<br />
<br />
==Troubleshooting==<br />
<br />
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).<br />
<br />
===Unknown device_type===<br />
<br />
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.<br />
<br />
Download and install the for-4.4 branch from [http://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].<br />
Your device should be recognized after you run<br />
<br />
# rmmod wacom<br />
# insmod /lib/modules/YOUR_KERNEL/extra/wacom.ko.gz<br />
<br />
===System freeze===<br />
<br />
If your system freezes when your tablet gets activated by the stylus, then you will need to [[patch]] your kernel with the patch from [https://lkml.org/lkml/2015/11/20/690 LKML].<br />
<br />
== References ==<br />
*[http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Main_Page Linux Wacom Project Wiki]<br />
*[http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]<br />
*[https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]<br />
*[http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]</div>Relhttps://wiki.archlinux.org/index.php?title=Graphics_tablet&diff=419941Graphics tablet2016-02-10T13:57:50Z<p>Rel: /* Finding out the button IDs */</p>
<hr />
<div>[[Category:Graphics tablet]]<br />
[[ja:Wacom タブレット]]<br />
{{Style|Many [[Help:Style]] issues}}<br />
This guide was started for ''USB'' based Wacom tablets, so much of the info in here focuses on that. Usually it is recommended to rely on [[Xorg]]'s auto-detection or to use a '''dynamic''' setup.<br />
However for an ''internal'' tablet device one might consider a '''static''' Xorg setup in case autodetection does not work.<br />
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.<br />
<br />
== Installing ==<br />
<br />
=== Check if kernel drivers needed (usually not) ===<br />
<br />
After plugging in the tablet (in case of a USB device) check {{ic|lsusb}} and/or {{ic|<nowiki>dmesg | grep -i wacom</nowiki>}} to see if the kernel recognizes your tablet. It should also be listed in {{ic|/proc/bus/input/devices}}.<br />
<br />
In case it is not recognized, it might happen for new devices not to be supported by the current kernel. Sometimes the tablet has already support by a more recent driver than the one that comes with the kernel. In that case you may try to install {{AUR|input-wacom-dkms}} from the [[AUR]].<br />
<br />
=== Install Wacom drivers ===<br />
<br />
Thanks to [http://linuxwacom.sourceforge.net The Linux Wacom Project], you only need to install the {{Pkg|xf86-input-wacom}} package, which contains everything needed to use a Wacom tablet on Linux.<br />
<br />
{{Note|There is also {{AUR|xf86-input-wacom-git}} in AUR which provides git version of ''xf86-input-wacom'', but you might encounter some troubles. For me the buttons for example did only work with the stable release, not with the git version. So it is recommended to try ''xf86-input-wacom'' first.}}<br />
<br />
=== Automatic setup ===<br />
<br />
Newer versions of X should be able to automatically detect and configure your device. Before going any further, restart X so the new udev rules take effect. Test if your device was recognized completely (i.e., that both pen and eraser work, if applicable), by issuing command<br />
<br />
$ xsetwacom --list devices<br />
<br />
which should detect all devices with type, for example<br />
<br />
Wacom Bamboo 2FG 4x5 Pen stylus id: 8 type: STYLUS <br />
Wacom Bamboo 2FG 4x5 Pen eraser id: 9 type: ERASER <br />
Wacom Bamboo 2FG 4x5 Finger touch id: 13 type: TOUCH <br />
Wacom Bamboo 2FG 4x5 Finger pad id: 14 type: PAD <br />
<br />
You can also test it by opening {{Pkg|gimp}} or {{Pkg|xournal}} and checking the extended input devices section, or whatever tablet-related configuration is supported by the software of your choice.<br />
<br />
For this to work you do not need any {{ic|xorg.conf}} file, any configurations are made in files in the {{ic|/etc/X11/xorg.conf.d/}} folder.<br />
If everything is working you can skip the manual configuration and '''proceed''' to the configuration section to learn how to further customize your tablet.<br />
<br />
With the arrival of Xorg 1.8 support for HAL was dropped in favor of [[udev]] which might break auto-detection for some tablets as fitting udev rules might not exist yet, so you may need to write your own.<br />
<br />
If you have installed {{Pkg|libwacom}} or associated packages like {{Aur|libwacom-fedora}}{{Broken package link|{{aur-mirror|libwacom-fedora}}}} 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 X11 drivers.<br />
<br />
=== Manual setup ===<br />
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.<br />
The Wacom tablet device is accessed using a input event interface in {{ic|/dev/input/}} which is provided by the kernel driver.<br />
The interface number {{ic|event??}} is likely to change when unplugging and replugging into the same or especially a different ''USB'' port.<br />
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).<br />
<br />
====Dynamic with udev====<br />
{{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.}}<br />
<br />
Assuming ''udev'' is already installed you simply need to install {{AUR|wacom-udev}} from the [[AUR]].<br />
<br />
=====USB-devices=====<br />
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.<br />
<br />
$ ls /dev/input/wacom* <br />
/dev/input/wacom /dev/input/wacom-stylus /dev/input/wacom-touch<br />
<br />
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/10-wacom.rules}}. It is a good idea to copy the file e.g. to {{ic|10-my-wacom.rules}} before modifying it, else it might be reverted by a package upgrade.<br />
<br />
Add your device to the file by duplicating some line of another device and adapting ''idVendor'',''idProduct'' and the symlink name to your device.<br />
The two id's can by determined using<br />
<br />
$ lsusb | grep -i wacom<br />
Bus 002 Device 007: ID 056a:0062 Wacom Co., Ltd<br />
<br />
In this example idVendor is 056a and idProduct 0062.<br />
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.<br />
For details check the linuxwacom wiki [http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Fixed_device_files_with_udev Fixed device files with udev].<br />
<br />
Save the file and reload udev's configuration profile using the command ''udevadm control --reload-rules''<br />
Check again the content of ''/dev/input'' to make sure that the ''wacom'' symlinks appeared.<br />
Note that you may need to plug-in the tablet again for the device to appear.<br />
<br />
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}}.<br />
<br />
=====Serial devices=====<br />
The {{AUR|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:<br />
<br />
# inputattach --w8001 /dev/ttyS0<br />
<br />
See ''man inputattach'' for help about available options.<br />
As for USB devices one should end up with a file {{ic|/dev/input/wacom}} and proceed with the ''Xorg'' configuration.<br />
<br />
====Static setup====<br />
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}}.<br />
<br />
====Xorg configuration====<br />
<br />
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/}}.<br />
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.<br />
<br />
An example configuration for a ''Volito2'' might look like this<br />
<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "stylus"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "stylus"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "eraser"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "eraser"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
Option "tilt" "on" # add this if your tablet supports tilt<br />
Option "Threshold" "5" # the official linuxwacom howto advises this line<br />
EndSection<br />
Section "InputDevice"<br />
Driver "wacom"<br />
Identifier "cursor"<br />
Option "Device" "/dev/input/wacom" # or the corresponding event?? for a static setup<br />
Option "Type" "cursor"<br />
Option "USB" "on" # USB ONLY<br />
Option "Mode" "Relative" # other option: "Absolute"<br />
Option "Vendor" "WACOM"<br />
EndSection<br />
<br />
Make sure that you also change the path ({{Ic|"Device"}}) to your mouse, as it will be {{Ic|/dev/input/mouse_udev}} now.<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse1"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mouse_udev"<br />
Option "SendCoreEvents" "true"<br />
Option "Protocol" "IMPS/2"<br />
Option "ZAxisMapping" "4 5"<br />
Option "Buttons" "5"<br />
EndSection<br />
Add this to the ''ServerLayout'' section<br />
<br />
InputDevice "cursor" "SendCoreEvents" <br />
InputDevice "stylus" "SendCoreEvents"<br />
InputDevice "eraser" "SendCoreEvents"<br />
And finally make sure to update the identifier of your mouse in the ''ServerLayout'' section &ndash; as mine went from<br />
<br />
InputDevice "Mouse0" "CorePointer"<br />
to<br />
<br />
InputDevice "Mouse1" "CorePointer"<br />
<br />
== Configuration ==<br />
<br />
=== General concepts ===<br />
<br />
The configuration can be done in two ways temporary using the `xsetwacom` tool, which is included in ''xf86-input-wacom'' or permanent in {{ic|xorg.conf}} or better in a extra file in {{ic|/etc/X11/xorg.conf.d}}.<br />
The possible options are identical so it is recommended to first use `xsetwacom` for testing and later add the final config to the ''Xorg'' configuration files.<br />
<br />
==== Temporary configuration ====<br />
<br />
For the beginning it is a good idea to inspect the default configuration and all possible options using the following commands.<br />
<br />
$ xsetwacom --list devices # list the available devices for the get/set commands<br />
Wacom Bamboo 16FG 4x5 Finger touch id: 12 type: TOUCH<br />
Wacom Bamboo 16FG 4x5 Finger pad id: 13 type: PAD <br />
Wacom Bamboo 16FG 4x5 Pen stylus id: 17 type: STYLUS <br />
Wacom Bamboo 16FG 4x5 Pen eraser id: 18 type: ERASER<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5" all # using the device name<br />
$ xsetwacom --get 17 all # or equivalently use the device id<br />
$ xsetwacom --list parameters # to get an explanation of the Options<br />
$ man wacom # get even more details<br />
<br />
'''Caution''', do not use the device id when writing shell scripts to set some options as the ids might change after an hotplug.<br />
<br />
Options can be changed with the {{ic|--set}} flag. Some useful examples are<br />
<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" ScrollDistance 50 # change scrolling speed<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" Gesture off # disable multitouch gestures<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger touch" Touch off # disable touch<br />
<br />
For further configuration tips and tricks see below in [[#Specific configuration tips]].<br />
{{Note|You can reset your temporary configuration at any time by unplugging and replugging in your tablet.}}<br />
<br />
==== Permanent configuration ====<br />
<br />
To make a permanent configuration the preferred way for ''Xorg''>1.8 is to create a new file in {{ic|/etc/X11/xorg.conf.d}}<br />
e.g. {{ic|52-wacom-options.conf}} with the following content.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/52-wacom-options.conf|<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo stylus options"<br />
MatchDriver "wacom"<br />
MatchProduct "Pen"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "RawSample" "20"<br />
Option "PressCurve" "0,10,90,100"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo eraser options"<br />
MatchDriver "wacom"<br />
MatchProduct "eraser"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "RawSample" "20"<br />
Option "PressCurve" "5,0,100,95"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo touch options"<br />
MatchDriver "wacom"<br />
MatchProduct "Finger"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
Option "ScrollDistance" "18"<br />
Option "TapTime" "220"<br />
EndSection<br />
<br />
Section "InputClass"<br />
Identifier "Wacom Bamboo pad options"<br />
MatchDriver "wacom"<br />
MatchProduct "pad"<br />
<br />
# Apply custom Options to this device below.<br />
Option "Rotate" "none"<br />
<br />
# Setting up buttons<br />
Option "Button1" "1"<br />
Option "Button2" "2"<br />
Option "Button3" "3"<br />
Option "Button4" "0"<br />
EndSection<br />
}}<br />
<br />
The identifiers can be set arbitrarily. The option names are (except for the buttons) identical to the ones listed by {{ic|xsetwacom --list parameters}} and especially also in {{ic|man wacom}}. As noted in [[#Remapping Buttons]] the button ids seem to be different than the ones for {{ic|xsetwacom}}.<br />
<br />
==== Changing orientation ====<br />
<br />
If you want to use your tablet in a different orientation you have to tell this to the driver, else the movements do not cause the expected results.<br />
This is done by setting the '''Rotate''' option for all devices. Possible orientations are '''none''','''cw''','''ccw''' and '''half'''.<br />
A quick way is e.g.<br />
$ for i in 12 13 17 18; do xsetwacom --set $i Rotate half; done # remember the ids might change when hotplugging<br />
<br />
or use the following script like this {{ic|./wacomrot.sh half}}<br />
<br />
{{hc|1=wacomrot.sh|2=<br />
#!/bin/bash<br />
device="Wacom Bamboo 16FG 4x5"<br />
stylus="$device Pen stylus"<br />
eraser="$device Pen eraser"<br />
touch="$device Finger touch"<br />
pad="$device Finger pad"<br />
<br />
xsetwacom --set "$stylus" Rotate $1<br />
xsetwacom --set "$eraser" Rotate $1<br />
xsetwacom --set "$touch" Rotate $1<br />
xsetwacom --set "$pad" Rotate $1<br />
}}<br />
<br />
==== Remapping Buttons ====<br />
<br />
It is possible to remap the buttons with hotkeys.<br />
<br />
*Check [http://planetedessonges.org:8010/wakey/ Simple web-based GUI for xsetwacom], supports ''bamboo small'' but more models may come.<br />
<br />
===== Finding out the button IDs =====<br />
Sometimes it needs some trial&error to find the correct button IDs. For me they even differ for {{ic|xsetwacom}} and the {{ic|xorg.conf}} configuration. Very helpful tools are {{ic|xev}} or {{ic|xbindkeys -mk}}. An easy way to proceed is the following<br />
<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 'a'<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 2 'b'<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 3 'c'<br />
$ # and so on<br />
<br />
Then fire up {{ic|xev}} from a terminal window, place your mouse cursor above the window and hit the buttons and write down the IDs.<br />
<br />
$ xev | grep KeyPress -A 5<br />
KeyPress event, serial 37, synthetic NO, window 0x2a00001,<br />
root 0x272, subw 0x0, time 50428930, (78,101), root:(949,550),<br />
state 0x10, keycode 38 (keysym 0x61, a), same_screen YES,<br />
XLookupString gives 1 bytes: (61) "a"<br />
XmbLookupString gives 1 bytes: (61) "a"<br />
XFilterEvent returns: False<br />
--<br />
KeyPress event, serial 37, synthetic NO, window 0x2a00001,<br />
root 0x272, subw 0x0, time 50430634, (89,116), root:(960,565),<br />
state 0x10, keycode 56 (keysym 0x62, b), same_screen YES,<br />
XLookupString gives 1 bytes: (62) "b"<br />
XmbLookupString gives 1 bytes: (62) "b"<br />
XFilterEvent returns: False<br />
--<br />
KeyPress event, serial 37, synthetic NO, window 0x2a00001,<br />
root 0x272, subw 0x0, time 50431674, (56,104), root:(927,553),<br />
state 0x10, keycode 54 (keysym 0x63, c), same_screen YES,<br />
XLookupString gives 1 bytes: (63) "c"<br />
XmbLookupString gives 1 bytes: (63) "c"<br />
XFilterEvent returns: False<br />
^C<br />
<br />
===== The syntax =====<br />
<br />
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.<br />
<br />
KEYWORD [ARGS...] [KEYWORD [ARGS...] ...]<br />
<br />
KEYWORD + ARGS:<br />
key [+,-]KEY [[+,-]KEY ...] where +:key down, -:key up, no prefix:down and up<br />
button BUTTON [BUTTON ...] (1=left,2=middle,3=right mouse button, 4/5 scroll mouse wheel)<br />
modetoggle toggle absolute/relative tablet mode <br />
displaytoggle toggle cursor movement among all displays which include individual screens<br />
plus the whole desktop for the selected tool if it is not a pad.<br />
When the tool is a pad, the function applies to all tools that are asssociated<br />
with the tablet<br />
<br />
BUTTON: button ID as integer number<br />
<br />
KEY: MODIFIER, SPECIALKEY or ASCIIKEY<br />
MODIFIER: (each can be prefix with an '''l''' or an '''r''' for the left/right modifier (no prefix = left)<br />
ctrl=ctl=control, meta, alt, shift, super, hyper<br />
SPECIALKEY: f1-f35, esc=Esc, up,down,left,right, backspace=Backspace, tab, PgUp,PgDn<br />
ASCIIKEY: (usual characters the key produces, e.g. a,b,c,1,2,3 etc.)<br />
<br />
===== Some examples =====<br />
<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 3 # right mouse button<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +ctrl z -ctrl"<br />
$ xsetwacom --get "Wacom Bamboo 16FG 4x5 Finger pad" Button 1<br />
key +Control_L +z -z -Control_L<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +shift button 1 key -shift"<br />
<br />
even little macros are possible<br />
<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key +shift h -shift e l l o"<br />
<br />
{{Note|There seems to be a bug in the ''xf86-input-wacom'' driver version 0.17.0, at least for my ''Wacom Bamboo Pen & Touch'', but I guess this holds in general. It causes the keystrokes not to be overwritten correctly.<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key a b c" # press button 1 -> abc<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key d" # press button 1 -> dbc WRONG!<br />
<br />
A simple workaround is to reset the mapping by mapping to "":<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "" # to reset the mapping<br />
$ xsetwacom --set "Wacom Bamboo 16FG 4x5 Finger pad" Button 1 "key d" # press button 1 -> d<br />
<br />
}}<br />
<br />
{{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.}}<br />
<br />
===== Execute custom commands =====<br />
<br />
Mapping custom commands to the buttons is a little bit tricky but actually very simple. First, install {{Pkg|xbindkeys}}.<br />
<br />
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}}<br />
in the InputClass section of your '''pad''' device. Map the tablet's buttons to some unused button ids.<br />
<br />
# Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)<br />
Option "Button1" "10"<br />
Option "Button2" "11"<br />
Option "Button3" "12"<br />
Option "Button4" "13"<br />
<br />
Then restart your ''Xorg'' server and verify the buttons using {{ic|xev}} or {{ic|xbindkeys -mk}}.<br />
<br />
Now set up your xbindkeys configuration, if you do not already have one you might want to create a default configuration<br />
$ xbindkeys --defaults > ~/.xbindkeysrc<br />
<br />
Then add your custom key mapping to {{ic|~/.xbindkeysrc}}, for example<br />
<br />
"firefox"<br />
m:0x10 + b:10 (mouse)<br />
"xterm"<br />
m:0x10 + b:11 (mouse)<br />
"xdotool key ctrl-z"<br />
m:0x10 + b:12 (mouse)<br />
"send-notify Test "No need for escaping the quotes""<br />
m:0x10 + b:13 (mouse)<br />
<br />
==== LEDs ====<br />
<br />
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:<br />
{{hc|/etc/udev/rules.d/99-wacom.rules|<nowiki><br />
# Give the users group permissions to set Wacom device LEDs.<br />
ACTION=="add", SUBSYSTEM=="hid", DRIVERS=="wacom", RUN+="/usr/bin/sh -c 'chown :users /sys/%p/wacom_led/*'"<br />
</nowiki>}}<br />
<br />
Setting the Intuos OLEDs can be done using [https://aur.archlinux.org/packages/i4oled/ i4oled] from the AUR.<br />
<br />
==== TwinView Setup ====<br />
<br />
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<br />
<br />
Option "TwinView" "horizontal"<br />
<br />
To all of your Wacom-InputDevice entries in the {{ic|xorg.conf}} file.<br />
You may read more about that [http://ubuntuforums.org/showthread.php?t=640898 HERE]<br />
<br />
===== Temporary TwinView Setup =====<br />
<br />
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.<br />
<br />
==== Xrandr Setup ====<br />
xrandr sets two monitors as one big screen, mapping the tablet to the whole virtual screen and deforming aspect ratio.<br />
For a solution see this thread: [https://bbs.archlinux.org/viewtopic.php?pid=797617 archlinux forum].<br />
<br />
If you just want to map the tablet to one of your screens, first find out what the screens are called<br />
$ xrandr<br />
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384<br />
'''HDMI-0''' disconnected (normal left inverted right x axis y axis)<br />
'''DVI-0''' connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
'''VGA-0''' connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 477mm x 268mm<br />
1920x1080 60.0*+<br />
1680x1050 60.0 <br />
...<br />
Then you need to know what is the ID of your tablet.<br />
$ xsetwacom --list devices<br />
WALTOP International Corp. Slim Tablet stylus id: '''12''' type: STYLUS<br />
<br />
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<br />
$ xsetwacom --set '''12''' MapToOutput '''"VGA-0"'''<br />
This should immediately work, no root necessary.<br />
<br />
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<br />
$ xsetwacom --set '''12''' MapToOutput '''"1920x1080+1920+0"'''<br />
should also map the tablet to the screen on the right.<br />
<br />
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.<br />
<br />
=== Pressure curves ===<br />
<br />
Use [http://linuxwacom.sourceforge.net/misc/bezier.html Wacom Pressure Demo] to find P1=red (eg. 50,0), P2=purple (eg. 100,80) and Threshold=green (eg. 27) 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. ([http://250kb.de/u/150207/p/FoS1SiXuZQRP.png example curve])<br />
<br />
You can immediately test your desired values for your device (eg. "Wacom Intuos4 6x9 stylus") with<br />
<br />
xsetwacom --set "Wacom Intuos4 6x9 stylus" PressureCurve "50" "0" "100" "80"<br />
xsetwacom --set "Wacom Intuos4 6x9 stylus" Threshold "27"<br />
<br />
Later you can apply them in {{ic|/etc/X11/xorg.conf}} as shown below or you use the above shell commands in any startup script<br />
{{hc|/etc/X11/xorg.conf|<br />
Option "PressCurve" "50,0,100,80" # Custom preference<br />
Option "Threshold" "27" # sensitivity to do a "click"<br />
}}<br />
<br />
=== Force Proportions ===<br />
<br />
For standard ('''16:9''') widescreen monitors with Wacom tablets it is a typical problem that your strokes are slightly more horizontally oriented than they physically were (so for example a perfectly drawn circle with the pen will turn into a horizontal ellipse in the computer) because the tablet drawing surface proportions are larger on the vertical axis by default ('''16:10''') than your monitors aspect ratio and this inconsistency will subtly distort your strokes. It is possible to force the proportions of the drawing surface to match the aspect ratio of your monitor to solve this problem by cutting off the bottom of the drawing surface to accommodate for the differences in vertical resolution with the below options. This is an alternative to the "Force Proportions" option in the Windows driver settings. It is generally recommended to do this to ensure maximum accuracy of your tablet input.<br />
<br />
To get the tablets default values run the following command (where "device name or ID" would be for your stylus):<br />
<br />
xsetwacom --get "device name or ID" Area<br />
<br />
After this you can figure out your tablet's resolution by dividing the values with the ratio '''11.25''' (so '''21600/11.25=1920''' and '''13500/11.25=1200'''), so to convert this to '''1920x1080''' ('''16:9''') resolution, do '''1080*11.25=12150''' then to set the proportions with xsetwacom:<br />
<br />
xsetwacom --set "device name or ID" Area 0 0 21600 12150<br />
<br />
Here is how to do the same in the xorg configuration file:<br />
<br />
Option "BottomX" "21600"<br />
Option "BottomY" "12150"<br />
<br />
(An alternative formula would would be aspect ratio multiplied by '''1350'''. So '''16:9''' is '''16*1350=21600''' and '''9*1350=12150''')<br />
<br />
{{Note|There is also a KeepShape option which reportedly should do this automatically but it does not seem to work, which is why we have to do it the hard way. I do not know whether these values should be kept the same or increased on a bigger resolution monitor, but I highly suspect that they should be kept the same (e.g. the values are relative to the tablet's resolution, not the monitor's resolution; the important part is that the aspect ratio is correct, not that the resolution is a match)}}<br />
<br />
=== Using kcm-wacomtablet ===<br />
<br />
The KDE configuration module {{AUR|kcm-wacomtablet}} (or if you're on Plasma 5, {{AUR|kcm-wacomtablet-frameworks-git}}) supports easy configuration of the tablet through a graphical user interface, allowing for different profiles and proper hotplugging support. It will auto-detect the type of your tablet, and load your configuration profile automatically when the tablet is plugged in.<br />
<br />
== Application-specific configuration ==<br />
<br />
=== Blender ===<br />
<br />
To enable pad buttons and extra pen buttons in blender, you can create a xsetwacom wrapper to temporarily remap buttons for your blender session.<br />
<br />
Provided example (for Bamboo fun) adapted to '''Sculpt''' mode: [http://pastebin.archlinux.fr/1887946 blender_sculpt.sh]<br />
<br />
It remaps<br />
*Left tablet buttons to '''Shift''' and '''Control''' ''(pan/tilt/zoom/smooth/invert)''<br />
*Right tablet buttons to '''F''' ''(brush size/strenght)'' and '''Control-z''' ''(undo)''<br />
*Top pen button ton '''m''' ''(mask control)''<br />
<br />
=== GIMP ===<br />
<br />
To enabled proper usage, and pressure sensitive painting in [http://www.gimp.org GIMP], just go to ''Edit &rarr; Input Devices''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' '''devices''', set the '''mode''' to ''Screen'', and remember to save.<br />
<br />
*Please take note that if present, the ''pad'' '''device''' should be kept disabled as I do not 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].<br />
<br />
*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.<br />
<br />
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].<br />
<br />
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.<br />
<br />
=== Inkscape ===<br />
<br />
As in GIMP, to do the same simply got to ''Edit &rarr; Input Devices...''. Now for each of your ''eraser'', ''stylus'', and ''cursor'' '''devices''', set the '''mode''' to ''Screen'', and remember to save.<br />
<br />
=== Krita ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== VirtualBox ===<br />
<br />
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'''.<br />
<br />
=== Web Browser Plugin ===<br />
<br />
A plugin that imitates the official Wacom web plugin can be found on the AUR as [https://aur.archlinux.org/packages/wacomwebplugin/ wacomwebplugin]. It has been tested successfully using Chromium and Firefox.<br />
<br />
With this plugin it is possible to make use of online tools such as [http://sta.sh/muro/ deviantART's Muro]. This plugin is in early stages so as always, your mileage may vary.<br />
<br />
==Troubleshooting==<br />
<br />
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).<br />
<br />
===Unknown device_type===<br />
<br />
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.<br />
<br />
Download and install the for-4.4 branch from [http://sourceforge.net/p/linuxwacom/input-wacom/ci/jiri/for-4.4/~/tarball SourceForge].<br />
Your device should be recognized after you run<br />
<br />
# rmmod wacom<br />
# insmod /lib/modules/YOUR_KERNEL/extra/wacom.ko.gz<br />
<br />
===System freeze===<br />
<br />
If your system freezes when your tablet gets activated by the stylus, then you will need to [[patch]] your kernel with the patch from [https://lkml.org/lkml/2015/11/20/690 LKML].<br />
<br />
== References ==<br />
*[http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Main_Page Linux Wacom Project Wiki]<br />
*[http://www.gimptalk.com/forum/topic.php?t=17992&start=1 GIMP Talk - Community - Install Guide: Getting Wacom Drawing Tablets To Work In Gimp]<br />
*[https://help.ubuntu.com/community/Wacom Ubuntu Help: Wacom]<br />
*[http://ubuntuforums.org/showthread.php?t=1038949 Ubuntu Forums - Install a LinuxWacom Kernel Driver for Tablet PC's]</div>Rel