我在校准自助服务终端系统的触摸屏时遇到问题。我已经安装xinput_calibrator
并执行:
$ xinput_calibrator -v
DEBUG: XInputExtension version is 2.3
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not report Absolute events.
DEBUG: Skipping device 'PS/2 Generic Mouse' id=12, does not report Absolute events.
DEBUG: Selected device: MicroTouch Systems, Inc. MicroTouch USB Touchscreen - EX II
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Not evdev calibrator: Evdev: invalid "Evdev Axis Calibration" property format
Calibrating standard Xorg driver "MicroTouch Systems, Inc. MicroTouch USB Touchscreen - EX II"
current calibration values: min_x=0, max_x=65535 and min_y=0, max_y=65535
If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL).
DEBUG: Found that 'MicroTouch Systems, Inc. MicroTouch USB Touchscreen - EX II' is a sysfs name.
DEBUG: Adding click 0 (X=323, Y=768)
DEBUG: Adding click 1 (X=970, Y=766)
DEBUG: Adding click 2 (X=321, Y=253)
DEBUG: Adding click 3 (X=969, Y=247)
--> Making the calibration permanent <--
DEBUG: Found that 'MicroTouch Systems, Inc. MicroTouch USB Touchscreen - EX II' is a sysfs name.
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
Identifier "calibration"
MatchProduct "MicroTouch Systems, Inc. MicroTouch USB Touchscreen - EX II"
Option "MinX" "10961"
Option "MaxX" "55163"
Option "MinY" "54602"
Option "MaxY" "10485"
Option "SwapXY" "0" # unless it was already set to 1
Option "InvertX" "0" # unless it was already set
Option "InvertY" "0" # unless it was already set
EndSection
但这并不能改变屏幕的校准错误,我想我需要使用该xinput_calibrator --precalib
选项,因为生成的值是错误的。
我怎样才能获得这些值并放入该命令中?
更新
根据评论,这里有更多详细信息:
- 上面的输出保存在
/etc/X11/xorg.conf.d/99-calibration.conf
.local/share/xorg/Xorg.0.log
请查找应用上述配置前后文件内容的相关部分->这里<-
答案1
xinput_calibrator 用于使用 evdev 校准触摸屏。用于触摸屏的驱动程序是 libinput。所以你需要使用选项CalibrationMatrix或TransformationMatrix。