一、首先需要涉及到的配置文件有:
1.桌面旋转配置文件:/etc/X11/xorg.conf
Section "Monitor"
Identifier "DSI-1"
#配置rotate 正常-normal, 左90°-left, 右90°-right, 翻转180°-inverted
Option "Rotate" "right"
EndSection
2.触控屏校准配置文件:/usr/share/X11/xorg.conf.d/40-libinput.conf
Section "InputClass"
Identifier "libinput touchscreen catchall"
#转置矩阵
Option "TransformationMatrix" "1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0"
#校准矩阵
Option "CalibrationMatrix" "-1.219822 0.0 1.124682 0.0 1.492537 -0.229478 0.0 0.0 1.0"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
二、校准用到的工具
1.xinput_calibrator 这个工具输出的参数不能直接使用,需要根据校准坐标自己技术校准矩阵值
2.xinput.py