Asus zenbook pro duo 触摸屏 xinput 映射与多台显示器

Asus zenbook pro duo 触摸屏 xinput 映射与多台显示器

我有一台运行 kubuntu 20.04 的华硕 Zenbook pro Duo。我按照这款笔记本电脑的各种设置教程操作,两个触摸屏都运行正常。但是,当我插入另一台显示器时,校准完全失效。我按照尝试使用 xinput map-to-output 来修复该问题。它解决了 X 轴上的校准问题,但 Y 轴仍然偏离;触摸记录的位置远离我实际触摸屏幕的位置。

有人知道我该如何让它工作吗?这些是我尝试用来映射触摸屏的命令。它们修复了 X 轴校准,但 Y 轴仍然关闭。

xinput map-to-output 16 eDP-1-1
xinput map-to-output 18 DP-1-2

下面是 xinput 和 xrandr 的输出。

新输入

    ⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ MOSART Semi. 2.4G Wireless Mouse          id=10   [slave  pointer  (2)]
⎜   ↳ ELAN1406:00 04F3:3101 Mouse               id=13   [slave  pointer  (2)]
⎜   ↳ ELAN1406:00 04F3:3101 Touchpad            id=14   [slave  pointer  (2)]
⎜   ↳ ELAN9008:00 04F3:29B6                     id=16   [slave  pointer  (2)]
⎜   ↳ ELAN9008:00 04F3:29B6 stylus              id=17   [slave  pointer  (2)]
⎜   ↳ ELAN9009:00 04F3:29A1                     id=18   [slave  pointer  (2)]
⎜   ↳ ELAN9009:00 04F3:29A1 stylus              id=19   [slave  pointer  (2)]
⎜   ↳ ELAN9008:00 04F3:29B6 eraser              id=22   [slave  pointer  (2)]
⎜   ↳ ELAN9009:00 04F3:29A1 eraser              id=23   [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)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ USB2.0 HD UVC WebCam: USB2.0 HD           id=11   [slave  keyboard (3)]
    ↳ USB2.0 HD UVC WebCam: USB2.0 IR           id=12   [slave  keyboard (3)]
    ↳ ELAN1406:00 04F3:3101 Keyboard            id=15   [slave  keyboard (3)]
    ↳ Asus WMI hotkeys                          id=20   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=21   [slave  keyboard (3)]

兰德

$ xrandr
Screen 0: minimum 8 x 8, current 5760 x 3260, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
eDP-1-1 connected primary 3840x2160+1920+0 (normal left inverted right x axis y axis) 344mm x 194mm
   3840x2160     60.00*+  59.98    59.97  
   3200x1800     59.96    59.94  
   2880x1620     59.96    59.97  
   2560x1600     59.99    59.97  
   2560x1440     59.99    59.99    59.96    59.95  
   2048x1536     60.00  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     60.01    59.97    59.96    59.93  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
   1920x1080     60.00*+  60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   1920x1080i    60.00    50.00    59.94    50.00  
   1600x900      60.00  
   1280x1024     60.02  
   1152x864      59.97  
   1280x720      60.00    50.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   640x480       60.00    59.94  
DP-1-2 connected 3840x1100+1919+2160 (normal left inverted right x axis y axis) 340mm x 100mm
   3840x1100     60.02*+  48.02  
   1920x550      60.06    48.08  

答案1

有同样的问题。底部屏幕映射正确,但顶部垂直映射了屏幕顶部 2/3(我猜它也想转到底部屏幕,但结束得太快了,我想需要一种方法来扩展映射)

编辑:设法让一切以这种方式运作:

#!/bin/bash

# Read xinput list output into a variable
xinput_output="$(xinput list)"

# Find the line with the device name and extract the ID
topscreen_id="$(echo "$xinput_output" | grep -E 'ELAN9008:00 04F3:2F29\s+id=' | head -n 1 | sed -E 's/.*id=([0-9]+).*/\1/')"

# Find the line with the device name and extract the ID
bottomscreen_id="$(echo "$xinput_output" | grep -E 'ELAN9009:00 04F3:2F2A\s+id=' | head -n 1 | sed -E 's/.*id=([0-9]+).*/\1/')"

# Print the extracted IDs
echo "Top screen ID: $topscreen_id"
echo "Bottom screen ID: $bottomscreen_id"

echo "Mapping Top Touchscreen"
xinput map-to-output $topscreen_id eDP-1
echo "Mapping Bottom Touchscreen"
xinput map-to-output $bottomscreen_id DP-1

echo "Fixing coordinates for bottom touchscreen"
xinput set-prop $bottomscreen_id "Coordinate Transformation Matrix" 1 0 0 0 0.5 0.674 0 0 1

相关内容