ubuntu不能设置高分辨率问题的解决方法
来源:互联网 发布:彩票大数据分析系统 编辑:程序博客网 时间:2024/05/15 01:59
在ubuntu12.10上安装gnome切换到经典模式后,分别率最高只有1024*768,以为是没有安装显卡驱动导致的,上网搜索了N多方法,安装了各种nvidia驱动,依然没有搞定。
反而把分辨率降低到只能设置为最高854*480,导致窗口按钮都看不到。后来想启动时选择默认模式,不用gnome经典模式,回到默认模式不就可以了,结果还是不行。
然后又把gnome删除,删除时直接使用sudo apt-get remove gnome*, 把所有gnome相关的文件都删除了,就直接导致启动不了。
最后没办法,又重新安装了ubuntu12.10,安装时选择第一项默认的保留已有文档和软件继续安装,结果安装后虽然可以驱动了,但还是最高只能是1024*768的分辨率。
后来又去ubutnu软件中心安装了nvidia当前驱动,还是不行。由于重装时没有选择安装更新,所以又去“软件更新器”安装了更新,更新后重启还是没有作用。
再后来想到升级到13.04,经过一个多小时漫长的等待,升级后结果还是不行。分辨率10.24*768依然不变。
此时搜索“ubuntu 硬件 显示 未知”使,发现了以下文章,按照操作居然成功了,把分辨率设置为了1400*900,虽然“系统设置/显示”里面还是显示未知,但分辨率的确提高了。
(转)ubuntu分辨率设置
以下是本篇文章的内容:
--------------------------------------------------------------->>>
我的一台11寸上网本,装的ubuntu。最近外接了一个19寸显示器。分辨率最多只能是1024x768。显示器设置里显示“未知”显示器。
用下面的命令可以看到显卡的信息:
$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)
我一直以为是显卡驱动没装好,于是下载了intel显卡linux驱动的源码,并花了几天时间来编译(期间安装了N多它所依赖的包),最终还是没能装成功,还把Xorg搞挂了。无奈还重装了系统。其实intel集成显卡的驱动已经装好了,而且用命令sudo apt-get install xserver-xorg-video-intel也可以安装。
之后还在网上看到修改/etc/X11/xorg.conf之类的解决方案。我直接头大了。
最后还是找到了解决方案:xrandr命令。
首先,直接运行xrandr查看下分辨率的情况:
$ xrandr
Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 4096 x 4096
LVDS1 connected (normal left inverted right x axis y axis)
1024x600 60.0 +
800x600 60.3 56.2
640x480 59.9
VGA1 connected 1280x1024+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
标星号的那行就是我正在使用的分辨率。
下面用cvt命令生成一个modeline,为后续添加分辨率作准备:
$ 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
再运行xrandr --newmode来创建一个分辨率模式,使用“Modeline”后的内容(--rmmode删除这个模式):
$ xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
接着用xrandr --addmode把这个模式添加到显示器上(--delmode把这个模式从该显示器上移除):
$ xrandr --addmode VGA1 "1440x900_60.00"
最后是应用这个模式:
$ xrandr --output VGA1 --mode "1440x900_60.00"
到此,我的屏幕看上去就清爽多了。
用xrandr查看一下:
$ xrandr
Screen 0: minimum 320 x 200, current 1440 x 900, maximum 4096 x 4096
LVDS1 connected (normal left inverted right x axis y axis)
1024x600 60.0 +
800x600 60.3 56.2
640x480 59.9
VGA1 connected 1440x900+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
1440x900_60.00 59.9*
设置完后我的屏幕向左偏出了约5个像素,直接在显示器(硬件)上调就可以了。
参考:https://wiki.ubuntu.com/X/Config/Resolution
<<<---------------------------------------------------------------
特此感谢!终于搞定了浪费了大半天的问题。
不过,关机重新开机后此设置有时候就没有了,又恢复到原来的分辨率了。
现在把设置新分辨率的命令写到一个sh脚本中,如果分辨率恢复到原来的自动执行此shell文件就可以了。
代码如下:
#!/bin/bash</p><p># set screen resolution to 1400 * 900</p><p># Query current resolution
echo "Current resolution:"
xrandr
echo "-------------------------------------"</p><p># New one modeline for 1440 * 900
echo "New one modeline for 1440 * 900:"
cvt 1440 900
echo "-------------------------------------"</p><p># Create resolution using "xrandr --newmode" command
echo "Create resolution 1400 * 900:"
xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
echo "-------------------------------------"</p><p># Add the resolution to monitor
echo "Add the resolution to monitor:"
xrandr --addmode VGA1 "1440x900_60.00"
echo "-------------------------------------"</p><p># Apply the resolution
echo "Apply the resolution:"
xrandr --output VGA1 --mode "1440x900_60.00"
echo "-------------------------------------"</p><p># Query current resolution again to determine the settings valid or not
echo "Current resolution after settings:"
xrandr
echo "-------------------------------------"
设置分辨率1680 * 1050的shell脚本如下:
#!/bin/bash</p><p># set screen resolution to 1680×1050</p><p># Query current resolution
echo "Current resolution:"
xrandr
echo "-------------------------------------"</p><p># New one modeline for 1680×1050
echo "New one modeline for 1680×1050:"
cvt 1680 1050
echo "-------------------------------------"</p><p># Create resolution using "xrandr --newmode" command
echo "Create resolution 1680×1050:"
xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
echo "-------------------------------------"</p><p># Add the resolution to monitor
echo "Add the resolution to monitor:"
xrandr --addmode VGA1 "1680x1050_60.00"
echo "-------------------------------------"</p><p># Apply the resolution
echo "Apply the resolution:"
xrandr --output VGA1 --mode "1680x1050_60.00"
echo "-------------------------------------"</p><p># Query current resolution again to determine the settings valid or not
echo "Current resolution after settings:"
xrandr
echo "-------------------------------------"
- ubuntu不能设置高分辨率问题的解决方法
- ubuntu不能设置高分辨率问题的解决方法
- ubuntu不能设置高分辨率问题的解决方法-亲测可用
- ubuntu解决不能设置高分辨率的问题
- Ubuntu中virtualbox不能识别USB设置的解决方法
- Ubuntu设置静态IP不能连网的解决方法
- ubuntu 14.04设置了静态IP不能上网的解决方法
- 高分辨率手机OOM的问题
- iOS重新设置首界面不能启动问题的解决方法
- ubuntu 13.08 显示器不识别 分辨率不能设置的问题
- 使用secureCRT设置OK不能连接ubuntu的问题
- Ubuntu使用问题(一):Ubuntu不能正常关机的解决方法
- VirtualBox安装ubuntu后不能全屏显示的解决方法及设置root密码
- Ubuntu下不能重命名文件的解决方法
- VirtualBox中的Ubuntu不能全屏的解决方法
- 【Ubuntu】Vim不能访问"+寄存器的解决方法
- ubuntu vim 不能显示中文的解决方法
- Eclipse在高分辨率下图标变小的解决方法
- bbed恢复ORA-01190
- SQL Server 性能基线和监控 (powershell )
- 抽象类和接口
- 线性表之链表实作一
- activity如何显示来自于BroadcastReceiver的更新数据
- ubuntu不能设置高分辨率问题的解决方法
- 转载_Linux下的换行符\n\r以及txt和word文档的使用
- 常见的基本的调式方式
- 跳转至微信及相关问题。
- 深度剖析jquery.form.js插件 教会你如何用它
- Unity3D 4.0新功能:Mecanim动画系统基础教程
- Poj 2154 Color (Polya计数 欧拉函数优化)
- 在同一个页面使用多个不同的jQuery版本,让它们并存而不冲突
- C++如何调用C#