jMonkeyEngine / jMonkeyEngine/sdk

Error starting OpenGL context on Ubuntu with Intel graphics

Open
#294 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
348
Forks
104
Avg merge
4d 13h
Merged PRs (30d)
3

Description

Hi,
When the SDK loads I immediately get an error indicating OpenGL is not working.
I'm on an Ubuntu 20.04 system with Intel UHD Graphics 620 using the latest drivers with Mesa support.
When running the BasicGame (from the new project wizard) OpenGL seems to work fine.

Judging from the log below it seems LWJGL cannot find the correct video driver. On both Wayland and X-windows I get the same error. This laptop has an NVidia graphics chipset as well and with that one this SDK runs fine. But it should run with Intel as well :)
My system supports GLX version 1.4, while the SDK is looking for version 1.3. Should this be backwards compatible?

What strikes me is that a really old version of LWJGL (2.9.3) is used while the SDK also uses the 3.x versions.
Any help would be appreciated.

The error from the log
NFO [com.jme3.gde.core.scene.SceneApplication]: Could not find GLX 1.3 config from peer info
org.lwjgl.LWJGLException: Could not find GLX 1.3 config from peer info
at org.lwjgl.opengl.LinuxPbufferPeerInfo.nInitHandle(Native Method)
at org.lwjgl.opengl.LinuxPbufferPeerInfo.(LinuxPbufferPeerInfo.java:52)
at org.lwjgl.opengl.LinuxDisplay.createPbuffer(LinuxDisplay.java:1349)
at org.lwjgl.opengl.Pbuffer.createPbuffer(Pbuffer.java:234)
at org.lwjgl.opengl.Pbuffer.(Pbuffer.java:219)
at org.lwjgl.opengl.Pbuffer.(Pbuffer.java:190)
at org.lwjgl.opengl.Pbuffer.(Pbuffer.java:166)
at com.jme3.system.lwjgl.LwjglCanvas.makePbufferAvailable(LwjglCanvas.java:342)
[catch] at com.jme3.system.lwjgl.LwjglCanvas.createContext(LwjglCanvas.java:475)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:113)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:213)
at java.base/java.lang.Thread.run(Thread.java:834)
LWJGL 2.9.3 context running on thread jME3 Main

  • Graphics Adapter: null
  • Driver Version: null
  • Scaling Factor: 1

My supported GLX and OpebGL/Mesa version
$ glxinfo | grep "version"
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.3.3 - kisak-mesa PPA
OpenGL core profile shading language version string: 4.60
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.3.3 - kisak-mesa PPA
OpenGL shading language version string: 4.60
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.3.3 - kisak-mesa PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
GL_EXT_shader_implicit_conversions, GL_EXT_shader_integer_mix,

SDK version info
Product Version: jMonkeyEngine SDK v3.3.2-stable
Java: 11.0.6; OpenJDK 64-Bit Server VM 11.0.6+10
Runtime: OpenJDK Runtime Environment 11.0.6+10
System: Linux version 5.8.0-38-generic running on amd64; UTF-8; en_US (jmonkeyplatform)

Edit: added some logging of my working setup with Nividia. Here as well some Null values are logged for driver and adapter.
Log when starting with Nvidia driverthat works correctly
Running on jMonkeyEngine 3.3.2-stable

  • Branch: HEAD
  • Git Hash: 1a05e3f
  • Build Date: 2020-10-07
    OpenGL Renderer Information
  • Vendor: NVIDIA Corporation
  • Renderer: GeForce MX150/PCIe/SSE2
  • OpenGL Version: 4.6.0 NVIDIA 460.32.03
  • GLSL Version: 4.60 NVIDIA
  • Profile: Compatibility
    LWJGL 2.9.3 context running on thread jME3 Main
  • Graphics Adapter: null
  • Driver Version: null
  • Scaling Factor: 1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the BasicGame on Ubuntu 20.04 and Intel graphics, then trace the context setup through com.jme3.system.lwjgl.LwjglCanvas.java and LwjglAbstractDisplay.java. Compare the failing LWJGL 2.9.3 path with the working NVIDIA log, focusing on the GLX 1.3 pbuffer error. Done means the SDK starts an OpenGL context on the reported Intel setup without the logged exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
computer-graphics, desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.