Bug 70706

Summary: Regression in fbconfig
Product: xorg Reporter: Hrvoje Senjan <hrvoje.senjan>
Component: Server/Ext/GLXAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: ajax, alex_y_xu, ansla80, arthur.titeica, b.brachaczek, bu9zilla, david, devurandom, Dieter, dri-devel, eugene.shalygin+bugzilla.FDO, joe.yasi, mgraesslin, mike, quarckster, rick.hendricksen
Version: git   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 70707    

Description Hrvoje Senjan 2013-10-20 22:23:58 UTC
Since trying out 1.14.99.2, i'm encountering the issue that KWin is not able to activate compositing, probably as a result of refactoring:

kwin(18388): Failed to get visual from fbconfig 
kwin(18388) KWin::OpenGLBackend::setFailed: Creating the OpenGL rendering failed:  "Could not initialize the buffer" 

Regression is somewhere between da5e20127a5b6e11a47eb6e61f3ea87b056cdf5f (works correctly) and f0659a7f68a5a334879af01a6a63742eab1bf5de (fails with above errors)

Let me know what further info i can provide. Glxinfo also spits:
Error: couldn't find RGB GLX visual or fbconfig
Comment 1 Dennis Schridde 2013-12-05 10:36:30 UTC
Is a patch for this known?
Comment 2 Hrvoje Senjan 2013-12-05 15:20:19 UTC
(In reply to comment #1)
> Is a patch for this known?

The patch for resolving this, to my knowledge, does not exists.
Comment 3 Mike Lothian 2013-12-05 15:36:59 UTC
I don't have this issue at all. I did for a while but it was fixed when I used the latest xorg-server and mesa
Comment 4 Dieter Nützel 2013-12-07 18:46:55 UTC
I can confirm the bug with openSUSE 12.3/13.1.

xorg-x11-server-7.6_1.14.99.903.1 (latest for the above).

lib/gallium> rpm -qi xorg-x11-server
Name        : xorg-x11-server
Version     : 7.6_1.14.99.903.1
Release     : 272.2
Architecture: i586
Install Date: Sa 07 Dez 2013 17:23:36 CET
Group       : System/X11/Servers/XF86_4
Size        : 5441518
License     : GPL-2.0+ and MIT
Signature   : DSA/SHA1, Fr 06 Dez 2013 14:55:33 CET, Key ID bb1af2330f2672c8
Source RPM  : xorg-x11-server-7.6_1.14.99.903.1-272.2.src.rpm
Build Date  : Fr 06 Dez 2013 14:53:25 CET
Build Host  : build20
Relocations : (not relocatable)
Vendor      : obs://build.opensuse.org/X11
URL         : http://xorg.freedesktop.org/
Summary     : X
Description :
This package contains the X.Org Server.
Distribution: X11:XOrg / openSUSE_12.3

/home/dieter> !glx
glxinfo
name of display: :0
Error: couldn't find RGB GLX visual or fbconfig
Error: couldn't find RGB GLX visual or fbconfig

240 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x021 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 None
[-]

Look here, too.
https://bugs.freedesktop.org/show_bug.cgi?id=72446
https://bugs.freedesktop.org/show_bug.cgi?id=70557
Comment 5 Dennis Schridde 2013-12-07 21:27:32 UTC
To me this issue seems to appear randomly - sometimes KDE starts with working compositing, but most often it does not.
Comment 6 Dennis Schridde 2013-12-07 21:29:12 UTC
*** Bug 72446 has been marked as a duplicate of this bug. ***
Comment 7 Dieter Nützel 2013-12-07 21:55:02 UTC
(In reply to comment #5)
> To me this issue seems to appear randomly - sometimes KDE starts with
> working compositing, but most often it does not.

Same, here.
When it starts _with_ compositing, then error message appears.
_Without _ compositing glxinfo runs OK and GL performance is nearly 25% better!

Q3A goes from ~53 fps to 66 fps (640x480 window on 1920x1080 screen) with my poor Duron 1800/RV730 AGP.

So is there a possibility, that we can disable compositing on the fly, when GL apps starts?
Comment 8 Dennis Schridde 2013-12-07 22:31:02 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > To me this issue seems to appear randomly - sometimes KDE starts with
> > working compositing, but most often it does not.
> 
> Same, here.
> When it starts _with_ compositing, then error message appears.
> _Without _ compositing glxinfo runs OK and GL performance is nearly 25%
> better!

In the current session I did not get compositing but the mentioned message in ~/.xession-errors:
kwin(2492): Failed to get visual from fbconfig 
kwin(2492) KWin::OpenGLBackend::setFailed: Creating the OpenGL rendering failed:  "Could not initialize the buffer" 
kwin(2492): Failed to initialize compositing, compositing disabled 

glxinfo currently does not work, either:
Error: couldn't find RGB GLX visual or fbconfig
Error: couldn't find RGB GLX visual or fbconfig
name of display: :0
[...]

So the current session seems to be a case of "without compositing, with glxinfo error". Which also seems to make sense: Something is preventing GL apps from working, which also affects glxinfo.

A quick test shows that EGL does not seem to be affected:
$ eglinfo
EGL API version: 1.4
EGL vendor string: Mesa Project
EGL version string: 1.4 (Gallium)
EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 
[...]

Also the X11 variants of the *gears (egl,es1,es2) programs work:
$ eglgears_x11 
EGL_VERSION = 1.4 (Gallium)

But the "screen variants do not (though I do not remember ever before testing them, so I cannot tell whether this is a regression):
$ eglgears_screen 
EGL_VERSION = 1.4 (Gallium)
EGLUT: failed to choose a config

I can confirm this with KWin (stripped from unrelated output):
$ kwin
kwin(3945): Failed to get visual from fbconfig 
kwin(3945) KWin::OpenGLBackend::setFailed: Creating the OpenGL rendering failed:  "Could not initialize the buffer" 
QObject::connect: Cannot connect (null)::resetCompositing() to KWin::Compositor::restart()
kwin(3945): Failed to initialize compositing, compositing disabled 
kwin(3945): Consult http://techbase.kde.org/Projects/KWin/4.0-release-notes#Setting_up 

$ kwin_gles
OpenGL vendor string:                   X.Org
OpenGL renderer string:                 Gallium 0.4 on AMD REDWOOD
OpenGL version string:                  OpenGL ES 3.0 Mesa 9.2.4
OpenGL shading language version string: OpenGL ES GLSL ES 3.0
[...]

> So is there a possibility, that we can disable compositing on the fly, when
> GL apps starts?

I think that is a completely unrelated issue that belongs on https://bugs.kde.org/ and should be reported against KWin.
Comment 9 Hrvoje Senjan 2013-12-17 22:40:41 UTC
With latest Mesa and xserver master:


name of display: :0
libGL: screen 0 does not appear to be DRI3 capable
libGL: OpenDriver: trying /usr/lib64/dri/updates/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/updates/r600_dri.so
libGL error: dlopen /usr/lib64/dri/updates/r600_dri.so failed (/usr/lib64/dri/updates/r600_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/lib64/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/r600_dri.so
libGL: driver does not expose __driDriverGetExtensions_r600(): /usr/lib64/dri/r600_dri.so: undefined symbol: __driDriverGetExtensions_r600
libGL: Can't open configuration file /home/hrvoje/.drirc: No such file or directory.
libGL: Can't open configuration file /home/hrvoje/.drirc: No such file or directory.
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable
Error: couldn't find RGB GLX visual or fbconfig
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable
Error: couldn't find RGB GLX visual or fbconfig
Comment 10 Dennis Schridde 2013-12-18 09:37:12 UTC
I confirm that this is still present in x11-base/xorg-server-1.14.99.904 and media-libs/mesa-9.2.5.

(In reply to comment #9)
> /usr/lib64/dri/r600_dri.so: undefined symbol: __driDriverGetExtensions_r600

There seems to be a different issue on your system.

On my system this symbol is also not present:
$ readelf -s /usr/lib64/dri/r600_dri.so | grep driDriverGetExt
$ readelf -s /usr/lib64/dri/r600g_dri.so | grep driDriverGetExt

But that does not seem to be a problem here:
$ LIBGL_DEBUG=verbose glxinfo
name of display: :0
libGL: OpenDriver: trying /usr/lib64/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/r600_dri.so
libGL: Can't open configuration file /home/USER/.drirc: No such file or directory.
libGL: Can't open configuration file /home/USER/.drirc: No such file or directory.
libGL: Can't open configuration file /home/USER/.drirc: No such file or directory.
Error: couldn't find RGB GLX visual or fbconfig
libGL: Can't open configuration file /home/USER/.drirc: No such file or directory.
Error: couldn't find RGB GLX visual or fbconfig
[...]

Could it be that some parts of Mesa on your system do not fit together? Maybe multiple versions/variants installed in parallel?
Comment 11 Hrvoje Senjan 2013-12-18 09:39:59 UTC
(In reply to comment #10)
> There seems to be a different issue on your system.
> 

That is a sideeffect of Mesa master and MESA_DEBUG=1/LIBGL_DEBUG=verbose env vars =)
Comment 12 David Heidelberg (okias) 2013-12-24 22:39:54 UTC
X.Org X Server 1.14.99.905 (1.15.0 RC 5)

I can confirm problem with kwin.
Comment 13 Eugene Shalygin 2014-01-02 20:17:23 UTC
X.Org X Server 1.15.0 has the same problem with mesa from git master branch. 

Glxinfo and KWin run fine if mesa is compiled with --disable-dri3
Comment 14 Michael Mair-Keimberger 2014-01-05 09:12:06 UTC
I can confirm this problem with kwin too.
X.Org X Server 1.15.0
Comment 15 Stefan Brüns 2014-02-01 21:02:18 UTC
openSUSE ships a xorg config file in the glamor package:
$> cat /etc/X11/xorg.conf.d/05-glamor.conf
Section "Module"
        Load  "dri2"
        Load  "glamoregl"
EndSection
---

I think this was a workaround to get correct GL symbol tables. As the GL loader has changed with xserver 1.15 this is probably no longer needed.

Commenting out (#) the two Load commands fixed this for me.
Comment 16 Dieter Nützel 2014-02-04 00:40:21 UTC
(In reply to comment #15)
> openSUSE ships a xorg config file in the glamor package:
> $> cat /etc/X11/xorg.conf.d/05-glamor.conf
> Section "Module"
>         Load  "dri2"
>         Load  "glamoregl"
> EndSection
> ---
> 
> I think this was a workaround to get correct GL symbol tables. As the GL
> loader has changed with xserver 1.15 this is probably no longer needed.
> 
> Commenting out (#) the two Load commands fixed this for me.

Or move it away...;-)

So, I can confirm that this works OK, now on

openSUSE 13.1
Linux 3.13.1-3.gfc9498b-desktop
xorg-x11-server-7.6_1.15.0-293.2.i586 (1.15 final)
xf86-video-ati-7.3.0-37.1.i586
Mesa 10.1.0-devel (git-1597788)
r600g
RV730 AGP
Without Glamor.

With glamor-0.6.0-41.2.i586
it is very slow and KDE's window borders are (massive) corrupted.
Comment 17 Eugene Shalygin 2014-02-05 17:29:31 UTC
In my case "Module" section is empty and I have the issue.

X.Org X Server 1.15.0
xf86-vide0-ati, module version = 7.3.99
Mesa 10.1.0-devel (git-023a50d), r600g driver
Comment 18 Joseph Yasi 2014-02-15 20:03:48 UTC
I've also been seeing this with Xorg 1.15 and Mesa 10.2-devel and the Intel 2.99.910 driver with DRI3 enabled. It is very inconsistent. Logging in and out of KDE a few times, and eventually glxinfo works, but often I get:
Error: couldn't find RGB GLX visual or fbconfig
Error: couldn't find RGB GLX visual or fbconfig

Desktop effects with kwin work inconsistently as well.
Comment 19 Emil Velikov 2014-02-17 23:47:46 UTC
Might be worth testing these two patches [1] [2]

[1] http://patchwork.freedesktop.org/patch/20458/
[2] http://patchwork.freedesktop.org/patch/20464/
Comment 20 Joseph Yasi 2014-02-19 19:16:15 UTC
(In reply to comment #19)
> Might be worth testing these two patches [1] [2]
> 
> [1] http://patchwork.freedesktop.org/patch/20458/
> [2] http://patchwork.freedesktop.org/patch/20464/

Those patches fixed it for me.
Comment 21 Christopher Yeleighton 2014-02-25 08:53:16 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > openSUSE ships a xorg config file in the glamor package:
> > $> cat /etc/X11/xorg.conf.d/05-glamor.conf
> > Section "Module"
> >         Load  "dri2"
> >         Load  "glamoregl"
> > EndSection
> > ---
> > 
> > I think this was a workaround to get correct GL symbol tables. As the GL
> > loader has changed with xserver 1.15 this is probably no longer needed.
> > 
> > Commenting out (#) the two Load commands fixed this for me.
> 
> Or move it away...;-)
> 
> So, I can confirm that this works OK, now on
> 

Commenting the two lines has no effect upon glxinfo.
Comment 22 Adam Jackson 2014-04-07 18:03:45 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > Might be worth testing these two patches [1] [2]
> > 
> > [1] http://patchwork.freedesktop.org/patch/20458/
> > [2] http://patchwork.freedesktop.org/patch/20464/
> 
> Those patches fixed it for me.

Both of these patches are now merged to Mesa, closing.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.