radeon
This is a guide for setting up the radeon (x11-drivers/xf86-video-ati) open-source driver for AMD/ATI-based graphics cards. See FreeDesktops Radeon wiki article for supported chipsets and features.
This driver is generally slightly slower in 3D and in some cases significantly faster in 2D than the proprietary fglrx driver, however is completely open source and able to utilize KMS, which provides a framebuffer as well.
Support for most recent cards is usually included in newer kernels, however, newer features may only be available in recent versions of the driver. If you need newer versions, try to make sure that you keyword x11-libs/libdrm, media-libs/mesa and x11-drivers/xf86-video-ati at the same time.
Contents |
[edit] Alternate Drivers
Before starting this guide, take a look at the other drivers available for your card.
[edit] Kernel Config
For the newest cards (R8xx, Radeon HD5xxx and above), kernel-2.6.36 or above is necessary.
[edit] Kernels >=3.0.0
| Linux Kernel Configuration: Enabling radeon driver and KMS |
Device Drivers ---> Graphics support ---> <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> <*> ATI Radeon [*] Enable modesetting on radeon by default - NEW DRIVER General setup ---> [*] Enable PCI quirk workarounds |
[edit] Kernels >=2.6.33
| Linux Kernel Configuration: Enabling radeon driver and KMS |
Device Drivers ---> Graphics support ---> <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> <*> ATI Radeon [*] Enable modesetting on radeon by default General setup ---> [*] Enable PCI quirk workarounds |
[edit] Kernels <= 2.6.32
| Linux Kernel Configuration: Enabling radeon driver and KMS |
Device Drivers ---> Graphics support ---> <*> /dev/agpgart (AGP Support) <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> <*> ATI Radeon [*] Staging drivers ---> [ ] Exclude Staging drivers from being built [*] Enable modesetting on radeon by default |
[edit] AGP Cards
| Linux Kernel Configuration: AGP Cards |
Device Drivers --->
Graphics support --->
<*> /dev/agpgart (AGP Support)
(Enable your AGP Chipset as well)
|
If building with modules, go ahead and build the kernel and restart the system. If using built-in drivers, don't build until after the firmware is installed in the next section.
[edit] Device Firmware
The radeon driver requires the device firmware for proper operation. This firmware needs to be compiled into the kernel if the drivers are built-in, or simply installed and available if they are built as modules.
[edit] Installing a firmware package
First, determine the chipset of the card using
In general, for cards with R600 (Radeon HD2000) or newer:
And all other cards:
If compiling with modules, skip to Recompiling and Configuring.
[edit] With a built-in driver
| Linux Kernel Configuration: Adding the radeon-ucode firmware into the kernel |
Device Drivers --->
Generic Driver Options --->
[*] Include in-kernel firmware blobs in kernel binary
# RadeonHD 2000, 3000, and 4000 series cards:
(radeon/R600_rlc.bin
radeon/R700_rlc.bin) External firmware blobs
# RadeonHD 5000 and above(Evergreen):
(radeon/CEDAR_me.bin
radeon/CEDAR_pfp.bin
radeon/CEDAR_rlc.bin
radeon/CYPRESS_me.bin
radeon/CYPRESS_pfp.bin
radeon/CYPRESS_rlc.bin
radeon/JUNIPER_me.bin
radeon/JUNIPER_pfp.bin
radeon/JUNIPER_rlc.bin
radeon/REDWOOD_me.bin
radeon/REDWOOD_pfp.bin
radeon/REDWOOD_rlc.bin) External firmware blobs
(/lib/firmware/) Firmware blobs root directory
|
If the correct firmware is selected, compile the kernel and reboot.
For example:
CONFIG_EXTRA_FIRMWARE="radeon/PALM_pfp.bin" CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/"
[edit] Using module auto-detect for a hint
To find out which firmware files are specifically needed, build the radeon driver as a module, install the firmware packages and load the module with kernel modesetting (KMS) enabled.
- Build the kernel with "Enable KMS by Default" and reboot.
- In a running system:
- Reboot and enable modesetting in the arguments to the kernel:
Now read the output of dmesg and Xorg.N.log. There should be a line such as" requesting firmware" or "microcode" and card generation. As an example, an X1300 card which is from the R500 generation, the requested file is R520_cp.bin. Newer cards may need more than one file.
If the kernel has an initrd and includes the radeon kernel module, then the initrd should also include the firmware. (If unsure, it is safe to skip this step.)
[edit] Recompilation and Configuring
[edit] Mesa and X11 Drivers
Edit /etc/make.conf to reflect the new driver:
VIDEO_CARDS="radeon"
Recompile mesa to support DRI in the new driver. Without this step, 3D support will not work.
Next, recompile xorg-drivers to pull in the necessary packages for radeon:
For the best performance with modern drivers, make sure Gallium is selected.
| Code: eselect mesa list |
r300 (Radeon R300-R500) [1] classic [2] gallium * r600 (Radeon R600-R700, Evergreen, Northern Islands) [1] classic [2] gallium * sw (Software renderer) [1] classic [2] gallium * |
[edit] XOrg Configuration
A default radeon setup with KMS installed should not need an /etc/X11/xorg.conf file. If one exists, move it aside to let X.Org auto-detect everything:
[edit] User Settings
For acceleration, users must be in the video group.
At this point, installation of a default radeon driver is complete. Reboot the system or start X from scratch. If it doesn't start immediately, see the Troubleshooting section.
[edit] Testing for 3D Acceleration
3D acceleration can be tested with glxinfo (part of mesa-progs):
If the following string (or similar) appears, hardware acceleration is working:
OpenGL renderer string: Mesa DRI R200 (RV280 5C61) 20090101 x86/MMX+/3DNow!+/SSE TCL DRI2
If the following appears, X was unable to enable the radeon OpenGL driver and is using the software fallback:
OpenGL renderer string: Software Rasterizer
If this happens, see /var/log/Xorg.0.log for errors(which are prefixed with (EE)). If there are no errors in the log, make sure that the user is in the video group.
[edit] Additional Features
[edit] Dual Monitor Setup
Read the X.Org/Dual Monitors for information on setting up dual monitor support.
[edit] Temperature, Fans, Power - LM_sensors
In general, follow the lm_sensors guide.
In order to access sensors on graphic card, I2C must be enabled for Radeon frame buffer driver. (this is outdated information, framebuffer works fine with 3.0.0 series kernels without lm_sensors)
| Linux Kernel Configuration: Radeon I2C capability |
Device Drivers --->
Graphics support --->
<M> Support for frame buffer devices --->
<M> ATI Radeon display support
[*] DDC/I2C for ATI Radeon support
|
[edit] Crossfire
Crossfire is a method of combining the capabilities of two ATI cards. As of 2011-11, it is only supported by the x11-drivers/ati-drivers driver, which has its own article: fglrx.
[edit] Not Satisfied? Try some Live Ebuilds!
If you want to use bleeding edge radeon features(and bugs) you might want to try live ebuilds, straight from source control trunk. To do this you need first need to get the x11 overlay using Layman.
Follow the Overlays article for instructions on how to do this.
Overlay packages (especially live ones) are usually KEYWORDed or MASKed. Follow the article on Unmasking Packages for information on this.
Once you have the overlay added, and the packages unmasked:
If you are using gentoo-hardened, please check the Troubleshooting section.
[edit] Troubleshooting
[edit] X11 Configuration
Modern X11 installs will pick up the radeon driver automatically, but if you find yourself needing to tell X11 to use the radeon driver specifically, set Driver to "radeon" in /etc/X11/xorg.conf.
...
Section "Device"
Identifier "My AMD/ATI Video Card"
Driver "radeon"
Option "AccelMethod" "EXA"
# AccelDFS is enabled by default on PCI-E cards, but not on AGP cards.
Option "AccelDFS" "True"
EndSection
...
[edit] Custom EDID
Using of a custom EDID is (at the moment) only possible without KMS. Deactivate KMS with "radeon.modeset=0" or "nomodeset" at command line (grub.conf) and add a line to the "Device" section of your xorg.conf:
...
Section "Device"
Identifier "My AMD/ATI Video Card"
Driver "radeon"
Option "CustomEDID" "DVI-0:/MyEdidDir/MyEdid.bin"
EndSection
...
[edit] Frozen or black console on boot
If incorrect firmware is built into the kernel, the console will appear "frozen" or black after the kernel tries to switch the resolution. Switch to a previous kernel with VESA or VGA console support and correct the error.
In some cases, the system may still boot into X.Org, in which case the error can be corrected from there.
[edit] Naming of output depends ...
If you are using KMS the output "DVI-0" and "DVI-1" can be switched in relation to "without KMS". This is important in the case of deactivating outputs:
...
Section "Monitor"
Identifier "HDMI-0"
Option "Ignore" "true"
EndSection
Section "Monitor"
#is DVI-0 for KMS
Identifier "DVI-1"
Option "Ignore" "true"
EndSection
...
[edit] VGA arb prevents direct rendering
If your Xorg log shows that dri is disabled due to VGA arbitration, then try enabling KMS. The log output indicating that this might be required looks like this:
... (WW) RADEON(0): Direct rendering is not supported when VGA arb is necessary for the device (EE) RADEON(0): [dri] DRIScreenInit failed. Disabling DRI. ... (WW) RADEON(0): Direct rendering disabled (EE) RADEON(0): Acceleration initialization failed (II) RADEON(0): Acceleration disabled ...
[edit] Boot Process stalls (Black screen for 30s)
One common cause for this is having kernel modesetting enabled, but without access to the correct firmware. Try disabling framebuffer/KMS, and try building different (or all available) firmware into the kernel.
[edit] X Fails to load mesa with Missing Symbols
The -z lazy ld flag is required for the x11 overlay live build, otherwise xserver will fail to load mesa, complaining of missing symbols.
[edit] Flickering on wine and low FPS
Try disabling the sync to vblank, to do this you need to set "SwapbuffersWait" to off
...
Section "Device"
Identifier "RV770"
Driver "radeon"
Option "SwapbuffersWait" "off"
EndSection
Section "dri"
Mode 0666
EndSection
...
and use driconf to disable vsync OR add this to your .bashrc
export vblank_mode=0
[edit] See also
- building from source in the official freedesktop site.
- handy guide explaining the graphics stack.
- wiki.gentoo.org article