$ xinput --list

WARNING: running xinput against an Xwayland server. See the xinput man page for details.
 Virtual core pointer                          id=2    [master pointer  (3)]
    Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
    xwayland-pointer:10                       id=6    [slave  pointer  (2)]
    xwayland-relative-pointer:10              id=7    [slave  pointer  (2)]
    xwayland-pointer-gestures:10              id=8    [slave  pointer  (2)]
    xwayland-touch:10                         id=10   [slave  pointer  (2)]
    xwayland-tablet stylus:10                 id=11   [slave  pointer  (2)]
    xwayland-tablet eraser:10                 id=12   [slave  pointer  (2)]
    xwayland-tablet cursor:10                 id=13   [slave  pointer  (2)]
    xwayland-tablet-pad:10                    id=14   [slave  pointer  (2)]
 Virtual core keyboard                         id=3    [master keyboard (2)]
     Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
     xwayland-keyboard:10                      id=9    [slave  keyboard (3)]

So we see that xinput --list points its manpage to talk about wayland, which has a section saying...

1
2
3
4
5
6
XWAYLAND
Xwayland is an X server that uses a Wayland Compositor as backend. Xwayland acts as translation layer between the X protocol and the Wayland protocol but does not have direct access to the hardware. The X Input Extension devices created by Xwayland ("xwayland- pointer", "xwayland-keyboard", etc.) map to the Wayland protocol devices, not to physical devices.

 These X Input Extension devices are only visible to other X clients connected to the same Xwayland process. Changing properties on Xwayland devices only affects the behavior of those clients. For example, disabling an Xwayland device with xinput does not disable the device in Wayland-native applications. Other changes may not have any effect at all.

 In most instances, using xinput with an Xwayland device is indicative of a bug in a shell script and xinput will print a warning. Use the Wayland Compositor's native device configu‐ ration methods instead.

I found these links, but can't remember how.

https://wayland.freedesktop.org/libinput/doc/latest/tablet-support.html

https://forum.manjaro.org/t/support-for-pressure-sensitive-tablets-in-wayland/90469/2

https://lists.freedesktop.org/archives/wayland-devel/2014-June/015605.html

https://www.reddit.com/r/ObsidianMD/comments/1hbx3qi/fix_for_pressure_sensitivity_not_working_on/

Installing libinput-tools gives access to a cli tool that prints debug stuff, but does not reflect any additional configuration done by a compositor or desktop environment. (warning, source for this is deepseek LLM)

The following showed a fullscreen popup with a debug visualization showing pressure support.
$ libinput debug-gui

Failed to open /dev/input/event4 (Permission denied)
Failed to open /dev/input/event12 (Permission denied)
Failed to open /dev/input/event13 (Permission denied)
Failed to open /dev/input/event14 (Permission denied)
Failed to open /dev/input/event15 (Permission denied)
Failed to open /dev/input/event23 (Permission denied)
Failed to open /dev/input/event25 (Permission denied)
Failed to open /dev/input/event16 (Permission denied)
Failed to open /dev/input/event10 (Permission denied)
Failed to open /dev/input/event11 (Permission denied)
Failed to open /dev/input/event9 (Permission denied)
Failed to open /dev/input/event19 (Permission denied)
Failed to open /dev/input/event8 (Permission denied)
Failed to open /dev/input/event18 (Permission denied)
info: event2 Power Button                   added
info: event0 Power Button                   added
info: event1 Lid Switch                     added
info: event21 DP-1                           added
info: event24 Razer Razer DeathAdder V3 Pro Keyboard added
info: event26 Razer Razer DeathAdder V3 Pro  added
info: event27 ZSA Technology Labs Ergodox EZ Keyboard added
info: event5 Valve Software Steam Controller added
info: event6 Valve Software Steam Controller added
info: event3 AT Translated Set 2 keyboard   added
info: event17 Huion keyboard                 added
info: event7 HUION 256C PEN STYLUS          added

$ sudo libinput debug-gui

