# DRI 3D acceleration for ATI Rage Mobility

## kappert

This concerns kernel 2.4.x. Later kernels probably will have 3D support for this card included directly.

The description below worked for the following configuration:

```

KERNEL: 2.4.20-gentoo-r7

XFree86 Version 4.3.0

Release Date: 27 February 2003

X Protocol Version 11, Revision 0, Release 6.6

Build Operating System: Linux 2.4.20-gentoo-r7 i686 [ELF]

```

The graphics card on my DELL Inspiron 7500 laptop is identified under W2K as:

ATI RAGE Mobility P/M AGP 2X (A21/2) ATI compatible, 8MB RAM, 1400x1050 60Hz, 32 bits/pixel

And by XFree86:

ATI Technologies Inc Rage Mobility P/M AGP 2x rev 100

Here is what I did to (finally!) get DRI working on my computer under Linux:

Build kernel with following settings in "make menuconfig":

Character devices  --->

<*> /dev/agpgart (AGP Support)

[*]   Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I860 support

[*] Direct Rendering Manager (XFree86 DRI support)

... you don't have to include any of the "DRM 4.1" drivers (we add the proper driver later externally)

Have a look at http://www.retinalburn.net/linux/dri_HOWTO.html.

Then get the most recent kit from

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

It is called something like "mach64-20031020-linux.i386.tar.bz2", where the date part (here: 20031020) can be anything newer.

Unpack mach64-20031020-linux.i386.tar.bz2 and run "install.sh".

Verify that your /etc/X11/XF86Config-4 is OK. Below are some sections, from my configuration. They may not be optimal. If you know better please post a reply. Especially if you figure out which modules are required and which one does what.

IMPORTANT: DRI will not be enabled for resolutions above 1024x768 (search for errors (EE) in /var/log/XFree86.0.log). The way I do it is to put a "Modes" line in to limit the resolution to "1024x768" (see Section "Screen" below).

```

Section "Module"

        Load  "extmod"

        Load  "dri"

        Load  "dbe"

        Load  "record"

        Load  "xtrap"

        Load  "glx"

        Load  "speedo"

        Load  "type1"

        Load  "GLcore"

        Load  "bitmap"

        Load  "ddc"

        Load  "freetype"

        Load  "int10"

        Load  "vbe"

EndSection

Other relevant section:

Section "Device"

        Identifier  "Card0"

        Driver      "ati"

        VendorName  "ATI"

        BoardName   "Rage Mobility P/M AGP 2x"

        ChipSet     "ati"

        ChipId      0x4c4d

        ChipRev     0x64

        BusID       "PCI:1:0:0"

EndSection

Section "Screen"

        Identifier "Screen0"

        Device     "Card0"

        Monitor    "Monitor0"

        DefaultDepth 16

        SubSection "Display"

                Depth     1

        EndSubSection

        SubSection "Display"

                Depth     4

        EndSubSection

        SubSection "Display"

                Depth     8

        EndSubSection

        SubSection "Display"

                Depth     15

        EndSubSection

        SubSection "Display"

                Depth     16

# uncomment modes line to limit resolution (otherwise DRI won't run)

# (WW) ATI(0): DRI static buffer allocation failed

# -- need at least 8662 kB video memory

#               Modes     "1024x768" "800x600" "640x400"

        EndSubSection

        SubSection "Display"

                Depth     24

        EndSubSection

        SubSection "Display"

                Depth     32

        EndSubSection

EndSection

                                                                                                    

Section "DRI"

     Mode 0666

EndSection

```

Restart X and then check if direct rendering works with the fowllowing command (here it is working):

$ glxinfo | grep render

direct rendering: Yes

OpenGL renderer string: Mesa DRI Mach64 [Rage Pro] 20030502 AGP 2x x86/MMX/SSE

Try glxgears. With DRI I get about 275 FPS, without roughly 150 FPS.

And now: Enjoy TUXRACER!!

----------

## tawtao

I known that the ATI mobile is Mach64 shipset but I can not find the driver. Thanks I was looking for this ... quite awhile  :Very Happy: 

Oop! ... Driver works fine with the card. The only problem is that the ATI mobile came with the DELL inspiron 2100 has memory only 4M. Therefore, I can not run DRI with mode 1024x768.  DRI runs in mode 800x600, but not higher because ... --need at least 4608 kB video memory --- (for 1024x768)  :Razz: 

If you have a lot of memory on your cards, you can go for higher mode ... I think.  Buy the way, DRI works with only depth 16 and 32. Changing depth is not work too  :Razz: 

----------

## kappert

 *tawtao wrote:*   

> I known that the ATI mobile is Mach64 shipset but I can not find the driver. Thanks I was looking for this ... quite awhile 
> 
> Oop! ... Driver works fine with the card. The only problem is that the ATI mobile came with the DELL inspiron 2100 has memory only 4M. Therefore, I can not run DRI with mode 1024x768.  DRI runs in mode 800x600, but not higher because ... --need at least 4608 kB video memory --- (for 1024x768) 
> 
> If you have a lot of memory on your cards, you can go for higher mode ... I think.  Buy the way, DRI works with only depth 16 and 32. Changing depth is not work too 

 

I am glad my information helped you. I am considering to try out the solution from XIG in order to get 3D acceleration with a higher resolution (but I don't know if it will work):

http://www.xig.com/Pages/Atop/LaptopIndividualSupportSpecs/Dell-IndividualLaptops/Inspiron7500.html

(this is just the link to my laptop model, they support tons of other cards and machines, including Suns).

Installation would be with RPM, but I don't know what will happen when I use RPM for installation on a Gentoo system?? (rpm CAN be emerged).

----------

## tawtao

Thank you very much. Your information made me understand more about how DRI works.  Very unfortunate, even XIG does not support my note book. (Inspiron 2100).  :Sad:  ... Thanks again.

----------

## kappert

I have tried out different options and I can say now that http://www.retinalburn.net/linux/ is the best solution for my exact configuration and graphics card. As far as I understand it, this will become part of the 2.6 kernel, which means that one will not have to worry about a separate installation anymore.

I have also tried http://www.xig.com/, mainly because I wanted 3D acceleration with a resolution of 1400x1050. The company leaves a professional impression and it may be the right solution for your graphics card. But in my specific case 3D acceleration in tuxracer and quake2 did either not work or was extremely slow (couldn't tell a difference from non-accelerated mode). Both games were unplayable although I had reduced to 1024x768, 16bit colors. Tuxracer and quake2 do work properly with the mach64 driver from retinalburn. 

However, a demo called "glaze" worked at about double the framerate with XIG compared to retinalburn. And, indeed, with XIG it is accelerated when I am in 1400x1050 mode.

Installation under Gentoo was challenging. You can "emerge rpm" and then use "rpm -i --nodeps" to install their packages. But I also had to move some libraries out of the way. Basically you do "ldd /usr/X11R6/lib/xglinfo" or "ldd <your-3D-game>" and keep moving libraries out of the way until you see that a library called "libXda" gets listed by ldd. Then you know that XIG's solution is being used. See their FAQ for a better explanation.

Another problem was that a device called "/dev/xsvc" is created by the XIG installation and that it disappears through rebooting. I have not investigated it further, but just kept redoing that part of the installation (which in turn overwrites backup copies that the first-time installation made).

I recommend that you backup your disk before trying out the XIG solution under Gentoo, so that you can switch back easily. You may be able to switch back in other ways, it is just easier if you have the option.

I also tried http://www.scitechsoft.com/. But their Snap driver gave me nothing but an ugly flickering black screen. I saw no way of fixing it.

----------

## lbrtuk

It might be an idea to shove this over onto 'Documentation, Tips & Tricks'

https://forums.gentoo.org/viewforum.php?f=12

----------

## dberkholz

mach64 support added in xfree-drm-4.3.0-r7.

----------

## kappert

 *spyderous wrote:*   

> mach64 support added in xfree-drm-4.3.0-r7.

 

Great!

But I get the error below.

Am I right in assuming that for this card I should set VIDEO_CARDS to "mach64"? Could "mach64" (or whatever applies) be added to the list in the error message?

ERROR FOLLOWS:

# emerge xfree-drm

Calculating dependencies ...done!

>>> emerge (1 of 1) x11-base/xfree-drm-4.3.0-r6 to /

>>> md5 src_uri  :Wink:  linux-drm-4.3.0-kernelsource-20030714.tar.gz

>>> md5 src_uri  :Wink:  xfree-drm-4.3.0-r6-gentoo-0.4.tar.bz2

>>> Unpacking source...

!!! ERROR: x11-base/xfree-drm-4.3.0-r6 failed.

!!! Function src_unpack, Line 97, Exitcode 0

!!! Please set at least one video card in VIDEO_CARDS in make.conf or the environment. USE is deprecated. Possible VIDEO_CARDS values are matrox, 3dfx, rage128, radeon, sis, i810, i830, and gamma.

----------

## dizzey

mach64 support added in xfree-drm-4.3.0-r7.

!!! ERROR: x11-base/xfree-drm-4.3.0-r6 failed.

!!! Function src_unpack, Line 97, Exitcode 0

!!! Please set at least one video card in VIDEO_CARDS in make.conf or the environment. USE is deprecated. Possible VIDEO_CARDS values are matrox, 3dfx, rage128, radeon, sis, i810, i830, and gamma.

the support was added in the xfree-drm-4.3.0-r7 release not the xfree-drm-4.3.0-r6 release. try the never realse

----------

## tfoggoa

Great info folks. I've been playing around with this for a bit now. I have a All-in-wonder Pro (mach64) card and I'm trying to get xv scaling working on the TV-out at 800x600. I have some questions maybe someone can answer.

I loaded up the retinal burn drivers with the dri-xv-tvout stuff.  The tar file was: mach64-dri-xv-20030413.i386.tar.bz2 I know this is old but I wanted the TVOut working.

1. I can do glxinfo and see the mach64 driver is loaded. When I run glxgears my cpu goes to 100%. Isn't this driver supposed to take the load off the cpu and onto the mach64 card?

2. I seem to me missing the libGL.so and libGLU.so in the /usr/X11R6/lib path. Is this normal?

3. I can do xvinfo but when I scale some videos to full screen the cpu is at 50% (it's a lowly P3 733MHz celeron). I want the video card doing this scaling.

-Todd

----------

## gaffiere

Tnx man!   :Very Happy: 

Finally it works also on my Compaq Presario 1700

good job

----------

## dberkholz

 *tfoggoa wrote:*   

> Great info folks. I've been playing around with this for a bit now. I have a All-in-wonder Pro (mach64) card and I'm trying to get xv scaling working on the TV-out at 800x600. I have some questions maybe someone can answer.
> 
> I loaded up the retinal burn drivers with the dri-xv-tvout stuff.  The tar file was: mach64-dri-xv-20030413.i386.tar.bz2 I know this is old but I wanted the TVOut working.
> 
> 1. I can do glxinfo and see the mach64 driver is loaded. When I run glxgears my cpu goes to 100%. Isn't this driver supposed to take the load off the cpu and onto the mach64 card?
> ...

 

The dri-devel mailing list at dri.sf.net is the appropriate place for your first and third concerns, libGL* are in /usr/lib/. However the mach64 driver wasn't actively maintained last I checked so you'll have best luck working to solve the problems yourself with the help of the developers on dri-devel.

----------

