2

So i have been trying out libgdx for the past day and it works well, until i realized that it only works on my laptop with intel graphics while it instantly shuts down on my desktop with a nvidia 750ti.

According to this github issue, this issue should've already been fixed in this commit.

I also tried what others on older posts have recommended, like here and here (which shouldn't be neccessary anymore since that commit, but worth trying)

System.setProperty("org.lwjgl.opengl.Display.allowSoftwareOpenGL", "true");

But believe it or not, it doesn't work. Here's the stack trace

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: OpenGL is not supported by the video driver.
    at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:229)
    at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setupDisplay(LwjglGraphics.java:174)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:138)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:120)
Caused by: org.lwjgl.LWJGLException: X Error - disp: 0x7f0f4c000c50 serial: 194 error: BadValue (integer parameter out of range for operation) request_code: 154 minor_code: 24
    at org.lwjgl.opengl.LinuxDisplay.globalErrorHandler(LinuxDisplay.java:320)
    at org.lwjgl.opengl.LinuxContextImplementation.nCreate(Native Method)
    at org.lwjgl.opengl.LinuxContextImplementation.create(LinuxContextImplementation.java:51)
    at org.lwjgl.opengl.ContextGL.<init>(ContextGL.java:132)
    at org.lwjgl.opengl.Display.create(Display.java:850)
    at org.lwjgl.opengl.Display.create(Display.java:757)
    at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:220)
    ... 3 more

When comparing the stack trace to this guy, the cause is aparently not Pixel format is not accelerated rather Caused by: org.lwjgl.LWJGLException: X Error - disp: 0x7f12cc000c50 serial: 194 error: BadValue (integer parameter out of range for operation) request_code: 154 minor_code: 24. Maybe that's just because i'm running linux and he isn't, i don't know. It does seem wierd though that a integer parameter out of range for operation error would be the reason for LWJGL to think that my video driver doesn't support OpenGL, but that's just a guess.

Here is the exact code that i'm trying to run. I don't think the code is to blame since it works just fine on my laptop, but i've added it here just in case.

Both my laptop and desktop runs up-to-date Arch Linux installs, so the os shouldn't be the issue.

Thanks in advance!

2
  • 2
    The github issue is for a hardware device that is too old to support LWJGL. I think your case is different. Do any OpenGL apps work for you? (Can you get glxgears working?)
    – P.T.
    Mar 5, 2015 at 2:00
  • Thanks, it was something wrong with OpenGL and a simple restart solved it for me. glxinfo and glxgears simply crashed when i started them. Mar 5, 2015 at 21:18

2 Answers 2

3

The solution was pretty simple, thanks P.T. for the help.

I don't know what was wrong, but no OpenGL apps could be run at all actually, and a simple reboot solved the issue for me.

-2

Open Software & Updates

Additional Drivers

Using X.Org X server - Nouveau display drivers from xserver-xorg-video-mouveau (open source)

Apply Changes

Open terminal

sudo reboot now

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 25, 2021 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.