【20230415】Ubuntu22.04双屏显示触屏设置,解决触摸点和响应位置不一致的问题

双屏显示时,如果存在一个触摸屏,有可能会出现触摸点和响应位置不一致的问题。

我的显示器配置如下:一个34寸,3440*1440;一个22英寸触摸屏,1920*1080。

1 在终端输入 xinput,查看触屏显示器 id,在这里 id=14 的设备是触屏

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech M350                           	id=9	[slave  pointer  (2)]
⎜   ↳ WingCoolTouch WingCoolTouch             	id=13	[slave  pointer  (2)]
⎜   ↳ WingCoolTouch WingCoolTouch             	id=14	[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)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ Intel HID events                        	id=10	[slave  keyboard (3)]
    ↳ Logitech M350                           	id=11	[slave  keyboard (3)]
    ↳ Keyboard K380 Keyboard                  	id=12	[slave  keyboard (3)]
    ↳ BRLTTY 6.4 Linux Screen Driver Keyboard 	id=15	[slave  keyboard (3)]

2 使用 xrandr 命令查看各显示器配置,这里 DP-3 是触屏

Screen 0: minimum 8 x 8, current 5360 x 1440, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 connected 1920x1080+0+360 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00 +  60.00*   59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1280x1024     60.02  
   1280x720      60.00    59.94    50.00  
   1152x864      60.00  
   1024x768      60.00  
   800x600       60.32  
   720x480       59.94  
   640x480       59.94    59.93  
DP-4 connected primary 3440x1440+1920+0 (normal left inverted right x axis y axis) 795mm x 334mm
   3440x1440     60.00 + 144.00   120.00*  100.00  
   2560x1440     60.00  
   2560x1080    144.00   119.88   100.00    59.94  
   1920x1440     45.45  
   1920x1200     59.88  
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1600x1200     60.00  
   1600x900      60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.95    59.94    59.93  
DP-5 disconnected (normal left inverted right x axis y axis)

3 匹配触摸输出

xinput map-to-output 14 DP-3

参考:Ubuntu18.04双屏显示触屏设置,解决触摸点和响应位置不一致的问题

猜你喜欢

转载自blog.csdn.net/Creationyang/article/details/130171389
今日推荐