admin 管理员组

文章数量: 1184232

在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,虽然“系统设置/显示”里面还是显示未知,但分辨率的确提高了。

以下是本篇文章的内容:

--------------------------------------------------------------->>>

<<<---------------------------------------------------------------


特此感谢!终于搞定了浪费了大半天的问题。

不过,关机重新开机后此设置有时候就没有了,又恢复到原来的分辨率了。

现在把设置新分辨率的命令写到一个sh脚本中,如果分辨率恢复到原来的自动执行此shell文件就可以了。

代码如下:

#!/bin/bash
# set screen resolution to 1400 * 900
# Query current resolution
echo "Current resolution:"
xrandr
echo "-------------------------------------"
# New one modeline for 1440 * 900
echo "New one modeline for 1440 * 900:"
cvt 1440 900
echo "-------------------------------------"
# 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 "-------------------------------------"
# Add the resolution to monitor
echo "Add the resolution to monitor:"
xrandr --addmode VGA1 "1440x900_60.00"
echo "-------------------------------------"
# Apply the resolution
echo "Apply the resolution:"
xrandr --output VGA1 --mode "1440x900_60.00"
echo "-------------------------------------"
# Query current resolution again to determine the settings valid or not
echo "Current resolution after settings:"
xrandr
echo "-------------------------------------"

设置分辨率1680 * 1050的shell脚本如下:

#!/bin/bash
# set screen resolution to 1680×1050
# Query current resolution
echo "Current resolution:"
xrandr
echo "-------------------------------------"
# New one modeline for 1680×1050
echo "New one modeline for 1680×1050:"
cvt 1680 1050
echo "-------------------------------------"
# 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 "-------------------------------------"
# Add the resolution to monitor
echo "Add the resolution to monitor:"
xrandr --addmode VGA1 "1680x1050_60.00"
echo "-------------------------------------"
# Apply the resolution
echo "Apply the resolution:"
xrandr --output VGA1 --mode "1680x1050_60.00"
echo "-------------------------------------"
# Query current resolution again to determine the settings valid or not
echo "Current resolution after settings:"
xrandr
echo "-------------------------------------"

本文标签: 辨率设置 环境下分 显示