ubuntu下surface多屏显示

本文介绍如何在Surface连接外部显示器时,通过xrandr和xsetwacom命令将触屏和笔输入限定在Surface内置屏幕上,解决双屏输入不便的问题,并提供调整不同分辨率显示器缩放比例的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Surface 屏幕那么小,有条件的情况下外接个显示器才爽。但这个时候,触屏和pen的输入会投影到两个屏幕上,很不方便。
这时,可以用下面的方法把触屏输入限制在surface内置屏幕中。
先运行

xrandr

我的显示是

Screen 0: minimum 320 x 200, current 4656 x 1824, maximum 8192 x 8192
eDP-1 connected primary 2736x1824+0+0 (normal left inverted right x axis y axis) 260mm x 173mm
   2736x1824     60.01*+
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 1920x1080+2736+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1920x1080     60.00*+  60.00    50.00    59.94  
   1680x1050     59.88  
   1400x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00    60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       60.00    60.00    59.94    59.94  
   640x480       75.00    60.00    59.94    59.94  
   720x400       70.08  
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)

从显示的结果看,eDP-1是内置屏幕。然后再运行

xinput --list

我的显示是

Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Microsoft Surface Type Cover Mouse      	id=13	[slave  pointer  (2)]
⎜   ↳ Microsoft Surface Type Cover Consumer Control	id=14	[slave  pointer  (2)]
⎜   ↳ Microsoft Surface Type Cover Touchpad   	id=15	[slave  pointer  (2)]
⎜   ↳ ipts 1B96:006A Touchscreen              	id=18	[slave  pointer  (2)]
⎜   ↳ ipts 1B96:006A UNKNOWN                  	id=16	[slave  pointer  (2)]
⎜   ↳ ipts 1B96:006A Pen (0)                  	id=24	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Video Bus                               	id=6	[slave  keyboard (3)]
    ↳ Surface Pro 3/4 Buttons                 	id=7	[slave  keyboard (3)]
    ↳ Microsoft Surface Type Cover Keyboard   	id=12	[slave  keyboard (3)]

id 18和24便是触屏和笔了。
最后执行

xsetwacom set 18 MapToOutput eDP-1
xsetwacom set 24 MapToOutput eDP-1

完成。

参考

https://askubuntu.com/questions/71768/touchscreen-and-additional-external-monitor

p.s. 如果两个显示器分辨率不同,两个显示器的缩放比例如何单独设置?
我外接的1080p的显示器,以surface的2K屏为准缩放200%时,外接显示器的画面过大。直接执行

xrandr --output HDMI-1 --scale 2x2

HDMI-1 是所设置的显示器,2x2表示长宽显示的内容均加倍(显示的文字,图片变小),缩放比例可不为整数。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值