1.查看现有设备
xrandr -q
输出如下:
Screen 0: minimum 1 x 1, current 800 x 600, maximum 8192 x 8192 Virtual1 connected primary 800x600+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 800x600 60.00*+ 60.32 2560x1600 59.99 1920x1440 60.00 1856x1392 60.00 1792x1344 60.00 1920x1200 59.88 1600x1200 60.00 1680x1050 59.95 1400x1050 59.98 1280x1024 60.02 1440x900 59.89 1280x960 60.00 1360x768 60.02 1280x800 59.81 1152x864 75.00 1280x768 59.87 1024x768 60.00 640x480 59.94 Virtual2 disconnected (normal left inverted right x axis y axis) Virtual3 disconnected (normal left inverted right x axis y axis) Virtual4 disconnected (normal left inverted right x axis y axis) Virtual5 disconnected (normal left inverted right x axis y axis) Virtual6 disconnected (normal left inverted right x axis y axis) Virtual7 disconnected (normal left inverted right x axis y axis) Virtual8 disconnected (normal left inverted right x axis y axis)
目前正在使用的显示器为Virtual1,针对具体屏幕的分辨率设置可以使用下面这个命令。这里Virtual1替换为你的显示器名称
xrandr --output Virtual1 --auto --left-of CRT1
2.创建分辨率
cvt 1280 1024 60
输出:
1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz Modeline "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
3.新增分辨率至分辨率列表中
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
4.查看新添加的分辨率
xrandr
输出:
Screen 0: minimum 64 x 64, current 1280 x 960, maximum 16384 x 16384 Virtual1 connected 1280x960+0+0 0mm x 0mm 1024x768 60.0 + 60.0 1600x1200 60.0 1440x1050 60.0 1280x960 60.0* 800x600 60.0 640x480 60.0 1280x1024_60.00 (0x14d) 109.0MHz h: width 1280 start 1368 end 1496 total 1712 skew 0 clock 63.7KHz v: height 1024 start 1027 end 1034 total 1063 clock 59.9Hz
5.添加分辨率至当前正在使用的显示器
xrandr --addmode Virtual1 "1280x1024_60.00"
6.使用新添加的分辨率
xrandr -s 1280x1024_60.00
7.持久地记忆这个新添加的分辨率
在~/.xprofile中加入下面语句:
xrandr --output Virtual1 --mode 1280x1024_60.00
原文地址:https://www.cnblogs.com/hester/p/10327781.html
时间: 2024-11-07 13:30:42