Intel HD Graphics 520 driver with OpenGL support

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
kalo86
Samurai
Samurai
Posts: 177
Joined: 28 Mar 2011, 18:04
Location: Italy

Intel HD Graphics 520 driver with OpenGL support

Post#1 by kalo86 » 01 Jun 2020, 18:15

Hello community,

I have a question: why the Intel HD Graphics card 520 on my laptop has an OpenGL version 3.0 while on Windows it reaches OpenGL 4.5?

I need support for OpenGL 4.x in order to run a specific software and I wonder if there is a way to make it possible in Porteus 5.0rc1 (x86_64).

I hope to read your answers.

Best regards,
kalo86

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Intel HD Graphics 520 driver with OpenGL support

Post#2 by donald » 02 Jun 2020, 02:58

Hi kalo86
What does glxinfo|grep OpenGL show?
It may look like this:

Code: Select all

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) 
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.3
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 12.0.3
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 12.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
The issue is probably that you are getting compatibility profile when you really want a core profile.
The driver only supports OpenGL 4.3 when in core profile mode, and 3.0 in compatibility mode.

You could try to set a environment variable like MESA_GL_VERSION_OVERRIDE=4.3
to get it working.
https://www.mesa3d.org/envvars.html

kalo86
Samurai
Samurai
Posts: 177
Joined: 28 Mar 2011, 18:04
Location: Italy

Intel HD Graphics 520 driver with OpenGL support

Post#3 by kalo86 » 02 Jun 2020, 06:19

Hello donald, thank you for the answer.
The following is the output of the command:

Code: Select all

root@porteus:~# glxinfo|grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.0.4
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 19.0.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
I suppose that I have to change the variable.
What is the best way to do it? Overwrite the .bashrc file at reboot? Can I do this on the rootcopy folder or do I need a dedicated module?

Thanks,

kalo86

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Intel HD Graphics 520 driver with OpenGL support

Post#4 by donald » 02 Jun 2020, 07:52

export MESA_GL_VERSION_OVERRIDE=4.5

If the problem is solved, store this
for the user in ~/.bashrc or system wide in /etc/profile
If saving changes is not sufficient, use rootcopy.
Check if being set with printenv

kalo86
Samurai
Samurai
Posts: 177
Joined: 28 Mar 2011, 18:04
Location: Italy

Intel HD Graphics 520 driver with OpenGL support

Post#5 by kalo86 » 02 Jun 2020, 07:56

Hi Donald,

I run Porteus in "Always fresh" boot mode with root login.
Therefore I need to modify the .bashrc for root user.
I am going to try in a few minutes.

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Intel HD Graphics 520 driver with OpenGL support

Post#6 by donald » 02 Jun 2020, 08:24

Hi kalo
rootcopy can be used in always fresh mode
if you remove "norootcopy" from the APPEND line in porteus.cfg

kalo86
Samurai
Samurai
Posts: 177
Joined: 28 Mar 2011, 18:04
Location: Italy

Intel HD Graphics 520 driver with OpenGL support

Post#7 by kalo86 » 02 Jun 2020, 08:28

How can I verify if the new environment variable is really working?
In the output of glxinfo|grep OpenGL I see that there is a line

Code: Select all

OpenGL version string: 3.0 Mesa 19.0.4
I suppose that this line should change, right?

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Intel HD Graphics 520 driver with OpenGL support

Post#8 by donald » 02 Jun 2020, 08:49

first (in terminal)
export MESA_GL_VERSION_OVERRIDE=4.5

Check if being set with printenv

then
MESA_GL_VERSION_OVERRIDE=4.5 your_program

kalo86
Samurai
Samurai
Posts: 177
Joined: 28 Mar 2011, 18:04
Location: Italy

Intel HD Graphics 520 driver with OpenGL support

Post#9 by kalo86 » 02 Jun 2020, 08:57

The new environment variable seems to work but the software is not working anymore. Without any extra environment variable it works (without graphics).

Do you know if I can check something?

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Intel HD Graphics 520 driver with OpenGL support

Post#10 by donald » 02 Jun 2020, 09:22

The new environment variable seems to work but the software is not working anymore.
The program wont start? - :(
Do you know if I can check something?
Nope, that was the only "easy fix" to try that i am aware of.

Problem is the program uses the wrong profile
(compatibility profile not core profile)
and i do not know when and where this is determined.
(source code or at compiling)

Sorry for being of no help.

kalo86
Samurai
Samurai
Posts: 177
Joined: 28 Mar 2011, 18:04
Location: Italy

Intel HD Graphics 520 driver with OpenGL support

Post#11 by kalo86 » 02 Jun 2020, 09:25

No problem Donald, I always am surrounded by difficulties in any field.
Do you know if I can compile a driver with a specific flag for the core profile?
Can you recommend a source where I may get detailed info about this topic?
Thanks

kalo86
Samurai
Samurai
Posts: 177
Joined: 28 Mar 2011, 18:04
Location: Italy

Intel HD Graphics 520 driver with OpenGL support

Post#12 by kalo86 » 02 Jun 2020, 09:33

If this can help, I have the IDE log from the software:

Code: Select all

SEVERE [global]
com.jogamp.opengl.GLException: Profile GL4bc is not available on X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x7f07fd57a780, owner true, ResourceToolkitLock[obj 0x47c40da1, isOwner true, <185ae9d6, 78aded17>[count 1, qsz 0, owner <AWT-EventQueue-0>]]], but: [GLProfile[GLES3/GLES3.hw], GLProfile[GL2ES2/GL4.hw], GLProfile[GL2ES1/GLES1.hw], GLProfile[GL4/GL4.hw], GLProfile[GL3/GL4.hw], GLProfile[GLES2/GLES3.hw], GLProfile[GL4/GL4.hw], GLProfile[GL4ES3/GL4.hw], GLProfile[GLES1/GLES1.hw], GLProfile[GL2GL3/GL4.hw]]
	at com.jogamp.opengl.GLProfile.get(GLProfile.java:991)
	at jogamp.opengl.GLContextImpl.verifyInstance(GLContextImpl.java:1471)
	at jogamp.opengl.GLContextImpl.setGLFunctionAvailability(GLContextImpl.java:1942)
	at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:395)
	at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:765)
	at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:648)
	at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:586)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1279)
	at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
	at jogamp.opengl.GLAutoDrawableBase.defaultDisplay(GLAutoDrawableBase.java:467)
	at com.jogamp.opengl.GLAutoDrawableDelegate.display(GLAutoDrawableDelegate.java:190)
Last edited by kalo86 on 02 Jun 2020, 09:35, edited 1 time in total.

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Intel HD Graphics 520 driver with OpenGL support

Post#13 by donald » 02 Jun 2020, 09:35

No problem Donald
Thanks for not disencouraging me.- :)

This page may shed some light on it.
https://www.khronos.org/opengl/wiki/OpenGL_Context

kalo86
Samurai
Samurai
Posts: 177
Joined: 28 Mar 2011, 18:04
Location: Italy

Intel HD Graphics 520 driver with OpenGL support

Post#14 by kalo86 » 02 Jun 2020, 09:37

Apparently the software is looking for a Profile GL4bc which is not available.

kalo86
Samurai
Samurai
Posts: 177
Joined: 28 Mar 2011, 18:04
Location: Italy

Intel HD Graphics 520 driver with OpenGL support

Post#15 by kalo86 » 05 Jun 2020, 14:36

Question for all the Porteus Community: do you know how to compile a new Intel driver for the core profile and OpenGL 4.5 support? I really need this OpenGL compatibility.
I hope you can help me.

Any help and/or suggestion will be much appreciated.

Best regards,
kalo

Post Reply