root@ubuntu:~# cvt 1920 1080 60 # 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync |
1920是宽x,1080是高y,60是刷新频率。
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsyn |
--newmode后面的参数是cvt命令的Modeline之后的内容。
xrandr --addmode Virtual1 "1920x1080_60.00" |
Virtual1是当前显示设备的名称,可以直接输入xrandr命令查看所有的显示设备。"1920x1080_60.00"是之前新建的模式的名称。
xrandr -s 1920x1080_60.00 |
如果要选择模式已经存在,直接执行第4步即可。执行xrandr命令可以查看当前设备、选择的模式等信息。
root@ubuntu:~# xrand Screen 0: minimum 1 x 1, current 1920 x 1080, maximum 16384 x 16384 Virtual1 connected primary 1920x1080+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 1920x1080_60.00 59.96* 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) |
带*的,是当前选择的模式。