Bug 1054435

Summary: Clutter-CRITICAL **: Unable to initialize Clutter: The OpenGL version could not be determined Window manager error: Unable to initialize Clutter.
Product: [Fedora] Fedora Reporter: Álvaro Castillo <midgoon>
Component: coglAssignee: Peter Robinson <pbrobinson>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 22CC: bugzilla, fmuellner, frederic.lespez, jeremy.mordkoff, kparal, midgoon, morroww6, pbrobinson, prd-fedora, rhughes, tiagomatos
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 18:51:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
GNOME software list installed
none
AMD OpenGL ES SDK none

Description Álvaro Castillo 2014-01-16 19:56:21 UTC
Created attachment 851256 [details]
GNOME software list installed

Description of problem:

Recently, I have installed AMD Catalyst 13.235 on Fedora 20 x86_64 with GNOME fully upgraded. However, GDM, gnome-session, cheese or another application requires Clutter does not work. This is the output message when I try to launch:

=======================OUTPUT INFO============
$ gnome-shell --replace
 
(gnome-shell:6935): GLib-CRITICAL **: g_strsplit: assertion 'string != NULL' failed
 
(gnome-shell:6935): Clutter-CRITICAL **: Unable to initialize Clutter: The OpenGL version could not be determined
Window manager error: Unable to initialize Clutter.
========================OUTPUT INFO=============

However, I run awesome games requires OpenGL, or Stellarium for example that's need OpenGL. This is my fglrxinfo:

=======================OUTPUT INFO==============
$ fglrxinfo 
display: :0  screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 7520G
OpenGL version string: 4.3.12618 Compatibility Profile Context 13.251
=======================OUTPUT INFO===============