(process:42893): Gtk-WARNING **: 13:50:03.895: Unable to acquire session bus: Error spawning command line “dbus-launch --autolaunch=14df5f8903b64a818dc301932a1a5ec7 --binary-syntax --close-stderr”: Child process exited with code 1
info: event2 Power Button                   added
info: event4 Video Bus                      added
info: event0 Power Button                   added
info: event1 Lid Switch                     added
info: event21 DP-1                           added
info: event23 Razer Razer DeathAdder V3 Pro  added
info: event24 Razer Razer DeathAdder V3 Pro Keyboard added
info: event26 Razer Razer DeathAdder V3 Pro  added
info: event27 ZSA Technology Labs Ergodox EZ Keyboard added
info: event5 Valve Software Steam Controller added
info: event6 Valve Software Steam Controller added
info: event16 acp5x Headset Jack             added
info: event10 FTS3528:00 2808:1015           added
info: event11 FTS3528:00 2808:1015 UNKNOWN   added
info: event3 AT Translated Set 2 keyboard   added
info: event17 Huion keyboard                 added
info: event19 Huion Mouse                    added
info: event7 HUION 256C PEN STYLUS          added
info: event8 Huion Tablet                   added
info: event18 Huion Tablet                   added

This prints an updating TUI tracking tablet data.
$ libinput debug-tablet

When not pressing

Device: FTS3528:00 2808:1015 UNKNOWN (event11)
No tool in proximity
libinput:
tip: up
  x:                   4.37 [-------------------------------------|------------------------------]
  y:                   2.71 [-------------------------------------|------------------------------]
  tilt x:              4.27 [-----------------------------------|--------------------------------]
  tilt y:              9.60 [-------------------------------------|------------------------------]
  dist:                0.00 [|-------------------------------------------------------------------]
  pressure:            0.00 [|-------------------------------------------------------------------]
  rotation:            0.00 [|-------------------------------------------------------------------]
  slider:              0.00 [----------------------------------|---------------------------------]
  buttons:
evdev:
  ABS_X:               0.00 [|-------------------------------------------------------------------]
  ABS_Y:               0.00 [|-------------------------------------------------------------------]
  ABS_Z:               0.00 [|-------------------------------------------------------------------]
  ABS_TILT_X:          0.00 [|-------------------------------------------------------------------]
  ABS_TILT_Y:          0.00 [|-------------------------------------------------------------------]
  ABS_DISTANCE:        0.00 [|-------------------------------------------------------------------]
  ABS_PRESSURE:        0.00 [|-------------------------------------------------------------------]
  buttons:

$ groups

deck sys network rfkill users video uucp storage lp audio wheel plover

$ libinput list-devices

Device:                  Power Button
Kernel:                  /dev/input/event2
Id:                      host:0000:0001
Group:                   1
Seat:                    seat0, default
Capabilities:            keyboard 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             n/a
Nat.scrolling:           n/a
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          none
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          n/a
Rotation:                0.0
Area rectangle:          n/a

Device:                  Power Button
Kernel:                  /dev/input/event0
Id:                      host:0000:0001
Group:                   2
Seat:                    seat0, default
Capabilities:            keyboard 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             n/a
Nat.scrolling:           n/a
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          none
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          n/a
Rotation:                0.0
Area rectangle:          n/a

Device:                  Lid Switch
Kernel:                  /dev/input/event1
Id:                      host:0000:0005
Group:                   3
Seat:                    seat0, default
Capabilities:            switch
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             n/a
Nat.scrolling:           n/a
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          none
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          n/a
Rotation:                0.0
Area rectangle:          n/a

Device:                  DP-1
Kernel:                  /dev/input/event21
Id:                      <unknown>:0000:0000
Group:                   4
Seat:                    seat0, default
Capabilities:            keyboard pointer 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             disabled
Nat.scrolling:           disabled
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          *button
Scroll button:           KEY_RESERVED
Scroll button lock:      disabled
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          flat *adaptive custom
Rotation:                n/a
Area rectangle:          n/a

Device:                  Razer Razer DeathAdder V3 Pro Keyboard
Kernel:                  /dev/input/event24
Id:                      usb:1532:00b6
Group:                   5
Seat:                    seat0, default
Capabilities:            keyboard pointer 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             n/a
Nat.scrolling:           disabled
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          none
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          n/a
Rotation:                0.0
Area rectangle:          n/a

Device:                  Razer Razer DeathAdder V3 Pro
Kernel:                  /dev/input/event26
Id:                      usb:1532:00b6
Group:                   5
Seat:                    seat0, default
Capabilities:            keyboard 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             n/a
Nat.scrolling:           n/a
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          none
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          n/a
Rotation:                0.0
Area rectangle:          n/a

