微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ubuntu 14.04 分辨率调整 -- xrandr命令

问题描述:

自己在安装ubuntu-kylin 14.04 TLS系统成功后,在调整分辨率的时候(系统设置--显示)发现分辨率的选项只有1024x768以及800x600两个选项,而台式机的外接显示屏最高分辨率可能1920x1080(60HZ),于是自己想将分辨率调节到最佳模式(即最高分辨率)

解决方法

1、打开命令行终端,输入xrandr,列出当前能检测到的分辨率:
Screen 0: minimum 320 x 200,current 1024 x 768,maximum 16384 x 16384
displayPort-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.0*
800x600 60.3 56.2
848x480 60.0
640x480 59.9


由上面的显示可知,列表中无1920x1080的选项
2、输入cvt 1920 1080 获取,要生成 1920x1080分辨率所需的显示模式:
# 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


3、输入以下命令:
#使用cvt获取的信息(即Modeline后显示内容),新建一个显示模式
sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
#将新建的显示模式添加到DVI-0中(从xrandr显示的信息中可获去--第三行)
sudo xrandr --addmode DVI-0 1920x1080_60.00
#选择DVI-0输出,并将其输出模式设置为1920x1080_60.00(上个命令设置的模式名)
#此命令即可将分辨率设置为目标分辨率
sudo xrandr --ouput DVI-0 --mode 1920x1080_60.00

4、此时,再输入xrandr,即有以下信息(×表示当前选择的分辨率)

Screen 0: minimum 320 x 200,current 1920 x 1080,maximum 16384 x 16384
displayPort-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.0
800x600 60.3 56.2
848x480 60.0
640x480 59.9
1920x1080_60.00 60.0*

5、将分辨率设置为开机认的分辨率 —— 通过“问题描述”(系统设置--显示)即可选择对应的分辨率

6、若第5步,不能设置开机认的分辨率,可通过以下方式设置:
(可命令行输入sudo vi ~/.profile)
#在 ~/.profile 最末尾添加修改分辨率的命令:
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode DVI-0 1920x1080_60.00

知识补充:

1、Xrandr is used to set the size,orientation and/or reflection of the outputs for a screen. It can also set the screen size.
2、Cvt is a utility for calculating VESA Coordinated Video Timing modes.
3、通过man xrandr,查看EXAMPLE,有简单的使用说明,直接参照最后三行代码就可解决,如下:
EXAMPLES
Sets an output called LVDS to its preferred mode,and on its right put an output called VGA
to preferred mode of a screen which has been physically rotated clockwise:
xrandr --output LVDS --auto --rotate normal --pos 0x0 --output VGA --auto --rotate
left --right-of LVDS
Forces to use a 1024x768 mode on an output called VGA:
xrandr --newmode "1024x768" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync
xrandr --addmode VGA 1024x768

xrandr --output VGA --mode 1024x768

原文地址:https://www.jb51.cc/ubuntu/354655.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