Ubuntu + Asus laptop/pen click detection issue

Type of device* : Laptop with touchscreen/pen support ASUS Pen 2.0 (SA203H) and the ASUS Pen 3.0
Brand and version of the device: Asus Proart laptop PX13 hn7306eac
System : Ubuntu 26.04

Krita version: 5.3.1 snap, 5.3.1 debian apt, direct appimage krita-5.3.1-x86_64.AppImage, krita-5.4.0-prealpha-bc052bd7bf-x86_64.AppImage, krita-6.1.0-prealpha-27ce141187-x86_64.AppImage


Description of the issue (you can include screenshots):

The issue persists in all krita verisons above, QT_QPA_PLATFORM=wayland, I tried both pens just to be sure. Pen works normally in ubuntu outside krita as you would expect, hovering is detected, pressing the pen is detected as a click.

Inside krita it gets interesting. hovering still works, but presses are not detected. Unless while pressing i touch the mousepad with my finger. If I touch the mousepad it works as its supposed to, clicks, pressure and tilt is detected. But as soon as i remove finger the icon changes from brush to select and nether krita nor krita tablet tester detect clicks/pressure. I’m stumped on how to further debug the issue. If anyone has any tips i’d be happy to try them.

:slight_smile: Hello @Dino_Memovic, and welcome to the forum!

Did you try toggling “Use mouse events for right- and middle-clicks (workaround for convertible devices, needs restart)” in Krita under Settings > Configure Krita > Tablet Settings?

Michelist

It’s probably this xwayland bug again Touchscreen stylus not working on Gnome 50

Hay! It was the xwayland issue and its fixed in wayland-24.1.12. I’ll just write what I did for the next person having the issue b4 the deb/apt packages get updated for this. The only way right now is to build it from source. If you are not

  1. download https://www.x.org/pub/individual/xserver/xwayland-24.1.12.tar.xz and extract
  2. install dependancies apt-get install libpixman-1-dev ninja-build meson g++ gcc pkg-config libx11-dev libxkbfile-dev libxfont-dev libxshmfence-dev libxcvt-dev libbsd-dev libsystemd-dev libwayland-dev libwayland-bin wayland-protocols libepoxy-dev libtirpc-dev . You only need this to build you can safely remove them (replace install with remove) after building/installing.
  3. extract the source code and cd xwayland-24.1.12
  4. create build directory and go inside mkdir build && cd build
  5. make the build meson setup .. --buildtype=release -D xkb_output_dir=/var/lib/xkb && ninja - If it complains that it cannot find a package google dev ubuntu and it will tell you eg. “epoxy dev ubuntu” ends up being apt-get install libepoxy-dev
  6. Finally ninja install
  7. Check if it worked Xwayland -version it should show 24.1.12
  8. After rebooting krita should just work as expected.

Thank you Michelist and Ciubix for pointing me to the right debug path :smiley: