个人工具

“UbuntuHelp:RadeonDriver/zh”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
双头显示
Xinerama
第271行: 第271行:
 
==== Xinerama ====
 
==== Xinerama ====
  
Using Xinerama requires declaring all devices twice in Xorg.conf. Even if you only have one video card, you have to define it twice if you use two of its video output options. Your Xorg.conf will thus contain two monitor, device and screen definitions. Below is an example of this:
+
使用Xinerama,你需要在Xorg.conf文件中将所有设备声明两次。即使只有一块显卡,只要你同时使用两路视频输出选项,就必须将显卡定义两次。你的Xorg.conf将包含两个显示器、两个显示卡和两个屏幕分辨率定义。以下是示例:
  
 
<pre><nowiki>
 
<pre><nowiki>
第323行: 第323行:
 
</nowiki></pre>
 
</nowiki></pre>
  
Make sure the Monitor``Layout definition is correct. The types that can be used can be found in the ''ati'' manual page. Also make sure both screen definitions refer to the right device and monitor and the correct display modes are set.
+
要确定Monitor``Layout 定义是正确的。你可以在ATI驱动的使用手册中查找可用的类型。还要确保两个屏幕的定义与所指的显示器正确对应,并且显示模示设置是正确的。
  
 
+
同样,"Server``Layout" 段也要做一些更改。在Ubuntu的标准Xorg.conf文件中,仅定义了Screen0。请确保它包含以下的设置:
Some changes also have to be made to the "Server``Layout" section. In the standard Ubuntu Xorg.conf only Screen 0 is defined. Make sure it contains the following settings:
+
  
 
<pre><nowiki>
 
<pre><nowiki>
第334行: 第333行:
 
</nowiki></pre>
 
</nowiki></pre>
  
Note that Screen 1 could also be "Clone", "Left``Of", "Right``Of", "Above", or "Below".
+
注意:Screen 1与Screen0之间的关系可能为以下5种: "Clone"(克隆), "Left``Of"(居左), "Right``Of"(居右), "Above"(在上), or "Below"(在下).
  
 
=== How does it work? (under construction) ===
 
=== How does it work? (under construction) ===

2007年8月13日 (一) 17:09的版本

ATI Radeon 开源驱动 HowTo

本指南将向您说明如何使用自由、开源的 ATI 显卡驱动——"radeon"。它提供了硬件支持的 2D 和 3D 加速。对有些显卡来说,这个驱动或许不如 fglrx 驱动稳定,但它与 AIGLX 兼容,而且有更好的双头支持。


适用于您的显卡么?

请首先检查您显卡的名称和芯片:

$ lspci

在列表中,试着寻找这样的几行(它们对应于您的显卡):

01:00.0 VGA compatible controller: ATI Technologies Inc RV350 AS [Radeon 9550]
01:00.1 Display controller: ATI Technologies Inc RV350 ?? [Radeon 9550] (Secondary)


不支持

您无法在以下的显卡(系列)中使用 "radeon" 驱动:

X1300 / R515 based cards.
X1600 / R530 based cards.
X1800 / R520 based cards.
X1900 / R580 based cards.

只有 2D 加速

Xpress 200M Northbridge integrated GPUs

实验性的 3D 加速

以下这些显卡(系列)包含完整的 2D 加速和实验性的 3D 加速支持:

9500 / R300 based cards.
9600 / rv350 or rv360 based cards.
9700 / R300 based cards.
9800 / R350 or R360 based cards.
X300 / rv370 based cards.
X600 / rv380 based cards.
X700 / rv410 based cards.
X800 / R420 or R423 or R430 or R480 based cards.
X850 / R480 or R481 based cards.


完整 3D 加速

以下这些显卡(系列)包含完整的加速支持:

7000 / rv100 based cards.
7200 / R100 based cards.
7500 / rv200 based cards.
8X00 / R200 based cards.
9000 / rv250 based cards.
9100 / R200 based cards.
9200 / rv280 based cards.

对基于 rv280 的显卡,在 DVI 输出时包含一个 bug,请参见 UbuntuHelp:Radeon_9200/9250_(RV280)_and_DVI

Ubuntu 6.10 (Edgy) installation with AIGLX

