Difference between revisions of "AMD Catalyst"

From ArchWiki
Jump to: navigation, search
(watermark with unsupported hardware)
(Radeon HD 6870 and fglrx 10.10: remove watermark on HD6870)
Line 810: Line 810:
  
 
And xorg will start but with a "AMD Unsupported hardware" watermark.
 
And xorg will start but with a "AMD Unsupported hardware" watermark.
 +
 +
You can remove this watermark using the following script :
 +
#!/bin/sh
 +
DRIVER=/usr/lib/xorg/modules/drivers/fglrx_drv.so
 +
for x in $(objdump -d $DRIVER|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do
 +
  sed -i "s/$x/\x90\x90\x90\x90\x90/g" $DRIVER
 +
done

Revision as of 10:43, 6 November 2010

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary heading Template:Article summary link Template:Article summary link Template:Article summary end Formerly known as fglrx, ATI has rebranded their proprietary Linux driver, which is now known as Catalyst. Currently, only the package name has changed, while the kernel module retains its original fglrx name, therefore any mention of fglrx below is specifically in reference to the kernel module, not the package.

Contents

Supported devices

Supported are devices of ATIs Radeon brand made by AMD. Future devices will be branded as AMD Radeon. Since version 9.4, the proprietary ATI driver only supports graphic cards with core R6xx or newer. For older cards, you can use xf86-video-ati.

Within this article, readers will see both model names (e.g. HD 4850, X1900) and code or core names (e.g. RV770, R580). Please refer to this table of AMDs model and core series.

Installation

Catalyst was once a precompiled package offered by Arch in the extra repository, but as of March 2009, official support has been dropped because of dissatisfaction with the quality and speed of development of the proprietary driver. Catalyst driver for stock kernel and (needed) Catalyst libraries/utils are available on AUR.

Note: Since version 10.9 catalyst is (again) splited into catalyst and catalyst-utils
Note: With every catalyst's (or catalyst-utils since 10.9) update you should remove amdpcsdb file in this way:

kill/stop your X/DE, remove /etc/ati/amdpcsdb, start your X/DE, and then set up amdcccle.

Note: Catalyst's 10.10 build supports only xorg-server 1.9 so feel free to install it from [extra] repository

Stock Kernel

kernel26

To install ATI's fglrx driver for the kernel26 package, you need to install either the catalyst or the catalyst-test package from the AUR which you can build via makepkg.

Note: Here's some example of how to build and install/update packages with makepkg:

Download tarballs of catalyst and catalyst-utils from AUR and extract them, then:

cd catalyst-utils
makepkg -c
sudo pacman -U catalyst-utils-*.tar.xz 
(or if you are updating: sudo pacman -Ud catalyst-utils-*.tar.xz)
cp ati-driver-* ../catalyst
cd ../catalyst
makepkg -ci
Note: If pacman will ask you about removing libgl - you may safely say "Y"

After installing package you probably need to configure xorg. Using provided aticonfig tool is recommended:

# aticonfig --initial
 (or for Dual Head: # aticonfig --initial=dual-head)
# aticonfig -v

And add nomodeset to your kernel line in /boot/grub/menu.lst , ie.:

kernel /boot/vmlinuz26 root=/dev/sda1 ro nomodeset

Plus add fglrx to the MODULES list in /etc/rc.conf."

You may now reboot your system.

If you have got x86_64 architecture system and want to use some 32-bit opengl programs or wine games you will have to install AUR's lib32-catalyst-utils

If you need more information on catalyst, visit this thread or create a new one, and ask there.


Custom Kernels

To install catalyst for a custom kernel, you'll need to build your own catalyst-$kernel package containing the kernel module compiled specifically for your kernel.

If you are at all uncomfortable or inexperienced making packages, read up the ABS wiki page first so things go smoothly.

Obtaining PKGBUILD

Obtain the PKGBUILD and catalyst.install files from AUR.

Editing the PKGBUILD and building

Three changes need to be made here:

1. Change

   pkgname=catalyst

to

   pkgname=catalyst-KERNEL_NAME

where KERNEL_NAME is whatever you want (e.g. custom, mm, themostawesomekernelever)

2. Remove kernel26 from the dependencies list.

Finally, build and install the package. (makepkg -i or makepkg followed by pacman -U pkgname.pkg.tar.gz)

Notes

  • If you run multiple kernels, then install catalyst module packages for all kernels. They won't conflict with one another.


catalyst-generator - a tool for generating catalyst-{kernver} packages

catalyst-generator is a package able to build and install fglrx modules packed into nice pacman's packages.

It's generating catalyst-{kernver} packages using makepkg and installing them with pacman; {kernver} is version of a kernel for which package was built, ie. catalyst-2.6.35-ARCH package was built for 2.6.35-ARCH kernel.

To built and install catalyst-{kernver} package for booted kernel as unprivileged user (safer way) type this:

catalyst_build_module

You will be asked for root's password and to proceed package installation. It's important to run this command after installing catalyst-generator.

This package doesn't support auto re-compilation functionality so after kernel's update you will have to manually update catalyst-{kernver} package, do it in this way (without rebooting):

1. as root type:

catalyst_build_module remove

this command will remove all unused catalyst-{kernver} packages

2. as unprivileged user type:

catalyst_build_module new_kernel_version

where new_kernel_version is a version of kernel which you just updated/installed, ie:

catalyst_build_module 2.6.36-ARCH

or:

catalyst_build_module all

which will built catalyst-{kernver} packages for all kernels.


If you want to remove catalyst-generator - it's better to run this command as root:

catalyst_build_module remove_all

before removing catalyst-generator (this command will remove all catalyst-{kernver} packages from the system)

catalyst-generator isn't able to remove all those catalyst-{kernver} packages automatically while being removed because there can not be more than 1 pacman's instance running. If you will forget to type `catalyst_build_module remove_all` before typing `pacman -R catalyst-generator` - catalyst-generator will tell you which catalyst-{kernver} packages you will have to remove after removing catalyst-generator.


Note: If you see those warnings:

WARNING: Package contains reference to $srcdir

WARNING: '.pkg' is not a valid archive extension.

while building catalyst-{kernver} package - don't be concerned, it's normal.


Automatic re-compilation of fglrx module with every kernel update

Note: Here catalyst_build_module script is working on fglrx modules files, not on pacman's packages.

Since catalyst 10.9 that funcionality has been removed from catalyst package mainly because of this and that.

Still it can be very usefull if you are using more than one stock kernel, or you don't like to rebuild catalyst package with every kernel update. Known mkinitcpio's hook functionality has been moved to AUR's catalyst-hook.

Also there is a new package able to provide similar functionality called catalyst-daemon.

Please note that those packages provides only re-building scripts and source files needed to build fglrx module, and they depend on catalyst-utils package.

Auto re-compilation is enabled by default after installing selected package, if you want to turn it off just run this command as root:

# catalyst_build_module autooff

You can also turn it on with:

# catalyst_build_module auto

Both catalyst-hook and catalyst-daemon are using catalyst_build_module script, which is also able to do other things.

Use catalyst_build_module remove command to remove every unused fglrx module:

# catalyst_build_module remove

catalyst_build_module is storing all informations about compilling/installig fglrx module in log file placed in /var/log/catalys-install.log. But you don't need to remember it, you will be informed about that fact whenever installation fails.

catalyst-hook

In catalyst-hook 'automatic re-compilation' functionality is done by a fglrx hook on mkinitcpio with combination of forcing to update package kernel26-headers in first place.

The hook will call catalyst_build_module command to update fglrx module for the version of your new kernel, and additionally it will call catalyst_build_module remove command to remove unneeded flgrx module(s).

If you are using more than one kernel - you can simply build fglrx module for whatever kernel you've got without even booting that kernel, do it as root with this command:

# catalyst_build_module kernel_version

where kernel_version is version of kernel for which you want to build fglrx module, more precise example:

# catalyst_build_module 2.6.35-rc4-rc

You may also use this command:

# catalyst_build_module all

to build fglrx module for every working system's kernel.

Note: If you are using this functionality it's important to look at the installation process of kernel26 (or any other kernel) package. fglrx hook will tell you is everything all right.
Note: If your custom kernel is using some non-standard mkinitcpio configuration file (ie. kernel26-zen is using /etc/mkinitcpio-zen.conf) you'll have to manually add fglrx to HOOKS array so it can be auto-recompiled with kernel's update.
Note: If you aren't using stock kernel26 at all and still wanna use auto recompilation you should remove kernel26-headers from SyncFirst list of /etc/pacman.conf after running 'catalyst_build_module auto'.

catalyst-daemon

In catalyst-damon 'automatic re-compilation' functionality is done by init script called autofglrx which runs with every system boot and checks if kernel was updated. If kernel was updated - it's rebuilding fglrx module. If kernel wasn't updated - it's loading previously built fglrx module (this whole operation is taking only 20ms on 2.4 GHz CPU).

Autofglrx's check function is comparing built time of just booted kernel (provided by `uname -v`) with built time of a kernel for which fglrx module was built. It's able to do such camparision because it adds `uname -v` information to the fglrx module's description while module's compilation.

While rebuilding autofglrx will call 'catalyst_build_module' to build a module and 'catalyst_build_module remove' to remove unneeded, older fglrx module.

It doesn't remain in memory.

Note: While installation autofglrx is added into begining of DAMONS array of /etc/rc.conf file. You may replace it, but be sure to add it before your DM/X, and do NOT add monkey (@) to it because it must NOT be started in background.
Note: If you are using own compilation flags and got problems with a daemon - please add those flags into /usr/bin/catalyst_build_module file.


Catalyst's repositories

There are some unofficial repositories containing the newest (or older) catalyst packages along with the appropriate libs and software in order to use the driver.

Note: If you want to know what packages are inside any given repository you need to first add repository to pacman.conf and then list repository with pacman -Sl command, ie.:
# pacman -Sl catalyst

Main repository

There is a repository called [catalyst] which contains newest stable catalyst driver and some additional packages like patched xorg-server. This repository should always work with stock kernel from [core] and it is updated most frequently. To use it you need as root:

1) Edit /etc/pacman.conf and add those lines above all other repositories:

For i686 systems:

   [catalyst]
   Server = http://catalyst.apocalypsus.net/repo/catalyst/i686

For x86_64 systems:

   [catalyst]
   Server = http://catalyst.apocalypsus.net/repo/catalyst/x86_64

ie. for x86_64 systems pacman.conf should look like:

   (...)
   [catalyst]
   Server = http://catalyst.apocalypsus.net/repo/catalyst/x86_64
   [core]
   # Add your preferred servers here, they will be used first
   Include = /etc/pacman.d/mirrorlist
   [extra]
   # Add your preferred servers here, they will be used first
   Include = /etc/pacman.d/mirrorlist
   (...)

2) Update repositories and packages with:

