zoukankan      html  css  js  c++  java
  • Ubuntu 更改屏幕分辨率

      安装完Ubuntu后发现分辨率不合适,平时习惯了看小一点的文字,所以搜了一下修改屏幕分辨率的命令,具体操作如下:

    1.先用 xrandr 命令查看一下当前系统支持的分辨率

    wayde@wayde-All-Series:~$ xrandr
    Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
    VGA-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
       1024x768      60.00* 
       800x600       60.32    56.25  
       848x480       60.00  
       640x480       59.94  
    HDMI-1 disconnected (normal left inverted right x axis y axis)
    HDMI-2 disconnected (normal left inverted right x axis y axis)

    后面带*号的就是你当前的分辨率

    2.我这个屏幕之前都是用的1440x900的分辨率,所以用 ctv 命令生成一个详细的分辨率

    wayde@wayde-All-Series:~$ cvt 1440 900
    # 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
    Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync

    3. 接着继续用 xrandr --newmode 命令新建一个分辨率,新建的分辨率就是上述产生的 Modeline 后面的字串

    wayde@wayde-All-Series:~$ xrandr --newmode "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync

    4.将上述新建的分辨率用 xrandr --addmode 命令加入到分辨率列表中

    wayde@wayde-All-Series:~$ xrandr --addmode VGA-1 "1440x900_60.00"

    注意后面的60指的是屏幕刷新频率

    5.最后用 xrandr --output 命令输出你想要的分辨率

    wayde@wayde-All-Series:~$ xrandr --output VGA-1 --mode "1440x900_60.00"

    看似已经成功了,但是当你重启后会发现分辨率又会恢复原样,于是在网上搜了搜,找到了如下方法:

    在终端输入命令:

    $sudo gedit /etc/X11/xorg.conf

     然后粘贴如下脚本并保存

    Section "Monitor"
    Identifier "Configured Monitor"
    Modeline "1024x768_60.00" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync
    Modeline "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
    Option "PreferredMode" "1440x900_60.00"
    EndSection
    
    Section "Screen"
    Identifier "Default Screen"
    Monitor "Configured Monitor"
    Device "Configured Video Device"
    EndSection
    
    Section "Device"
    Identifier "Configured Video Device"
    EndSection

     再次重启就OK了!







  • 相关阅读:
    Socket编程中的强制关闭与优雅关闭及相关socket选项
    怎样通过MSG_WAITALL设置阻塞时间,IO模式精细讲解: MSG_DONTWAIT 、 MSG_WAITALL
    RTSP、HTTP、HTTPS、SDP四种协议详解
    RTMP、RTSP、HTTP视频协议详解(附:直播流地址、播放软件)
    Idea连接服务器docker并部署代码到docker实现一键启动
    @Autowired注解和静态方法
    关于工具类静态方法调用@Autowired注入的service类问题
    @PostConstruct
    spring-boot-starter-mail技术总结
    使用SpringBoot发送mail邮件
  • 原文地址:https://www.cnblogs.com/zoneofmine/p/6426054.html
Copyright © 2011-2022 走看看