Device:                  ZSA Technology Labs Ergodox EZ Keyboard
Kernel:                  /dev/input/event27
Id:                      usb:3297:4976
Group:                   6
Seat:                    seat0, default
Capabilities:            keyboard pointer 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             n/a
Nat.scrolling:           disabled
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          none
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          n/a
Rotation:                0.0
Area rectangle:          n/a

Device:                  Valve Software Steam Controller
Kernel:                  /dev/input/event5
Id:                      usb:28de:1205
Group:                   7
Seat:                    seat0, default
Capabilities:            pointer 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             disabled
Nat.scrolling:           disabled
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          button
Scroll button:           BTN_RIGHT
Scroll button lock:      disabled
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          flat *adaptive custom
Rotation:                0.0
Area rectangle:          n/a

Device:                  Valve Software Steam Controller
Kernel:                  /dev/input/event6
Id:                      usb:28de:1205
Group:                   7
Seat:                    seat0, default
Capabilities:            keyboard 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             n/a
Nat.scrolling:           n/a
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          none
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          n/a
Rotation:                0.0
Area rectangle:          n/a

Device:                  AT Translated Set 2 keyboard
Kernel:                  /dev/input/event3
Id:                      serial:0001:0001
Group:                   8
Seat:                    seat0, default
Capabilities:            keyboard 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             n/a
Nat.scrolling:           n/a
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          none
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          n/a
Rotation:                0.0
Area rectangle:          n/a

Device:                  Huion keyboard
Kernel:                  /dev/input/event17
Id:                      usb:256c:ffff
Group:                   9
Seat:                    seat0, default
Capabilities:            keyboard 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             n/a
Nat.scrolling:           n/a
Middle emulation:        n/a
Calibration:             n/a
Scroll methods:          none
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          n/a
Rotation:                0.0
Area rectangle:          n/a

Device:                  HUION 256C PEN STYLUS
Kernel:                  /dev/input/event7
Id:                      usb:256c:eeed
Group:                   10
Seat:                    seat0, default
Size:                    8x5mm
Capabilities:            tablet 
Tap-to-click:            n/a
Tap-and-drag:            n/a
Tap button map:          n/a
Tap drag lock:           n/a
Left-handed:             disabled
Nat.scrolling:           n/a
Middle emulation:        n/a
Calibration:             identity matrix
Scroll methods:          none
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           none
Clickfinger button map:  n/a
Disable-w-typing:        n/a
Disable-w-trackpointing: n/a
Accel profiles:          none
Rotation:                n/a
Area rectangle:          (0.00, 0.00) - (1.00, 1.00)


I asked deepseek if using libinput was the correct approach for a painting app. It explained that x11 consumes libinput devices via the xf86-input-libinput driver, and that they are thus exposed over the x11 protocol, not via libinput.

It went on to talk about how you would have to write an abstraction layer that handled both cases, and recommended using gtk, qt, or similar, where such wrapping has already been done. It pointed towards https://wayland.app/protocols/tablet-v2.

I was confused, and asked a follow up question. Deepseek replied that libinput is the driver that talks to the hardware, and zwp_tablet_v2 is how applications then talk to this hardware. I checked that OurPaint is running inside of XWayland by running XEyes and observing that the eyes move when I hover over the OurPaint window (the eyes do not move when hovering over wayland native applications.)

I asked Deepseek:
"The application in question uses its own custom windowing and UI framework. It seems to be running inside XWayland when launched in a wayland environment. The pressure support is not working for my tablet, which shows pressure information inside of libinput-tools. The question I wish to solve is how to expose that information to the x native application in a way it understands."

### 1. Understanding the Data Flow (Where the Pressure Gets Lost)

To fix this, you need to understand the journey of a pen stroke from your tablet to your application.

1. **Hardware -> Kernel:** The tablet sends a raw USB event.

2. **Kernel -> libinput:** The compositor (e.g., GNOME Mutter, KDE KWin, Sway) reads the event via `libinput`. Your `libinput debug-events` command confirms this layer is working [](https://unix.stackexchange.com/questions/696514/configuring-xp-pen-graphics-tablet-on-linux-specifically-wayland).

3. **libinput -> Wayland Protocol:** The compositor translates the libinput event into a Wayland protocol message. For tablets, this is the `zwp_tablet_v2` protocol.

4. **Wayland -> XWayland:** Since your application is X11-based, it cannot understand the `zwp_tablet_v2` protocol. The event is routed to **XWayland** (the X server running as a Wayland client). XWayland acts as a translator.

5. **XWayland -> XInput2:** XWayland must translate the Wayland tablet event into an **XInput2** event that your X11 application can receive. This includes populating the X11 event structure with pressure, tilt, and other axes [](https://gitlab.gnome.org/Archive/clutter/-/blob/f6da5ea616b114c80708817c51b20abb8f8a8304/clutter/x11/clutter-device-manager-xi2.c)[](https://gitlab.gnome.org/Archive/clutter/-/commits/f6da5ea616b114c80708817c51b20abb8f8a8304/clutter/x11/clutter-device-manager-xi2.c).

I tried to clone and build the source, but the my CMake binary is too new, so support for CMake < 3.5 has been removed:

OurPaint on  master via C v15.2.1-gcc via △ v4.2.3 via 🐍 v3.14.3
$  cmake .
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

Passing that, I see I am missing lagui.
I clone, run cmake passing that -D flag, and run make.
I go back to OurPaint, and try again.

OurPaint on  master [?] via C v15.2.1-gcc via  v4.2.3 via 🐍 v3.14.3
>  cmake . -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -Dlagui_DIR=../LaGUI/
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Error at /h/Code/external/wellobserve/LaGUI/lagui-config.cmake:4 (include):
  include could not find requested file:

    /h/Code/external/wellobserve/LaGUI/lagui-targets.cmake
Call Stack (most recent call first):
  CMakeLists.txt:26 (find_package)


-- Found OpenGL: /usr/lib/libOpenGL.so
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found Freetype: /usr/lib/libfreetype.so (found version "2.14.1")
-- Found GLEW: /usr/include (found version "2.3.1")
-- Found LCMS2: /usr/lib/liblcms2.so
-- Found ZLIB: /usr/lib/libz.so (found version "1.3.1")
-- Found PNG: /usr/lib/libpng.so (found version "1.6.55")
-- Found LuaJIT: /usr/lib/libluajit-5.1.so
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Warning (dev) at CMakeLists.txt:131 (install):
  Policy CMP0177 is not set: install() DESTINATION paths are normalized.  Run
  "cmake --help-policy CMP0177" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:133 (install):
  Policy CMP0177 is not set: install() DESTINATION paths are normalized.  Run
  "cmake --help-policy CMP0177" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!

At this point I give up trying to build because I am not experienced with C, but I find the logic for pressure in la_kernel.c, where the strings are compared.

I go back to xinput to see which devices show my tablet input.

>  xinput list
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ xwayland-pointer:10                       id=6    [slave  pointer  (2)]
⎜   ↳ xwayland-relative-pointer:10              id=7    [slave  pointer  (2)]
⎜   ↳ xwayland-pointer-gestures:10              id=8    [slave  pointer  (2)]
⎜   ↳ xwayland-touch:10                         id=10   [slave  pointer  (2)]
⎜   ↳ xwayland-tablet stylus:10                 id=11   [slave  pointer  (2)]
⎜   ↳ xwayland-tablet eraser:10                 id=12   [slave  pointer  (2)]
⎜   ↳ xwayland-tablet cursor:10                 id=13   [slave  pointer  (2)]
⎜   ↳ xwayland-tablet-pad:10                    id=14   [slave  pointer  (2)]
Virtual core keyboard                         id=3    [master keyboard (2)]
Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
xwayland-keyboard:10                      id=9    [slave  keyboard (3)]

I try with xinput test 2 and get an error, and xinput test 12, 13, and 14 don't work. So only the "stylus" shows data with xinput test 11.

When testing the stylus, many lines are printed like below

motion a[0]=168080 a[1]=155217 a[2]=0 a[3]=56 a[4]=-39 a[5]=0

a[2] is the pressure. a[3] is x tilt, -64 (pen looks like --> ) to 63 (pen looks like <-- ). a[4] is y tilt, -64 (pen looks like v) to 63 (pen looks like ^).

Edit

Pub: 26 Feb 2026 14:44 UTC

Views: 13