美文网首页
Ubuntu调整显示器分辨率

Ubuntu调整显示器分辨率

作者: 神奇的腿 | 来源:发表于2017-04-03 12:57 被阅读0次

    以1920×1080为例:

    1. xrandr得到显示设备
      如下图,可知目前应用的是VGA1。
    ➜  xrandr
    Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
    DP1 disconnected (normal left inverted right x axis y axis)
    HDMI1 disconnected (normal left inverted right x axis y axis)
    VGA1 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  
    VIRTUAL1 disconnected (normal left inverted right x axis y axis)
    
    1. cvt命令得到modeline
    ➜  ~ cvt 1920 1080
    # 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
    
    1. 创建新mode
      xrandr后面跟的是拷贝上个命令的输出。
    ➜  xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    
    1. 将新mode添加
    xrandr --addmode VGA1 1920x1080_60.00
    
    1. 输出新的mode
    xrandr --output VGA1 --mode 1920x1080_60.00
    
    1. 添加到rc文件中使设置在每次开机时自启动
      将以下命令添加到.zshrc
    xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    xrandr --addmode VGA1 1920x1080_60.00
    xrandr --output VGA1 --mode 1920x1080_60.00
    
    1. 重启确保可用

    相关文章

      网友评论

          本文标题:Ubuntu调整显示器分辨率

          本文链接:https://www.haomeiwen.com/subject/sganottx.html