#打开终端输入以下命令:
###1步骤
xrandr
输出:
Virtual1 connected primary 1440x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
查看当前连接的显示设备 Virtual1
###2步骤
gtf 800 480 60
输出
# 800x480 @ 60.00 Hz (GTF) hsync: 29.82 kHz; pclk: 29.58 MHz
Modeline "800x480_60.00" 29.58 800 816 896 992 480 481 484 497 -HSync +Vsync
###3步骤
xrandr --newmode "800x480_60.00" 29.58 800 816 896 992 480 481 484 497 -HSync +Vsync
###4步骤
xrandr --addmode Virtual1 "800x480_60.00"
###5步骤
xrandr --output Virtual1 --mode "800x480_60.00"
###6步骤
//以下为持久化显示模式
//1
编辑配置文件~/.config/monitors.xml来配置分辨率大小,但需要等到下一次重启时才起效
<monitors version="1">
<configuration>
<clone>no</clone>
<output name="Virtual1">
<vendor>???</vendor>
<product>0x0000</product>
<serial>0x00000000</serial>
<width>800</width>
<height>480</height>
<rate>60</rate>
<x>0</x>
<y>0</y>
<rotation>normal</rotation>
<reflect_x>no</reflect_x>
<reflect_y>no</reflect_y>
<primary>yes</primary>
</output>
<output name="Virtual2">
</output>
<output name="Virtual3">
</output>
<output name="Virtual4">
</output>
<output name="Virtual5">
</output>
<output name="Virtual6">
</output>
<output name="Virtual7">
</output>
<output name="Virtual8">
</output>
</configuration>
</monitors>
//2
sudo gedit /etc/X11/xorg.conf //打开(或新建)xorg.conf文件,初始系统没有该文件,创建即可。
打开后,在文件中添加以下内容:
Section "Monitor"
Identifier "Configured Monitor"
Modeline "800x480_60.00" 29.58 800 816 896 992 480 481 484 497 -HSync +Vsync #来自命令gtf的输出
Option "PreferredMode" "800x480_60.00" #模式名为"800x480_60.00"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
Section "Device"
Identifier "Configured Video Device"
EndSection
完成,重启,OK