From cchtml.com

For all of you that like to do things the hard way:

Getting 3D for your ATI Radeon card in LFS [1][edit]

Used here

  • Kernel 2.6.15 (with agp and DRM configured)
  • Fresh LFS install
  • Xorg 6.8.2 (By BLFS)
  • Driver (proprietary fglrx 8.20.8)

Probably not needed (and might even interfere!) Please verify and edit if possible.

  • Mesa-6.4.1 (leftovers after failed attempt at installing r300_dri)

After browsing ATI's homepage for drivers I decided to use the installer-package, as I didn't have any easy way to convert rpms into tarballs.

If you decide to use the installer provided by ATI, make sure you don't have any libGL.so.* lying around in /usr/X11R6/lib before running the installer binary. It appears to rename installed files rather than overwriting old. Move any existing just to be safe:

mkdir /root/old_libGL
mv /usr/X11R6/lib/libGL.so* /root/old_libGL

Run the installer, it does some checks and then opens a graphical point-and-clickety install window. Follow instructions and install the correct driver. Maybe it works now already? Never has for me, so I'll continue..

After the installer exits you should have a directory /lib/modules/fglrx/build_mod with a script "make.sh" to re-build the fglrx driver. Now for kernel 2.6.15 with fglrx 8.20.8 you'll need to apply a patch for avoiding errors of:

Bad page state at free_hot_cold_page I pathched manually, since all you need to do is change line 2624 in firegl_public.c to

  1. if LINUX_VERSION_CODE >= 0x02060f

If the script complains about not being run from a real console, you could try to hack it a bit to go on anyway.

cd /lib/modules/fglrx/build_mod
vi make.sh

search for:

if [ $? -ne 0 ];
   echo "You arent running in a 'login shell'."
   echo "Please login directly from a console"
   echo "or use 'su -l' to get the same result."
   exit 1

and delete the line with 'exit 1' to get past that annoyance. Run it to build the modules. Then change to the parent directory and run "make_install.sh", hack as needed. This installs the kernel module and it's conterpart in /lib/X11R6/modules/

Finally, when all of this is done, you might need an old version of libstdc++ check it by typing:

[shell]$ ldd /usr/X11R6/lib/modules/dri/fglrx_dri.so
libm.so.6 => /lib/libm.so.6 (0x408a5000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x408c7000)

Since I had only version 6 on my system I also installed version 5 to make fglrx happy.

Alternatively, setting LIBGL_DEBUG might also reveal old libstdc++ dependencies.

run fglrxconfig, answer a lot of questions, start X and pray.

Good luck! /Jeol

(...think I forgot somthing, hm.)

Troubleshooting tips[edit]

Read the log, look for errors (EE)
cat /var/log/Xorg.0.log | grep EE
LIBGL_DEBUG=verbose glxinfo

Distribution Neutral Steps

Verifying | Configuring | Troubleshooting