Rotating screen messes up stylus under wayland.
If you are using Gnome and the iio-sensor-proxy package is installed (as explained here: https://wiki.archlinux.org/index.php/Tablet_PC#With_GNOME), the screen will rotate if you rotate the device. Obviously, the axes of the touchscreen and the stylus also need to rotate. This works fine under Xorg, but under Wayland the stylus axes do not rotate correctly. I suspect that the reason for this is that gnome uses xinput set-prop id --type=float "Coordinate Transformation Matrix" matrix to rotate the stylus axes. The command above only works under Xorg as written in the xinput manpage:
XWAYLAND Xwayland is an X server that uses a Wayland Compositor as backend. Xwayland acts as translation layer be‐ tween 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 configuration methods instead.