You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenJDK 64-Bit Server VM v17.0.13+11-Ubuntu-2ubuntu120.04 by Ubuntu
Module
GLFW, OpenGL
Bug description
When creating an OpenGL context with GLFW in LWJGL version 3.3.3 and newer, it uses the llvmpipe software renderer instead of the NVIDIA GPU in my system.
The output from running the hello world application from https://www.lwjgl.org/guide (with -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.util.DebugLoader=true and prints added for the glGetString values) is
Hello LWJGL 3.3.3-snapshot!
[LWJGL] Version: 3.3.3-snapshot
OS: Linux v5.4.0-204-generic
JRE: Linux amd64 17.0.13
JVM: OpenJDK 64-Bit Server VM v17.0.13+11-Ubuntu-2ubuntu120.04 by Ubuntu
[LWJGL] Loading JNI library: lwjgl
Module: org.lwjgl
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_ryan/3.3.3-snapshot/x64/liblwjgl.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_ryan/3.3.3-snapshot/x64/liblwjgl.so
[LWJGL] Closure Registry: ConcurrentHashMap
[LWJGL] Loading library: jemalloc
Module: org.lwjgl.jemalloc
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_ryan/3.3.3-snapshot/x64/libjemalloc.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_ryan/3.3.3-snapshot/x64/libjemalloc.so
[LWJGL] MemoryUtil allocator: JEmallocAllocator
[LWJGL] Loading library: glfw
Module: org.lwjgl.glfw
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_ryan/3.3.3-snapshot/x64/libglfw.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_ryan/3.3.3-snapshot/x64/libglfw.so
[LWJGL] Loading JNI library: lwjgl_opengl
Module: org.lwjgl.opengl
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_ryan/3.3.3-snapshot/x64/liblwjgl_opengl.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_ryan/3.3.3-snapshot/x64/liblwjgl_opengl.so
[LWJGL] Loading library: libGLX.so.0
Module: org.lwjgl.opengl
libGLX.so.0 not found in org.lwjgl.librarypath=/tmp/lwjgl_ryan/3.3.3-snapshot/x64
Loaded from system paths: /lib/x86_64-linux-gnu/libGLX.so.0
Vendor: Mesa/X.org
Renderer: llvmpipe (LLVM 12.0.0, 128 bits)
Version: 3.1 Mesa 21.2.6
With LWJGL 3.3.1, I get the following output:
Hello LWJGL 3.3.1 SNAPSHOT!
[LWJGL] Version: 3.3.1 SNAPSHOT
[LWJGL] OS: Linux v5.4.0-204-generic
[LWJGL] JRE: Linux amd64 17.0.13
[LWJGL] JVM: OpenJDK 64-Bit Server VM v17.0.13+11-Ubuntu-2ubuntu120.04 by Ubuntu
[LWJGL] Loading JNI library: lwjgl
[LWJGL] Module: org.lwjgl
[LWJGL] Using SharedLibraryLoader...
[LWJGL] Found at: /tmp/lwjglryan/3.3.1-SNAPSHOT/liblwjgl.so
[LWJGL] Loaded from org.lwjgl.librarypath: /tmp/lwjglryan/3.3.1-SNAPSHOT/liblwjgl.so
[LWJGL] Closure Registry: ConcurrentHashMap
[LWJGL] Loading library: jemalloc
[LWJGL] Module: org.lwjgl.jemalloc
[LWJGL] Using SharedLibraryLoader...
[LWJGL] Found at: /tmp/lwjglryan/3.3.1-SNAPSHOT/libjemalloc.so
[LWJGL] Loaded from org.lwjgl.librarypath: /tmp/lwjglryan/3.3.1-SNAPSHOT/libjemalloc.so
[LWJGL] MemoryUtil allocator: JEmallocAllocator
[LWJGL] Loading library: glfw
[LWJGL] Module: org.lwjgl.glfw
[LWJGL] Using SharedLibraryLoader...
[LWJGL] Found at: /tmp/lwjglryan/3.3.1-SNAPSHOT/libglfw.so
[LWJGL] Loaded from org.lwjgl.librarypath: /tmp/lwjglryan/3.3.1-SNAPSHOT/libglfw.so
[LWJGL] Loading JNI library: lwjgl_opengl
[LWJGL] Module: org.lwjgl.opengl
[LWJGL] Using SharedLibraryLoader...
[LWJGL] Found at: /tmp/lwjglryan/3.3.1-SNAPSHOT/liblwjgl_opengl.so
[LWJGL] Loaded from org.lwjgl.librarypath: /tmp/lwjglryan/3.3.1-SNAPSHOT/liblwjgl_opengl.so
[LWJGL] Loading library: libGL.so.1
[LWJGL] Module: org.lwjgl.opengl
[LWJGL] libGL.so.1 not found in org.lwjgl.librarypath=/tmp/lwjglryan/3.3.1-SNAPSHOT
[LWJGL] Loaded from system paths: /lib/x86_64-linux-gnu/libGL.so.1
Vendor: NVIDIA Corporation
Renderer: GeForce 9400M/integrated/SSE2
Version: 3.3.0 NVIDIA 340.108
which shows that the GPU is being correctly selected.
The only difference I can see between the two is that 3.3.3 is using libGLX instead of libGL. I have found that 3.3.3 selects the correct GPU if I specify -Dorg.lwjgl.opengl.libname=libGL.so.1 and call GLFWNativeGLX.setPath(GL.getFunctionProvider()) before glfwInit(), but this does not seem like the ideal solution.
Stacktrace or crash log output
The text was updated successfully, but these errors were encountered:
Running the application with __GLX_VENDOR_LIBRARY_NAME=nvidia does not seem to change anything, it still selects llvmpipe. I'm not sure what's happening since the GPU does appear in glxinfo output without the environment variable.
Version
3.3.3
Platform
Linux x64
JDK
OpenJDK 64-Bit Server VM v17.0.13+11-Ubuntu-2ubuntu120.04 by Ubuntu
Module
GLFW, OpenGL
Bug description
When creating an OpenGL context with GLFW in LWJGL version 3.3.3 and newer, it uses the
llvmpipe
software renderer instead of the NVIDIA GPU in my system.The output from running the hello world application from https://www.lwjgl.org/guide (with
-Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.util.DebugLoader=true
and prints added for theglGetString
values) isWith LWJGL 3.3.1, I get the following output:
which shows that the GPU is being correctly selected.
The only difference I can see between the two is that 3.3.3 is using
libGLX
instead oflibGL
. I have found that 3.3.3 selects the correct GPU if I specify-Dorg.lwjgl.opengl.libname=libGL.so.1
and callGLFWNativeGLX.setPath(GL.getFunctionProvider())
beforeglfwInit()
, but this does not seem like the ideal solution.Stacktrace or crash log output
The text was updated successfully, but these errors were encountered: