LWJGL/lwjgl

Wayland not supported

srakitnican opened this issue · 9 comments

Minecraft is not starting up under Wayland because of lwygl error "No modes available". As stated by Olivier Fourdan issue seems to be that lwygl doesn't understand output of command "xrandr -q" under Wayland.

Fedora bugzilla report

Do you have such an output somewhere? I don't have a system with wayland here atm.

I can give you outputs of xrandr -q under wayland and X:

X:

Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767
LVDS1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
1366x768      60.00*+
1280x720      60.00
1024x768      60.00
1024x576      60.00
960x540       60.00
800x600       60.32    56.25
864x486       60.00
640x480       59.94
720x405       60.00
680x384       60.00
640x360       60.00
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Wayland:

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
XWAYLAND0 connected 1360x768+0+0 340mm x 190mm
   1360x768@0.1Hz   0.00*+

I'm running Fedora 22 Workstation. Btw I don't know whether I can reproduce that issue, because I don't own Minecraft.

Sure,
X

Screen 0: minimum 8 x 8, current 1280 x 1024, maximum 32767 x 32767
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1280x1024+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
   1280x1024     60.02*+  75.02  
   1152x864      75.00  
   1024x768      75.08    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32  
   640x480       75.00    72.81    60.00  
   720x400       70.08  
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Wayland

Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 8192 x 8192
XWAYLAND0 connected 1280x1024+0+0 380mm x 300mm
   1280x1024@0.1Hz   0.00*+

Mode names are arbitrary, you cannot infer anything from them:
https://bugs.freedesktop.org/show_bug.cgi?id=94589#c6

The Xserver people were so kind to work around this issue in xserver 1.18.3: https://bugs.freedesktop.org/show_bug.cgi?id=94589
Anyway, the way how lwjgl handles mode names is still broken.

Spasi commented

The only correct solution is to use the libXrandr API instead of parsing the xrandr command output. This is what GLFW does in LWJGL 3.

Has anyone tried lwjglx with Minecraft? It'd be easier to fix that if something's missing or not working, instead of trying to make changes to LWJGL 2.

LWJGL is well supported on XWayland 1.19 now. Any progress toward getting a native Wayland support ?

This is becoming a larger problem for me with more distributions moving to Wayland. I'm using Fedora 30 and it defaults to Wayland. This is not just Minecraft but for my own projects that use LWJGL.

Been having this issue lately. Oddly enough though, if I launch Minecraft in an X11 session, and then I go to a wayland session and launch it, it'll work. But if I try to fullscreen it, it'll crash, and then it'll refuse to launch from that point onward until I go back into an Xorg session and relaunch it there.