Graphics tablet

From ArchWiki

From Wikipedia:Graphics tablet:

A graphics tablet (also known as a digitizer, digital graphic tablet, pen tablet, drawing tablet, external drawing pad or digital art board) is a computer input device that enables a user to hand-draw images, animations and graphics, with a special pen-like stylus, similar to the way a person draws images with a pencil and paper.

Most graphics tablets will work out of the box with Arch Linux. Additional configuration is required for certain extra features, such as button remapping and adjusting the tablet's aspect ratio. This article explains how to configure your tablet under Xorg. For configuration under Wayland, see #Wayland and libinput.

Installation

The Arch Linux kernels include drivers by the linux-wacom and DIGImend projects. linux-wacom supports Wacom devices, while DIGImend supports devices from other manufacturers. Both projects publish a list of supported devices: linux-wacom, DIGImend. After connecting your tablet via USB or Bluetooth, it should show up when running dmesg as root and be listed in /proc/bus/input/devices. For USB devices, the lsusb command from usbutils should also show your tablet. If your tablet does not show up, or if certain features do not work, see #Device not recognized by the kernel.

Install the xf86-input-wacom Xorg driver. No additional configuration is required for Wacom devices, as the included /usr/share/X11/xorg.conf.d/70-wacom.conf file will automatically load the wacom(4) driver when plugging Wacom devices. If your device is from another manufacturer, you will need to manually configure Xorg to use it with the wacom driver, which will allow configuring it through xsetwacom. Create a file in /etc/X11/xorg.conf.d, where VID:PID is your USB ID as seen by lsusb:

/etc/X11/xorg.conf.d/10-tablet.conf
Section "InputClass"
    Identifier "Tablet"
    Driver "wacom"
    MatchDevicePath "/dev/input/event*"
    MatchUSBID "VID:PID"
EndSection
Tip: A sample configuration file covering several non-Wacom devices is provided by the DIGImend project here.

After restarting X, the command xsetwacom list devices should now list some devices. If it does not, see #Manual setup.

Utilities

  • Wacom Tablet KCM — A KDE configuration module that allows remapping buttons and mapping a tablet to a monitor. It also supports tablet-specific profiles and hotplugging. It does not work on Wayland as it requires the wacom Xorg driver.
https://invent.kde.org/system/wacomtablet || kcm-wacomtablet
https://gist.github.com/tom-galvin/6c19fe907945d735c045 ||
https://gist.github.com/Konfekt/d57567b84b264e37e62bd5c001e76457 ||

Alternative drivers

  • Tuhi — An application that can download drawings from Wacom's smartpad range of devices, such as the Bamboo Spark and Bamboo Slate.
https://github.com/tuhiproject/tuhi || tuhi-gitAUR
  • Huion Linux Driver — Huion's official, proprietary Linux driver.
https://www.huion.com || huiontabletAUR
  • XP-Pen Linux Driver — XP-Pen's official, proprietary Linux driver. Some UGEE devices may also be supported.
https://www.xp-pen.com || xp-pen-tabletAUR
  • OpenTabletDriver — A cross-platform user space driver for several different tablet models.
https://opentabletdriver.net || opentabletdriverAUR
https://github.com/RoaldFre/wacom_serial5 || wacom_serial5-dkms-gitAUR

Weylus

Weylus is a project that allows using a smartphone or tablet as a graphics tablet on your computer. It is available as weylusAUR or weylus-binAUR.

Configuration

The Xorg driver can be temporarily configured with xsetwacom, see xsetwacom(1). Changes are lost after X server restarts or replugging your tablet, see #Permanent configuration to view methods to keep your settings persistent.

List the available devices:

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

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

Remapping buttons

Xorg treats the buttons on tablets and pens as mouse buttons. Tablet buttons start at 1, pen buttons start at 2 (1 is the tip contact event). Since most applications do not allow mapping shortcuts to mouse buttons, users may be interested in remapping these buttons to keyboard buttons.

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

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

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

