XP-Pen display tablets on Linux
I recently got an XP-Pen Artist 12 Pro display tablet for my birthday and an immediate question for me was: will in work in Linux? Short answer: yes!
There is not much you need to do and pressure sensitivity works out of the box. It is like another monitor and you only need to adjust the position relative to your other display(s). You can either use your settings or change it via a command line tool called "xrandr". Since I often change the way I use my display setup, I am using scripts to do so. Here is an example of the relevant lines:
xrandr --output DP-0 --auto --left-of DP-1
xrandr --output DP-1 --mode 1920x1080 --rate 120 --right-of DP-0 --above HDMI-1 --primary
xrandr --output HDMI-0 --auto --below DP-1
But you also need to configure the stylus pen a wee bit. By default the pen would not be restricted to the display tablet and therefore moves across all screens while you move your pen on your tablet. The relevant lines in my case are - you can also use the ID but since it may change according to the connected equipment I chose to use the name:
xinput map-to-output "UGTABLET 11.6 inch PenDisplay Mouse" HDMI-0
xinput map-to-output "UGTABLET 11.6 inch PenDisplay Pen (0)" HDMI-0
Your pen might be called slightly different - just find your entry using the following line:
xinput --list
My complete script to set up the notebook on the left, my main monitor in center and my tablet below the main monitor with the stylus correctly configured:
#!/bin/bash
# set-up Dell G5 notebook screen (left)
xrandr --output DP-0 --auto --left-of DP-1
# set-up Dell S2419HGF monitor (center)
xrandr --output DP-1 --mode 1920x1080 --rate 120 --right-of DP-0 --above HDMI-1 --primary
# set-up XP-Pen Artist 12 Pro (below)
xrandr --output HDMI-0 --auto --below DP-1
# set up the stylus pen
xinput map-to-output "UGTABLET 11.6 inch PenDisplay Mouse" HDMI-0
xinput map-to-output "UGTABLET 11.6 inch PenDisplay Pen (0)" HDMI-0