jmonkeyengine: fullscreen mode in LWJGL2 on Linux crashes during startup

I get this exception while trying to put my game into any fullscreen resolution. Is there any way to go into fullscreen from the dialog that doesn’t have this problem?

java.lang.RuntimeException: Unable to find fullscreen display mode matching settings
	at com.jme3.system.lwjgl.LwjglDisplay.createContext(LwjglDisplay.java:79)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:113)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
	at java.lang.Thread.run(Thread.java:748)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (16 by maintainers)

Commits related to this issue

Most upvoted comments

I found this solution and it worked for me on (LWJGL2) OS X - MacBook Pro;

public static void main(String[] args) {
        GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();

        AppSettings setting = new AppSettings(true);
        setting.setFullscreen(true);
        setting.setFrameRate(60);
        setting.setFrequency(device.getDisplayMode().getRefreshRate());

        HelloTerrain app = new HelloTerrain();
        app.setShowSettings(false);
        app.setSettings(setting);
        app.start();
    }

I use 2. It’s a generic error, it might be caused by several things.

If this happens on linux with lwjgl2, it might be related to this https://hub.jmonkeyengine.org/t/fix-for-unable-to-find-fullscreen-display-mode-matching-settings-for-multimonitor-configurations-in-linux/41510 . LWJGL2 is unmaintained so i don’t think we will get an official patch.

This appears to be a troubleshooting question. Such questions are best answered at the Forum: https://hub.jmonkeyengine.org/