# [SOLVED] Radeon drivers and dri

## Spiros

I have an ATI Mobility Radeon X2300. I always used fglrx drivers, but now, because of some incompatibility with the newest kernel, I decided to try the open-source radeon drivers. The first impact is good, but I have a problem: I cannot activate the direct rendering. I post a part of glxinfo:

```

direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)

server glx vendor string: SGI

server glx version string: 1.2

client glx vendor string: ATI                                                      

client glx version string: 1.4

GLX version: 1.2

OpenGL vendor string: DRI R300 Project                                             

OpenGL renderer string: Mesa DRI R300 20060815 TCL                                 

OpenGL version string: 1.3 Mesa 7.4

```

I followed this doc. On /var/log/Xorg.0.log I don't find anything useful.

The intressing thing is that I can enable the Kwin4 desktop effects, but in practice they make the desktop unusable without the direct rendering. glxgears is very slow, too.

Thank you for help.

-- SOLUTION --

The solution was: update xorg-server to version 1.6.2-r1.

----------

## Evincar

post the output of:

```
grep EE /var/log/Xorg.0.log

grep WW /var/log/Xorg.0.log
```

That will give more info so we can help you better![/code]

----------

## Spiros

```

spiros ~ $ grep EE /var/log/Xorg.0.log

        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(II) Loading extension MIT-SCREEN-SAVER

spiros ~ $ grep WW /var/log/Xorg.0.log

        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(WW) Ignoring unrecognized extension "Damage"

(WW) AllowEmptyInput is on, devices using drivers 'kbd' or 'mouse' will be disabled.

(WW) Disabling Keyboard1

(WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)

(WW) RADEON(0): R500 support is under development. Please report any issues to xorg-driver-ati@lists.x.org

(WW) RADEON(0): LVDS Info:

(WW) RADEON(0): DRI init changed memory map, adjusting ...

(WW) RADEON(0):   MC_FB_LOCATION  was: 0xd7ffd000 is: 0xd7ffd000

(WW) RADEON(0):   MC_AGP_LOCATION was: 0x003f0000 is: 0xffffffc0

(WW) SynPS/2 Synaptics TouchPad can't grab event device, errno=16

```

----------

## Spiros

I attach another log (glxinfo with LIBGL_DEBUG=verbose):

```

libGL: XF86DRIGetClientDriverName: 5.3.0 r300 (screen 0)

libGL: OpenDriver: trying /usr/lib32/dri/tls/r300_dri.so

libGL: OpenDriver: trying /usr/lib32/dri/r300_dri.so

libGL error: dlopen /usr/lib32/dri/r300_dri.so failed (/usr/lib32/dri/r300_dri.so: wrong ELF class: ELFCLASS32)

libGL: OpenDriver: trying /usr/lib64/dri/tls/r300_dri.so

libGL: OpenDriver: trying /usr/lib64/dri/r300_dri.so

libGL error: dlopen /usr/lib64/dri/r300_dri.so failed (/usr/lib64/dri/r300_dri.so: undefined symbol: _glapi_tls_Context)

libGL error: unable to load driver: r300_dri.so

libGL: XF86DRIGetClientDriverName: 5.3.0 r300 (screen 0)

libGL: OpenDriver: trying /usr/lib32/dri/tls/r300_dri.so

libGL: OpenDriver: trying /usr/lib32/dri/r300_dri.so

libGL error: dlopen /usr/lib32/dri/r300_dri.so failed (/usr/lib32/dri/r300_dri.so: wrong ELF class: ELFCLASS32)

libGL: OpenDriver: trying /usr/lib64/dri/tls/r300_dri.so

libGL: OpenDriver: trying /usr/lib64/dri/r300_dri.so

libGL error: dlopen /usr/lib64/dri/r300_dri.so failed (/usr/lib64/dri/r300_dri.so: undefined symbol: _glapi_tls_Context)

libGL error: unable to load driver: r300_dri.so

```

----------

## cyrillic

Did you remember to do this

```
# eselect opengl set xorg-x11 
```

BEFORE unmerging the fglrx driver ?

----------

## Spiros

I think I did.

But, if I did not, what can I do now?

----------

## cyrillic

The file "r300_dri.so" that xorg is looking for belongs to the media-libs/mesa package.  You could try re-emerging that, and see if it helps.

----------

## Spiros

Done, but nothing changed.

----------

## bbgermany

Does DRI work as root?

bb

----------

## scary