# pacman -Syu

3) Install catalyst:

# pacman -S catalyst catalyst-utils
Note: If you are updating steps 2 and 3 look like this:
# pacman -Sy
# pacman -Rd catalyst
# pacman -S catalyst catalyst-utils

4) Don't forget to prepare your /etc/X11/xorg.conf for catalyst. Use aticonfig --initial if you don't have prepared xorg.conf. Also add fglrx module to MODULES array in /etc/rc.conf

5) Reboot


For x86_64 users [catalyst] provides lib32-catalyst-utils package needed to run 32-bit opengl applications and wine games.

Repository also contains xvba-video package so you may easily use video acceleration described below, plus catalyst-daemon, catalyst-hook and catalyst-generator packages.


Troubleshooting
Black/grey/white boxes/artifacts mainly in firefox/thunderbird

With catalyst 10.6 AMD/ATi announce new method of 2D acceleration for radeons, that funcionality has fixed problems with maximizing/resizing windows. Unfortunately this step causes bugs for some users. To turn on old (slower xaa) method of 2d rendering please kill your desktop environment and Xserver and type this command as root:

aticonfig --set-pcs-str=DDX,ForceXAA,TRUE

If you do that it's better to use one of patched xorg-server packages delivered by [catalyst] repository.

[catalyst] repository contains xorg-server-backclear (patched with backclear patch) and xorg-server-1.8-catalyst-maximize-fix (patched with fedora patch) packages. Both this patches are fixing problems with maximizing/resizing but they are doing it in different way - you may choose which patched xserver is best for you. To remove xorg-server and install xorg-server-backclear just type:

# pacman -Rd xorg-server
# pacman -S xorg-server-backclear

Similar with xorg-server-1.8-catalyst-maximize-fix.

Xserver segmentation fault

Rebuild your xorg.conf with:

aticonfig --initial

or:

aticonfig --initial --force

(if its still not woking then remove /etc/X11/xorg.conf and use one of these two commands mentioned above)

Keyboard/mouse not working

Please remember that old hal's input config doesn't work with new xorg-server.

Well it should work out of the box with provided with xorg-server 1.8 package files: /etc/X11/xorg.conf.d/10-evdev.conf and /etc/X11/xorg.conf.d/10-quirks.conf but it could happen that's not working / fitting to you so read more here Arch's Xorg wiki or here Fedora's wiki for Input device configuration but don't forget that in archlinux we are using /etc/X11/xorg.conf.d directory instead of fedora's /etc/xorg.conf.d

Warning: Do not add any new xserver Section into your /etc/X11/xorg.conf - this file is still used by catalyst - i mean ie dont add any Section "InputClass" into xorg.conf because when you do this both aticonfig and amdcccle wont start cause of parsing xorg.conf error (just use /etc/X11/xorg.conf.d directory for it)


Archive repositories

[xorg18] repository

Catalyst < 10.10 isn't working with current xorg-server 1.9 (checked also with IgnoreAbi flag) - that's the reason why [xorg18] repo with xserver 1.8 and some additional packages arrived. To use it you need edit /etc/pacman.conf and add those lines above all other repositories: For i686 systems:

  [xorg18]
  Server = http://catalyst.apocalypsus.net/repo/xorg18/i686

For x86_64 systems:

  [xorg18]
  Server = http://catalyst.apocalypsus.net/repo/xorg18/x86_64


[catalyst-10.9] repository supports xorg-server 1.8, it's catalyst package is built for 2.6.35-ARCH kernel, got catalyst-hook, catalyst-daemon and catalyst-generator packages. Repository contains catalyst-test 10.10-999 package (with xorg-server 1.9 support) and for x86_64 users: lib32-catalyst-utils-test package. catalyst-test 10.10-999 is a catalyst drivers package which base on 10.10 RC1 with xserver 1.9 support. It consists of modified catalyst-utils and catalyst-generator packages, and it's working only with xorg-server 1.9.

For i686:

   [catalyst-10.9]
   Server = http://catalyst.apocalypsus.net/repo/catalyst/i686

For x86_64:

   [catalyst-10.9]
   Server = http://catalyst.apocalypsus.net/repo/catalyst/x86_64


Note:

Repositories listed below provides one catalyst package, not splited into catalyst and catalyst-utils

[catalyst-10.7] repository works fine with any kernel<2.6.37 and with multiple-kernels systems (becase of 'auto re-compile' functionality provided by a hook).

For x86_64 users [catalyst-10.7] provides lib32-catalyst-utils package (which should work fine with [multilib] repository) needed to run 32-bit opengl applications and wine games.

For i686:

   [catalyst-10.7]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/i686

For x86_64:

   [catalyst-10.7]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/x86_64

Repository also contains xvba-video package so you may easily use video acceleration described below.

Troubleshooting for this repository is the same as for main one.


[catalyst-10.5] repository works fine with 2.6.34-ARCH kernel and xserver 1.8. xorg-server package here is patched with backclear patch, and xorg-server-1.8-catalyst-maximize-fix package is patched with fedora's backfill patch.

For i686:

   [catalyst-10.5]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/i686

For x86_64:

   [catalyst-10.5]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive/x86_64


Note: Archive repositories listed below work only with kernel 2.6.33-ARCH and xserver 1.7. You may find xserver 1.7 packages in [xorg17] repository mentioned below. If you are using kernel other than 2.6.33-ARCH please use one of archive tarballs to build catalyst for your kernel.


[xorg17] repository contains xserver 1.7 packages, use it only if you are experiencing problems with newer xserver 1.8.

[xorg17] repository contains xorg-server-backclear (patched with backclear patch) and xorg-server-1.7-catalyst-maximize-fix (patched with fedora patch) packages. Both this patches fix problems with maximizing/resizing but they are doing it in different way - you may choose which patched xserver is best for you. To remove xorg-server and install xorg-server-backclear just type:

# pacman -Rd xorg-server
# pacman -S xorg-server-backclear

Similar with xorg-server-1.7-catalyst-maximize-fix

To use [xorg17] repo please put those lines at the top of all other repositories in /etc/pacman.conf:

For i686:

   [xorg17]
   Server = http://catalyst.apocalypsus.net/repo/xorg17/i686

For x86_64:

   [xorg17]
   Server = http://catalyst.apocalypsus.net/repo/xorg17/x86_64


catalyst-10.6 works well with xserver-1.7, got opengl 3.3/4 support, brings new 2D acceleration support, got some problems with gamma, wine games, and texturing in basing on q3a engine games:

For i686:

   [catalyst-10.6]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive-old/i686

For x86_64:

   [catalyst-10.6]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive-old/x86_64


If you are experiencing known bugs/errors (ie. lots of artifacts) with catalyst 10.6 you may still use older catalyst-10.5 or catalyst-10.4 or catalyst-10.3 repositories.

catalyst-10.5 and catalyst-10.4 repositories contain xorg-server (for this repositories patched with backclear patch) and xorg-server-1.7-catalyst-maximize-fix (patched with fedora patch) packages. Both this patches fix problems with maximizing/resizing but they are doing it in different way - you may choose which patched xserver is best for you. To remove xorg-server and install xorg-server-1.7-catalyst-maximize-fix just type:

# pacman -Rd xorg-server
# pacman -S xorg-server-1.7-catalyst-maximize-fix


catalyst-10.5 works well with xserver-1.7, got opengl 3.3/4 support, but still got some problems with gamma, wine games, and texturing in basing on q3a engine games:

For i686:

   [catalyst-10.5]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive-old/i686

For x86_64:

   [catalyst-10.5]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive-old/x86_64

catalyst-10.5 repository also contains libva-sds, mplayer-vaapi and xvba-video packages so you may easily use video acceleration described below.


If you don't like catalyst-10.5 you may still use older catalyst 10.4 which work well with xserver-1.7, but still got some problems with gamma and wine games:

For i686:

   [catalyst-10.4]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive-old/i686

For x86_64:

   [catalyst-10.4]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive-old/x86_64


