# Radeon 7000-9700 DRI CVS Install Guide

## phelan

This guide describes how to get and compile the newest DRI code responsible for 3D acceleration in XFree. This can speed up performance, resolve problems or bring up new problems!

Only do the follwing if you feel happy with testing-stage software!

Of course you have to change the paths according to your system and you need root-rights.

1. Emerge XFree 4.3

If you haven't already done so.

2. Download and compile the sources

First of all, make sure you have compiled AGP Support either into the Kernel or, even better, as a module.

Look at this guide:

http://dri.sourceforge.net/doc/DRIcompile.html

Most gentoo-people can start off with topic 6.

Follow the guide until you reach 8.3.

There I had to use 'make World' instead of the more complicated lines given.

We'll leave the guide now.

When it finished we need to compile the kernel-module:

cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel

make -f Makefile.linux radeon.o

cp radeon.o /lib/modules/2.4.19-gentoo-r10/kernel/drivers/char/drm/

3. Install the new drivers

(First you may want to backup the files we replace. This is not covered here)

cd ~/DRI-CVS/build/xc/exports/lib/modules/

cp dri/r200_dri.so /usr/X11R6/lib/modules/dri/

cp drivers/atimisc_drv.o /usr/X11R6/lib/modules/drivers/

cp drivers/radeon_drv.o /usr/X11R6/lib/modules/drivers/

cp extensions/libdri.a /usr/X11R6/lib/modules/extensions/

cp linux/libdrm.a /usr/X11R6/lib/modules/linux/

4. Configuration

Add these lines to your "Module" Section in /etc/X11/XF86Config if they're not already there.

  Load         "glx"

  Load         "dri"

For better performance you can add these lines to the "Device" section:

  Option        "AGPMode" "4"

  Option        "EnablePageFlip"

But beware of the "EnablePageFlip" option. I've read it can cause crashes, although it has never done for me.

5. Final Steps

Go to a console and shut down XFree:

/etc/init.d/xdm stop

Now we clean up and get the new modules ready. Execute:

update-modules

modprobe -r radeon

Finally, start XFree again:

/etc/init.d/xdm startLast edited by phelan on Wed Mar 05, 2003 9:54 am; edited 4 times in total

----------

## xlyz

tv out works with them?

and winex?

----------

## Lovechild

thank you, thank you, thank you, thank you, thank you.. with a little adaptation I made this hint work for my Radeon 7500 as well, just needed different drivers, and now DRI works in XFree 4.3pre, which it hasn't done before.. 

So, you earned worshipping points my friend.. I can now play UT again, and now about 15% faster (according to glxgears).

----------

## phelan

 *xlyz wrote:*   

> tv out works with them?

 

I don't think DRI is related to tv-out! You may want to check out the TV Output section of this FAQ:

http://www.ati.com/support/faq/linux.html

 *xlyz wrote:*   

> and winex?

 

This article at Transgaming says something about WineX support for various 8500 drivers:

http://www.transgaming.com/showthread.php?news=55

----------

## xlyz

 *phelan wrote:*   

> 
> 
> http://www.ati.com/support/faq/linux.html
> 
> http://www.transgaming.com/showthread.php?news=55

 

I knew those docs.

Just wondering whether atitvout work with latest dri drivers included with 4.2.99 (it doesn't with ati drivers) and if winex issues were fixed.

My current config works fine, and being them the main reason for upgrading, I would like to know it before messing everything up     :Wink: 

----------

## vibidoo

I have follow your tips and now I have DRI initialized very well with my Radeon 9000 ( r250)   :Laughing: 

But what about Glx ??

 I emerged tuxracer for FPS testing and each time I get this error 

```

Configure: error: your copy of glx.h is out of date ...

!!! ERROR : app-games/tuxracer-0.61-r2 failed

!!! Function econf; Line 334, Exitcode 1

!!! econf failed

```

----------

## Bloke2k

Hmm I have a small question on this one,  it says get to 8.1 in the guide and then leave it and follow the rest of this post, but do you still have to do the ln -s blah bla etc first?

I almost have this working but X just gives me a blank screen when I try to start it

I am using the Radeon 7200 does this make a difference ?

----------

## phelan

 *vibidoo wrote:*   

> 
> 
>  I emerged tuxracer for FPS testing and each time I get this error 
> 
> ```
> ...

 

I have encountered this problem even with an unmodified 4.2.99.4 installation. I don't think the file is out of date but too new.

You may try to get the glx.h file from Xfree 4.2.1 and temporarly copy it over your /usr/X11R6/include/GL/glx.h (Backup it first!). Maybe somebody can provide this file if you don't have the 4.2.1 sources available.

----------

## phelan

 *Bloke2k wrote:*   

> Hmm I have a small question on this one,  it says get to 8.1 in the guide and then leave it and follow the rest of this post, but do you still have to do the ln -s blah bla etc first?
> 
> 

 

Sorry, this one was a typo. It's 8.3 not 8.1.  :Embarassed: 

To answer your question: Yes!

 *Bloke2k wrote:*   

> 
> 
> I almost have this working but X just gives me a blank screen when I try to start it
> 
> I am using the Radeon 7200 does this make a difference ?
> ...

 

Yes! You need to copy another file. Instead of

cp dri/r200_dri.so /usr/X11R6/lib/modules/dri/

you need to type:

cp dri/radeon_dri.so /usr/X11R6/lib/modules/dri/

----------

## vibidoo

 *phelan wrote:*   

> 
> 
> I have encountered this problem even with an unmodified 4.2.99.4 installation. I don't think the file is out of date but too new.
> 
> You may try to get the glx.h file from Xfree 4.2.1 and temporarly copy it over your /usr/X11R6/include/GL/glx.h (Backup it first!). Maybe somebody can provide this file if you don't have the 4.2.1 sources available.
> ...

 

Ok thanks for your advise Phelan .

[edit ]

It's ok , it works 

[/edit]

----------

## rikkus

Go into the checkout of XFree you made (DRI-CVS) and find

glx.h. Update it to version 1.12 using:

cvs up -r 1.12 glx.h

Now copy that over the one in the installed X11, then:

cvs up -A glx.h

to get it back to its original version.

This will give you a glx.h which works for e.g. tuxracer.

Rik

----------

## rikkus

To clear up any confusion about which options need selecting

in the 'Character devices' section of the kernel config:

[img:742d252790]http://rikkus.info/tmp/kernconf.png[/img:742d252790]

AMD agpgart support selected, because that's what I have.

Note that DRI is selected but no DRM-related stuff is.

Also note that agpgart support is built as a module.

----------

## Jkay

hm.

I followed these instructions to the letter, for a Radeon 8500, including the menuconfig shown here.

The radeon module is full of unresolved symbols tho and will not load at startup, and manually.

 *Quote:*   

> 
> 
> www root # modprobe radeon
> 
> /lib/modules/2.4.19-gentoo-r10/kernel/drivers/char/drm/radeon.o: unresolved symbol add_wait_queue_Rsmp_a8ebcd4b
> ...

 

----------

## rikkus

 *Jkay wrote:*   

> 
> 
> The radeon module is full of unresolved symbols tho and will not load at startup, and manually.
> 
> 

 

This probably means you're either picking up the wrong module or you compiled the module for a different kernel. Try doing a make clean for the radeon module in the DRI-CVS dir and make it again, then try insmod directly on it.

Rik

----------

## phelan

Everybody already running the drivers should notice that I updated section 4 of the guide with some performance-rising options for your XF86Config. (Of course, no recompiling is needed)

That 'flipping' stuff pushed my glxgears score up another 30%!

Currently, I'm thinking about making an eBuild for this guide. But assuming that the DRI people will resume releasing snapshots when XFree 4.3.0 is out it would become obsolete...

----------

## zeb

I tried this tip for my radeon 7200, copying radeon_dri instead of r200_dri. I can start X, but when starting glxgears or glxinfo I get this error:

```

X Error of failed request:  BadMatch (invalid parameter attributes)

  Major opcode of failed request:  143 (GLX)

  Minor opcode of failed request:  5 (X_GLXMakeCurrent)

  Serial number of failed request:  349

  Current serial number in output stream:  349

```

Any ideas what could be wrong?

Edit:

I fixed the problem: I recompiled the kernel with agpgart as a module instead, and without compiling the old radeon driver as a module, which I had selected previously. I then copied radeon.o back into the drm folder and now it works   :Very Happy: 

----------

## john_

I did what you said, and it worked. But I loaded up quake3 to test it out (Native, not threw wine(x)) And I get a _little_ better preformance then I did before which wasn't good to start with. Maybe 3 or 4 FPS @ 640 after DRI. I dunno if this is related to this forum/thread but it tells me to do "set +r_SoftwareGL 1" when I exec it. And when I don't do that it syas that OpenGL can't be opened or isn't there. (I dunno the exact because im in windows now)  Could that be a problem. I run a Radeon 8500 /w the DRI drivers. glxgears works pretty good. I get about 100fps off of that (is that good?) Anyways I dunnpo why I am getting such crappy preformance out of my card.

----------

## Sastraxi

Most people get in the thousands (I get about 7000-8000 with r9500 pro), so obviously it isn't working. Did you put the Load "glx" and Load "dri" lines in there?

----------

## john_

Yeah they are in my XF config.

----------

## LinuxDocc

i have had the same problem .... it is very easy add this to your XF86Config

Section "DRI"

    Mode 0666

EndSection

(look at the end of XF86Config there is it, remove the # )

Restart the x server and then you have hardware 3D  :Smile: 

LinuxDoc

----------

## thing_q3

I'm getting the following errors when i try to startx after the install:

```

(EE) module ABI minor version (6) is newer than the server's version (5)

(EE) Failed to load module "radeon" (module requirement mismatch, 0)

(EE) RADEON:  Failed to load "radeon" module.

Fatal server error: no screens found

```

Any ideas as to what the problem could be? I was getting unresolved symbols in the radeon module earlier, but a recompile seemed to fix this.

----------

## Italy's Chicken

 *thing_q3 wrote:*   

> I'm getting the following errors when i try to startx after the install:
> 
> ```
> 
> (EE) module ABI minor version (6) is newer than the server's version (5)
> ...

 i'm getting the same problem as you... if you look a little farther up the log, it says: *Quote:*   

> (II) Module radeon: vendor="The XFree86 Project"
> 
>         compiled for 4.3.0, module version = 4.0.1
> 
>         Module class: XFree86 Video Driver
> ...

 my guess is the radeon module is for version 4.0.1. so how can we recompile it for 4.3.0?

----------

## phelan

[/quote]my guess is the radeon module is for version 4.0.1. so how can we recompile it for 4.3.0?[/quote]

Have you done the last three lines of step two?

You also have to remember, that not every code you get from CVS has to be fully functional so trying it a week later or so can resolve some problems!

----------

## thing_q3

I went the emerge xfree-drm route, and everything's working fine now, i get about 2600 f/s on glxgears.

I think the problem may have been that I just had the lastest stable xfree from the emerge tree (4.1 maybe?), rather than the newest one (4.3), which is what the cvs repository would be geared towards (?). Thanks anyway for your help!

----------

## ZephidZebra

Hi,

I have Radeon 7500 and it does not work  :Sad: 

Ref: https://forums.gentoo.org/viewtopic.php?t=46780

plz help me, hate using vesa... :/

----------

## dberkholz

The open-source DRI drivers only support Radeon<=9200. ATI hasn't released specs on the r300 chipset, which the 9500 and higher use. So if you have a 9500 or higher, use ati-drivers; you won't get acceleration with this.

----------

## dberkholz

 *001aman wrote:*   

>  *ZephidZebra wrote:*   Hi,
> 
> I have Radeon 7500 and it does not work 
> 
> Ref: https://forums.gentoo.org/viewtopic.php?t=46780
> ...

 

This thread is 7 years old, you might want to start a new one after checking the troubleshooting section of the Hardware 3D Acceleration Guide.

Also a few commands like 

```
LIBGL_DEBUG=verbose glxinfo
```

 and 

```
grep -e EE -e WW /var/log/Xorg.0.log
```

 may help track down your problems.

----------

## John R. Graham

It was just proto-spam.

- John

----------