have you uninstalled fglrx completely ? it appears sometimes it just refuses to die (ie. eselect opengl sometimes just doesn't work as it should..:)

 maybe if you still have that problem even after doing (as root)

```
 eselect opengl set xorg-x11 
```

you could check

https://forums.gentoo.org/viewtopic-t-768839.html

----------

## Spiros

 *bbgermany wrote:*   

> Does DRI work as root?

 

No, it does not.

In facts, I suspect that the error is due to a previous installation of fglrx, but I don't know how to remove all its files and configurations. I installed it twice: once with emerge (and then I removed it with emerge -C), once with the official packages and a patch. The last one is maybe still installed.

I don't find any error either in kdm.log or in Xorg.0.log, but glxinfo with LIBGL_DEBUG=verbose returns:

```

libGL: OpenDriver: trying /usr/lib32/dri/r300_dri.so

libGL error: dlopen /usr/lib32/dri/r300_dri.so failed (/usr/lib32/dri/r300_dri.so: wrong ELF class: ELFCLASS32)

libGL: OpenDriver: trying /usr/lib64/dri/r300_dri.so

libGL error: dlopen /usr/lib64/dri/r300_dri.so failed (/usr/lib64/dri/r300_dri.so: undefined symbol: _glapi_tls_Context)

```

Can it be due to some wrong kernel configuration?

----------

## bbgermany

Hi,

1. remove the fglrx kernel module

2. make sure, you have drm and radeon kernel module loaded

3. recompile the x11-drivers 

```
emerge -av $(qlist -IC x11-drivers/)
```

4. try again

bb

----------

## Spiros

 *bbgermany wrote:*   

> 1. remove the fglrx kernel module

 

What must I do? Is it sufficient to remove the directory /lib/modules/fglrx?

EDIT: I removed the directory /lib/modules/fglrx; I controlled the kernel; I re-emerged all those drivers (evdev, mouse, keyboard, synaptics, ati). But nothing changed. glxinfo returns the same error.

----------

## bbgermany

Hi,

removing the dir and run "depmod -a" should be sufficient. In addition, could you please post the following: Xorg.0.log, xorg.conf, "dmesg | less" and your installed version of X and your drivers?

Thx, bb

EDIT: Interesting would be the kernel version and the drm/radeon module as well. Since according to this: http://dri.freedesktop.org/wiki/ATIRadeon you need a quite current version of the DRM stuff.

----------

## Spiros

Now I'm sure fglrx is completely removed from my box.

xorg-server: 1.5.3-r6 (latest stable)

x11-drm: 20090320 (latest stable)

xf86-video-ati: 6.12.1-r1 (latest stable)

kernel: 2.6.29-gentoo-r5 (latest stable)

----------

## Spiros

-- Sorry --

----------

## Spiros

-- Post removed by the author --

----------

## Spiros

Since the error I have is "libGL error: dlopen /usr/lib64/dri/r300_dri.so failed (/usr/lib64/dri/r300_dri.so: undefined symbol: _glapi_tls_Context)" (from glxinfo), I googled a lot. I found this topic. Olivier Pelerin had the same error and solved it by creating a link (see comment #7). Then Rick Vernam wrote the same instuction for amd64 (my case) (see comment #8 ). I did the same thing, but my problem is yet unsolved.

I also found this topic about the same problem. I modified my xorg.conf according to this solution, but the problem was not solved.

Of course I rebuilded xorg-server, xf86-video-ati, mesa and mesa-progs and checked my kernel's configuration...

----------

## DaggyStyle

not sure what exactly are you trying to do but remember that afaik, your card have no 3d support and inorder to get 2d support (software rendered) you must install drm and radeon from svn

----------

## Spiros

 *DaggyStyle wrote:*   

> your card have no 3d support and inorder to get 2d support (software rendered) you must install drm and radeon from svn

 

Where comes this news from? This wiki is not very clear: they say that 3D for X2000-X4870 is under development, but my card is listed as RV550-based and, according to this table, R500 are quite stable in both 2D and 3D. However, on Ubuntu I can run compiz fusion without problems with radeon drivers. I don't must run 3D games, I'd like only a little compositing on my KDE4...   :Rolling Eyes: 

(Do you mean git instead of svn?)

----------

## DaggyStyle

 *Spiros wrote:*   

>  *DaggyStyle wrote:*   your card have no 3d support and inorder to get 2d support (software rendered) you must install drm and radeon from svn 
> 
> Where comes this news from? This wiki is not very clear: they say that 3D for X2000-X4870 is under development, but my card is listed as RV550-based and, according to this table, R500 are quite stable in both 2D and 3D. However, on Ubuntu I can run compiz fusion without problems with radeon drivers. I don't must run 3D games, I'd like only a little compositing on my KDE4...  
> 
> (Do you mean git instead of svn?)

 

well then try to match th gentoo driver version to the ubuntu

----------

## Spiros

I FINALLY SOLVED!

I only updated xorg-server to the (unstable) version 1.6.2-r1 and now I have direct rendering and compositing active on my KDE.

I will erase all unuseful text from my previous posts and write a short resume in order to help other users.

Thanks to all people who helped me.

----------

## linuxale

 *Spiros wrote:*   

> I FINALLY SOLVED!
> 
> I only updated xorg-server to the (unstable) version 1.6.2-r1 and now I have direct rendering and compositing active on my KDE.
> 
> I will erase all unuseful text from my previous posts and write a short resume in order to help other users.
> ...

 

I've solved the same problem with all the last sw version searching and trying; here what I do:

export LIBGL_DRIVERS_PATH="/usr/lib64/dri"

mkdir /usr/lib/xorg/x86_64

ln -s /usr/lib/opengl/xorg-x11/lib/libGL.so.1.2 /usr/lib/xorg/x86_64/libGL.so.1

For 32bit system change the dir x86_64 to x86 ( I believe ).

Excellent Performance wih glxgears!!!!

20042 frames in 5.0 seconds = 4008.275 FPS

20039 frames in 5.0 seconds = 4007.645 FPS

20039 frames in 5.0 seconds = 4007.709 FPS

----------

