To compile the fglrx driver for a debian unstable system running a 2.6.18 kernel, which was compiled from kernel.org (so no standard debian kernel).
Prereqs:
– kernel has an agpgart module
– kernel has dri support
– apt-get module-assistant
Commands:
apt-get install fglrx-driver
will load the 8.28.8-4 driver and install it
aticonfig --initial will write the X.org file
apt-get install fglrx-kernel-src
cd /usr/src/modules
rm -r fglrx
cd /usr/src
tar x fglrx.tar.bz2
module-assistant prepare
module-assistant a-i fglrx
then
modprobe agpgart
rmmod radeon (fglrx works only if the radeon driver was unloaded)
modprobe fglrx
Then extend the Xorg.conf file with
Section "Extensions"
Option "Composite" "false" #make DRI work with fglrx.
EndSection
Section “ServerFlags”
Option “AIGLX” “off”
EndSection
Then load the X server and start fglrxinfo. If it contains anything but ATI it didn’t work.
Problems:
To help debug one can use something like:
LIBGL_DEBUG=verbose fglrxinfo
before starting fglrxinfo. In a particular case it printed:
libGL: XF86DRIGetClientDriverName: 8.28.8 fglrx (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri//fglrx_dri.so
libGL error: dlopen /usr/X11R6/lib/modules/dri//fglrx_dri.so failed
(/usr/X11R6/lib/modules/dri//fglrx_dri.so: cannot open shared object
file: No such file or directory)
libGL error: unable to find driver: fglrx_dri.so
libGL: XF86DRIGetClientDriverName: 8.28.8 fglrx (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri//fglrx_dri.so
libGL error: dlopen /usr/X11R6/lib/modules/dri//fglrx_dri.so failed
(/usr/X11R6/lib/modules/dri//fglrx_dri.so: cannot open shared object
file: No such file or directory)
libGL error: unable to find driver: fglrx_dri.so
display: :0.0 screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.2 (1.5 Mesa 6.5.1)
which indicated that the wrong library was laoded. Therefore the following two commands resolved this issue:
tuuster:/usr/X11R6/lib/modules# ln -s /usr/lib/xorg/modules/drivers dri
rm dri
tuuster:/usr/X11R6/lib/modules# ln -s /usr/lib/dri .