Now, I'm written over openbox session because I cannot start GDM :'(

Futhermore, when I used radeon driver, I could launch any GNOME software application. But, I don't interested uses free driver, because I cannot suspend my system without that. (kernel bug (?))

I'm added more info about GNOME software I've installed. All it's fully upgraded.

I've searched into net about more information of this possible bug.
Add into /etc/environment or creates file into /etc/profile.d/clutter.sh including: export CLUTTER_VBLANK=none. But does not work.

Comment 1 Kamil Páral 2014-01-17 09:35:41 UTC
See https://bugzilla.gnome.org/show_bug.cgi?id=712340

Comment 2 Álvaro Castillo 2014-01-30 00:14:25 UTC
Yes, I tried to follow instruction there.

============QUOTE==============================================
Dylan Smith [reporter] 2013-11-18 01:17:48 UTC

OK, I have GNOME Shell and Totem working with Catalyst 13.11 beta 6 finally,
rebuilding rpms.

In cogl spec file, %build section 
Added:
  --enable-cogl-gles2=no \
  --enable-wayland-backend=no \
  --enable-wayland-compositor=no
Commented:
#  --enable-kms-egl-platform \
#  --enable-wayland-egl-platform \
#  --enable-wayland-egl-server \
#  --enable-xlib-egl-platform


In clutter spec file, %build section
Added:
        --enable-wayland-backend=no \
        --enable-wayland-compositor=no \
Commented:
#%if %{with_wayland}
#        --enable-egl-backend \
#        --enable-evdev-input \
#        --enable-wayland-backend \
#        --enable-wayland-compositor \
#%endif


In gnome-shell spec file, 
%prep section, commented:
# %patch10 [details] -p1 -b .fix-wayland-build
%install section, commented:
# desktop-file-validate
%{buildroot}%{_datadir}/applications/gnome-shell-wayland.desktop
# %{_bindir}/gnome-shell-wayland
# %{_datadir}/applications/gnome-shell-wayland.desktop

Totem spec file did not need any modification, just rebuilding again is enough.

Source rpm files are:
cogl-1.16.0-2.fc20.src.rpm
clutter-1.16.0-2.fc20.src.rpm
gnome-shell-3.10.2-1.fc20.src.rpm
totem-3.10.1-1.fc20.src.rpm
=========================END-OF-QUOTE===============================

After made it. I can join into GNOME session but I cannot see mouse cursor, and desktop. Only see GNOME startup (setting language and more), and switch names of folders because I changed English into Spanish from GNOME's startup.

But all desktops was black screen. I had to swtich tty and turn off X.org server (init 3).

I've tried to launch totem, or cheese, or another GNOME application depends of it and says same bug about OpenGL to clutter. :S


AMD's has got a libEGL, you can download from here: It's SDK includes libraries for all arch (x86 and x86_64). I don't know how to use that library (install...). Maybe can works fine with it.
http://developer.amd.com/tools-and-sdks/graphics-development/amd-opengl-es-sdk/

Comment 3 Álvaro Castillo 2014-01-30 00:19:27 UTC
Created attachment 857312 [details]
AMD OpenGL ES SDK

Library libEGL.so it's included for x86 and x86_64 archs.

Comment 4 William P. Morrow 2014-03-09 14:07:02 UTC
I can't say for sure that this is your bug, but you should give this a try.
add this to your .xinitrc file:

export COGL_DRIVER=gl
export COGL_OVERRIDE_GL_VERSION=1.4
export COGL_RENDERER=GLX
export LD_PRELOAD=/usr/lib64/fglrx/fglrx-libGL.so.1.2
gnome-session

TThe dlsym search for glGetString returns a stub from another library
which returns 0 instead of gl data. The program does not handle
this error and segvs.

This massive kludge adds the gl library to everything run under the
session as the first library.  The search finds the good stuff, but
at the price of goofy shared libraries in your executables.

I have not refined this yet, and there may be other side-effect
fixes/bugs since the program needs is not finding the correct
external set (insecurity risk).

good luck with your search for fixes.
your post was helpful thanks.

Comment 5 Jeremy Mordkoff 2014-04-11 14:57:12 UTC
I can confirm that the solution in comment 4 does work 

Thanks William!

Comment 6 awlnx 2014-04-25 09:10:45 UTC
Do I only need the workaround in comment 4 to get it working or do I also need to recompile gnome? Or do I need to install libEGL.so from AMD?

Comment 7 William P. Morrow 2014-04-27 20:57:21 UTC
There is no need to do anything else if the problem you are experiencing is this one.  This is a pretty massive kludge.  The cogl library needs to be fixed before this will no longer be needed.  It loads the first libgl version it finds and this forces the first version to be the desired one.

Comment 8 Paul DeStefano 2015-01-18 08:18:20 UTC
Please bump this to F21 at least, if not rawhide.

Comment 9 Peter Robinson 2015-01-20 12:05:35 UTC
(In reply to William P. Morrow from comment #7)
> There is no need to do anything else if the problem you are experiencing is
> this one.  This is a pretty massive kludge.  The cogl library needs to be
> fixed before this will no longer be needed.  It loads the first libgl
> version it finds and this forces the first version to be the desired one.

This kludge should be done as part of the AMD drivers, we don't support binary drivers in Fedora and I doubt upstream cogl has any urge to support them either (which is where this should actually be reported)

Comment 10 William P. Morrow 2015-01-20 14:55:53 UTC
All true, but...
The reason this is a problem is that the library search for dl is global, and not restricted to the interesting library versions.
That is a security bug.
It is loading someone elses objs, not the intended version.
That should be fixed in general.

Comment 11 Paul DeStefano 2015-01-21 20:44:14 UTC
Hopefully we'll get some traction now that this is reported against rawhide.  Thanks for that.

Just to be clear, are you asking us to report upstream?  If you've already done it, then okay.  But if you would rather someone else do it, just say the word.

Comment 12 William P. Morrow 2015-01-22 00:48:45 UTC
No, I have not pushed for any changes, and I would like to have a fix.
My opinion is that the library search should find the correct version of
the actual glGetString for libGL, not a weak link from somewhere else.
If you have any sway in getting this examined, then please make a request.

This mod has been reported for over a year, and a fix reported for months,
and no actual changes have occurred to date.

This problem affects popular products.  Its hard to understand why
it is so hard to get attention.

Comment 13 Jaroslav Reznik 2015-03-03 15:23:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 14 Paul DeStefano 2016-01-16 22:44:50 UTC
I wonder if this is still an issue.  I finally got upgraded to F23 and removed the COGL environment settings I found here and had been using since F20.  I don't see a problem with totem, specifically, but I don't use GNOME, either, so that may not be a sufficient test.

Comment 15 Paul DeStefano 2016-01-20 05:31:39 UTC
I have found some problems in F23 that I wonder may be related.  I'm getting COGL warnings and errors.  Cheese doesn't show preview, for example.

$ cheese

(cheese:30289): Cogl-WARNING **: Shader compilation failed:
Vertex shader failed to compile with the following errors:
ERROR: error(#271) Explicit version number 120 not supported by GL3 forward compatible context
ERROR: error(#273) 1 compilation errors.  No code generated

Is this related?

Comment 16 Fedora End Of Life 2016-07-19 18:51:14 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.