電腦外接着一個 23‘ 的顯示器,分辨率爲 1920*1080
。ubuntu
操做系統:ubuntu 14.04ruby
今天,經過 Setting->Displays 中選擇外接屏的分辨率時,發現最大隻有 1024×768
,而且外接屏顯示 「Unknown Displays」,日了狗了。。。ide
解決辦法主要是給這個 「Unknown Displays」 設置一個 1920*1080
的選項,下面藉助 xrandr
命令來實現。spa
在終端輸入 xrandr
:操作系統
注:.net
代碼以下:code
而後屏幕上會返回兩行內容,賦值第二行中 ‘Modeline’ 後面的全部內容,並接到下面 xrandr --newmode
後面:orm
其中 」DP2「 即上面展現的外接端口,不用的接口這個名字可能不一樣,好比有的會是 VGA1,以上面 xrandr
的顯示結果爲準。server
以後,再進入 Setting->Displays, 發現那個 「Unknown Display」 的分辨率中,有了 「1920x1080」 這個選項,選中它,並 Apply 便可。blog
Section "InputDevice"Identifier "Generic Keyboard"Driver "kbd"Option "XkbRules" "xorg"Option "XkbModel" "pc104"Option "XkbLayout" "us"EndSectionSection "InputDevice"Identifier "Configured Mouse"Driver "mouse"EndSectionSection "Device"Identifier "Configured Video Device"EndSectionSection "Monitor"Identifier "Monitor0"VendorName "Unknown"ModelName "Unknown"HorizSync 30.0 - 83.0VertRefresh 50.0 - 75.0Option "DPMS"Modeline "1600x1200_60.00" 161.00 1600 1712 1880 2160 1200 1203 1207 1245 -hsync +vsyncModeline "1600x1228_60.00" 128.00 1600 1632 1664 1728 1200 1203 1207 1235 -hsync +vsyncModeline "1400x1050_60.00" 121.75 1400 1488 1632 1864 1050 1053 1057 1089 -hsync +vsyncModeline "1024x768_60.00" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsyncEndSectionSection "Screen"Identifier "Default Screen"Monitor "Monitor0"SubSection "Display"Modes "1600x1200" "1600x1228" "1400x1050" "1024x768" EndSubSectionEndSection