I have an 5 year old laptop and I think the touchscreen is getting glitchy because my cursor is sometimes flickering and windows suddenly move and whatnot like my laptop is possessed. It started happening in Ubuntu 20.04 right before I did a completely fresh install of Ubuntu 22.04 where the problem persisted, so I don't think the OS is the culprit; I'm pretty sure the touchscreen.
I've tried
xinput disable 5
but I get
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
and it doesn't disable the touchscreen.
I tried:
modprobe -r hid_multitouch
But that only disabled part of the touchpad (not the touchscreen) functionality.
So, what's the right way to disable the touchscreen on a fresh install of Ubuntu 22.04 (Wayland)? Thanks.