Introduction

This wiki explains how to install the proprietary ATI drivers in a Slackware Linux distribution, creating, thanks to a SlackBuild, packages that can be installed through the installpkg command.

This wiki DOES NOT explain how to improve performance. In particular, It provides only a minimal description of how to set up the X.Org server with the only purpose of loading the proprietary drivers (a description on how to configure the X.Org server to increase performance can be found, in italian, here).

All commands starting with a '#>' must be executed with root rights, while commands beginning with '$>' can be performed by a user without such rights.

Proprietary ATI Drivers and ATI Catalyst

Since 21 November 2007, ATI drivers have changed the name and the number version. The new drivers, which were first mentioned only as Proprietary ATI Driver, are now called ATI Catalyst. Moreover, the version number has passed from 8.XX.X to 7.XX.

When in this wiki we will talk about drivers version <8.37.6, we will refer implicitly to the old driver, such as Proprietary ATI Driver, while the new ATI Catalyst have a number version >= 8.37.6, even if, for instance, have a release number 7.11.

Getting all the necessary

If the downloaded driver version is less than 8.37.6, then you need to know from now that it will not work onto X.Org 7.2 server (or 1.3) or later.

Note:

Drivers for x86 and x86_64 architectures are equivalent. The installer contains files for both architectures, then It will be the compilation process and the package creation process to choose the appropriate files.

This means that the SlackBuild will be good for Slackware, Slackware64 and for Slackware 64-bit portings (Slamd64, Bluewhite64, etc. ...).

Since drivers also contain a kernel module which will be compiled directly on your system, you'll need the kernel source in use.

What do created packages contain?

The two packages created by SlackBuild, that we'll call fglrx-module and fglrx-x contain, respectively, the kernel module and the X.Org server driver currently installed in the system. In this way, if you upgrade the kernel or the X.Org server, you can create only one package.

Creating only fglrx-module package

To create just the package containing the kernel module for the currently installed kernel, simply run the installer with the Only_Module option.

Minimal X.Org server configuration

Once installed the two indicated packages, you must tell to the X.Org server to use ATI proprietary drivers, to do this we must check if the xorg.conf file, which is usually located in the /etc/X11/ directory, contains the following items:

Section "Module"
...
Load "dri"
Load "glx"
...
EndSection

Section "Device"
...
Driver "fglrx"
...
EndSection

Section "DRI"
Group 0
Mode 0666
EndSection

Note:

The command:

#> aticonfig --initial

can help you. Do aticonfig without options for more infos.

Installation checking

To see if proprietary ATI drivers are properly installed run the command:

Remove installed packages

ATI Proprietary drivers or ATI Catalyst < 11.3

To remove installed packages you can use the removepkg utility. However, there are aspects that should be considered:

The packages' removing don't delete fglrx's driver configuration files, these files are located in /etc/ati directory

Be Careful:

The /etc/ati/custom-package directory, if exists, contains the external SlackBuild and therefore should not be deleted.

The fglrx-x package contains ATI's OpenGL libraries, and these libraries are located in the same directory of the Mesa libraries, so when you install the fglrx-x package Mesa OpenGL libraries are overridden. To restore the situation you should simply reinstall the package containing these libraries, like:

x11

for Slackware 11, or:

mesa

for Slackware 12.

ATI Catalyst >= 11.3

During installation of the package fglrx-<version>-<architecture>-<release>.tgz some libraries that would be overwritten are renamed as FGL.renamed.library_name. Due to remove this package “cleanly” you should do:

#> aticonfig --uninstall

or, directly with the script:

#> /usr/share/ati/amd-uninstall.sh

or, also with any installer >= 11.3, with:

#> ati-driver-installer-<versione>-x86.x86_64.run --uninstall

Will remain only the directory /etc/ati with the configuration files.

Patching the drivers

Ati drivers are usually not compatible with brand new version of kernel linux. You often need to patch the driver so that you can create the kernel module successfully. Since Ati Catalyst > 8.11 you can patch Ati drivers within the internal SlackBuild before that same SlackBuild compiles the kernel module.

In order to do that, you just have to create (or download from the Internet) a patch and rename it like this:

can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ru ./2.6.x/Makefile ../../../../../../fglrx-install.uZLF8t/common/lib/modules/fglrx/build_mod//2.6.x/Makefile
|--- ./2.6.x/Makefile 2010-09-01 16:05:31.000000000 +0200
|+++ ../../../../../../fglrx-install.uZLF8t/common/lib/modules/fglrx/build_mod//2.6.x/Makefile 2010-09-23 08:47:24.000000000 +0200
--------------------------
File to patch:

The error occurs during module compilation and It's due to the fact that the kernel was compiled with the option of paravirtualization active. This option among other things, prevents to load, and then to compile, modules that do not have the GPL license. Since that ATI drivers don't have this type of license, they aren't compiled.

To work around this problem you can:

Disable kernel paravirtualization option

The paravirtualization option is called CONFIG_PARAVIRT and generally is in the Processor type and features kernel submenu.

Patch ATI drivers

This operation is illegal because It changes the type of license issued by ATI in a GPL license. I wrote the patch:

but I do not take any responsibility, I do not use It and I discourage the use in order to prefer the alternative to disable the paravirtualization kernel option. To use this patch You need to:

External SlackBuild

Copy the patch in the /etc/ati/custom-package/patch directory

Internal SlackBuild (only with Ati Catalyst > 8.11):

Copy the patch in the /etc/ati/patch directory (if it doesn't exist you must create it)

The SlackBuild will find and apply the patch automatically. In order to uninstall it you simply need to delete it. In order to uninstall the patch simply delete It from /etc/ati/custom-package/patch directory.

This problem is due to the lack of SHM filesystem (now called tmpfs), that is virtual memory filesystem. To work around this problem you must:

Add into /etc/fstab file the following line:

shm /dev/shm tmpfs defaults 0 0

Then mount the filesystem through:

#> mount /dev/shm

Obviously the kernel must be predisposed for the "mounting" of this filesystem, in particular the kernel option that must be enabled is CONFIG_TMPFS that is generally placed in File system --> Pseudo filesystems submenu. However all the compiled kernel generally have this option enabled.

kernel includes at /lib/modules/`uname -r`/build/include do not match current kernel

The complete mistake is something like this:

Error:
kernel includes at /lib/modules/`uname -r`/build/include do not match current kernel.
they are versioned as ""
instead of "`uname -r`".
you might need to adjust your symlinks:
- /usr/include
- /usr/src/linux

The error, also if explained, could be not clear. In practice It results from the fact that the symbolic link:

/lib/modules/`uname -r`/source
/lib/modules/`uname -r`/build

don't point to the directory where are inserted the current kernel sources (which is generally /usr/src/linux- 'uname-r'). It happens to those who use a kernel contained in Slackware, so I will try to explain It in terms of Slackware "packages". This can happen:

because the kernel source were not installed. In this case should be enough to install the source package which can be found in Slackware k/ directory. However, It is not granted that the problem will be solved, You'll need to see the second reason why there is an error.

because sources (also if installed) do not reflect the settings of the current kernel. The new Slackware 12 has some precompiled kernels (which means different settings), while just a single package for the sources (unless seeing the branch extra/). In particular, the sources are for the SMP kernel and so if you use a non-SMP kernel can appear this error. To avoid this, after making sure that the package source has been installed, do simply the following:

#> cd /usr/src/linux
#> cp /boot/config .config
#> make

running make, in addition to compiling the kernel modules (which we will not use), some header files are regenerated, and they will reflect the kernel configuration (as it's set in the .config file).

Driver 8.39.4 logo

This "bug" in 8.39.4 drivers results from the fact that ATI developers don't update the packager maintainers before the official releases. It should be nice first if they did test us official releases in order to certify the proper functioning of the scripts for creating packages. To solve the problem it's necessary to use the external SlackBuild as described here.

amdcccle don't start on Slackware 12

Many users of the X.Org 7.2 (or 1.3) server version fail to start properly the Catalyst. The command to run the Catalyst is:

#> amdcccle

For this problem it seems there is no solution yet, but we are working on to solve it.