The ati driver is already shipped with Ubuntu, so you won't have to download it. This driver is completely compatible with AIGLX, so if you want an accelerated desktop, you won't need to install XGL.

删除闭源的 fglrx 驱动

fglrx 是由 ATI 提供的官方闭源的 Radeon 驱动。它与开源的 "radeon" 驱动相冲突。如果 "fglrx" 内核模块在启动时加载,X 虽然可以改为使用 "radeon" 驱动,但“直接渲染”(DRI)将被禁止,从而导致严重的性能下降。如果您之前使用了闭源的 "fglrx" 驱动,在使用开源 "radeon" 驱动之前强烈建议卸载 "fglrx" 模块。具体步骤如下:

sudo modprobe -r fglrx

为了禁止启动时加载该模块,您可以将其列入“黑名单”。

在 /usr/lib 中的 libGL.so 可能还是安装 xorg-driver-fglrx 时的版本。您可以通过以下命令检查这一点:

$ glxinfo | grep vendor

如果您看见:client glx vendor string: ATI,则说明 libGL.so 仍然是来自 ATI 的版本。请删除 xorg-driver-fglrx 包,并保证安装了 libgl1-mesa-glx 和 libgl1-mesa-dri 两个软件包:

$ sudo apt-get remove xorg-driver-fglrx
$ sudo apt-get install libgl1-mesa-glx libgl1-mesa-dri

配置 X.org

本方法基于 /etc/X11/xorg.conf。编辑该文件时您需要拥有管理员权限(使用 "sudo" 命令)。您可以在 Ubuntu (Gnome) 下使用 gedit,或者在 Kubuntu (KDE) 下使用 kate。如果您在命令行模式下,也可以使用vim 或者 nano

sudo vim /etc/X11/xorg.conf

sudo nano /etc/X11/xorg.conf

配置您的显卡驱动设备 ("Device") 段

您首先需要找到已经与您显卡相关的设备段。它可以有任意的名字,甚至没有名字(如果您正在安装 xserver)。一般而言,您可以在鼠标 (mouse) 项后面找到它。

设备段看起来应该是这样的:

Section "Device"
	Identifier	"Radeon 9600"
	Driver		"ati"
	BusID		"PCI:1:0:0"
	Option		"XAANoOffscreenPixmaps"
EndSection

Identifier 是您给自己的显卡起的名字,最好短一点。名字可以随便起(不过我只测试了字母和数字)。 Driver 表示您想要使用的驱动程序。必须是 ati不是 radeon 或者 fglrx。 BusID 标明了显卡的硬件地址,永远是 PCI,即使是 AGP 显卡。可以通过 lspci 命令获得BusID。 如果 lspci 显示 01:00.0,则 xorg.conf 中的 BusID 就是 "PCI:1:0:0""XAANoOffscreenPixmaps" 选项对 AIGLX 桌面加速是必须的。

显示器 ("Monitor") 段

显示器段看起来如下所示:

Section "Monitor"
	Identifier	"Generic Monitor"
	Option		"DPMS"
	HorizSync	28-72
	VertRefresh	43-60
EndSection

Identifier 是您给自己的显示器起的名字。DPMS 选项是关于电源控制的——我现在不太确定——但肯定需要与您的硬件兼容。 HorizSyncVertRefresh 选项一般来说是不必要的,但对我而言却是必须的。These are given in the example but are pretty much standard. 您可以参考显示器手册来获得该参数。

屏幕 ("Screen") 段

看起来基本如下所示:

Section "Screen"
	Identifier	"Default Screen"
	Device		"Radeon 9600"
	Monitor		"Generic Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes		"1440x900" "1024x768"
	EndSubSection
EndSection

Identifier 是您给自己的屏幕起的名字,具体叫什么无关紧要,但我更喜欢短一些的。 Device 必须是您之前给显卡起的名字。 Monitor 是您之前给显示器起的名字。 DefaultDepth 是供 X.org 使用的每像素比特数 (bpp色深) ,一般都是 24。 "Display" 子段中的显示模式必须被您的显示器所支持。如果您不知道,请选择1024x768,这是最可能的。如果您知道,请把您希望使用的分辨率列在前面,其他的分辨率列在后面。

