Fix for "Unable to find fullscreen display mode matching settings" for multimonitor configurations in linux

Long story short, lwjgl2 uses xrandr to populate an hashmap and picks always the first key as primary monitor, this is not always the case and can cause jme to crash with

“Unable to find fullscreen display mode matching settings”

when trying to use fullscreen.

This fixes it: GitHub - riccardobl/lwjgl2-primarymonitor-patch-xrandr: A java agent that makes lwjgl2 use the correct primary monitor on Linux.

This is not jme fault, but i thought to share it here since i know others had or have this issue and lwjgl2 seems deprecated in favour of lwjgl3 so i doubt we will get a patch from them…

6 Likes

tbh I think this issue was also happening on lwjlg3 and as far as I knew it jme was using AWT to get the display settings and it crashed because the Framerate was returned as 59.97 Hz but you had to set 60 Hz for it to work.

Could be a different bug I was experiencing though and not related.

Just for the record, the issue also occurs on my single monitor setup. I do have the workspaces (virtual desktops) enabled, so that might be the problem.