Wanting to use an XP-Pen Tablet in KDE under wayland


I just got Garuda linux (KDE Dragonized Gaming Edition) installed, and my drawing tablet I'm attempting to see if I can get working under wayland is the XP-Pen Innovator 16. I Installed the xp-pen-tablet package from the AUR via the paru package manager, and if information about the specs of my computer is needed it's located in the screenshot below. One last thing that the screenshot won't inform you however is that I'm also running a dual monitor setup.

Basically my issue is that my stylus is incorrectly proportioned to my tablet screen causing it to be offset and severely misaligned from the actual pointer's location whenever I try to draw on the screen. This problem doesn't exist on X11 (though there are other crippling problems X11 currently gets me), and it also seems to go away if I use solely my xp pen tablet as the only monitor/screen and don't connect my second monitor? But on wayland at least, if I run it with both monitors, that causes the incorrect proportion/offset problem with my stylus and the pointer on the screen.

(I'm willing to record this problem and post as gif if you feel that'll help as well)

Is anyone else running an xp-pen tablet on arch with a setup similar like mine on wayland (plasma)? Or even happen to use the exact same tablet I'm using with this setup, and experiencing any problems similar to this yourself? Or is there something I'm missing that I should do to attempt to fix this? I've tried playing around with the xp-pen menu and setting the screen/pen area there but to no avail.

Output from garuda-inxi

/home/lotusism〉garuda-inxi                                                                                                                                                                                   07/27/2022 03:21:54 AM
Kernel: 5.18.14-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=8172b417-d74f-4d93-a2e8-92cf0cd31db4 rw [email protected]
nvidia-drm.modeset=1 quiet quiet splash rd.udev.log_priority=3
resume=UUID=bff48acc-54b9-44d8-961d-beafae478a35 loglevel=3
Desktop: KDE Plasma v: 5.25.3 tk: Qt v: 5.15.5 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Type: Desktop Mobo: ASUSTeK model: TUF B450M-PRO GAMING v: Rev X.0x
serial: <superuser required> UEFI: American Megatrends v: 2006
date: 11/13/2019
Device-1: hidpp_battery_0 model: Logitech MX Ergo Multi-Device Trackball
serial: <filter> charge: 50% (should be ignored) rechargeable: yes
status: N/A
Info: model: AMD Ryzen 7 3700X bits: 64 type: MT MCP arch: Zen 2 gen: 3
built: 2020-22 process: TSMC n7 (7nm) family: 0x17 (23)
model-id: 0x71 (113) stepping: 0 microcode: 0x8701013
Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
L3: 32 MiB desc: 2x16 MiB
Speed (MHz): avg: 4049 high: 4050 min/max: 2200/4979 boost: enabled
scaling: driver: acpi-cpufreq governor: performance cores: 1: 4050 2: 4049
3: 4049 4: 4050 5: 4050 6: 4050 7: 4050 8: 4050 9: 4050 10: 4050 11: 4049
12: 4050 13: 4046 14: 4046 15: 4048 16: 4049 bogomips: 129591
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: mmio_stale_data status: Not affected
Type: retbleed
mitigation: untrained return thunk; SMT enabled with STIBP protection
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2
mitigation: Retpolines, IBPB: conditional, STIBP: always-on, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Device-1: NVIDIA GM204 [GeForce GTX 980] vendor: ASUSTeK driver: nvidia
v: 515.57 alternate: nouveau,nvidia_drm non-free: 515.xx+
status: current (as of 2022-06) arch: Maxwell process: TSMC 28nm
built: 2014-19 pcie: gen: 3 speed: 8 GT/s lanes: 16 ports: active: none
off: DP-1,HDMI-A-1 empty: DP-2,DP-3,DVI-I-1 bus-ID: 08:00.0
chip-ID: 10de:13c0 class-ID: 0300
Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
compositor: kwin_x11 driver: X: loaded: nvidia unloaded: modesetting
alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch
display-ID: :0 screens: 1
Screen-1: 0 s-res: 3840x3240 s-dpi: 144 s-size: 677x571mm (26.65x22.48")
s-diag: 886mm (34.87")
Monitor-1: DP-1 note: disabled pos: primary,bottom model: ID160F
serial: <filter> built: 2020 res: 1920x1080 hz: 60 dpi: 142 gamma: 1.2
size: 344x193mm (13.54x7.6") diag: 394mm (15.5") ratio: 16:9 modes:
max: 1920x1080 min: 640x480
Monitor-2: HDMI-A-1 mapped: HDMI-0 note: disabled pos: primary,top
model: Samsung serial: <filter> built: 2020 res: 3840x2160 hz: 60 dpi: 52
gamma: 1.2 size: 1872x1053mm (73.7x41.46") diag: 1388mm (54.6")
ratio: 16:9 modes: max: 3840x2160 min: 640x480
OpenGL: renderer: NVIDIA GeForce GTX 980/PCIe/SSE2 v: 4.6.0 NVIDIA 515.57
direct render: Yes
Device-1: NVIDIA GM204 High Definition Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel bus-ID: 3-2:3 pcie: chip-ID: 19f7:0003
gen: 3 class-ID: 0300 speed: 8 GT/s lanes: 16 bus-ID: 08:00.1
chip-ID: 10de:0fbb class-ID: 0403
Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 0a:00.4 chip-ID: 1022:1487 class-ID: 0403
Device-3: RODE Microphones NT-USB type: USB
driver: hid-generic,snd-usb-audio,usbhid
Sound Server-1: ALSA v: k5.18.14-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 16.1 running: no
Sound Server-3: PipeWire v: 0.3.56 running: yes
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: ASUSTeK PRIME B450M-A driver: r8169 v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 05:00.0 chip-ID: 10ec:8168
class-ID: 0200
IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-1: ASUSTek ASUS USB-BT500 type: USB driver: btusb v: 0.8
bus-ID: 1-1:2 chip-ID: 0b05:190e class-ID: e001 serial: <filter>
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Local Storage: total: 1.4 TiB used: 25.25 GiB (1.8%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:5 vendor: Silicon Power
model: SPCC M.2 PCIe SSD size: 953.87 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 42A4SANA temp: 48.9 C scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Samsung
model: MZVLW512HMJP-000L2 size: 476.94 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 6L1QCXY7 temp: 50.9 C scheme: GPT
ID-1: / raw-size: 933.83 GiB size: 933.83 GiB (100.00%)
used: 25.25 GiB (2.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:7
ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
used: 608 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p3 maj-min: 259:8
ID-3: /home raw-size: 933.83 GiB size: 933.83 GiB (100.00%)
used: 25.25 GiB (2.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:7
ID-4: /var/log raw-size: 933.83 GiB size: 933.83 GiB (100.00%)
used: 25.25 GiB (2.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:7
ID-5: /var/tmp raw-size: 933.83 GiB size: 933.83 GiB (100.00%)
used: 25.25 GiB (2.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:7
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.55 GiB used: 4.2 MiB (0.0%)
priority: 100 dev: /dev/zram0
ID-2: swap-2 type: partition size: 19.53 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p1 maj-min: 259:6
System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 63 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 35%
Processes: 324 Uptime: 37m wakeups: 15 Memory: 15.56 GiB
used: 4.1 GiB (26.4%) Init: systemd v: 251 default: graphical
tool: systemctl Compilers: gcc: 12.1.0 clang: 14.0.6 Packages: pacman: 2049
lib: 563 Shell: nu default: Bash v: 5.1.16 running-in: yakuake inxi: 3.3.19
Garuda (2.6.5-1):
System install date:     2022-07-26
Last full system update: 2022-07-27
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       Probably (Run as root to verify)
Snapshots:               Snapper
Failed units:

It's a small miracle you can boot to a Wayland session at all with an Nvidia driver. There has been some progress recently, but my understanding is Wayland is still badly supported/broken on Nvidia hardware.

Unless someone chimes in with some advice for lifting the curse from your Nvidia/Wayland combo, addressing these crippling problems might be a better area of focus.


Also use

it's closed source.

# Maintainer: Mikhail Velichko <efklid at gmail dot com>
# Contributor: Moon Sungjoon <sumoon at seoulsaram dot org>
# Contributor: Hurstel Alexandre <alexandre at hurstel dot eu>
# Contributor: Tobias Manske <aur at rad4day dot de>

pkgdesc="XP-Pen (Official) Linux utility (New UI driver)"


package() {
       cd $srcdir
       ar x *.deb
       bsdtar xf data.tar.xz -C $pkgdir
       cp -r $pkgdir/lib/* $pkgdir/usr/lib
       rm -r $pkgdir/lib
       chmod 755 $pkgdir/usr/
       chmod 755 $pkgdir/usr/lib/
       chmod 755 $pkgdir/usr/share/
       chmod 755 $pkgdir/usr/share/applications/
       chmod 755 $pkgdir/usr/share/icons/
       #Moved from the official post_install() script to avoid errors during installation/updates
       chmod 777 $pkgdir/usr/lib/pentablet/conf/xppen/
       chmod 777 $pkgdir/usr/lib/pentablet/lib/
       chmod 777 $pkgdir/usr/lib/pentablet/platforms/
       #Minimize GUI on autostartup
       sed -re 's/(^Exec=\/.+)/\1 \/mini/gi' -i ${pkgdir}/etc/xdg/autostart/xppentablet.desktop

So, when you use a single monitor the tablet is mapped correctly to the single monitor, and when you use two monitors then it is mapping the tablet to the full extent of the two displays?

If so, this should be something configured via the tablet software, where you can choose how it deals with multiple displays.

Of course, if the tablet software doesn't know what Wayland is then the main options are 1) contact the developers and ask for Wayland support and 2) go back to using Xorg.


Wow, so first off I want to say, thanks so much for the really quick response guys! :grinning:

Secondly, at least on this front what I've found is that whenever the xp-pen application I installed from aur is active in the system tray while on wayland, then that's where my pen-being-offset problem in my op starts. Once I exit out of that however, everything is somehow fine with my tablet, the offset is gone and I can write normally (albeit I do notice a bit more of a gap between my pen and the cursor compared to windows, but this is probably more of a calibration issue than anything, and is potentially it's own discussion).

So in short, although I'm going to try and confirm this with xp-pen's support as per SGS's and jonathon's suggestion, my thoughts are that perhaps the official driver from xp-pen is at the moment only intended for xorg and not quite for wayland yet? Although I can't quite answer why it works out-of-the-box when I exit out of the xp-pen application in the system tray?

It's a small miracle you can boot to a Wayland session at all with an Nvidia driver. There has been some progress recently, but my understanding is Wayland is still badly supported/broken on Nvidia hardware.

Absolutely, it's good to keep this perspective in mind, and I appreciate the reminder! I can always fallback to windows if I need something done (which is why I'm super thankful I found an extra nvme ssd lying around in the house going unused on that note!), so this little wayland adventure with nvidia hardware I'm doing I feel I should treat as more of an experiment than anything, and whatever I can do (regardless of how small) to help get better support for people with this similar setup, since I imagine the people working on getting better support need some people to use it and report back.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.