完成

如果 xorg.conf 中不包含如下两段,请将它们添加在文件结尾处:

Section "DRI"
Mode 0666
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection

之后,请检查 "ServerLayout" 段:

Section "ServerLayout"
	Option		"AIGLX"		"true"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
EndSection

AIGLX 选项将启动 AIGLX,从而支持绚丽的 3D 桌面特效。 Identifier 不能更改。 Screen 是您在屏幕段为屏幕起的名字。 InputDevice 是除了显卡和显示器之外,您希望使用的设备,可以在该文件前面的几个输入设备段中找到它们。

重启并获得崭新的加速桌面!

如果 Xserver 已经运行,请同时按下 Ctrl-Alt-Backspace 重启 Xserver,否则,请输入 startx

如果您希望利用 AIGLX,使用新的窗口管理器,推荐 compiz。但首先,您不妨先测试您的驱动程序:

测试新安装的驱动

为了判断是否正在使用新安装的驱动,您可以测试3D设置。用如下的命令测试 OpenGL 加速:

$ glxinfo | grep vendor

结果必须是 SGI ,否则说明安装不正确。请确保您重启了 Xserver,如果还不行,请参见 “删除闭源的 fglrx 驱动”一节。

$ glxinfo | grep "direct rendering"

如果结果是“No direct rendering”,则您的显卡可能不被开源驱动所支持。您不得不安装闭源 fglrx 驱动。请注意安装这个驱动将使您无法使用 AIGLX,原因是 ATI 无法为他们的硬件提供合适的驱动。

调试驱动程序

有一些驱动程序选项可以使性能得到提高。以下是/etc/X11/xorg.conf中有关设备部分的一个示例:

Section "Device"
Identifier      "ATI Technologies, Inc. Radeon 9600"
Driver          "ati"
Option          "AGPMode"       "8"
Option          "AccelMethod"   "EXA"
Option          "ColorTiling"   "on"
BusID           "PCI:1:0:0"
EndSection

AGPMode选项用来指定AGP总线相对于AGP 1x的倍速。由于有报告称更高的AGP总线倍速造成运行不稳定,AGP 1x被设置为默认速度。但对于一些显卡来说,将AGP总线设置为与BIOS中相同的倍速十分重要。

您可以在ATI驱动的manpage中查找更多的选项。需要注意的是有一些选项并未列出,但确实是有效的。

$ man ati

双头显示

有两种方式可以在X中实现双头显示(一台计算机连接两个显示器): 使用MergedFB或Xinerama。MergedFB的配置非常简单,而且在两个屏幕上都有DRI支持(需要3D支持)。所以,这是设置双头显示的优选方案。

MergedFB

在一个额外的显示器被检测到时,MergedFB就自动启用了。如果配置不正确,这会导致两个屏幕以克隆方式显示同样的画面,而不是将桌面进行扩展。要得到一个更大的桌面,你可以将以下的代码加入到Xorg.conf文件的“Device”块中:

Option  "MonitorLayout"                 "LCD, CRT"
Option  "CRT2Position"                  "RightOf"
Option  "MetaModes"                     "1400x1050-1024x768"
Option  "MergedXinerama"                "on"
Option  "MergedNonRectangular"          "true"
Option  "MergedFB"                      "true"

请注意以下事项:

- 即便你使用的是两个LCD或两个CRT,还是要把显示器布局设置为一个LCD和一个CRT。这样的设置决定了哪一台是主显示器。

- “CRT2位置”指明次显示器与主显示器的位置关系。可用的选项有:克隆、居左、居右、在上和在下。

- "Meta``Modes" sets the monitor resolutions for Primary-Secondary monitors, which together make up the total virtual desktop. In this double-resolution example the primary display runs at 1400x1050 and the second display runs at 1024x768. These resolutions can also be equal. Defining a single resolution results in clone mode and putting multiple resolutions (single or double) between the parentencies allows switching with CTRL-ALT-+/-.

- the "Merged``Xinerama" setting assists in window placement support.

- If the two screens defined with "Meta``Modes" are not working at the same resolution, "Merged Non Rectangular" blocks the smaller one from scrolling by not allowing the mouse pointer to use the height difference of the two resolutions on the smallest screen.


