Bug 105847

Summary: Profile GL3bc is not available on X11GraphicsDevice
Product: Mesa Reporter: Aidan <aidan.walton>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED DUPLICATE QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Aidan 2018-04-02 12:27:50 UTC
I'm running the latest mesa drivers for radeon using Obilaf's ppa: on Ubuntu 17.10.

glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 4.5
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.1.0-devel
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.1 Mesa 18.1.0-devel
OpenGL shading language version string: 1.40
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.1.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10


I'm trying to run Scilab, which previously worked with an Nvidia graphics card.

Since I changed to Radeon, Scilab graphics are broken. Scilab have an old issue:
https://wiki.scilab.org/Graphical%20issues%20with%20Scilab%205.X

Which relates to a lack of pbuffer support, but I think this is not related. However the workaround they suggest does not help.

I have tested with glxgears that both software and hardware based OpenGL function on my system by toggling the LIBGL_ALWAYS_SOFTWARE=1 env variable and with Scilab it makes no difference.

I see from scilab debug logging that the java jogl call fails:

Caused by: com.jogamp.opengl.GLException: Profile GL3bc is not available on X11GraphicsDevice[type .x11, connection :1, unitID 0, handle 0x7f6b4c766120, owner true, ResourceToolkitLock[obj 0x21c3eea, isOwner true, <bbc9230, 355a3c78>[count 1, qsz 0, owner <AWT-EventQueue-1>]]], but: [GLProfile[GLES1/GLES1.hw], GLProfile[GLES2/GLES3.hw], GLProfile[GL2ES1/GLES1.hw], GLProfile[GL4ES3/GL4.hw], GLProfile[GL2ES2/GL4.hw], GLProfile[GL4/GL4.hw], GLProfile[GLES3/GLES3.hw], GLProfile[GL4/GL4.hw], GLProfile[GL3/GL4.hw], GLProfile[GL2GL3/GL4.hw]]

So even though the driver offers support for a version of OpenGL above this, the profile required here does not seem to be available.

I have no knowledge of how these profiles are translated between the graphics driver (Mesa) and what X11 offers to clients. But clearly there is a problem.

Any help appreciated, and apologies if this is an obvious problem elsewhere that is simply my lack of understanding, but still as it does not work
Comment 1 Emil Velikov 2018-04-04 17:07:04 UTC
Some of the previous scilab reports indicate that the jogl has some funky driver detection code - see bug 103078.

If the suggestion from there (reinstating the "Gallium 0.4") makes things work again, then we can call this a duplicate.
Comment 2 Aidan 2018-04-05 11:19:26 UTC
Thanks for drawing my attention to these discussions. However as much as I would like to be able to act on this without further assistance I have just spent several hours trying to find my way around the suggested .jar file installed on my Ubuntu 17.10 in order to attempt patching this file as per the suggestion:
https://bugs.freedesktop.org/show_bug.cgi?id=103078

However, I am not a java programmer, and firstly tring to decompile find and then patch the correct parts has proved 'convoluted' to say the least. I could try and clone the repo, but I'm quite sure compiling it on my machine will lead to further hours of problems. In fact, even doing a simple text search against the diff lines from within GLContextImpl.java turns up a blank. I can see parts that seems similar, but they are not exact copies. In fact the file does not even have enough lines of code to find the diffs by line number. Before I totally foobar my installed version. I have opted to ask for assistance.

I'm a C++ coder and all this compressed, manifested, decomposing etc, is turning my head inside out.

Anyway..... Just for your info. I have installed the Ubuntu package: 

libjogl2-java

This contains the file:
/usr/share/java/jogl2-2.3.2.jar

Which from what I can tell is the latest version of jogamp.

## As a side note. It also contains jogl2.jar, which seems identical, maybe its just an alias, but its an alias using disk space??? Whatever ###

If there was a less painful way of patching this, I would try, but honestly, I can't do it. I give in :)

Still no working Scilab.

Help would be appreciated, I will follow instructions if clarified, but I fear my lack of skill will not make things better.
Regards
Comment 3 Timothy Arceri 2018-05-01 06:51:49 UTC
I believe Emil was suggesting you should try building Mesa and reverting this commit [1]. For now I'm going to mark this as a duplicate.

[1] https://cgit.freedesktop.org/mesa/mesa/commit/?id=92b4ca45504e7ffc5f4fa385ada1be48e6123181

*** This bug has been marked as a duplicate of bug 103078 ***

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.