1. 程式人生 > >Ubuntu 18.04設置1920*1080

Ubuntu 18.04設置1920*1080

輸出 mode err 分辨 gedit .html span 方案 參數

Ubuntu升級後,發現分辨率沒有1920*1080,在網上尋找了一個文章解決辦法如下。

方案一(臨時性,重啟會失效):

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 文件,將此模式保存為默認分辨率。

1、$ 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

2、保存。重啟後就變成1920x1080了。

ps:我的系統是18.04的,默認沒有xorg.conf文件。但是沒關系,將上述內容保存為xorg.conf文件就行了。

轉載鏈接:https://www.jiansuan.net/article_show_357.html

Ubuntu 18.04設置1920*1080