After identifying the button, you can remap it with xsetwacom. The general mapping syntax is as follows:

$ xsetwacom set pad-or-stylus Button number keyword arguments

The full list of keywords and their arguments is available in xsetwacom(1) § Button. Here are a few examples:

Note:
  • A + sign before a key means it is pressed, while a - sign means it is released. Keys with no signs are pressed then released.
  • You can view a full list of modifiers with xsetwacom list modifiers.
  • Keywords such as key and button can be mixed.

To remap the button to Ctrl+z:

$ xsetwacom set pad Button 1 "key +ctrl z -ctrl"

To remap the button to mouse button 3:

$ xsetwacom set pad Button 1 "button 3"

To press mouse button 1 while holding Shift:

$ xsetwacom set pad Button 1 "key +shift button 1 key -shift"

To clear all custom mappings from the button:

$ xsetwacom set pad Button 1

Execute custom commands

Although you cannot map tablet buttons to custom commands directly using xsetwacom, it is possible to map them to a key combination that will activate a custom keybind utility such as Xbindkeys, sxhkd, or the keyboard shortcut configuration system for your window manager or desktop environment.

It is possible to remap the tablet buttons to a function key or mouse button that's not available on your hardware, such as F20 or mouse button 10. This way, you can set up custom commands that are only executed through your tablet's buttons.

Adjusting aspect ratios

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

Find out your tablet's resolution by running:

$ xsetwacom get stylus Area

Reducing the drawing area height

Run:

$ xsetwacom set stylus Area 0 0 tablet_width height

where height is tablet_width * screen_height / screen_width.

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

$ xsetwacom set stylus ResetArea

Reducing the screen area width

Run:

$ xsetwacom set stylus MapToOutput WIDTHxSCREEN_HEIGHT+0+0

where WIDTH is screen_height * tablet_width / tablet_height.

Mapping the tablet to a monitor

If you have multiple monitors, it is useful to map your tablet to a single monitor in order to avoid distortions when drawing. This can also be used if you have a graphics tablet with a screen, in order to map the tablet's active area to its own screen.

You can map your tablet to a monitor with the following command, where output is your monitor identifier as reported by xrandr:

$ xsetwacom set stylus MapToOutput output

For example:

$ xsetwacom set 'Wacom Intuos S Pen stylus' MapToOutput VGA-0

If this does not work with the Nvidia binary drivers, try using HEAD-0, HEAD-1, ... according to the monitor number.

Alternatively you can use the argument next to switch to the next available monitor.

For example:

$ xsetwacom set 'Wacom Intuos S Pen stylus' MapToOutput next

If xsetwacom is unable to find your output, you can use the command in #Reducing the screen area width to manually map the tablet to a region matching your monitor. Run:

$ xsetwacom set stylus MapToOutput SCREEN_WIDTHxSCREEN_HEIGHT+HORIZONTAL_OFFSET+VERTICAL_OFFSET

Where SCREEN_WIDTH and SCREEN_HEIGHT are your monitor's width and height in pixels, while HORIZONTAL_OFFSET and VERTICAL_OFFSET are the coordinates for your desired monitor, starting from the leftmost and highest pixel in your setup. For example, if you have two 1920x1080 monitors side-by-side, and you want to map your tablet to the rightmost monitor, you would run:

$ xsetwacom set stylus MapToOutput 1920x1080+1920+0
Tip: You can combine this with the formula in #Reducing the screen area width to map the tablet to an output in a way that does not distort the aspect ratio, by replacing SCREEN_WIDTH with the calculated width from the formula.

In case xsetwacom does not work, you can try xinput. First, you need to find your stylus ID:

$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Wacom Intuos PT S 2 Finger                id=11   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos PT S 2 Pad                   id=12   [slave  pointer  (2)]
⎜   ↳ USB Keyboard                              id=14   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=16   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=17   [slave  pointer  (2)]
⎜   ↳ SteelSeries Kinzu V2 Gaming Mouse         id=9    [slave  pointer  (2)]
⎜   ↳ Wacom Intuos PT S 2 Pen Pen (0x6281780c)  id=20   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ ...

