Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: OpenGL issues with Mint

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2018
    Posts
    3

    Unhappy OpenGL issues with Mint

    Hi all,

    I ran Minecraft with shaders on Win7 with generic Intel drivers and shaders worked perfectly. Netherless I switched to Ubuntu Mint for better driver support (trackpad, touchscreen, etc didnt work in Win7)

    My issue is, now on Linux, shaders fail big time. They display a mostly black screen (the world renders fine, it's just black) And these error messages come up :

    [Shaders] Error: Invalid program "shadow"
    [Shaders] Error: Invalid program "gbuffers_weather"
    [Shaders] Error: Invalid program "gbuffers_water"
    [Shaders] Error: Invalid program "composite"
    [Shaders] Error: Invalid program "final"


    Google searches tell me this happens because drivers are not supporting it (old drivers) or the hardware does not support it...

    But I am using the latest official Intel drivers for Linux. My graphics card is Opengl 4.5 compatible (Iris 540 on i7)
    Had to remove openjdk-11 to get Minecraft to start though, so it runs on openjdk-8. Don't know if that's relevant.

    Graphics seem capped at 60 fps though, I set it to uncapped frames but it doesn't go over 60. Don't know where to go to find a configuration tool.
    Interestingly in-game the OpenGL version it thinks I'm running in the Minecraft shader window states :

    Opengl 3.0 Mesa 18.0.5, Intel Open Source Technology Center, Mesa DRI Iris Graphics 540 (Skylake GT3e)

    Shouldn't it be 4.5? Opengl 3.0 was released 10 years ago.

    glxinfo
    string: 4.5 (Core Profile) Mesa 18.0.5


    So I do in fact have OpenGL 4.5 installed. It's not the driver. -> Intel Mesa driver for Linux is now OpenGL 4.6 conformant as of FEBRUARY 1, 2018
    My hardware supports OpenGL 4.6 - from Khronos site - listing each card's conformant Linux OpenGL status ;

    2018-01-25 OpenGL_4_6
    Intel® Iris™ Graphics 540
    CPU: Intel® 6th Generation Core™ processor
    OS: Linux 4.14.6
    API: OpenGL 4.6


    Ok, check my kernel is that version at least... uname -r

    4.15.0-29-generic


    Running Ubuntu Mint Tara which JUST released, so it's pretty new.

    inxi -Gx
    Graphics: Card: Intel Iris Graphics 540 bus-ID: 00:02.0
    Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting (unloaded: fbdev,vesa)
    Resolution: 1360x768@59.80hz
    OpenGL: renderer: Mesa DRI Intel Iris Graphics 540 (Skylake GT3e)
    version: 4.5 Mesa 18.0.5 Direct Render: Yes


    Check Intel driver...

    xserver-xorg-video-intel is already the newest version (2:2.99.917+git20171229-1)

    I do not know where to go to even start fixing this. I also would like some sort of way to configure the graphics settings (like priorities, or that 60fps cap for example)

    EDIT : I removed all openjdk and installed Oracle java 8 instead. Minecraft runs great, but the same issue with shaders displaying errors and rendering very dark persists. Also Minecraft stated in their download page that Java 8 must be installed, so it has to be this version.
    Last edited by stubkan; 08-09-2018 at 01:03 AM.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,435
    Quote Originally Posted by stubkan View Post
    Intel drivers for Linux.
    ...
    Opengl 3.0 Mesa 18.0.5, Intel Open Source Technology Center, Mesa DRI Iris Graphics 540 (Skylake GT3e)
    ...
    string: 4.5 (Core Profile) Mesa 18.0.5
    I believe this is the old "Intel drivers only advertise OpenGL 3.0 compatibility profile support" problem.

    The above is saying your drivers offer OpenGL 3.0 compatibility profile support and OpenGL 4.5 core profile support.

    Some minecraft shaders want compatibility profile support (of some unspecified version). Minecraft itself says it requires OpenGL 4.4 support, though it doesn't qualify compatibility or core. So my guess is compatibility.

    I'm not sure if there's a way to get Minecraft working on Linux with your Intel GPU (do some searches). However, if you just pick up an inexpensive semi-recent NVidia or AMD GPU, you should be good-to-go.

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2018
    Posts
    3
    It may be a challenge putting an add-on graphics card into my Lenovo Yoga laptop...

    I could tackle this challenge though :

    According to MESA Latest release notes ;

    Mesa 18.1.5 implements the OpenGL 4.5 API, but the version reported by glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. Some drivers don't support all the features required in OpenGL 4.5. OpenGL 4.5 is only available if requested at context creation. Compatibility contexts may report a lower version depending on each driver.

    So, Minecraft gets a compatibility version return of 3.0 ... I would like to try to force it to return 4.5 and see if my laptop bursts into flames...

    Any tips on where to start?

    EDIT: I found this information on what versions get returned..

    Things could be that simple, but they aren't. Implementors are only required to support the core profile, the compatibility profile is optional. This lead to the situation we now have: depending on the implementation and the platform, the options for GL context will vary:

    All major desktop platforms (Windows, Unix/Linux, OSX) support "legacy" GL with the old context creation method.

    On windows, using modern GPUs and drivers, you will still typically get the highest compatibility profile which is supported by the GPU when you use the legacy context creation/don't request a specific version/request a version < GL3. So you can end up with 4.4 when you asked for 1.0 there.

    On OSX, there is a sharp cut. Legacy GL creation will give you at most GL2.1. If you need modern GL, you have to ask for a 3.2 core profile.

    On Linux, it depends on the GPU driver you are using. AMD's and NVidia's proprietary drivers behave similiar to the windows case. However, the open source mesa3D implementation (which is also used by the official intel GPU drivers) does handle it more like OSX does: only core profiles are supported.


    So it seems to me, it SHOULD have returned the core version regardless...

    Ok, I can launch Java with this script :

    #!/bin/sh
    MESA_GL_VERSION_OVERRIDE=4.5COMPAT java -jar "/usr/share/minecraft/minecraft.jar"


    However, this is from 2016, before the launcher got changed. I cannot start Minecraft this way as it authenticates the username and selects a game version via the launcher before actually launching the .jar file... Is there a way to make it into a java -argument format or insert it into a file somewhere?
    Last edited by stubkan; 08-09-2018 at 08:30 PM.

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2018
    Posts
    3
    I have managed to fool Minecraft!

    I added the variables to the minecraft-launcher.sh script as follows :

    #!/bin/sh
    cd "$(dirname "$(realpath $0)")"
    MESA_GL_VERSION_OVERRIDE=4.5COMPAT exec ./launcher "$@"


    Minecraft now recognizes my OpenGL version as 4.5. When loading shaders this fix removed all but two of the Shader error messages...

    [Shaders] Error: Invalid program "shadow"
    [Shaders] Error: Invalid program "final"


    These two error messages are still there. World still renders incredibly darkly. Further investigation reveals that the GLSL shader language is still set to 1.3.

    I try to force it with another variable override...

    MESA_GLSL_VERSION_OVERRIDE - changes the value returned by glGetString(GL_SHADING_LANGUAGE_VERSION). Valid values are integers, such as "130". Mesa will not really implement all the features of the given language version if it's higher than what's normally reported. (for developers only)

    Guess that's as far as I can go? glxinfo reports that I'm all up to 4.5 (GLES being 3.2, but thats the most it can go now)

    Some shaders work 100% now however, some don't. I guess I just have to find a middle ground. I think the MESA3D drivers are borked. I read in some places that they cannot report core versions, and only report compat versions, crippling OpenGL for many things.
    Last edited by stubkan; 08-09-2018 at 11:31 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •