Radeon

This is a guide for setting up the radeon 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, and  at the same time.

Alternate Drivers
Before starting this guide, take a look at the other drivers available for your card.

Kernel Config
For the newest cards (R8xx, Radeon HD5xxx and above), kernel-2.6.36 or above is necessary.

Kernels >=3.0.0
Looks like KMS and FB drivers conflicting now (Nov 2012), at least on old cards like R250 and R350 (see http://www.spinics.net/lists/xorg/msg54751.html). If X doesn't start after upgrade and you see in Xorg.0.log this error: [   33.188] (II) [KMS] drm report modesetting isn't supported. [   33.188] (EE) Screen 0 deleted because of no matching config section. [   33.188] (II) UnloadModule: "radeon" [   33.188] (EE) Device(s) detected, but none match those in the config file. then switch off framebuffer driver:

AGP Cards
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.

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.

Installing a firmware package
First, determine the chipset of the card using from. Wikipedia's list is also an excellent resource for matching model numbers to GPU part numbers.

In general, for cards with R600 (Radeon HD2000) or newer:

And all other cards:

If compiling with modules, skip to Recompiling and Configuring.

With a built-in driver
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/"

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.)

Mesa and X11 Drivers
Edit /etc/make.conf to reflect the new driver:

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.

eselect mesa list

X.Org 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:

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.

Testing for 3D Acceleration
3D acceleration can be tested with (part of ):

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 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.

Dual Monitor Setup
Read the X.Org/Dual Monitors for information on setting up dual monitor support.

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)

Crossfire
Crossfire is a method of combining the capabilities of two ATI cards. As of 2011-11, it is only supported by the driver, which has its own article: fglrx.

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.

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.

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:

Cannot switch to better resolution / refresh rate on VGA connected display
This is because VGA does not have EDID, which is supposed to communicate with the display device, and ask for working display resolutions and refresh rates. Because the EDID is failed, ATI falls back to some driver default settings that are usually decent but might not be the best. First thing to do is determine the resolutions and refresh rates you want to use that are supported by your display. You can calculate modelines with or (my favorite)  e.g. . Be aware that using refresh rates / resolutions beyond your display's capacity can cause damage to your display. You can look at /var/log/Xorg.0.log to determine what Xorg is currently using (0-CRT / VGA-0) or just use to get a nice listing for all your auto-detected outputs.

If you have the correct refresh rates, you need to edit the xorg.con like:

Remember, these are my settings, may not work for you. You must recalculate your display modes, this can cause permanent demage to your display!

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.

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:

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:

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.

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.

Flickering on wine and low FPS
Try disabling the sync to vblank, to do this you need to set "SwapbuffersWait" to off

and use driconf to disable vsync OR add this to your .bashrc