Important: You are required to change your passwords used for Gentoo services and set an email address for your Wiki account if you haven't done so. See the full announcement and Wiki email policy change for more information.

fglrx

From Gentoo Wiki
Jump to: navigation, search

External resources

AMD Catalyst (previous fglrx: FireGL and Radeon for X ) is the proprietary graphics driver for AMD/ATI graphic cards. The open source alternative is radeon.

Hardware detection

To choose the right driver, first detect the graphics card. You can use lspci for this task:

root # lspci | grep -i VGA

If you have an AGP card, also detect the chipset supporting AGP:

root # lspci | grep -i AGP

Hardware support

Product name Driver version X server (max) Bus Note
Radeon HD 5000 and newer 13.6_beta 1.14 PCIe
Radeon HD 5000 and newer 13.4 1.13 PCIe
Radeon HD 2000 - 4000 13.1_pre897 1.12.49 PCIe or AGP Mask ati-drivers slot 1 and newer, see the instructions under the table
Radeon HD 1000 and older   Use radeon driver
Force legacy driver when you have Radeon HD 2000 - 4000
Mask >=ati-drivers-13.1 and >=xorg-server-1.13:
root # echo "# Force legacy driver" >> /etc/portage/package.mask
root #
echo ">=x11-base/xorg-server-1.13" >> /etc/portage/package.mask
root #
echo "x11-drivers/ati-drivers:1" >> /etc/portage/package.mask

Installation

Kernel

You need USB support. Also you need to activate the following kernel options:

Kernel configuration

[*] Enable loadable module support --->
Processor type and features  --->
    [*] MTRR (Memory Type Range Register) support
Bus options (PCI etc.)  --->
    [*] PCI Express support
    [*] Message Signaled Interrupts (MSI and MSI-X)
Device Drivers  --->
    Graphics support  --->
        < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
    Graphics support  --->
        [ ] Support for frame buffer devices

If you have an AGP card, enable AGP support:

Kernel configuration

Device Drivers  --->
    Graphics support  --->
        <*> /dev/agpgart (AGP Support)  --->
            Choose your AGP driver, e.g.:
            <*> AMD Opteron/Athlon64 on-CPU GART support

If you use a hybrid system with Intel integrated video card, you should also activite KMS and Intel driver. Make sure raedon is disable.

Kernel configuration

Device Drivers  --->
    Graphics support  --->
        <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
            < > ATI Radeon
            <*> Intel 8xx/9xx/G3x/G4x/HD Graphics
                [*]   Enable modesetting on intel by default

Driver

Portage uses the variable VIDEO_CARDS for enabling support for various graphics cards in packages. Setting VIDEO_CARDS to fglrx will pull in the driver x11-drivers/ati-drivers:

File/etc/portage/make.conf

VIDEO_CARDS="fglrx"

If you are using a hybrid system, enable intel driver but disable sna USE flag on it. See bug #430000.

File/etc/portage/make.conf

VIDEO_CARDS="fglrx intel"
File/etc/portage/package.use

x11-drivers/xf86-video-intel uxa -sna


Check the USE flags of x11-drivers/ati-drivers:

→ Information about USE flags
USE flag Default Recommended Description
debug No No Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
modules Yes Yes Build the kernel modules
multilib No On 64bit systems, if you want to be able to compile 32bit and 64bit binaries
qt4 Yes Install qt4 dependent optional tools (e.g Catalyst Control Panel)
static-libs No No Build static libraries

After setting this you want to update your system so the changes take effect:

root # emerge --ask --changed-use --deep @world

acpid

Some cards need acpid running to handle events. See the ACPI article.

Configuration

Initial setup

This will generate an initial xorg.conf to /root/xorg.conf.new:

root # X -configure

Copy the file /root/xorg.conf.new to the default location:

root # cp xorg.conf.new /etc/X11/xorg.conf

This will modify an existing xorg.conf to use the fglrx driver with a single screen:

root # aticonfig --initial --input=/etc/X11/xorg.conf

For dual-head configuration use this instead (where the second screen is [left|right|above|below]):

root # aticonfig --initial=dual-head --input=/etc/X11/xorg.conf --screen-layout=[left|right|above|below]

Set the OpenGL driver to use fglrx:

root # eselect opengl set ati

Permissions

If you have the USE flag acl enabled globally and are using ConsoleKit (i.e you're using a Desktop profile) permissions to video cards will be handled automatically. You can check the permissions using getfacl:

user $ getfacl /dev/ati/card0 | grep larry
user:larry:rw-

A broader solution is to add the user you want to be able to access the video card to the video group:

root # gpasswd -a larry video

Note that you will still be able to run X without permission to the fglrx subsystem, but usually not with acceleration enabled.

Settings

The most comfortable way for most users is to use opt/bin/amdcccle as a graphical UI to configure the driver.

Troubleshooting

Unexplained segmentation faults and kernel crashes

If you experience unexplained segmentation faults and kernel crashes with this driver and multi-threaded applications such as Wine set UseFastTLS in xorg.conf to either 0 or 1, but not 2.

See also

  • fglrx Quick Switch - Quickly switch between this driver and the open Radeon driver using GRUB 2 without downgrading xorg-server.
  • hprofile - Another method for switching between graphics drivers.
  • uvesafb - Framebuffer support with binary drivers.
  • ATI FAQ

External resources