#打开终端输入以下命令:
###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来配置分辨率大小,但需要等到下一次重启时才起效
no
???
0x0000
0x00000000
800
480
60
0
0
normal
no
no
yes
//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