Starting Minecraft 1.8 or switching to fullscreen most often than not produces an invisible fullscreen window ontop of everything on the desktop and you have to switch to another tty to kill it.
It works approximately every third time you start so there is still a race condition present. Have the same problem on two computers. Also had this with 1.7.10.
Fullscreen worked in an earlier 1.7.x release on this computer.
I think this relates to MC-55045
Related issues
Attachments
Comments


Do you know how to test another version of LWJGL?
If yes, please try the latest nightly from here: http://ci.newdawnsoftware.com/job/LWJGL-git-dist/
It contains some important fixes for linux fullscreen.

Unable to reproduce with Ubuntu 14.04 using Gnome Shell. Please add details about your desktop window manager, as well as graphics card and drivers in use.

Happens to me with the i3 WM, on a 7870 Ghz edition.
@tulius can't change LWJGL version since the new launcher, it overwrites it...

HP Elitebook 745 G2 16GB RAM
AMD A10 PRO-7350B R6 APU
Radeonsi Mesa 10.1.5-1.20140607.fc20
Gnome Version 3.10.2
OpenJDK 1.7.0.65
Fedora 20 x64

To trick the launcher into acception custom LWJGL files:
0. Stop the launcher, if already running
1. Download the nightly (from here: http://ci.newdawnsoftware.com/job/LWJGL-git-dist/) (choose latest build --> lwjgl-2.9.2.zip)
2. Unzip it, copy lwjgl.jar from the zip file over minecrafts lwjgl-2.9.1.jar (override it, but keep the name) (usually found in ~/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.1)
3. Correct the checksum of the jar in lwjgl-2.9.1.jar.sha with a text editor (calculate the new sum with "sha1sum" on the command line)
4. Block the launcher from accessing the internet. (just disable WiFi/unplug the network cable)
5. Now start the launcher, it will go to offline mode.
Without internet, the launcher will accept the custom library.

I have tested lwjgl 2.9.2 per instructions above.
1. Starts in fullscreen the first time.
2. Exits game and try to start again. Crash instead of Mojang logo.
3. Exit launcher and try to start again. Crashes every time.
4. Restart computer and start game again. Works first time. Second try crash again.
Do you want the crash log?

Yes please 🙂

Crash with LWJGL 2.9.2

Thats looks interesting...
Please run "xrandr" on the command line after minecraft crashed and attach the output here.
That would be great.

xrandr
Screen 0: minimum 320 x 200, current 1600 x 900, maximum 16384 x 16384
VGA-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
eDP connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
1600x900 59.99 + 40.00*
1440x900 59.89
1280x854 59.89
1280x800 59.81
1280x720 59.86
1152x768 59.78
1024x768 59.92
800x600 59.86
848x480 59.66
720x480 59.71
640x480 59.38
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-2 disconnected (normal left inverted right x axis y axis)

Allright, LWJGL stumbles over one of those lines because it slightly differs from what is expected.
I am fixing this right now, stand by.

Should be fixed with https://github.com/tfg13/lwjgl/commit/e74811e5e7d288c39ac1c613522b9adda2d564a4
I would like to test the fix before submitting it to the main repository.
Would be great if you could grab the version I just compiled from here: https://github.com/tfg13/lwjgl/releases/tag/test_mc70651.
The rest should be the same as above: Copy it over the original jar file, recalculate the checksum and cut your internet connection before starting the launcher.

Tested the fix by starting Minecraft 8 times. Crash is gone.
Fullscreen worked=V
Invisible fullscreen=X
Result in order=V V X V X V X V
So its better but still dont work every time like it did in earlier versions before the launcher was updated at the end of the 1.7.x series
Can this be a regression in lwjgl if it was updated in one of the last launchers in the 1.7.x series?
I was using fglrx earlier on another laptop with RHEL6 so the fullscreen problems was there on completely different hardware, OS and graphics driver as well. Im now using radeonsi on a amd apu with Fedora 20 so this should be a minecraft or lwjgl problem.

Ok, fixing the crash was the easy part. Now on to that race condition.
You said you also had this with 1.7.10, but not with 1.7.x.
Could you please go back one version at a time and figure out exactly which version introduced this problem?

I found a system with AMD graphics and was able to reproduce this.
However, the problem vanished when I installed fglrx from the repository.
Could you give fglrx another try? I think your older system with fglrx on RHEL may have suffered from the old race condition, which was fixed with Minecraft 1.8.

AFAIK fglrx is not compatible with Fedora 20/Kernel 3.15 yet.
So this could affect all users using radeonsi. OTOH this is the only game that has a fullscreen problem on this laptop.
Is there anything else we could try regarding lwjgl? adding a short pause in minecraft/lwjgl?

I'm afraid a lot of games will require the proprietary drivers (for performance, stability, opengl support).
I also tested other LWJGL based games and they had exactly the same problem.
Besides, I traced the lwjgl methods minecraft calls and there was nothing unusual going on.
However, I still find it very interesting that Minecraft worked before.
If you have some spare time, please try figuring out which Minecraft version introduced this behaviour.

What I meant was that fglrx worked on earlier versions of minecraft and broke around 1.7.8 I think on my earlier laptop with a FireGL m2000 GPU.
radeonsi works in fullscreen on a whole bunch of games on this laptop (source games, metro, doom3, quake4, etqw and others)
So is it really a radeonsi problem? As all other games are working I think this should be fixed/worked around. And as the other lwjgl games had the same problem creating a fullscreen window everything point to lwjgl being at fault in combination with radeonsi.
Is there any different methods of doing fullscreen we can try in lwjgl to make radeonsi behave? I will check the earlier versions if radeonsi works there...

Same Problem here: Fedora 20, Gnome-Shell 3.12 and Radeon Open Source driver, Hd 7870.
Please notice, that the fglrx driver will also not work for Gnome in the future, because of Wayland issues. So this Problem must get resolved for the open source driver.
Thank you very much!

> And as the other lwjgl games had the same problem creating a fullscreen window everything point to lwjgl being at fault in combination with radeonsi
Yes. On the other hand, the way LWJGL creates the fullscreen window is quite simple and didn't change for years.
I'm not really sure how to proceed from here.
Some random thoughts:
I assume your system is fully updated?
Does anyone know if it worked with older versions of the radeon mesa driver? (for example the one that ships with fedora 19?)
You can force LWJGL to create the fullscreen window in another (slighly outdated) way. To do so, open the minecraft profile editor and put the following into "JVM Arguments"
-DLWJGL_DISABLE_NETWM=true
Make sure the checkbox is selected and give it another try!

Problem still exists with -DLWJGL_DISABLE_NETWM=true added to JVM Arguments and 2.9.2.
Fedora 20 system fully updated and only fedora stock packages.
Need at minimum kernel 3.14 for gpu support on this laptop so I cant try older versions.
Will try older versions of Minecraft later today.

Exact same problem on Ubuntu 14.04 with Unity 3D. Still in Minecraft 1.8.

I dug into this and may have found something.
Same procedure as last time, custom lwjgl.jar is here: https://github.com/tfg13/lwjgl/releases/tag/test2_mc70651
I spare you the details, but the fix is quite experimental and may even break everything with other graphics drivers / operating systems.
The fix works for me, but your mileage may vary - So please test this!

Using DLWJGL_DISABLE_NETWM=true makes it so pressing the Windows key does not bring it out of fullscreen if it doesn't work for you you either did not put a space between the other arguments you have or just plain didn't do it right. That not only fixes the problem for me but makes it so pressing the Windows key does not disrupt gameplay. Perhaps an update to the Minecraft launcher should make it add it automatically. Anyway, it works and fixes the problem. Well, I shouldn't say fix, but it's a pretty dang good workaround, especially since the Windows key does NOTHING during gameplay anymore.

Confirmed test2_mc70651. Works 10 out of 10 times and seems stable here atleast.
Can also confirm that you can start the launcher with internet access. lwjgl.jar wont be replaced. Because of the updated sha1sum ?
@John Scott
Did not test -DLWJGL_DISABLE_NETWM=true and Alt-Tab/Windows key as that is not a problem for me in Gnome 3. But it did not solve that startup to fullscreen issue we are talking about here. The updated lwjgl.jar from tulius did however.
Great work tulius! Fantastic support. More than you can say about the mc developers who has yet to chime in or acknowledge this bug.
Just send a comment here if you update the experimental code and want me to verify it again before release and inclusion in Minecraft.

Short update:
The fix for the crash has been merged and should be included in the next nightly LWJGL build.
Unfortunately the experimental fix for the fullscreen issue breaks other things (multi-threaded rendering) and therefore cannot be included in LWJGL.
It is still unknown why exactly the creation of the fullscreen window sometimes fails and sometimes works.
This may be a driver bug, a bug in LWJGL or something else. Since I don't have a system with a AMD graphics I really cannot dig into this any further, sorry for that. (the fix last week was created on a borrowed machine).
As suggested on github, Minecraft may be able to circumvent this by creating the window differently. (that is, destroying it and then creating a new one instead of switching).
Besides, most dev effort is going into LWJGL 3 these days and it is unlikely the way of things internally work in LWJGL 2 will be changed.
Until this is done, 2 things come to my mind that users can do:
1. Continue using the somewhat broken fix I provided above. I will not take it down in the near future and since it seems not to break anything in minecraft this may be the simplest solution (if the launcher can be reliably tricked in to accepting the .jar)
2. Emulate fullscreen with a borderless window. Leave minecraft in windowed mode and instruct your window manager to remove the borders and resize it to your full screen resolution. Depends on your window manager if this is possible for you. I am using KDE and it is definitely possible there. You can even create a rule to apply this automatically when the minecraft window appears.

Have played several hours now and the experimental fix is stable with radeonsi on a few different computers. No crashes.
The launcher does not replace the fixed lwjgl so we can play online without problems. Thanks tulius for taking the time on this!
@Mojang
Can we try changing the way fullscreen works like suggested in the github thread above ie destroy and recreate and get this into 1.8.1?
This is a really annoying bug that affects all users of radeonsi.