查看“FixVideoResolutionHowto”的源代码
来自Ubuntu中文
←
FixVideoResolutionHowto
跳到导航
跳到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
=== Introduction 简介 === This Howto is intended for those who have installed or upgraded to Hoary, and their screen resolution is very low. A possible reason for this is that your hardware (video adapter/monitor) may not have been detected properly. There are several fixes that I have seen in the forum and in the IRC support channel. One solution will work for one person and another solution will work for someone else. I hope to provide several different solutions here, ranked in decending order from what I have seen to be the most popular and successful solution to those solutions that have helped only a few. This way, hopefully it will provide an answer for everyone. Let's start with the most popular fix. For ATI Users I recommend reading the ATI - Refresh Rate & Resolution Quickfix part on the bottom of this Page. 这篇文章是写给那些已经安装或升级Hoary,但其显示分辨率很低的朋友的。一个可能的原因是系统不能够适当检测到你的硬件(显卡/显示器)。我在论坛和IRC支持平台看到过一些修改方法。每个人对分辨率的要求是不同的。我希望在这儿提供些不同的分辨率解决方法,这些方法将以我曾见过最为流行与成功的分辨率到那些几乎不提供帮助的分辨率的逆序方式排列。因此希望这样能够给每一位提供解决方法。那我们就开始最流行的方法吧。 === Run the Autodetect Script Again 再次运行自检脚本 === I'm not sure that this is the solution that works for the most people actually, but it most certainly is the quickest and easiest one. All we're doing is running the same script that tried to detect your video hardware when you initially installed. Sometimes this does help. Run the following command. 事实上,我不确定这个分辨率对大多数人是适合的,但是这个分辨率毫无疑问是最快捷和简洁的。我们所要做的仅是运行同样的脚本,当你初始安装时,这个脚本将检测你的显示硬件(译者注:显卡和显示器) For Ubuntu 6.06 (Dapper Drake): 对ubuntu 6.06 (Dapper Drake)用户: <pre><nowiki> sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.custom sudo sh -c 'md5sum /etc/X11/xorg.conf > /var/lib/x11/xorg.conf.md5sum' sudo dpkg-reconfigure xserver-xorg </nowiki></pre> For Ubuntu 5.10 (Breezy Badger) and earlier: 对 Ubuntu 5.10 (Breezy Badger)及更早的用户: <pre><nowiki> sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.custom sudo sh -c 'md5sum /etc/X11/xorg.conf > /var/lib/xfree86/xorg.conf.md5sum' sudo dpkg-reconfigure xserver-xorg </nowiki></pre> After completion, close any open windows or programs you have running on your desktop and press <code><nowiki>CTRL-ALT-Backspace</nowiki></code> to restart X. You will be asked to log into your GNOME session again and hopefully everything will be fixed. If not, try the next solution. 当运行结束后,关闭任何在桌面上运行的窗口和程序,按下CTRL-ALT-Backspace(空格键)重新启动X窗口。此时你将被要求再次登录GNOME,希望问题能被解决,如果问题没有解决,试试下面的方法。 === Undetected Monitor Specs 没有检测到显示器特性 === Open the file <code><nowiki>/etc/X11/xorg.conf</nowiki></code> in your favorite text editor. I'll assume you are using <code><nowiki>nano</nowiki></code> for an editor as it is fairly straight forward. 在你喜欢的文本编辑器中打开文件 /etc/X11/xorg.conf 。我假定你将使用nano编辑器(nano编辑器非常直观)。 <pre><nowiki> sudo nano /etc/X11/xorg.conf </nowiki></pre> Now look for a section in that file called <code><nowiki>Section "Monitor"</nowiki></code>. Once you find this section, look at the lines of text between <code><nowiki>Section "Monitor"</nowiki></code> and <code><nowiki>EndSection</nowiki></code>. There should be two lines in there that begin with the words <code><nowiki>HorizSync</nowiki></code> and <code><nowiki>VertRefresh</nowiki></code>. If those lines don't appear there, don't worry. There is a good chance that we've found the problem already! 在打开的文件中寻找叫作“Monitor”(显示器)的那节。当你找到这一节时,查看从节“Monitor”到结束处的文本行。这中间存在以HorizSync(水平)和VertReFresh(垂直)开头的两行。如果这两行不存在,不要着急,这是一个我们寻找问题的好机会。 You will need to gather two bits of information for your monitor now, either from your User's Manual, the command line, or from online. We need the horizontal sync frequency (usually measured in kHz) and the vertical refresh rate (usually in Hz). Finding these values usually just involves searching [http://www.google.com Google] with the model of your monitor. Both of these values are typically given in a range such as "30-98 kHZ" or "50-160 Hz". Write those values down, or otherwise keep them handy. Additionally, if your monitor supports it, you can just run the following command: 从你的用户手册、命令行或从网上,你将收集你显示器的两个信息,即你的水平显示频率(常用KHz表示)和垂直刷新速度(常用Hz表示)。查找这些数据常常在Google输入显示显卡模块查找。这两类数据常以范围如“30-98KHz”或“50-160Hz”给出。写下查找的值或放在手边。另外,如果你的显示器支持下面的命令,你只需输入: <pre><nowiki> sudo ddcprobe | grep monitorrange </nowiki></pre> The first two values returned are your HorizSync rates, the second pair is your VertRefresh values. 前面两个值是你的水平显示速率,后边一对为垂直刷新速率。 There are two ways to enter your monitor information into the file. One way is to run the following commands which will regenerate the file and ask you for the values in the process. 有两种方式在文件中输入你的显示器信息。一种方式运行下面给出的命令,这个命令会重新生成一个文件并在处理过程中询问显示器的水平和垂直值: <pre><nowiki> sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.custom sudo sh -c 'md5sum /etc/X11/xorg.conf > /var/lib/xfree86/xorg.conf.md5sum' sudo dpkg-reconfigure -plow xserver-xorg </nowiki></pre> The second way is to simply add those values to our <code><nowiki>/etc/X11/xorg.conf</nowiki></code> file with a text editor. But first, lets make a backup of that file just in case an error is made. 第二种方法是用文本编辑器将这些值加入到我们的 /etc/X11/xorg.conf文件中。首先,我们备份一下文件以免配置出错造成损失: <pre><nowiki> sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup </nowiki></pre> Editing this file so that it works involves adding two extra lines to the <code><nowiki>Section "Monitor"</nowiki></code> section of that file. For example, mine is shown below. 编辑这个文件,并使它在节“Monitor”中加入额外两行后运行。下面以我的配置文件为例。 ''NOTE:'' Don't <u>change</u> anything that is written in the file for now. Just add the two lines. The snippet from my file is just an example and may not apply to your hardware. ''注意:''不要修改任何文件中的配置,仅添加两行。下面的显示来自我文件,仅是一个例子,可能并不适用你的硬件。 <pre><nowiki> Section "Monitor" Identifier "FLATRON 995F" Option "DPMS" HorizSync 30-96 VertRefresh 50-160 EndSection </nowiki></pre> Now save the file, close all open applications, and press <code><nowiki>CTRL-ALT-Backspace</nowiki></code> to restart X. Assuming all goes well, you will be prompted to log into your session again. 保存文件,关闭所有打开的文件,按下CTRL-ALT-Backspace重新启动X。如果运行正常,你将再次被要求登录。 ''NOTE:'' - If you are using XFree86 then you needed to edit <code><nowiki>/etc/X11/XF86Config-4</nowiki></code>. Also if you have an issue where only 800x600 is available in the dropdown for screen resolution, then modifying the ''Modes'' line within the section in that file called <code><nowiki>Section "Monitor"</nowiki></code> and adding the required resolution could solve this. ''注意:''如果你使用XFree86,你需要编辑 /etc/X11/XF86Config-4。如果在分辨率显示上你仅有800x600,需要修改在节“Monitor”中的Mode行,然后加入你需要的分辨率,这样才能解决: <pre><nowiki> SubSection "Display" Depth 24 Modes "1024x768" "800x600" "640x480" EndSubSection </nowiki></pre> === Resolution is not delivered by the vBios vBios没有传递分辨率 === This problem appears sometimes for laptops with "non-standard"-screen resolution in combination with certain Intel graphic-chips. Background: It seems that the Video Bios (vBios) has to deliver the right resolution for the lcd-screen to enable the autoconfiguration to set this resolution. However sometimes the right resolution is not delivered and consequently the right resolution can not be implemented. You can fix the problem by overwriting the vBios setting in the RAM by using a program called 855resolution. 这个问题偶尔存在于某些集成某个Intel图形芯片包含“non-standard(非标准)”-屏幕分辨率的手提电脑。背景:尽管显卡Bios(vBios)给lcd-screen(液晶屏幕)传递合适的显示分辨率,并让液晶屏幕自动配置分辨率,但是有时合适的分辨率并没有传递,而且也常常没有被执行。你可以在RAM中通过855resolution程序刷新vBios解决这个问题。 Here is the description of the 855resolution developer: "855resolution is a software to change the resolution of an available vbios mode for the 855 / 865 / 915 Intel graphic chipset" To install 855-resolution on Ubuntu 5.10 make sure that you have included the "universe" repository and type: 下面为855resolution开发者的描述:“855resolution 程序是对855/865/915 Intel图形芯片合适的vbios模式的分辨率进行修改的一个程序”。在包含“universe”(译者注:一种源更新模式)更新的Ubuntu 5.10中安装855-resolution,输入: <pre><nowiki> sudo apt-get install 855resolution </nowiki></pre> Once the program is installed you can use the program to list all available vBios modes: 当程序安装完后,你可以使用该程序列出所有可能的vBios模式的列表: <pre><nowiki> sudo 855resolution -l </nowiki></pre> The result should look similar to: 得到的结果类似: <pre><nowiki> 855resolution version 0.4, by Alain Poirier Chipset: Unknown (id=0x25908086) VBIOS type: 2 VBIOS Version: 3412 Mode 30 : 640x480, 8 bits/pixel Mode 32 : 800x600, 8 bits/pixel Mode 34 : 1024x768, 8 bits/pixel Mode 38 : 1280x1024, 8 bits/pixel Mode 3a : 1600x1200, 8 bits/pixel Mode 3c : 1400x1050, 8 bits/pixel Mode 41 : 640x480, 16 bits/pixel Mode 43 : 800x600, 16 bits/pixel Mode 45 : 1024x768, 16 bits/pixel Mode 49 : 1280x1024, 16 bits/pixel Mode 4b : 1600x1200, 16 bits/pixel Mode 4d : 1400x1050, 16 bits/pixel Mode 50 : 640x480, 32 bits/pixel Mode 52 : 800x600, 32 bits/pixel Mode 54 : 1024x768, 32 bits/pixel Mode 58 : 1280x1024, 32 bits/pixel Mode 5a : 1600x1200, 32 bits/pixel Mode 5c : 1400x1050, 32 bits/pixel </nowiki></pre> If the resolution of your sceen is not present then you can permanently overwrite a unused mode by the value of you screen. For example if you want to overwrite the mode 41 by the resolution 2400x1600 edit the file <code><nowiki>/etc/default/855resolution</nowiki></code> <code><nowiki>如果你的屏幕分辨率不存在,你可以通过屏幕分辨率永久刷新一个非用户模式。例如,如果你想通过分辨率2400x1600刷新模式41,编辑文件 /etc/default/855resolution</nowiki></code> <pre><nowiki> sudo gedit /etc/default/855resolution </nowiki></pre> Your file should look similar to: 你的文件类似下面的显示: <pre><nowiki> } # # 855resolution default # # find free modes by /usr/sbin/855resolution -l # and set it to MODE # MODE=41 #(译者注:注意此行) # # and set resolutions for the mode. XRESO=2400 YRESO=1600 </nowiki></pre> This will ensure that the vBios mode 41 is overwritten in the RAM at boot-time, before initializing the X-windows. Since the resolution is now available in the vBios your system should automatically be able to set the right resolution after rebooting. 这个配置将使vBios模式41在启动时,初始化X-windows之前写入RAM中。现在可以获取vBios中的分辨率,因此你的系统将在重启后自动获取合适设置的分辨率。 === Incorrect DefaultDepth 过高的DefaultDepth === DefaultDepthSometimes the automatic X configuration sets the colour depth to a value higher than some hardware can properly handle. To see if this is the case for you, first backup your <code><nowiki>/etc/X11/xorg.conf</nowiki></code> file. 有时,自动的X配置设置的颜色深度高过了硬件所能达到的程度。看是否是这个问题,首先备份 /etc/X11/xorg.conf 文件。 <pre><nowiki> sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup </nowiki></pre> Now open the file in your favourite text editor. I'll assume you'll use <code><nowiki>nano</nowiki></code> for now since it is relatively simple to use, but you can use whatever text editor you like. 现在在你喜爱的文本编辑器中打开文件。我将假定你使用目前相对容易使用的nano编辑器,当然你也可以使用你喜欢的文本编辑器。 <pre><nowiki> sudo nano /etc/X11/xorg.conf </nowiki></pre> Search for the word <code><nowiki>DefaultDepth</nowiki></code> (notice it is one word) in that file. The default colour depth set by Hoary is typically "24", but as mentioned, some hardware may not be able to use a value that high. It's pretty safe to change it to something like "16" just to test whether it solves your video problems or not. If this change does not solve anything, it is just as simple to change it back the way it was. 在文章中寻找DefaultDepth词(注意一个单词)。Hoary设置的默认颜色深度一般为“24”,但是正如上文提到的,一些硬件可能不能够使用这么高的颜色深度值。一个非常安全的方法是更改深度值为像“16”这样的值,然后测试你的显卡问题是否解决。如果这样也不能够解决任何问题,将文件改回到原来样子。 Once the value of <code><nowiki>DefaultDepth</nowiki></code> is changed, save the file, close all open windows on your desktop, and press <code><nowiki>CTRL-ALT-Backspace</nowiki></code> to restart X. Assuming all goes well, you will be prompted to log into GNOME again, hopefully at a higher resolution. 当DefaultDepth值被改变了,保存文件,关闭所有在桌面上打开的窗口,按下CTRL-ALT-Backspace重启X。假定运行正常,你将被要求再次登入GNOME,希望有一个更高的分辨率。 === ATI - Refresh Rate & Resolution QuickFix ATI-刷新速率与分辨率问题快速解决 === For those of you who run an ATI card with the fglrx driver, try running (in a Terminal): 此处为运行fglrx驱动的ATI显卡用户,试着运行(终端中): <pre><nowiki> sudo aticonfig </nowiki></pre> Follow the on-screen Instructions. This should fix the issue after restarting GDM. For Instance on a Setup with: 按屏幕显示指令运行,当重启GDM后,问题将被解决,如一个设置为: * 1 CRT Monitor * No TV-Out I would be running these commands: 我将运行这些命令: <pre><nowiki> sudo aticonfig --initial --input=/etc/X11/xorg.conf sudo aticonfig --resolution=1600x1200,1280x1024,1024x768 sudo aticonfig --force-monitor=crt1,notv </nowiki></pre> After you ran your aticonfig commands, you need to restart GDM, to restart GDM use the following command: 当你运行aticonfig命令后,你需要重新启动GDM,重启GDM命令如下: <pre><nowiki> /etc/init.d/gdm restart </nowiki></pre> That should fix it for good! If you experience a different Resolution being used for GDM than your Desktop, you can scroll to the bottom of this Page to: "GDM uses a different Resolution than my Desktop" to fix the issue. 这将一劳永逸的解决问题!如果通过GDM运行一个不同的分辨率而非你的Desktop(译者注:不清楚是否为桌面),你可以移动到本文底部“GDM uses a different Resolution than my Desktop”来解决你的问题。 === GDM looks right, but Gnome looks wrong GDM正常,但Gnome不正常 === This problem occured on a vanilla installation of 5.10 that -- somewhat unnaturally -- was running under <code><nowiki>VirtualPC</nowiki></code>. Because this was not a normal device, I set the device to <code><nowiki>VESA</nowiki></code> and the resolution to <code><nowiki>1024x768</nowiki></code> in the configuration manager by: 这个问题偶尔不合规律的发生在安装了vanilla 5.10运行虚拟PC的机器上。因为这不适一个普通的设备,在配置管理器中我为该设备设置为VESA,分辨率为1024x768: <pre><nowiki> sudo dpkg-reconfigure xserver-xorg </nowiki></pre> Naturally, make sure you configure these settings properly for your hardware. 当然,确保你配置的都是适合你硬件的。 These settings allowed GDM to present a normal login screen. However, completing login caused the display to fail. 这个设置允许GDM提供一个普通的登录界面。然而,正在登录时将引起显示错误。 Fix this by running the gconf-editor tool as a normal user and altering the screen settings within Gnome's XML configuration registry to equal the <code><nowiki>/etc/X11/xorg.conf</nowiki></code> settings: 解决这个问题通过普通用户运行gconf-editor工具,在Gnome's XML 配置中选择屏幕设置,保持和 /etc/X11/xorg.conf一致(译者注:此句等待高手修改): <pre><nowiki> startx gconf-editor </nowiki></pre> Browse the editor to <code><nowiki>/desktop/gnome/screen/default/%d</nowiki></code> where <code><nowiki>%d</nowiki></code> will probably be <code><nowiki>0</nowiki></code>. Select this node and change the <code><nowiki>resolution</nowiki></code> to your resolution of choice, and make sure <code><nowiki>rate</nowiki></code> is something functional for your display device as well. 使用编辑器打开/desktop/gnome/screen/default/%d(d常为0),选择节点并修改想要选择的分辨率,确信你的显示设备拥有这个速率。 Exit the editor, and try logging in through GDM again. 退出百年及,并再次登录GDM。 === GDM uses a different Resolution than my Desktop GDM使用与我的Desktop不同的分辨率 === This problem is easily solvable; to fix it do the following: 这个问题容易解决;按下面的步骤进行: 1) Make a Backup of your xorg.conf 1)备份你的xorg.conf <pre><nowiki> sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak </nowiki></pre> 2) Open xorg.conf 2)打开xorg.conf <pre><nowiki> sudo gedit /etc/X11/xorg.conf </nowiki></pre> 3) Locate your Screen Entry 3) 载入屏幕 <pre><nowiki> Section "Screen" </nowiki></pre> You will find multiple entries similar to: 你会发现很多类似如下: <pre><nowiki> SubSection "Display" Depth 24 Modes "1280x1024" "1024x768" EndSubSection </nowiki></pre> The First Entry in the "Modes" Line is what GDM will use, so change it to something lower/higher (Please make sure you know that your monitor and Graphic Card BOTH support this Resolution). 第一个进入点“Modes”行是GMD运行用的,因此将起更改为更低/更高(确信你知道你哦显示器和显卡BOTH支持这个分辨率)。 Save the file and close all running applications, restart GDM (/etc/init.d/gdm restart) and look if everything went fine. If not you can always use: 保存文件,关闭所有运行程序,重新启动GDM(/etc/init.d/gdm restart),查看是否正常。 如果不正常,你可以使用如下命令: <pre><nowiki> sudo cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf </nowiki></pre> to restore your system to the previous state. 恢复先前的状态 === The End 结束 === So far, this is all of the possible solutions I've collected for this problem. If none of the above corrected your situation, consider posting your question in the [http://www.ubuntuforums.org Ubuntu Support Forum] or in the #ubuntu IRC support channel on the <code><nowiki>irc.freenode.net</nowiki></code> network. 到目前为止,这是我收集到的所有可能解决问题的方法,如果上面没有你能够解决问题的方法,在[[[[category:CategoryDocumentation|Ubuntu]] Support Forum]]中提交你的问题或者在irc.freenod.net网上的#ubuntu IRC 支持平台上提交你的问题。 [[category:CategoryDocumentation]] ---- * 文章来源:官方WIKI<br> 翻译人员:newrain <br>校对人员:<br> 文章状态:
返回
FixVideoResolutionHowto
。
导航菜单
页面操作
页面
讨论
阅读
查看源代码
历史
页面操作
页面
讨论
更多
工具
个人工具
登录
导航
首页
最近更改
随机页面
页面分类
帮助
搜索
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息