您好,我最近一直在研究一种奇怪的设备。它是一款原生分辨率为 800x1280 的平板电脑——是的,它是向后的。显示器处于纵向模式,我必须进行一些 xorg 配置编辑来旋转屏幕和旋转触摸屏。如果我使用本机分辨率,这很好用,但是我试图让它使用 768x1024 分辨率。通过使用以下命令,我已成功获得 4:3 模式下的 768x1024 分辨率(侧面有黑条,这是我想要的)在平板电脑上显示:
user1:~ # xrandr --newmode "768x1024_60.00" 65.25 768 816 896 1024 1024 1027 1037 1063 -hsync +vsync
user1:~ # xrandr --addmode DSI-1 768x1024_60.00
user1:~ # xrandr -s 768x1024_60.00
我遇到的问题是让实际的触摸屏数字化仪与之对齐,就像它仍然停留在 16:10 一样。这是我的 xorg 配置文件:
user1:~ # cat /etc/X11/xorg.conf.d/99-touchscreen.conf
Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "SwapAxes" "true"
Option "InvertY" "true"
EndSection
user1:~ # cat /etc/X11/xorg.conf.d/50-monitor.conf
Section "Monitor"
Identifier "DSI-1"
Option "Rotate" "right"
EndSection
以下是触摸屏的属性:
Device 'Goodix Capacitive TouchScreen':
Device Enabled (152): 1
Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (284): 0
Device Accel Constant Deceleration (285): 1.000000
Device Accel Adaptive Deceleration (286): 1.000000
Device Accel Velocity Scaling (287): 10.000000
Device Product ID (276): 1046, 9111
Device Node (275): "/dev/input/event2"
Evdev Axis Inversion (288): 0, 1
Evdev Axis Calibration (289): <no items>
Evdev Axes Swap (290): 1
Axis Labels (291): "Abs MT Position X" (282), "Abs MT Position Y" (283), "Abs MT Touch Major" (280), "Abs MT Width Major" (281), "None" (0), "None" (0)
Button Labels (292): "Button Unknown" (277), "Button Unknown" (277), "Button Unknown" (277), "Button Wheel Up" (158), "Button Wheel Down" (159)
Evdev Scrolling Distance (293): 0, 0, 0
Evdev Middle Button Emulation (294): 0
Evdev Middle Button Timeout (295): 50
Evdev Third Button Emulation (296): 0
Evdev Third Button Emulation Timeout (297): 1000
Evdev Third Button Emulation Button (298): 3
Evdev Third Button Emulation Threshold (299): 20
Evdev Wheel Emulation (300): 0
Evdev Wheel Emulation Axes (301): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (302): 10
Evdev Wheel Emulation Timeout (303): 200
Evdev Wheel Emulation Button (304): 4
Evdev Drag Lock Buttons (305): 0
Evdev Kiosk Touch Mode (306): 0
Evdev Kiosk Touch Button (307): 1
Evdev Kiosk Touch Button Delay (308): 0
那么这是我需要编辑触摸矩阵的情况吗?对此有任何指示还是有更简单的方法?谢谢你的帮助。
我能够使用 来解决这个问题
xinput_calibrator
,这给了我正确的 xorg 校准数据。基本上,打开一个终端窗口并启动 xinput_calibrator 并触摸它要求您触摸的点。完成后,终端窗口将输出与 xorg 一起使用的信息: