org.lwjgl.LWJGLException: No modes available

Started by darkfrog, January 11, 2016, 01:08:18

Previous topic - Next topic

darkfrog

I'm using LWJGL backend in libgdx and I'm getting the following exception on my laptop (openSUSE with Bumblebee):

[error] Exception in thread "LWJGL Application" java.lang.ExceptionInInitializerError
[error] 	at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setVSync(LwjglGraphics.java:555)
[error] 	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:121)
[error] Caused by: java.lang.RuntimeException: org.lwjgl.LWJGLException: No modes available
[error] 	at org.lwjgl.opengl.Display.<clinit>(Display.java:141)
[error] 	... 2 more
[error] Caused by: org.lwjgl.LWJGLException: No modes available
[error] 	at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:740)
[error] 	at org.lwjgl.opengl.Display.<clinit>(Display.java:138)
[error] 	... 2 more


I've tried running using "optirun" and "primusrun" and it still fails.  I can run this on my desktop machine without any problems.  I have tested with glxgears and glxinfo and everything reports properly to use the intel or nvidia GPU based on how I execute it.  Is this something you guys have seen and can you offer an fixes?

darkfrog

I had forgotten that I'm using GNOME Wayland on that laptop. Switching back to GNOME works fine. So it would appear that LWJGL just has problems with Wayland.

spasi

LWJGL 2 does not support Wayland. LWJGL 3 uses GLFW, which does support Wayland, but not in the default distribution. You could try the latest libgdx release which has an LWJGL 3 backend, but you'll have to replace the GLFW binary with a build that has Wayland support enabled.