Gentoo Logo

Gentoo ATI Migration guide

1.  Replacing the binary driver with the open-source driver

Removing the old binary driver

Code Listing 1.1: Removing the binary driver

(First, remove the old binary)
# emerge -C x11-drivers/ati-drivers
(Next, set the OpenGL implementation to Mesa)
# eselect opengl set xorg-x11 

Warning: Please note that ati-drivers are bad at uninstalling themselves and might leave the fglrx.ko module in your /lib/modules/*kernel*/video/ folder. If this file resides on your system after uninstalling ati-drivers, please remove it.

Getting 2D acceleration to work

To get working 2D acceleration, we have to specify which graphic card we use in /etc/make.conf.

Code Listing 1.2: Adding the radeon driver to make.conf

# echo 'VIDEO_CARDS="radeon"' >> /etc/make.conf

Now that our environment is setup, re-emerge all the packages that use the VIDEO_CARDS variable.

Code Listing 1.3: Reemerging all required packages

# emerge -avuDN world 

Note: This also update your system, so if you don't want to do so just drop the -u option.

Next step is a bit tricky, because we have to correctly configure /etc/X11/xorg.conf.

Note: If you are using x11-base/xorg-server-1.6 or newer, then you can just simply remove xorg.conf and skip this step.

First, open the file /etc/X11/xorg.conf in your favorite editor. Second, search for the section containing Driver "fglrx". Third, remove everything in this section except the Driver and Identifier bits. Now replace "fglrx" with "radeon". More options for this driver can be found by reading man radeon.

Code Listing 1.4: Sample xorg.conf configuration

Section "Device"
	VendorName	"ATI"
	Identifier	"X700OS"
	Driver		"radeon"

Getting 3D acceleration to work

ATI's binary driver uses its own kernel module and OpenGL implementation. However, the open-source driver has the kernel module included in the kernel by default and needs just enabling.

To configure the kernel simply run make menuconfig in /usr/src/linux and enable the following options as modules:

Code Listing 1.5: Enable the correct modules in the kernel

Device Drivers ->
    Graphics support ->
        [M] Direct Rendering Manager (XFree86 4.1.0 and Higher DRI support) ->
            [M] ATI Radeon

After enabling those options just quit the configuration manager and run make && make modules_install to get those installed.

To use this module just type as root modprobe radeon or add the radeon module to the the correct config file so that it is loaded automatically on boot, such as /etc/modules.autoload.d/kernel-2.6 or /etc/conf.d/modules (if you're using OpenRC and baselayout-2).

Warning: If you had your fglrx module loaded, you can't just rmmod it and load the radeon module. This leads to memory corruption and kernel panic. To get rid of the fglrx module you'll have to reboot your computer.


Page updated September 23, 2009

Summary: This guide demonstrates how to migrate from the binary ATI driver to the open-source driver (xf86-video-ati).

Tomas Chvatal

Joshua Saddler

Donate to support our development efforts.

Copyright 2001-2014 Gentoo Foundation, Inc. Questions, Comments? Contact us.