In this case, the stylus ID is 20. To map it to monitor VGA-0, run:

$ xinput map-to-output 20 VGA-0

If all else fails, you will have to adjust your tablet's Coordinate Transformation Matrix. Instructions to calculate a matrix for your tablet are available in the xf86-input-wacom wiki.

Pressure curve

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

You can change the pressure curve with:

$ xsetwacom set stylus PressureCurve x1 y1 x2 y2

Permanent configuration

Through xsetwacom via udev and systemd service

It is possible to save your xsetwacom parameters in a shell script that is autostarted through udev with a custom systemd/User unit file. This approach is more complex than autostarting the shell script through your desktop environment or window manager, however, it will run the script every time the tablet is connected to the computer.

First install usbutils and run lsusb to find the vendor ID of your tablet (056a in the example below).

Then create a udev rule to start a systemd unit when the tablet is connected (replace the vendor ID accordingly):

/etc/udev/rules.d/99-wacom.rules
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="056a", TAG+="systemd", ENV{SYSTEMD_USER_WANTS}+="wacom.service"

Prepare the systemd unit file. It is connected to the special graphical-session.target which should be active whenever any graphical session is active, see systemd.special(7) § Special Passive User Units.

~/.config/systemd/user/wacom.service
[Unit]
Description=Configure my Wacom tablet
After=graphical-session.target
PartOf=graphical-session.target

[Service]
Type=oneshot
ExecStart=/path/to/wacom-config.sh

[Install]
WantedBy=graphical-session.target

Prepare the script for tablet configuration. When started from the systemd user service, the needed variables DISPLAY and XAUTHORITY should already be set. See systemd/User#DISPLAY and XAUTHORITY for details.

Note:
  • The Wacom input devices may not be ready at the time udev invokes the systemd service and the script is started. A workaround is to add sleep 1 at the beginning of your script (more might be needed, e.g. up to 10s for a Cintiq with integrated display due to its startup time). If it is still not working, check [1] for possible solutions.
  • The button IDs might change each time a tablet is plugged in. Hence, the script should not hardcode the IDs, but parse the correct IDs from the xsetwacom list devices output. See [2] for details.
wacom-config.sh
#!/bin/sh

for i in $(seq 10); do
    if xsetwacom list devices | grep -q Wacom; then
        break
    fi
    sleep 1
done

list=$(xsetwacom list devices)
pad=$(echo "${list}" | awk '/pad/{print $7}')
stylus=$(echo "${list}" | xsetwacom list devices | awk '/stylus/{print $7}')

if [ -z "${pad}" ]; then
    exit 0
fi

# configure the buttons on ${stylus} with your xsetwacom commands...
#xsetwacom set "${stylus}" Button 2 11
#...

Finally start/enable the service wacom.service with the --user flag.

Compatibility with Xfce4 Display Profiles

If you have a tablet with integrated display and want to seamlessly switch between multiple display profiles in Xfce4, simply listening to udev events might not be enough. You'll need to change the device settings whenever your display geometry changes. (e.g. Mirrored vs. Side-by-Side Setups).

In these cases you can use xfconf-query to monitor changes to the active display profile.

wacom-config-daemon.sh
#!/usr/bin/env sh

# Use this to target your specific monitor device
screen_dev="HDMI-A-0"

xfconf-query -c displays -p /ActiveProfile -m | while IFS= read -r; do
  echo "Reconfiguring..."

  # Tested with Wacom Cintiq 16 Pen (stylus/eraser)
  for id in $(xsetwacom list devices | grep -i wacom | awk '/Pen/{print $7}'); do
    xsetwacom set "${id}" MapToOutput "${screen_dev}"
  done
done

Now add this script to your autostart applications in Settings > Session and Startup > Application Autostart