If you do not get dual-head working based on these instructions, start by reading the "radeon" module's manual. This contains an overview of options that can be used with explanation of how they work. Reading the manual can be done by opening a terminal and running the following command:

$ man radeon

Please note However that this manual is out of date, which means some of the available options might not be described there.

Xinerama

使用Xinerama,你需要在Xorg.conf文件中将所有设备声明两次。即使只有一块显卡,只要你同时使用两路视频输出选项,就必须将显卡定义两次。你的Xorg.conf将包含两个显示器、两个显示卡和两个屏幕分辨率定义。以下是示例:

Section "Monitor"
	Identifier   "Monitor0"
	Option	    "DPMS" "true"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	Option	    "DPMS" "true"
EndSection

Section "Device"
	Identifier  "ati0"
	Driver      "ati"
	Option      "MonitorLayout"  "LVDS, CRT"
	Screen      0
	BusID       "PCI:1:0:0"
EndSection

Section "Device"
	Identifier  "ati1"
	Driver      "ati"
	Option      "MonitorLayout"  "LVDS, CRT"
	Screen      1
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "ati0"
	Monitor    "Monitor0"
	DefaultDepth     24
	SubSection "Display"
		Depth     24
		Modes		"1400x1050" "1280x1024" "1024x768" "800x600" "640x480"
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "ati1"
	Monitor    "Monitor1"
	DefaultDepth     24
	SubSection "Display"
		Depth     24
		Modes		"1400x1050" "1280x1024" "1024x768" "800x600" "640x480"
	EndSubSection
EndSection

要确定Monitor``Layout 定义是正确的。你可以在ATI驱动的使用手册中查找可用的类型。还要确保两个屏幕的定义与所指的显示器正确对应,并且显示模示设置是正确的。

同样,"Server``Layout" 段也要做一些更改。在Ubuntu的标准Xorg.conf文件中,仅定义了Screen0。请确保它包含以下的设置:

	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
	Option         "Xinerama"   "true"

注意:Screen 1与Screen0之间的关系可能为以下5种: "Clone"(克隆), "Left``Of"(居左), "Right``Of"(居右), "Above"(在上), or "Below"(在下).

How does it work? (under construction)

Here I will give any information not related to the direct install or configuration of the driver.

The features of your hardware are useless unless the driver (the piece of software which controls it) has support for them. This is a serious issue with graphics cards, a vital component which is constantly being updated. The main issue with these cards is between the use of Free Software drivers, which are included in Ubuntu (such as the "nv" driver for Nvidia cards and the "ati" for ATI's cards) and the non-free drivers offered by the card's manufacturers. Since the inner working of these cards are often trade secrets the proprietary manufacturer's drivers often have more features than the Free Software drivers, but cannot be included in Ubuntu for moral, technical (they often only work on the x86 platform) and sometimes legal reasons.

The exception to this rule is the new, Free Software "radeon" driver, which offers full OpenGL 3D acceleration on graphics cards such as the Radeon 9700 pro and below.

The "radeon" driver is automatically called by the "ati" driver if your card is supported. You should therefore specify "ati" in xorg.conf. 3D acceleration is enabled using the drivers from the DRI project such as: r300 (still experimental, but works fine), r200, r100, r128. For a complete map of supported chipsets see DRI page (this page however is out of date).

ToDo

The radeon driver documentation still is completely out of date, we still ABSOLUTELY need to fix that. Gotta contact the package maintainer for updating the man pages.

Add more options to the "Tweaking" section and document the few which are there.

dual-head section completed by TomVerdaat. Thanks :)


See Also

[1] - Known bugs in the ati driver

UbuntuHelp:BinaryDriverHowto/ATI - The Wiki page for the proprietary ATI driver "fglrx" which also offers 3D acceleration, and works on newer cards than the "radeon" driver. This driver was reported to be unstable, has fewer dual head support and does not support AIGLX at all.

Thinkpad Wiki Page On Radeon Driver - A page containing useful options and configurations for the "radeon" driver.

Xorg 7.1 Manual - X.org 7.1 official documentation.


Page maintained by Benjamin Couhe ( voraistos )