RadeonHD
From Gentoo Linux Wiki
This guide explains how to install the open-source RadeonHD drivers.
Contents |
[edit] Introduction
There have been complaints about catalyst ("fglrx") for ages. There was already an open-source driver called "radeon" (see Radeon), but it lacked support for some newer devices (as of March 2009, some devices are better supported by Radeon — 2D acceleration, Xv etc for R600-chips, for example). In September 2007, Novell started developing another open-source driver called RadeonHD, for use with the Radeon HD GPU series.
r500 support includes 2D and 3D acceleration, while r600 and r700 include 2D acceleration. 3D acceleration on r600 and r700 is experimental. For the latter two, 3D acceleration may be supported by the proprietary blob (see Fglrx).
Supported cards are listed on the official webpage, under header 3. Most modern Radeon HD-type GPUs and IGPs are supported.
[edit] Installing
[edit] Configuring the kernel
DRI support has been added for r5xx cards in May 2008, while r6xx and r7xx DRI has been added too but are still being worked on.
So you'll want to start enabling DRM support in your kernel now, especially if you have an r5xx RadeonHD :
| Linux Kernel Configuration: Kernel configuration |
Device Drivers --->
Graphics support --->
<M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
<M> ATI Radeon
[ ] Enable modesetting on radeon by default - NEW DRIVER
|
r6xx and r7xx DRI support has been realeased since kernel version 2.6.32.
I've read that r5xx user could enable the modesetting option in the kernel. I've not tried it so I can't confirm.
[edit] Option one: AGP GPUs
If you have an AGP GPU, enable the following options:
| Linux Kernel Configuration: AGP GPU on kernel 2.6.24 or earlier |
Device Drivers --->
Character devices --->
Graphics support --->
<M> /dev/agpgart (AGP Support)
<M> Enable whatever your AGP chipset as well (see lspci for this information)
|
| Linux Kernel Configuration: AGP GPU on kernel 2.6.25 or later |
Device Drivers --->
Graphics support --->
<M> /dev/agpgart (AGP Support)
<M> Enable whatever your AGP chipset as well (see lspci for this information)
|
[edit] Option two: PCI-e GPUs
If you have a PCI-e GPU, enable the following:
| Linux Kernel Configuration: PCI-e GPU on kernel 2.6.24 and earlier |
Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---> [*] PCI support [*] PCI Express support |
| Linux Kernel Configuration: PCI-e GPU on kernel 2.6.25 and later |
Bus options (PCI etc.) ---> [*] PCI Express support |
[edit] Finishing kernel configuration
Compile and install your kernel. Don't forget to add the modules you enabled to /etc/modules.autoload.d/kernel-2.6:
intel-agp (only if your GPU uses AGP) (or whatever your AGP chipset is) agpgart (only if your GPU uses AGP)
You probably do not need to add the drm module to the list, it will be autoloaded as soon as support for it is there.
[edit] Building and installing the sources
There are already releases of the RadeonHD driver. The releases will be relatively outdated though, and certainly with such a young project it might be worth it to try to use the git version. If it works for you and really want, for example, some initial acceleration for your card, the git version might suit you best. If you just want a working driver, go for the release version.
[edit] Option one: release version
If you simply want to use a release version:
x11-drivers/xf86-video-radeonhd
You should modify the VIDEO_CARDS variable on your /etc/make.conf file by adding both radeonhd and radeon to it.
VIDEO_CARDS="radeonhd radeon"
Now install radeonhd:
[edit] Option two: get live sources from git
Currently, there's no git ebuild for RadeonHD in portage, so we'll have to choose from three sub-options. Either install the compiled driver manually (sub-option one). Or add an ebuild to a local overlay (sub-option two). Or finally you can use an existing ebuild found in zen-overlay (sub-option three).
[edit] Sub-option one: fetch and install sources manually
The first step, of course, would be to make sure you have a git client installed:
Now go to a directory to download the sources to, usually /usr/src/.
And checkout those sources:
Now build that sucker!
This should install the RadeonHD driver for you. Please note that it might be nontrivial to completely uninstall the driver now.
Also note that you can also drop off the --prefix=/usr part so the driver will be installed to /usr/local. You should at this point find out which path your X downloads its modules from. The next will prepend module search directory under /usr/local before the one which in many computers is the default X.org module path. Not that this can cause your X not to start if main module path is changed for some reason so don't forget this setting's existence. The second path needs to be the real X.org module path.
Section "Files" ModulePath "/usr/local/lib/xorg/modules,/usr/lib/xorg/modules" EndSection
This way you won't be installing anything under main system and can just remove the option from xorg.conf if something goes wrong.
[edit] Sub-option two: add an ebuild to a local overlay
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/driver/xf86-video-radeonhd"
EGIT_BRANCH="master"
EGIT_BOOTSTRAP="./autogen.sh"
XDPVER=-1
inherit git x-modular
DESCRIPTION="Experimental Radeon HD video driver."
HOMEPAGE="http://wiki.x.org/wiki/radeonhd"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND=">=x11-base/xorg-server-1.3.0"
DEPEND="${RDEPEND}
x11-proto/xextproto
x11-proto/xproto"
Add this file to your overlay and emerge it.
[edit] Sub-option three: install from zen-overlay
It appears there's a live git ebuild in zen-overlay now.
[edit] Configuring xorg.conf to use the RadeonHD drivers
Start with a working configuration. See Xorg for a little bit more information on this, as well as the official X server configuration howto. In your "device" section, add the following option:
...
Section "Device"
Driver "radeonhd"
EndSection
...
Recent versions of the RadeonHD driver have support for composite/AIGLX, so if you want to use a compositing window manager like Compiz you can enable this:
...
Section "Extensions"
Option "Composite" "On"
EndSection
Section "ServerFlags"
Option "AIGLX" "On"
EndSection
...
If not, you can also explicitly configure these options as "Off".
Here is a working configuration exemple for dualhead with radeonHD. Adapt it to your monitors specifications
Be aware that this will slow up your machine as it is quite not well supported at this time.
Section "Module"
Load "glx"
Load "dri"
EndSection
Section "ServerFlags"
Option "AIGLX" "On"
EndSection
Section "Monitor"
Identifier "Monitor"
VendorName "ACME"
ModelName "WhoCares"
HorizSync 30 - 81
VertRefresh 50 - 160
Modeline "1280x1024_75.0" 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
Option "PreferredMode" "1280x1024_75.0"
Option "DPMS" "False" #No screen blanking
EndSection
Section "Monitor"
Identifier "TVHD"
VendorName "ACME"
ModelName "WhoCares"
HorizSync 26 - 81
VertRefresh 24 -75
Modeline "1920x1080_60.0" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
Option "PreferredMode" "1920x1080_60.0"
Option "DPMS" "False" #No screen blanking
Option "RightOf" "Moniteur"
EndSection
Section "Device"
Identifier "ATI Radeon HD"
Driver "radeonhd"
BusID "PCI:0X:00:0"
Option "monitor-DVI-I_2/digital" "Monitor"
Option "monitor-DVI-D_1" "TVHD"
Option "RROutputOrder" "DVI-I_2/digital,DVI-D_1"
Option "AccelMethod" "exa"
Option "DRI" "On"
Option "BackingStore" "On"
EndSection
Section "Screen"
Identifier "Screen0"
Device "ATI Radeon HD"
Monitor "Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
Virtual 3200 1080 # Standard Monitor + TV HD share the same virtual Screen horizontaly
EndSubSection
EndSection
Section "DRI"
Mode 0666
EndSection
Section "Extensions"
Option "Composite" "On"
EndSection
[edit] r600 and r700 3D
DRM support for 3D is available in kernel since 2.6.32.
DRM in kernel 2.6.33 contains IRQ support.
Mesa r600 driver was added in 7.6.1, however it it good idea to use 7.7 at least.
However 3D is quite slow and still buggy.
The following will help you get the latest update from the official git tree.
Add the x11 overlay to layman:
You'll need to unmask those packages. To do so comment those lines like in that exemple:
#=x11-libs/libdrm-9999 #=media-libs/mesa-9999 #=x11-apps/mesa-progs-9999
You'll also need to add r600 to your VIDEO_CARDS variable.
VIDEO_CARDS="fbdev vesa radeon radeonhd v4l r600"
Now, merge:
[edit] Known limitations
- See the X.org wiki for this information.
- Its not possible to use the radeonhd driver while the fglrx module is loaded, and it's loaded each time you boot your machine. Anyway the best solution is to unmerge it. You won't be able to use it since fglrx need that DRM support disabled in kernel configuration and that way it won't be auto loaded on boot. To get it short you'll have to choose between one or the other: you won't be able to have both modules installed.
[edit] Troubleshooting
[edit] mplayer
MPlayer may have difficulties playing video with the radeonhd driver because it expects xv, while xv may or may not be complete for your card, causing X to crash. To fix this, add the following line to /etc/mplayer/mplayer.conf:
vo=x11