Or catalyst-10.3. Catalyst 10.3 is still using old xserver 1.6, which is also provided by [catalyst-10.3] repository.

To use catalyst-10.3 you need as root:

1) Edit /etc/pacman.conf and add those lines above all other repositories: For i686:

   [catalyst-10.3]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive-old/i686

For x86_64:

   [catalyst-10.3]
   Server = http://catalyst.apocalypsus.net/repo/catalyst-archive-old/x86_64

2) Sync and downgrade packages with this commands

# pacman -Syy
# pacman -Suu

3) Remove xf86-video-ati and ati-dri packages if you have them installed.

4) (Recommended) If you dont like speed of xorg-server - remove it:

# pacman -Rd xorg-server

and try xorg-server-catalyst-maximize-fix:

# pacman -S xorg-server-catalyst-maximize-fix

5) Remove libgl and install catalyst:

# pacman -Rd libgl
# pacman -S catalyst

6) Don't forget to prepare your /etc/X11/xorg.conf for catalyst. Use aticonfig --initial if you don't have prepared xorg.conf. Also add fglrx module to MODULES array in /etc/rc.conf

7) Reboot

ATI/AMD Installer

Warning: Using the installer from ati.com/amd.com is NOT recommended for inexperienced users! Doing so may cause file conflicts and X failures. The packages available through pacman are configured specifically for Arch Linux and so should be used instead.

If you have attempted a manual install from the official installer, and are finding that nothing works correctly anymore, there should be an uninstall script placed at /usr/share/ati - run that, then try the pacman packages.

If you must use the installer from ATI/AMD for some reason, the following steps might work for you:

  • Download AMD/ATI driver installer from the official site only.
  • Make it executable.
  • Execute a terminal emulator (e.g Konsole) and be root.
  • Install mesa package
   pacman -S mesa
  • (Re)Install Xorg
  • Check for other required things for ATI/AMD installer listed on their website
   #pacman -Q | grep NameOfPackage
  • Use aticonfig as described below to update xorg.conf
  • Add ModulesPath into xorg.conf pointing at fglrx.so module if necessary

Configuration

ATI provides the aticonfig tool to create new basic xorg.conf file or modify an existing xorg.conf file and configure essentially every aspect of the card. For a complete list of aticonfig options, run:

$ aticonfig --help

If you want to create new xorg.conf file with specific for your system options, run the following command to generate one:

# Xorg -configure
Warning: Xorg -configure isn't actually recommended - sometimes it doesn't work good with catalyst and could cause your Xserver to break at start with black screen of death. So use it only if you are 100% sure of what you are doing. In most cases aticonfig --initiall mentioned below should build working xorg.conf file and Xserver should automatically and correctly detect all your input devices.

The simplest way to use aticonfig to adapt your xorg.conf file is listed in the examples at the end of the output if you run aticonfig without any command-line parameters:

   Examples:
     1. Setting up fglrx for the first time.
          Single head :    aticonfig --initial --input=/etc/X11/xorg.conf
          Dual head   :    aticonfig --initial=dual-head --screen-layout=above
                           This command will generate a dual head configuration
                           file with the second screen located above the first
                           screen.

Just adapt one of those two lines for your personal setup.

Warning: Please check the generated xorg.conf file before you copy it to /etc/X11/xorg.conf and happily startx or reboot. Otherwise, you'll probably get a locked blank screen and won't be able to use your system anymore.
The config files generated by preceding steps are sometimes incorrect. If you want, you can compare the generated files to one of the Sample Xorg.conf files listed on the Xorg wiki page.

Please ensure that in the "Screen" section you have "DefaultDepth 24" and there is a "DRI" section with "Mode 666" in it. The fglrx driver needs those lines to work, but the generated files by preceding programs don't have it. Without those lines, you might get an unresponsive black screen after reboot. Besides, since most of the parts are now automatically detected in modern Xorg, you don't need to write so many things in xorg.conf as you did before with ancient Xorg versions. So, some config sections/values in the generated xorg.conf are redundant.

Here is a minimal working example:

Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection
 
Section "Files"
        RgbPath      "/usr/share/X11/rgb"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/misc"
        FontPath     "/usr/share/fonts/100dpi:unscaled"
        FontPath     "/usr/share/fonts/75dpi:unscaled"
        FontPath     "/usr/share/fonts/TTF"
        FontPath     "/usr/share/fonts/Type1"
EndSection
 
Section "Module"
        Load  "extmod"
        Load  "dbe"
        Load  "xtrap"
        Load  "record"
        Load  "dri"
        Load  "glx"
        Load  "GLcore"
        Load  "freetype"
EndSection
 
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection
 
Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection
 
Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection
 
Section "Device"
        Identifier  "Card0"
        Driver      "fglrx"
        VendorName  "ATI Technologies Inc"
        BoardName   "Radeon Mobility X1400"
        BusID       "PCI:1:0:0"
