# OpenGL: Accelerated please!

## Billybob

I just downloaded the cube engine on my new Gentoo system hoping to play it...well I eventually got it to run, but it's obvious that it isn't using hardware acceleration since it's down at 13 FPS.

So does anyone know how to get it accelerated? I have an ATi Radeon 9600 XT care, ati-drivers has been emerged.

Thanks.

----------

## Billybob

glxinfo seems to say that Mesa is being used. Why? It's suppose to say it's using ATi Radeon 9600 XT, right?

Also, glxgears runs at 300fps...not sure if my CPU is just that fast or it's actually running hardware accelerated.

:-/

----------

## cartpullerjack

I've never run a radeon, so I don't know how helpful this will be.

I don't mean to insult you or anything, but to be sure, have you installed the ati driver?

There's one provided by ati and theres a recent open source driver.  I'm not sure if the os drive is in the portage tree yet.

I'm not sure if this applies to radeons, but for geforce cards you have to install an opengl implementation specific to nvidia cards (nvidia-glx).  I can't seem to find anything similar for ati at first glance, but you may have to run opengl-update to get xfree to switch from mesa to hardware acceleration.

hth.

----------

## pjp

Moved from Installing Gentoo.

----------

## Billybob

I've run "emerge ati-drivers" which gets the drivers, and I've run "opengl-update ati".

----------

## cartpullerjack

have you modprobe'd the ati driver?

edit:  sorry for all the questions.  I can't judge your noob level to tell how much you already know to do...

----------

## gen2newB

Have you made sure that you loaded the appropriate modules or functionality for your mobo built into your kernel? You have to make sure you have supposrt for your chipset and your agpgart support, be it from ATI's driver, or the kernel itself. Also, did you do the fglrxconfig that comes with ATI's drivers. Like the previous person said, I don't know exactly what you can/can not do, or have/have not done.

----------

## Billybob

I did use ATI's X config tool. I'm not entirely sure what I'm suppose to modprobe. I just did "modprove radeon" but not sure if that did anything.

I've compiled in support for all my hardware. I've re-compiled my kernel several times, but if I recall correctly the current kernel has agpart built in, DRI built in, and I think the DRI ATI Radeon support is a module...although I've tried without DRI and a bunch of other things compiled in and out.

Any ideas?

----------

## Billybob

Here's a section of my XFree86.0.log file:

 *Quote:*   

> 
> 
> (II) Loading extension ATIFGLRXDRI
> 
> (II) fglrx(0): doing DRIScreenInit
> ...

 

----------

## cartpullerjack

post your xf86config.  while my config loads the dri extension, it isn't explicitly turned on in my device section like i've had to do for i810s, voodoos, and rage 128s.  you might not need it.

----------

## Billybob

http://www.cljy.com/~billy/XF86Config

----------

## Wedge_

The long sequence of "drmOpenDevice" messages usually means that you still have Direct Rendering Manager support enabled in your kernel, or have a DRM module loaded. DRM doesn't get along with the ATI driver and so you don't get 3D acceleration if you have both loaded at the same time. If you have the "radeon" module loaded, unload it and then load the "fglrx" module. The radeon driver doesn't support the 9600XT anyway, so you can remove it from your kernel completely.

----------

## Billybob

*bangs head against wall* AHHHH, I'm gonna fricken scream here. Why won't it work? I've re-compiled my kernel 50 times by now. All of that junk are modules now, agpgart, the ATI support under agpgart, DRI, and the ATI support under DRI are all modules. under /etc/modules.autoload.d/kernel-2.6 I load:

 *Quote:*   

> 
> 
> #radeon
> 
> rtc
> ...

 

All of them load on boot, but still the X log states that 3D acceleration is disabled because DRI didn't init. flgrxinfo and glxinfo both still say Mesa is being used. What am I doing wrong?

----------

## Wedge_

If you're using 2.6 and have the kernel AGP support compiled as modules, you also have to load a second, motherboard-dependent AGP module (it's not like 2.4 where there's just agpgart). If you have an nForce board, load nvidia-agp. If it's a VIA board, load via-agp. If it's an Intel board, intel-agp. Etc etc  :Smile:  In your modules.autoload file, make sure they're in the order 

```
agpgart

<other agp module>

fglrx
```

----------

## Billybob

did that, nvidia-agp loaded properly during boot with everything else, but still DRI wont init and glxinfo still says Mesa is being used.

----------

## Wedge_

Alrighty, what's your /var/log/XFree86.0.log saying?

----------

## Billybob

http://www.cljy.com/~billy/XFree86.0.log

And thanks for helping me so far.

----------

## Wedge_

OK, I think the problem is that you have "UseInternalAGPGART" set to "yes" in your XF86Config. What this does is make the driver use its own AGP support rather than the kernels, which doesn't always work. Try changing "UseInternalAGPGART" to "no" and see if that helps.

----------

## Billybob

Changed to no, logged out of kdm and back to console. restarted kdm and XFree86.0.log says:

 *Quote:*   

> 
> 
> (EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_ENOMEM"
> 
> (EE) fglrx(0): cannot init AGP
> ...

 

AGP is not init and DRI is not init.   :Confused:  How should my kernel be setup? What needs to be module, what needs to be compiled in, and what needs to be disabled? I've read that DRI needs to be disabled, I have it as module ATM.

----------

## Wedge_

DRI doesn't actually have to be disabled, it should be OK to leave it as a module as long as it never gets loaded. Like I said before, it doesn't support your card, so if you want to get rid of it, go ahead. The AGP stuff can either be compiled in or as modules. Using modules tends to cause fewer problems for the majority of people. The link in my sig has a bit more information. 

If you're still getting the ENOMEM error, try increasing your AGP aperture size in the BIOS. This seems to happen fairly often with nForce boards for some reason, and increasing the aperture size will sometimes fix it.

----------

## Billybob

WOOOOOOOOOOOOOOOOOOOOOHHHHHHHHHOOOOOOOOOOOOOOOOOOOOO!

This forum needs dancing smilies! Cause I'm danc'n'. It's finally WoRkInG! I up-ed the apeture to 128MB instead of the 64MB it was at, I also re-compiled the kernel, disabling DRI...and adding a few non-related things(I think) here and there.

So, WOOHOO it works. glxinfo reports my card, and glxgears runs at 2000+ FPS, that's right, 2000   :Very Happy:  Sweet monkies it works!

Thanks for all your help Wedge_!

----------

## Wedge_

 *Billybob wrote:*   

> WOOOOOOOOOOOOOOOOOOOOOHHHHHHHHHOOOOOOOOOOOOOOOOOOOOO! 

 

 :Laughing: 

Have fun  :Smile: 

----------

## iuli

I need to thank you also, I just followed the Radeon FAQ and got it working in no time!!  :Smile: 

----------

## Wedge_

 *iuli wrote:*   

> I need to thank you also, I just followed the Radeon FAQ and got it working in no time!! 

 

Good to hear it  :Wink: 

----------

