sudo apt-get install xserver-xorg-input-libinput
cd /usr/share/X11/xorg.conf.d/
sudo nano 40-libinput.conf
找到touchscreen section
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
添加一行
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1
结果为
Section "InputClass"
Identifier "libinput touchscreen catchall"
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
然后重启生效
这样的修改也是同样修改为翻转90度,如果需要修改为其他角度,请参考libinput的算法
https://wayland.freedesktop.org/libinput/doc/latest/absolute_axes.html