在 PixelBook 上运行 Ubuntu 20.04 时,我无法成功校准触摸屏的几何形状。使用手写笔的触摸屏工作正常(尤其是在屏幕中心附近),但朝向显示屏角落的情况逐渐恶化——校准效果取决于我的显示分辨率。它目前非常不适合手写文档标记(我的主要用例),这已经够糟糕的了。
我得到的结果xinput_calibrator
是(用触控笔尖接触四个十字线后)
Warning: multiple calibratable devices found, calibrating last one (WCOM50C1:00 2D1F:5143 Pen (0))
use --device to select another one.
Calibrating standard Xorg driver "WCOM50C1:00 2D1F:5143 Pen (0)"
current calibration values: min_x=0, max_x=16777215 and min_y=0, max_y=16777215
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).
--> Making the calibration permanent <--
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 "!!Name_Of_TouchScreen!!"
Option "MinX" "-10194"
Option "MaxX" "16778670"
Option "MinY" "530113"
Option "MaxY" "16310016"
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
Change '!!Name_Of_TouchScreen!!' to your device's name in the config above.
我将建议的代码片段放入新的(之前不存在的)文件 /usr/share/X11/xorg.conf.d/99-calibration.conf 中,用作Wacom|WACOM|PTK-540WL|ISD-V4
设备名称(也许应该是其他名称?)。无论如何,重新启动后,我的触摸屏校准仍然和以前一样差。
的输出xinput_calibrator --list
是
Device "WCOM50C1:00 2D1F:5143" id=9
Device "WCOM50C1:00 2D1F:5143 UNKNOWN" id=11
Device "WCOM50C1:00 2D1F:5143 Mouse" id=12
Device "WCOM50C1:00 2D1F:5143 Pen (0)" id=16
值得一提的是,输出xinput --list
是
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ WCOM50C1:00 2D1F:5143 id=9 [slave pointer (2)]
⎜ ↳ WCOM50C1:00 2D1F:5143 UNKNOWN id=11 [slave pointer (2)]
⎜ ↳ WCOM50C1:00 2D1F:5143 Mouse id=12 [slave pointer (2)]
⎜ ↳ ACPI0C50:00 18D1:5028 id=13 [slave pointer (2)]
⎜ ↳ WCOM50C1:00 2D1F:5143 Pen (0) id=16 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ WebCamera: WebCamera id=8 [slave keyboard (3)]
↳ WCOM50C1:00 2D1F:5143 id=10 [slave keyboard (3)]
↳ Intel Virtual Button driver id=14 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=15 [slave keyboard (3)]
欢迎提供任何有关如何校准此触摸屏的建议。非常感谢!
答案1
我实施了两项改变,其中一项或者两项都起到了作用。
首先,我按照解决方案中的建议Toughbook CF-19 上的 xinput_calibrator 出现问题并且做到了
sudo apt install xserver-xorg-input-evdev
sudo apt remove xserver-xorg-input-libinput
其次,我尝试了xinput_calibrator --device X
上面我最初问题中列出的每个设备 ID 号“X”,直到校准效果看起来更好。我终于找到了一个有效的值,到那时(可能是因为上面的 evdev/libindput 更改?)设备的识别似乎更安全,并且 99-calibration.conf 的推荐文本也不同。我用下面的几行替换了该文件的初始内容,现在触摸屏似乎校准得很好:
Section "InputClass"
Identifier "calibration"
MatchProduct "WCOM50C1:00 2D1F:5143"
Option "Calibration" "41 25961 496 16806"
Option "SwapAxes" "0"
EndSection