EndSection
 
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth    24
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection
 
Section "DRI"
        Mode 0666
EndSection

Next, make sure the fglrx module and any needed agp modules are loaded.

# modprobe fglrx 

Add them to the MODULES array of your /etc/rc.conf to ensure that they load when you boot.

Finally, run Xorg with startx or by using GDM/KDM and verify that direct rendering is enabled by running the following command in a terminal:

$ glxinfo | grep direct

If it says "direct rendering: yes" then you're good to go! If the glxinfo command is not found, you may need to install the mesa package as well.

Warning: In recent versions of Xorg, the paths of libs are changed. So, sometimes libGL.so cannot be correctly loaded even if it's installed. Don't forget to check this if your GL is not working. Please read "Troubleshooting" section for details.

Video acceleration

Video Acceleration API (VA API) is an open source software library ("libVA") and API specification which enables and provides access to graphics hardware (GPU) acceleration for video processing on Linux and UNIX based operating systems. The main motivation for VA API is to enable hardware accelerated video decode at various entry-points (VLD, IDCT, Motion Compensation, deblocking) for the prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/WMV3).

In November 2009, VA-API gained a new proprietary xvba-video backend which allows VA-API powered applications to take advantage of AMD Radeon's UVD2 chipsets via the XvBA (X-Video Bitstream Acceleration API designed by AMD) library.

XvBA support and xvba-video is still under development, however in nowadays it is working very well in most cases and with mplayer (and mplayer front-ends), so feel free to check it. You have to build xvba-video package and install mplayer-vaapi (available in community repository) & libva (available in extra repository) packages. Then just set your video player to use vaapi:gl as video output.

Ie. for mplayer:

$ mplayer -vo vaapi:gl -va vaapi movie.avi

Ie. for smplayer:

Options -> Preferences -> General -> Video (tab) -> Output driver: User Defined : vaapi:gl
Options -> Preferences -> General -> Video (tab) -> Double buffering on
Options -> Preferences -> Advanced -> Options for MPlayer -> Options: -va vaapi
Options -> Preferences -> General -> General -> Screenshots -> Turn screenshots off

Don't forget to enable v-sync in amdcccle:

3D -> More Settings -> Wait for vertical refresh = Always On

Note: If you are using compiz/kwin please note that the only way to avoid video flickering is to watch videos in full-screen, and only when Unredirect Fullscreen is off.

In compiz you need to set Redirected Direct Rendering in General Options of ccsm.

Its off by default in kwin, but if you see flickering you need to add UnredirectFullscreen=off line to [Compositing] section in ~/.kde4/share/config/kwinrc file.

If its still flickering try to disable this option in ccsm (or change UnredirectFullscreen=off to UnredirectFullscreen=on in kwinrc).

Troubleshooting

Problems with video colours

You may still use vaapi:gl to avoid video flickering, but without video acceleration

Run mplayer without -va vaapi switch.

For smplayer remove -va vaapi from Options -> Preferences -> Advanced -> Options for MPlayer -> Options: -va vaapi

Plus for smplayer you may now safely turn screenshots on.

Troubleshooting (catalyst)

KWin and composite

Use the XRender instead of OpenGL as Composite-Type for best performance! This even solves any artifacts!

Rectangle/Checkerbox corruption with OpenGL programs

This was fixed in catalyst 8.9. It may occur though in later versions.

OpenGL programs like e.g. blender in windowed mode, show a rectangle/checkerbox corruption. This can be solved by using a Virtual display setting with a multiple of 64 bigger than your actual resolution like 1664 instead 1600 for width:

 Section "Screen"
   Identifier "Screen0"
   Device     "Card0"
   Monitor    "Monitor0"
   SubSection "Display"
     Depth     24
     Virtual 1664 1200
   EndSubSection
 EndSection

Black screen with complete lockups / hangs after reboot or startx

Faulty or corrupted amdpcsdb database

Fglrx and its Catalyst Control Center stores data on a database called amdpcsdb, located under /etc/ati. It isn't human readable, but only parsable by Catalyst Control Center. Sometimes, after updates, the settings in there aren't compatible with the new version of fglrx, so you end up with a black screen when starting X.

So, there is one thing to do.

Boot to init3, add the number 3 at the end of the menu.lst kernel options:

# rm /etc/ati/amdpcsdb

and restart Xorg (or even reboot).

Warning: Be careful. If you have saved settings through Catalyst Control Center, which are stored under that file, they may now have been lost. You should edit xorg.conf instead, by using aticonfig.

Be careful though. aticonfig stores its settings in amdpcsdb database like Catalyst Control Center. If you want that they're stored in xorg.conf instead, each time you use the aticonfig tool, add --input=/etc/X11/xorg.conf in the end of the command options as well.