Through Xorg.conf

Note: xorg.conf lacks some of options xsetwacom has and only lets you map buttons to mouse buttons.

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

You firstly need to find out your product names in the Xorg log file:

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

For these product names the sections would be:

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

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

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

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

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

$ xsetwacom get device all
Button remapping

Button remapping through Xorg.conf only allows you to remap the tablet buttons to mouse buttons.

Note: Because X uses buttons 4-7 as the four scrolling directions, tablet buttons 4 and higher are translated to mouse buttons 8 and higher by default. While xorg.conf uses the actual button numbers, xsetwacom uses the translated mouse button numbers. For example, the fourth button on a tablet would be Button4 on xorg.conf, and button 8 on xsetwacom.
/etc/X11/xorg.conf.d/10-tablet.conf
Section "InputClass"
    [...]
    # Setting up buttons (preferably choose the correct button order, so the topmost key is mapped to 10 and so on)
    Option "Button1" "10"
    Option "Button2" "11"
    Option "Button3" "12"
    Option "Button4" "13"
EndSection

You can then use #Execute custom commands to map these buttons to other commands, or other keys using automation tools.

Tip: You can look at your tablet's layout SVG for an overview of its button layout. Find out the filename with a recursive grep search for the tablet name reported by xsetwacom list devices:
$ grep -rl 'Wacom Bamboo 16FG 4x5' /usr/share/libwacom/*.tablet
/usr/share/libwacom/bamboo-16fg-s-t.tablet
In this case the respective layout SVG is /usr/share/libwacom/layouts/bamboo-16fg-s-t.svg. The letters in the SVG correspond to the button numbers: A=1, B=2, C=3, ...
Letting libinput take control of the touchpad

As the wacom touchpad normally does not support inverted scrolling it can be desirable to use libinput to take control of the touchpad.

To do this create /etc/X11/xorg.conf.d/90-libinput-wacom.conf with the following contents:

Section "InputClass"
    Identifier "libinput Wacom touchpad override class"
    MatchUSBID "056a:*"
    MatchDevicePath "/dev/input/event*"
    MatchIsTouchpad "true"
    Driver "libinput"
EndSection

Reboot afterwards.

See [3] for a more detailed explanation.

LEDs

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

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

Setting the Intuos OLEDs can be done using i4oledAUR.

Application-specific configuration

Xournal++

Xournal++ (xournalpp) is the successor to xournalAUR and fully supports pressure sensitive stylus input. For configurations, see Input Devices and Stylus in the Edit > Preferences menu.

Alchemy

AlchemyAUR (and Alchemy-gitAUR) needs the JPen library to manage stylus pressure. See Digimend documentation about Alchemy.

Blender

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

DrawPile

drawpileAUR is a drawing whiteboard (network collaborative drawing tool). It manages pressure level on its drawing tools. In the "Freehand" box, a brush icon at the right of each parameter needs to be activated to have pressure management on this parameter. There is only a general curve on the bottom right of the window ("Input" box), that can be applied to stylus, distance and velocity.

GIMP

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

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

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

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

Inkscape

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

MyPaint

mypaint (extra mypaint-brushes, mypaint-brushes1, note that these brushes are also used on other applications using libmypaint) is a general bitmap drawing application. Its advanced brush settings have been adopted by GIMP, Krita, OpenToonz, and few others and is in integration process in Pencil2D. It is a very light tool that can be used in low-end computers.

In MyPaint, there are general settings about tablets and per brush specific parameters (you can set your own brushes).

General settings are in menu Edit > Edit Preferences.

  • The "Pressure" tab is for global pressure mapping.
  • The "Devices" tab displays the list of detected input devices with little general information. Each one can be assigned to specific tasks by clicking on their parameter in the "Use for..." (Any Task, Ignore, Non-painting tasks, Navigation only) and "Scroll..." (zoom, pan) columns.
  • The "Buttons" tab allows to assign buttons to specific functions.

Brush settings can be accessed by the brush context menu (right click on a tool). You can duplicate an existing tool before making modification, and so, keep the tool with its default preset ("clone" in the context menu).

  • To edit brush settings, simply use the Edit Brush settings from the context menu on brush. There are several settings, see the MyPaint documentation for a full description or play with them to discover what they do.

OpenToonz

opentoonz is a professional 2D animation tool, first developed by Studio Ghibli, and used by Ghibli and Folimage among others.

Stylus pressure is managed by default on default tools. There is a checkbox Pressure at the second line, at top right, that can be unchecked to disable pressure management. Several presets can be selected by the menu button at right of Preset, and added or deleted with the +/- buttons.

libmypaint brushes can be chosen in the Basics mode (upper right tabs), and then in the column between the drawing area and the exposure sheet: at the "[LEVEL]: Palette" button, click on "Raster" tab to view the brushes. The brushes can be edited with MyPaint and used in OpenToonz.

Pencil2D

pencil2d is a light 2D animation tool. Each tool that can use the pressure parameter (Pencil, Eraser, Pen and Brush) has a checkbox called "Pressure" that is checked by default to use stylus pressure parameter.

There is also a git version, pencil2d-mypaint-gitAUR (already a very stable branch), that contains the libMyPaint engine and Deevad set of MyPaint Brushes. A subset of the brush settings with pressure management can be set by clicking on the brush and choosing edit.

Krita

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

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

Note: Krita binaries provided by upstream carry several patches for Qt and other dependencies. The krita package does not include these patches, so it is possible that it may have some bugs that are not present in the official Krita binary releases. If you experience issues with Arch Linux's krita package, try reproducing the problem with Krita's AppImage release first.

Wayland and libinput

When you are using Wayland, graphics tablets are handled by libinput. In this scenario, configuration through xsetwacom is not possible. You can only configure your tablet through the settings that are available in your desktop environment or Wayland compositor.

Tip:
  • input-remapper-gitAUR can remap tablet buttons when using libinput or Wayland.
  • OpenTabletDriver may also be used if your Wayland environment offers no tablet options. See #Alternative drivers.

Sway

Map to output

This has the same effect of #Mapping the tablet to a monitor, meaning that the tablet will not have an exact aspect ratio match with the output.

Add the following line to your sway configuration file:

~/.config/sway/config
input Identifier map_to_output Display-Name

Where Identifier is the identifier of your tablet, as read by swaymsg -t get_inputs:

$ swaymsg -t get_inputs
Input device: Wacom One by Wacom S Pen
 Type: Tablet tool
 Identifier: 1386:890:Wacom_One_by_Wacom_S_Pen
 Product ID: 890
 Vendor ID: 1386
 Libinput Send Events: enabled
 ...
Tip: If you want to apply this mapping to any tablets you connect, you may use type:tablet_pad and type:tablet_tool instead of the device identifier.

And Display-Name is the identifier of your output, as read by swaymsg -t get_outputs:

$ swaymsg -t get_outputs
 Output HDMI-A-1 'Samsung Electric Company ...'
 Current mode: 1920x1080 @ 60.000 Hz
 Position: 0,0
 Scale factor: 1.000000
 Scale filter: nearest
 ...

Map to output region

This has the same effect as #Reducing the screen area width. First, you need to figure out the active area for your tablet. Run:

# libinput debug-tablet

Move your tablet stylus to the bottom right corner to get the maximum ABS_X and ABS_Y values, then add the following line to your sway configuration:

~/.config/sway/config
input Identifier map_to_region X Y width output_height

Where width is calculated by output_height * (ABS_X / ABS_Y), and X and Y are the starting coordinates of the region.

For example, if you have two 1920x1080 monitors side-by-side, and you want to map your tablet to a region in the rightmost monitor, use the following line:

~/.config/sway/config
input Identifier map_to_region 1920 0 width 1080

Troubleshooting

Device not recognized by the kernel

Some tablets may be too recent to be supported by your current kernel. On Wacom devices, this is represented by a "Unknown device_type" message in your dmesg output. In this scenario, it is possible that the out-of-tree version of the drivers have support for your tablet before it is upstreamed to the kernel.

Install input-wacom-dkms-gitAUR if you have a Wacom tablet, or digimend-kernel-drivers-dkms-gitAUR if you have a tablet from another manufacturer. You will also need the headers for your current kernel, see DKMS for more information.

Tablet recognized but xsetwacom and similar tools do not display it

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

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

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

Manual setup

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

USB-devices

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

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

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

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

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

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

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

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

Static setup

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

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

Xorg configuration

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

An example configuration for a Volito2 might look like this

Section "InputDevice"
    Driver        "wacom"
    Identifier    "stylus"
    Option        "Device"       "/dev/input/wacom"   # or the corresponding event?? for a static setup
    Option        "Type"         "stylus"
    Option        "USB"          "on"                 # USB ONLY
    Option        "Mode"         "Relative"           # other option: "Absolute"
    Option        "Vendor"       "WACOM"
    Option        "tilt"         "on"  # add this if your tablet supports tilt
    Option        "Threshold"    "5"   # the official linuxwacom howto advises this line
EndSection
Section "InputDevice"
    Driver        "wacom"
    Identifier    "eraser"
    Option        "Device"       "/dev/input/wacom"   # or the corresponding event?? for a static setup
    Option        "Type"         "eraser"
    Option        "USB"          "on"                  # USB ONLY
    Option        "Mode"         "Relative"            # other option: "Absolute"
    Option        "Vendor"       "WACOM"
    Option        "tilt"         "on"  # add this if your tablet supports tilt
    Option        "Threshold"    "5"   # the official linuxwacom howto advises this line
EndSection
Section "InputDevice"
    Driver        "wacom"
    Identifier    "cursor"
    Option        "Device"       "/dev/input/wacom"   # or the corresponding event?? for a static setup
    Option        "Type"         "cursor"
    Option        "USB"          "on"                  # USB ONLY
    Option        "Mode"         "Relative"            # other option: "Absolute"
    Option        "Vendor"       "WACOM"
EndSection

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

Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "CorePointer"
    Option      "Device"             "/dev/input/mouse_udev"
    Option      "SendCoreEvents"     "true"
    Option      "Protocol"           "IMPS/2"
    Option      "ZAxisMapping"       "4 5"
    Option      "Buttons"            "5"
EndSection

Add this to the ServerLayout section

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

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

InputDevice    "Mouse0" "CorePointer"

to

InputDevice    "Mouse1" "CorePointer"

Mouse moving erratically due to proximity sensor

You can disable the mouse jumping due to a proximity sensor detecting a non-existing stylus. You can find your device with xinput --list, and after spotting the stylus, disable it with:

$ xinput disable device

This only works if you are not currently using a stylus.

Touch arbitration not working on graphic tablets

If you are using libinput, graphic tablets that have a stylus and a touchscreen might not support touch arbitration out of the box because the devices are not grouped into the same libinput device group. You can fix this by writing udev rules. For example, if the touchscreen is recognized with 0001:000a and the Wacom tablet with 0002:000b, you can create /etc/udev/rules.d/80-touch-arbitration.rules as a rule that groups these devices into the group f865e87b:

/etc/udev/rules.d/80-touch-arbitration.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0001", ATTRS{idProduct}=="000a", ENV{LIBINPUT_DEVICE_GROUP}="f865e87b"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0002", ATTRS{idProduct}=="000b", ENV{LIBINPUT_DEVICE_GROUP}="f865e87b"

Reporting issues with non-Wacom tablets

If you have a non-Wacom tablet that has missing features, you can report a tablet test to DIGImend drivers authors in order to include its functionalities into the driver. The DIGImend diagnostic tools are available on the AUR as uclogic-toolsAUR. You will also need the lsusb and usbhid-dump programs available in usbutils.

See also