# GLX stops working with xf86-video-ati



## G_Nerc (Aug 10, 2013)

Hi all!

After a port upgrade process, problems appear with games (games stop launch with errors).


```
Error: Couldn't initialize video: Couldn't find matching GLX visual
File: winsys.cpp
Line: 127
```

After checking /var/log/Xorg.0.log I see several errors and warnings:

`grep -E "EE|WW" /var/log/Xorg.0.log`

```
[    18.889] (WW) `fonts.dir' not found (or not valid) in "/usr/local/lib/X11/fonts/msttf/".
[    18.889] (WW) The directory "/usr/local/lib/X11/fonts/terminus-font/" does not exist.
[    18.890] (WW) Ignoring unrecognized extension "XDamage"
[    19.018] (II) Loading extension MIT-SCREEN-SAVER
[    19.459] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    20.185] (WW) RADEON(0): DRI init changed memory map, adjusting ...
[    20.185] (WW) RADEON(0):   MC_FB_LOCATION  was: 0x00cf00c0 is: 0x00cf00c0
[    20.185] (WW) RADEON(0):   MC_AGP_LOCATION was: 0x003f0000 is: 0x00030000
[    20.279] (WW) RADEON(0): Option "AllowGLXWithComposite" is not used
[    20.321] (EE) AIGLX error: dlopen of /usr/local/lib/dri/r600_dri.so failed (Cannot open "/usr/local/lib/dri/r600_dri.so")
[    20.321] (EE) AIGLX: reverting to software rendering
[    20.321] (EE) AIGLX error: dlopen of /usr/local/lib/dri/swrast_dri.so failed (Cannot open "/usr/local/lib/dri/swrast_dri.so")
[    20.321] (EE) GLX: could not load software renderer
[    21.361] (WW) Mouse: No Device specified, looking for one...
[    21.469] (WW) fcntl(12, F_SETOWN): Inappropriate ioctl for device
[    21.469] (WW) Mouse: No Device specified, looking for one...
[    21.490] (EE) xf86OpenSerial: Cannot open device /dev/ums0
[    21.490] (EE) Mouse: cannot open input device
[    21.490] (EE) PreInit returned 2 for "Mouse"
```

I check files located at /usr/local/lib/dri and there is a file radeon_dri.so, not r600_dri.so. I try to make a symbolic link: `ln -s /usr/local/lib/dri/radeon_dri.so /usr/local/lib/dri/r600_dri.so` and restart Xorg.

After that such errors/warnings exist:


```
[134042.815] (WW) `fonts.dir' not found (or not valid) in "/usr/local/lib/X11/fonts/msttf/".
[134042.815] (WW) The directory "/usr/local/lib/X11/fonts/terminus-font/" does not exist.
[134042.815] (WW) Ignoring unrecognized extension "XDamage"
[134042.826] (II) Loading extension MIT-SCREEN-SAVER
[134042.838] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[134043.336] (WW) RADEON(0): DRI init changed memory map, adjusting ...
[134043.336] (WW) RADEON(0):   MC_FB_LOCATION  was: 0x00cf00c0 is: 0x00cf00c0
[134043.336] (WW) RADEON(0):   MC_AGP_LOCATION was: 0x003f0000 is: 0x00030000
[134043.375] (WW) RADEON(0): Option "AllowGLXWithComposite" is not used
[134043.394] (EE) AIGLX error: r600 does not export required DRI extension
[134043.394] (EE) AIGLX: reverting to software rendering
[134043.394] (EE) AIGLX error: dlopen of /usr/local/lib/dri/swrast_dri.so failed (Cannot open "/usr/local/lib/dri/swrast_dri.so")
[134043.394] (EE) GLX: could not load software renderer
[134043.834] (WW) Mouse: No Device specified, looking for one...
[134043.886] (WW) fcntl(12, F_SETOWN): Inappropriate ioctl for device
[134043.886] (WW) Mouse: No Device specified, looking for one...
[134043.917] (EE) xf86OpenSerial: Cannot open device /dev/ums0
[134043.917] (EE) Mouse: cannot open input device
[134043.917] (EE) PreInit returned 2 for "Mouse"
```

I try `portupgrade -f graphics/libGL graphics/dri graphics/libdrm` and I have 
	
	



```
WITH_NEW_XORG=yes
```
 in /etc/make.conf.

Here is a link to my xorg.conf


----------



## zeissoctopus (Aug 13, 2013)

Please remove 
	
	



```
WITH_NEW_XORG=yes
```
 in /etc/make.conf and recompile xorg. The Xorg 7.7 with 
	
	



```
WITH_NEW_XORG=yes
```
 option result in linking the Mesa 8.x library which removes r600_dri.so offically. If you compile X.Org 7.7 without the 
	
	



```
WITH_NEW_XORG=yes
```
 option, it will link the old Mesa 7.x library with r600_dri.so for your old ATI.

Please read the porter message from http://miwi.cc/2012/06/cft-xorg-7-7-ready-for-testing/.


----------



## G_Nerc (Aug 14, 2013)

Thank you @zeissoctopus!

I will do what you say, but I not fully understand, how x11-drivers/xf86-video-ati not drops support for not so old cards like RV630, but MesaLib drops it...

Strange opensource, too much exceptions and restrictions in some cases with opensource software.


----------



## adamk (Aug 14, 2013)

It's not so much that Mesa dropped support for that GPU, but that it moved support for the GPU into the new gallium infrastructure which is not yet available on FreeBSD.


----------



## G_Nerc (Aug 14, 2013)

Thanks @adamk for the explanation!

Will work on KMS on AMD bring support for gallium or are they different things?


----------