Faulty ACPI hardware calls

It is possible that fglrx doesn't cooperate well with the system's ACPI hardware calls, so it autodisables itself and there is no screen output.

So try to run this:

  aticonfig --acpi-services=off

nForce 4 Incompatibility

Starting with 9.10 onward, the fglrx drivers are incompatible with nForce 4 chipsets. Use the open source drivers until a fix is created.

See bug report.

KDM disappears after logout

If you are running the catalyst proprietary driver and you get a console (tty1) instead of the expected KDM greeting when you log out, you must instruct KDM to restart the X server after each logout:

$ sudo nano /usr/share/config/kdm/kdmrc

Uncomment the following line under the section titled [X-:*-Core]:

TerminateServer=True

KDM should now appear when you log out of KDE.

Bad screen resolution at login manager

If the resolution for your login manager is for example 1600x1200 and you want 1280x1024 you can fix it by using a xorg.conf (newer X-servers using the open source drivers normally don't need a xorg.conf, so if you don't have a xorg.conf you need to create one). In the "Screen" section add a modes lines:

 Section "Screen"
   Identifier "aticonfig-Screen[0]-0"
   Device     "aticonfig-Device[0]-0"
   Monitor    "aticonfig-Monitor[0]-0"
   DefaultDepth     24
   SubSection "Display"
     Viewport   0 0
     Depth     24
     Modes    "1280x1024" "2048x1536"#<-add this line to change the default login screen resolution
   EndSubSection
   EndSection

The first argument of modes is the resolution, which will be used by default. The second argument is the maximum resolution supported by your monitor. This is needed so that you are able to choose higher screen resolutions using for example the KDE systemsettings.

Direct Rendering Doesn't Work

This problem may occur when using the proprietary catalyst driver.

Warning: Make sure that you own a R6xx (HD2xxx) or newer card or the driver won't be enabled. You may encounter that error if you try to enable your display by using catalyst and a card older than the R6xx ones.
Warning: This error would also appear if you haven't rebooted your system after the installation or upgrade of catalyst. The system needs to load the fglrx.ko module in order to make the driver work.

If you have problem with direct rendering, run:

   $ LIBGL_DEBUG=verbose glxinfo > /dev/null

at the command prompt. At the very start of the output, it'll usually give you a nice error message saying why you don't have direct rendering.

Common errors, and their solutions, are:

   libGL error: XF86DRIQueryDirectRenderingCapable returned false
  • Ensure that you are loading the correct agp modules for your AGP chipset before you load the fglrx kernel module. To determine which agp modules you'll need, run hwdetect --show-agp, then ensure that all modules listed from that command are in the MODULES= array in rc.conf, before fglrx.
   libGL error: failed to open DRM: Operation not permitted
   libGL error: reverting to (slow) indirect rendering
  • For this, make sure you have the following section in your xorg.conf somewhere:
   Section "DRI"
       Mode 0666
   EndSection
   libGL: OpenDriver: trying /usr/lib/xorg/modules/dri//fglrx_dri.so
   libGL error: dlopen /usr/lib/xorg/modules/dri//fglrx_dri.so failed (/usr/lib/xorg/modules/dri//fglrx_dri.so: cannot open shared object file: No such file or directory)
   libGL error: unable to find driver: fglrx_dri.so
  • Something hasn't been installed correctly. If the paths in the error message are /usr/X11R6/lib/modules/dri/fglrx_dri.so, then ensure you've logged completely out of your system, then back in. If you're using a graphical login manager (gdm, kdm, xdm), ensure that /etc/profile is sourced every time you log in. This is usually accomplished by adding source /etc/profile into ~/.xsession or ~/.xinitrc, but may vary between login managers.
  • If the paths above in your error message _are_ /usr/lib/xorg/modules/dri/fglrx_dri.so, then something hasn't been correctly installed. Try reinstalling the catalyst package.

Errors such as:

   fglrx: libGL version undetermined - OpenGL module is using glapi fallback

could be caused by having multiple versions of libGL.so on your system. Run:

   $ sudo updatedb
   $ locate libGL.so

This should return the following output:

   $ locate libGL.so
   /usr/lib/libGL.so
   /usr/lib/libGL.so.1
   /usr/lib/libGL.so.1.2
   $

These are the only three libGL.so files you should have on your system. If you have any more (e.g. /usr/X11R6/lib/libGL.so.1.2), then remove them. This should fix your problem.

You might not get any error to indicate that this is a problem. If you are using X11R7, make sure you do not have these files on your system:

   /usr/X11R6/lib/libGL.so.1.2
   /usr/X11R6/lib/libGL.so.1

Hibernate/Sleep Issues

Video fails to enter suspend/hibernate

If fglrx returns an error when attempting to suspend through hibernate scripts, a solution may be to add the following line to your "Device" section in /etc/X11/xorg.conf, which should allow the fglrx module to enter suspend mode.

Option      "UseInternalAGPGart" "no"

Video fails to resume from suspend2ram

ATI's proprietary catalyst driver cannot resume from suspend if the framebuffer is enabled. To disable the framebuffer, add vga=0 to your kernel options in /boot/grub/menu.lst, for example:

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz26 root=/dev/sda3 resume=/dev/sda2 ro vga=0
initrd /kernel26.img

System Freezes/Hard locks

  • To prevent system lockups, try adding the following lines to your fglrx "Device" section in xorg.conf
   Option "UseInternalAGPGART"         "no"
   Option "KernelModuleParm"           "agplock=0" # AGP locked user pages: disabled
Note: Neither option is necessary anymore since 8.24.18 because ATI has removed the internal AGP GART support from the driver.
  • As well, the radeonfb framebuffer drivers have been known in the past to cause problems of this nature. If your kernel has radeonfb support compiled in, you may want to try a different kernel and see if this helps.

Hardware Conflicts

Radeon cards used in conjunction with some versions of the nForce3 chipset (e.g. nForce 3 250Gb) won't have 3D acceleration. Currently the cause of this issue is unknown, but some sources indicate that it may be possible to get acceleration with this combination of hardware by booting Windows with the drivers from nVIDIA and then rebooting the system. This can be verified by issuing in a root console the following command:

    dmesg | grep agp

If you get something similar to this (using an nForce3-based system)

    agpgart: Detected AGP bridge 0
    agpgart: Setting up Nforce3 AGP.
    agpgart: aperture base > 4G

and also if issuing this command...

     tail -n 100 /var/log/Xorg.0.log | grep agp

...gets something similar to:

     (EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_ENODEV"

Then you have this bug.

Some sources indicate that in some situations, downgrading the motherboard BIOS may help, but this cannot be verified in all cases. Also, a bad BIOS downgrade can render your hardware useless, so beware.

See bug http://bugzilla.kernel.org/show_bug.cgi?id=6350 for more information and a potential fix.

Temporary hangs when playing video

This problem may occur when using the proprietary catalyst driver.

If you experience temporary hangs lasting from a few seconds to several minutes occuring randomly during playback with mplayer, check /var/log/messages.log for output like:

Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160
Nov 28 18:31:56 pandemonium [<f8bc628c>] ? ip_firegl_ioctl+0x1c/0x30 [fglrx]
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160
Nov 28 18:31:56 pandemonium [<c0197038>] ? vfs_ioctl+0x78/0x90
Nov 28 18:31:56 pandemonium [<c01970b7>] ? do_vfs_ioctl+0x67/0x2f0
Nov 28 18:31:56 pandemonium [<c01973a6>] ? sys_ioctl+0x66/0x70
Nov 28 18:31:56 pandemonium [<c0103ef3>] ? sysenter_do_call+0x12/0x33
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160
Nov 28 18:31:56 pandemonium =======================

Adding the nopat kerneloption to /boot/grub/menu.lst and rebooting fixed the problem at least for me.

After a kernel upgrade: X doesn't start/modprobe doesn't find fglrx

Reinstall the catalyst drivers.

Catalyst 10.6/10.7/10.8/10.9 : black/grey/white boxes/artifacts in firefox/thunderbird

With catalyst 10.6 AMD/ATi announce new method of 2D acceleration for radeons, unfortunately this step causes bugs for some users. To turn on old (slower xaa) method of 2d rendering please kill your desktop environment and Xserver and type this command as root:

aticonfig --set-pcs-str=DDX,ForceXAA,TRUE

Now you'll probably need patched xorg-server to fix problems with resizing/maximizing windows, read about it ie. here.

Amdcccle is showing different catalyst's version

It's because information about version is stored in /etc/ati/amdpcsdb file. This file is created while first run of X/DE by freshly installed catalyst, and later it's not updated. Solution: kill your X/DE, then remove /etc/ati/amdpcsdb, restart your X/DE, and then set up amdcccle.

Radeon HD 6870 and fglrx 10.10

When running

#sudo aticonfig --initial

you will get

aticonfig: No supported adaptaters detected

That's because HD6870 is not supported by fglrx 10.10

However you can create xorg.conf yourself :

Section "Device"
 Identifier "ATI radeon 6870"
 Driver "fglrx"
EndSection

And xorg will start but with a "AMD Unsupported hardware" watermark.

You can remove this watermark using the following script :

#!/bin/sh
DRIVER=/usr/lib/xorg/modules/drivers/fglrx_drv.so
for x in $(objdump -d $DRIVER|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do
 sed -i "s/$x/\x90\x90\x90\x90\x90/g" $DRIVER
done