Ubuntu 修改分辨率

临时修改

  1. 终端

     cvt 1920 1080   # 出现 modeline 的提示。
    
  2. 使用 xrandr 创建新的 mode,–newmode 后面跟刚刚 cvt 产生的 modeline 后面的信息,如果去掉“_60.00”就可以在显示器首选项中看到。

     $ sudo xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    
  3. 添加新的 mode,–addmode 后面第一个参数是 “xrandr” 命令显示的列表中,目标输出设备的名称。

     $sudo xrandr --addmode VGA-1 "1920x1080_60.00"
    
  4. 将分辨率应用到指定的输出设备

     $ sudo xrandr --output VGA-1 --mode "1920x1080_60.00"
    

屏幕分辨率已修改完成。但是,重启还会回到之前的分辨率。

永久修改

添加 /etc/X11/xorg.conf 文件,将此模式保存为默认分辨率。

$ sudo vim /etc/X11/xorg.conf

(如果没有安装vim,可以使用“sudo gedit /etc/X11/xorg.conf”),粘贴以下内容:

Section "Monitor"
Identifier "Configured Monitor"
Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
Option "PreferredMode" "1920x1080_60.00"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
Section "Device"
Identifier "Configured Video Device"
EndSection

保存。重启后就变成1920x1080了。

ps:我的系统是16.04的,默认没有xorg.conf文件。但是没关系,将上述内容保存为xorg.conf文件就行了。

如果只做了第一步,重启之后可能会出现类似下面的错误:Ubuntu 无法应用原保存的显示器配置

所选模式均不匹配可能的模式:为 CRTC 63 尝试模式

解决方法:删除/home/用户名/.config/monitors.xml,重启电脑即可。

Table of Contents