Skip navigation.
Home
Now Shipping Version 7.0

Howto: 3D OpenGL with XFree86 radeon driver


Posts: 34

How to get the stock Xfree86 ati/radeon driver to do 3D / GLX / OpenGL.

I did this with kernel 2.6.0-test11 and Xfree 4.3.99.902 (4.4.0 RC2)
Other versions of kernel and XFree might work as well using the same method.

Get your kernel 2.6 compiled from source. See the 2.6 howto for instructions. When you have made it work, direct your attention to these options:

Device Drivers -> Character devices

Enable /dev/agpart (AGP SUPPORT)
Select your chipset as well (In my case Intel 8xx)

Enable Direct Rendering Manager
Select ATI Radeon (I compiled this as a module, but compile in should work just fine)

Compile your kernel, install it and boot it.

After booting with it, investigate 'dmesg | less'

It should have something like this in it :

Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected an Intel i845 Chipset.
agpgart: Maximum main memory to use for agp memory: 439M
agpgart: AGP aperture is 256M @ 0xa0000000
...
[drm] Initialized radeon 1.9.0 20020828 on minor 0

Next up is XFree86

Backup your old xfree (as root) :
'cd /usr'
'zip -r X11R6.zip X11R6'

Get the latest snapshot (4.3.99.902) from :
http://www.xfree.org/develsnaps/

Unpack it and follow the build instructions.
All I did was :
'make World'
'make install'

The Mepis install comes with Nvidia drivers installed, they must be removed, or else they get loaded and wrecks havoc.

'rm /usr/X11R6/lib/modules/extensions/libglx.so*'

In /usr/lib there's some nvidia drivers as well, and some symbolic links that point to nvidia glx libs. We need to clean that up.

'cd /usr/lib'
'rm libGL*'
'ln -s /usr/X11R6/lib/libGL.a libGL.a'
'ln -s /usr/X11R6/lib/libGL.so.1.2 libGL.so.1'
'ln -s /usr/X11R6/lib/libGL.so.1.2 libGL.so.1'
'ln -s /usr/X11R6/lib/libGL.so.1.2 libGL.so'
'ln -s /usr/X11R6/lib/libGLU.a libGLU.a'
'ln -s /usr/X11R6/lib/libGLU.so.1.3 libGLU.so.1.3'
'ln -s /usr/X11R6/lib/libGLU.so.1.3 libGLU.so.1'
'ln -s /usr/X11R6/lib/libGLU.so.1.3 libGLU.so'

Now restart X and run glxinfo. It should output this :

name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context,
GLX_SGI_make_current_read
client glx vendor string: SGI
client glx version string: 1.2
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method,
GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control,
GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
GLX_SGIX_visual_select_group
GLX extensions:
GLX_ARB_get_proc_address, GLX_EXT_import_context, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_MESA_swap_control, GLX_MESA_swap_frame_usage,
GLX_SGI_video_sync
OpenGL vendor string: Tungsten Graphics, Inc.
OpenGL renderer string: Mesa DRI Radeon 20030328 AGP 4x x86/MMX+/SSE2TCL
OpenGL version string: 1.2 Mesa 5.0.2

... and more...

ncurses

btw, you may need to install ncurses to compile XFree.
Just remembered that...

glx

and in XF86config-4, remember to load glx and dri :

Load "glx"
Load "dri"

Good job

Maybe this will help some of those getting those shiney new Radeons for Christmas. I'm going to link it to some other sites.

Removing Nvidia GL Driver

Couldn't this be done a lot easier by just removing the Nvidia Kernel Packages (nvidia-kernel-2.4.22 and nvidia-kernel-common) and the Nvidia GLX Module (nvidia-glx) with apt-get or Kpackage?

Removing Nvidia GL Driver

Yes, that may be true. I have also considered just removing the Nvidia GLX driver, it might work too.
I just happened to install kernel 2.6 before, and trying every possible solution i decided to compile XFree86 from scratch. So the howto reflects the steps I took, it is not the definite guide.

Things to consider :

DRM in kernel 2.4 is not as good as in 2.6. This can be solved by loading it as a module.

A script that removes Nvidia GLX driver on Mepis should be straightforward. I'll give it a shot.

I don't know much on how to make an apt-get package, others will have to help there.

I'm hoping that work will go

I'm hoping that work will go into this. I've tested out quite a few distros over the past few years with most of my time spent with RH and more recently SuSE 9.0. However, I've had Radeons most of that time and always end up screwing up something when I attempt to install the ATI drivers.

Linux and from what I've seen so far MEPIS especially, have come a long way with hardware support but there are still some issues that are much harder than they need to be.

it can be done with kernel 2.

it can be done with kernel 2.4.22, right? I'm trying to make it working for me for 4/5 days now... wish me luck. Sad

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.