使用 xorg.conf 修复触摸屏 X 轴反转

使用 xorg.conf 修复触摸屏 X 轴反转

我使用 Titan6001 触摸屏设置 Fedora 35。虽然 Linux 响应触摸,但 X 轴是相反的(鼠标右键触摸到左侧,反之亦然)。 Y轴没问题。

我该如何扭转这个局面?我使用的是 X11(不是 Wayland)

我使用“Xorg -configure”命令创建了一个新的 xorg.conf,但它不包含 Titan6001 (eGalax) 设备的部分。但我在一篇旧帖子上找到了一个并将其添加到我的 xorg.conf 中,如下所示:

Section "InputDevice"
    Identifier     "EETI"
    Driver         "egalax"
    Option         "Device" "usbauto"
    Option         "Parameters" "/var/lib/eeti.param"
    Option         "ScreenNo" "0"
    Option         "InvertX" "true"
EndSection

但这没有什么区别(InvertX 没有效果)。我想知道这部分是否被接受。我的 Xorg.0.log 显示:

  72.646] (II) config/udev: Adding input device eGalax Inc. USB TouchController (/dev/input/event4)
[    72.646] (**) eGalax Inc. USB TouchController: Applying InputClass "evdev touchscreen catchall"
[    72.646] (**) eGalax Inc. USB TouchController: Applying InputClass "libinput touchscreen catchall"
[    72.646] (II) Using input driver 'libinput' for 'eGalax Inc. USB TouchController'
[    72.646] (**) eGalax Inc. USB TouchController: always reports core events
[    72.646] (**) Option "Device" "/dev/input/event4"
[    72.646] (**) Option "_source" "server/udev"
[    72.647] (II) event4  - eGalax Inc. USB TouchController: is tagged by udev as: Touchscreen
[    72.648] (II) event4  - eGalax Inc. USB TouchController: device is a touch device
[    72.648] (II) event4  - eGalax Inc. USB TouchController: device removed
[    72.674] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/input/input13/event4"
[    72.674] (II) XINPUT: Adding extended input device "eGalax Inc. USB TouchController" (type: TOUCHSCREEN, id 8)
[    72.674] (**) Option "AccelerationScheme" "none"
[    72.674] (**) eGalax Inc. USB TouchController: (accel) selected scheme none/0
[    72.674] (**) eGalax Inc. USB TouchController: (accel) acceleration factor: 2.000
[    72.674] (**) eGalax Inc. USB TouchController: (accel) acceleration threshold: 4
[    72.676] (II) event4  - eGalax Inc. USB TouchController: is tagged by udev as: Touchscreen
[    72.676] (II) event4  - eGalax Inc. USB TouchController: device is a touch device
[    72.678] (II) config/udev: Adding input device eGalax Inc. USB TouchController (/dev/input/mouse1)

我注意到它引用了 mouse1,这是一个线索吗?我应该为此创建一个部分吗?

所以接下来我尝试了

xinput --set-prop "eGalax Inc. USB TouchController" "Evdev Axis Inversion" 1, 0

但该财产并未得到承认。所以我尝试列出可用的属性并查看:

Device 'eGalax Inc. USB TouchController':
        Device Enabled (142):   1
        Coordinate Transformation Matrix (144): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Calibration Matrix (278):      1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Calibration Matrix Default (279):      1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Send Events Modes Available (261):     1, 0
        libinput Send Events Mode Enabled (262):        0, 0
        libinput Send Events Mode Enabled Default (263):        0, 0
        Device Node (264):      "/dev/input/event4"
        Device Product ID (265):        3823, 1

坐标变换矩阵或者输入校准矩阵能达到我想要的效果吗? (假设我必须从命令行设置它,而不是 xorg.conf)

答案1

是的。我自己正在经历这个。不要使用 xinput_calibrate,因为它也使用“旧的”InvertX、SwapXY 等。现在所有操作都是通过变换矩阵执行的,它可以一次性处理缩放/偏移/反转等。我正在学习如何通过阅读来设置它:https://wiki.archlinux.org/title/Talk:Calibration_Touchscreen

相关内容