在ubuntu22上运行,会出现如下错误:
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
解决方法:
将/etc/gdm3/custom.conf里面的WaylandEnable的值改为false,本身就是false的,把前面注释去掉。
这里我使用的geany,你也可以使用别的工具如:vi、leafpad等
sudo geany /etc/gdm3/custom.conf
打开/etc/X11/xorg.conf.d/40-libinput.conf
sudo geany /etc/X11/xorg.conf.d/40-libinput.conf
写入以下内容
Section "InputClass"
Identifier "libinput touchscreen catchall"
Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
MatchIsTouchscreen "on"
MatchDevicePath "dev/input/event*"
Driver "libinput"
EndSection
保存重啟即可。