当前位置: 首页 > 工具软件 > XRandR > 使用案例 >

linux命令xrandr修改桌面分辨率

蒋奇
2023-12-01

xrandr临时修改分辨率

方法一、

  1. 打开终端xrandr

Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767

eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm

   1366x768      60.00*+

   1280x720      60.00  

   1024x768      60.00  

   1024x576      60.00  

   960x540       60.00  

   800x600       60.32    56.25  

   864x486       60.00  

   640x480       59.94  

   720x405       60.00  

   680x384       60.00  

   640x360       60.00  

DP1 disconnected (normal left inverted right x axis y axis)

DP2 disconnected (normal left inverted right x axis y axis)

HDMI1 disconnected (normal left inverted right x axis y axis)

HDMI2 disconnected (normal left inverted right x axis y axis)

VGA1 disconnected (normal left inverted right x axis y axis)

VIRTUAL1 disconnected (normal left inverted right x axis y axis)

2、xrandr -s 0表示设置分辨率为1366x768      60.00*+

xrandr -s 1表示设置分辨率为1280x720      60.00  

方法二、

添加自己想要修改的分辨率如cvt  1920 1200

1、cvt  1920 1200

# 1920x1200 59.88 Hz (CVT 2.30MA) hsync: 74.56 kHz; pclk: 193.25 MHz

Modeline "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync

2、

xrandr --newmode "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync

  1. 执行xrandr

[root@localhost ~]# xrandr

Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767

eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm

   1366x768      60.00*+

   1280x720      60.00  

   1024x768      60.00  

   1024x576      60.00  

   960x540       60.00  

   800x600       60.32    56.25  

如上改显示用的是DP1

则执行xrandr --addmode DP1 1920x1200_60.00

xrandr --output  DP1 --mode 1920x1200_60.00

 类似资料: