# DRI in X with ATI-card

## stig

I have a laptop with the following grapichs card:

```

VGA compatible controller: ATI Technologies Inc 3D Rage LT Pro AGP-133 (rev 220)

```

I was woundering what I have to do to get DRI in X working?

----------

## bsolar

You might want to read this.

----------

## stig

I've looked through them, but isn't any of it to be found in portage?

----------

## bsolar

I don't undestand what you mean.

Btw try just removing the comment in /etc/X11/XF86Config to the lines

```
Load       "dri"

Load       "glx"
```

 in the Modules section. After restarting X try glxinfo. At the top it should tell you if 3D acceleration is enabled.

----------

## silverter

 *stig wrote:*   

> I have a laptop with the following grapichs card:
> 
> ```
> 
> VGA compatible controller: ATI Technologies Inc 3D Rage LT Pro AGP-133 (rev 220)
> ...

 

I have the same card in my notebook and I've been trying to get DRI working on it without succes. Try this page:

http://www.retinalburn.net/linux/ Maybe you have more luck than me. And If you do get it to work, please do post your results here...

Thanks and good luck.

----------

## Ygdrasil

Hi

I have managed to get DRI to work with my ATI card in my desktop by installing the bleeding-edge mach64 dri drivers available from 

http://dri.sourceforge.net/snapshots/bleeding-edge/

My ATI card is a: VGA compatible controller: ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 64)

You will need to do a modprobe mach64 to install the new kernel driver with dri support.

----------

## Ygdrasil

It should have said: "I have managed to get DRI to work with my ATI card in my laptop"

----------

## zypher

So did I my Latitude CPT466 has an ATI Rage Mobility P/M card.

Plain X (4.2.1 or 4.2.99) shows ~90 fps in glxgears.

The modules provided by retinalburn.net give me ~300.

I also used the patched binaries from the above site to enable xv which is very nice.

----------

## silverter

Zypher!! Good to hear you got it working. Can you please give us the steps you needed to get DRI and XV working, with the binaries from retinalburn.net? What version of X are you running? 4.2.1 or 4.2.99.x ?

Thanks for your time.

----------

## zypher

Ok, it's really easy!

0.: MAKE A BACKUP OF YOUR OLD MODULES!

That is your "drivers" and "multimedia" dirs in /usr/X11R6/lib/modules.

If you don't and things go wrong, you'll have to reemerge xfree.

1.: Get these two tarballs:

http://www.retinalburn.net/linux/dri-xv/dri-bleeding-edge/mach64-20020920-linux.i386.tar.bz2

http://www.retinalburn.net/linux/dri-xv/mach64-dri-xv-20020916.i386.tar.bz2

2.: Install the dripkg:

```
tar -jxvf mach64-20020920-linux.i386.tar.bz2

cd dripkg

./install.sh 
```

(You'll need a configured /usr/src/linux for this.)

Now the drm modules should be where they have to.

Don't ask me for details, I just did it and it worked for me, thats sufficient for me.  :Wink: 

3.: Install the xv-patched binaries

Easy, just copy the contents of the mach64-dri-xv package to /usr/X11R6/lib/modules.

I usually do this with mc as it can dive into tarballs. Do as you like.

Now it's time to reboot or to do a ldconfig/update-modules and so on (I'd rather reboot)

4.: Start X 

Fire up a terminal and try glxgears.

If it does not show the expected result, check your permissions and configs (XF86Config) regarding dri.

Try xvinfo, it should not say: "No adapters present"

5.: That's all folks.

Well you could do this with newer bleeding-edge builds and report here, of course  :Wink: 

hth,

zypher

----------

## zypher

Forgot: This worked on X 4.2.1, 4.2.99-r2, 4.3_pre1 and now 4.2.99-r4

----------

## dopey

I'm trying to get the DRI drivers working on my laptop.  It's a Dell Inspiron 5000 with a ATI Mobility P and I'm not having any luck getting DRI to work.  I can get Xvideo support though.

I followed the following steps:

1) Grabbed the binaries from retinalburn site.  Ran install.sh to

install everything.  The I loaded agpgart and the mach64.o module.

Linux agpgart interface v0.99 (c) Jeff Hartmann

agpgart: Maximum main memory to use for agp memory: 439M

agpgart: Detected Intel 440BX chipset

agpgart: AGP aperture is 64M @ 0xe0000000

[drm] AGP 0.99 on Intel 440BX @ 0xe0000000 64MB

[drm] Initialized mach64 1.0.0 20020904 on minor 0

That's the kernel output from the two modules.  Should there be more?

2) I have dri and glx modules loaded in XF86Config and a "DRI" section

declared with mode 0666

3) I start X and run glxinfo and it shows direct rendering=no.

glxgears gets slower performance than it did with the XF86 included

ATI driver.

In lsmod, the mach64 module shows up unused.  Is there anything

else that needs to be done?  Is there some kind of device node

or specific libGL that needs to be used?  I noticed the binary

packages for the mach64 dri stuff has an empty GL directory.

Any suggestions would be much appreciated.  I'm using

xfree-4.2.1-r2 and opengl-update-1.5.

Thanks

----------

## silverter

dopey: 

What resolution/bpp is your Xfree running on? How many Memmory has your cards got? Are there any DRI related error messaged in your XFree86.log-file?

In my case I have a ATI Rage 2D Lt Pro with on ly 4 mb mem, and I only get DRI in 800x600x16bpp. anything above this, DRI do not work. 

Try to lower your screen resolution and start with 16bpp to see if it works. 

Hope this helps. 

Good luck

----------

## dopey

That was it.  I've been working with 64-128MB video card on my desktop machines for so long I completely forgot how crappy the video in my laptop is.

Dropped the res down and bingo, I now have DRI support.

Not too shabby I guess.  Too bad I can't dynamically lower the res to get DRI support since I normally run at 1400x1050x24.

Anyways, thanks though.  This works at least.

----------

## Ygdrasil

Hi

Thanks allot for the tip about the xv-patched binaries   :Very Happy: 

I'll install them as soon as soon as I get home to test it.

BR

Ygdrasil

----------

## solidunit

It would be awesome if someone would make an ebuild that would pull down the latest dri drivers from cvs and automatically patch them for xv.

Would that be even possible? If I get some free time mebbe i'll give it a shot

----------

## weltraumfahrer

Hi,

i have also the card from the first poster (stig):

> VGA compatible controller: ATI Technologies Inc 3D Rage LT Pro AGP-133 (rev 220)

The problem with this card is, that the mtrr were not set correctly by the kernel (4MB instead of 8MB).

I have found a kernelpatch in the www that corrects this problem with the ATI-Cards.

And now my problem  :Sad:  : After a reinstal i've forgotten the URL  :Sad: 

Perhaps someone knows about this patch?

Thanks, Frank

----------

## Timitsch

I also have a 600 Mhz Laptop with an ATI Rage Pro Lite wit 8MB memory. up until now i've followed the posted instructions for getting DRI to work, but without success.  After alot of experimenting i've gotten xv and glx to work but when i run glxinfo it informs me that Direct Rendering=No

i have load "dri" and a DRI Section defined in my XF86Config.

I'd appreciate any kind of help, thanks

----------

## gozu

read your xfree log  ( /var/log/XFree86.0.log )

and search for dri.

it will most likely tell you why it isnt loading... unfortunatly i cant use dri in xfree 4.3.0 because i have a 9700pro :'(

----------

## eryvile

 *Ygdrasil wrote:*   

> ... bleeding-edge mach64 dri drivers available from 
> 
> http://dri.sourceforge.net/snapshots/bleeding-edge/
> 
> My ATI card is a: VGA compatible controller: ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 64)

 

Thanks a lot, that did the trick for me too  :Very Happy:  The card though isn't really worth the trouble: I get about 300fps with glxgears, but at least that's enough to play chromium  :Cool:  (with lowest detail level  :Sad: )

----------

## zypher

Update:

There is a new build of mach64-drm + xv + tv-out.

go to www.retinalburn.net/linux and download it.

It's made for X4.3 and I really longed for it.  :Wink: 

It's not hard to install, just untar and run ./install.sh.

Worked right out of the box for me on my Latitude CPt.

----------

## silverter

Has anyone tried it with kernel-2.5 + glibc+nptl? please let us know before I go into the trouble of setting it up  :Wink:  I know I'm a lazy git   :Rolling Eyes: 

regards,

----------

## zypher

It is mentioned in the README I think, "don't try this with 2.5.x!"

I tried and it failed  :Wink: 

----------

## silverter

Thanks zypher, that saved me a lot of hassle... 

regards,

----------

## dberkholz

I was able to do this with packages all available in portage.  See here.

----------

