Godot: Godot 2.1.4 Graphics Corrupt in Fullscreen mode on 4K monitor

Created on 19 Feb 2018  路  23Comments  路  Source: godotengine/godot

Godot version:
Godot 2.1.4

OS/device including version:
Windows 10, GTX 970, Nvidia drivers 390.77

Issue description:
Two players with the above system specs have reported fullscreen issues with our game. Nobody else seems to be able to reproduce it, so it seems to be an issue with this exact configuration, and I'm not sure what can be done about it. Both players use a 4k monitor, and trying to run the OS in a lower resolution didn't help. The game runs perfectly fine in windowed mode. I tried to work around it by using a borderless fullscreen window, but this didn't change anything.
One of the players has made a short video of what is happening:
https://onedrive.live.com/?authkey=%21AFazgToIULnOvbo&cid=FD371CA819AF25B0&id=FD371CA819AF25B0%219241&parId=FD371CA819AF25B0%21201&o=OneUp

Steps to reproduce:
I don't know. It seems to affect only this particular configuration - nobody else has reported fullscreen issues on Windows.

bug rendering

Most helpful comment

It's probably time we add that Windows manifest file to describe the DPI scaling behaviour that Windows should use. Last time we tried it crashed some old Intel drivers, but those don't support OpenGL 3.3 anyway so we could try again in 3.0. And maybe they got fixed in the meantime for OpenGL 2.1 in 2.1.x and 3.1.

All 23 comments

This won't be easy to debug, we'd need someone with access to such a system to first reproduce the bug, and then try to make a minimal example that reproduces it.

Given how system-specific the issue seems to be, it looks like a drivers bug, but it might be triggered with the way the fullscreen is handled in the game or with the 3D animations running in the menu.

(Just for the reference, Nvidia 390.77 is the latest driver for Windows 10 as of now, so asking them to upgrade their drivers won't fix it: https://www.geforce.com/drivers/results/130633 )

Here's some extra information from another player that might be helpful:

Hey, Denis! I thought I'd report back with some extra information, as it too wasn't working for me, but I did notice some odd behaviours.

If I have the 4k monitor at 4k resolution (3240x2160) the game can enter Fullscreen mode and has no issues. As soon as the resolution is lower than its native resolution (2560x1440, 1920x1080, etc) the full screen does it's bonkers stuff.

What was strange is when I was in 3240x2160 and entered "Borderless Fullscreen" the game resized itself to a window of 2560x1440, so it did not take up the full screen. And if I entered Borderless Fullscreen while my monitor was 2560x1440 (it would glitch, still, but it not being the active window it will remain fine), it resized itself to 1920x1080. It's as if the game thinks the monitor is using a different resolution?

This issue could be caused by Windows 10's DPI scaling fallback since Godot executables are currently not marked as DPI-aware by default. (I assume display scaling is in effect as very few users use a 3840脳2160 monitor at 100% scaling.)

The user experiencing the issue should try disabling the automatic DPI scaling on the game. To do so, right-click the game executable, then click Properties, go to the Compatibility tab, then override DPI scaling with the Application value. Click OK then start the game again.

That didn't fix it unfortunately.

It can sound weird but... Are you tick/untick project_settings/display/Allow_Hidpi?

I just check and indeed it's not ticked. I can try to change that and see if it makes any difference for the users. However, the game does work in fullscreen in 4k - the problem only appears if the resolution is set to anything that is _below_ the native resolution.

@ProbDenis If you managed to create a small project that reproduces the issue (e.g. extracting the main menu scene from Deep Sixed with similar display settings - or maybe even something simpler, we'd just need to be sure that it triggers the bug), that could be useful.

We could then try to look for Godot users with a 4k monitor who could reproduce the issue, and then debug it further (e.g. knowing the value of OS.get_screens_size() and OS.get_window_size() could be useful to see if indeed Godot misunderstands the downscaled resolutions.

Yes, that's what I'll do. First I'll try an empty project with nothing but a fullscreen/windowed switch, and we'll see if this already breaks it, or if there's more to it.

Here's a minimal test project. The user has confirmed that this project shows the exact same behaviour when switching to fullscreen mode:
FullscreenTest.zip

And here's what another user has reported:

At 3840x2160 @ 100% scale, the app was detecting 3840x2160 - window & fullscreen were fine
At 3840x2160 @ 150% scale, the app was detecting 2560x1440 - window & fullscreen were fine

At 2560x1440 @ 100% scale, the app was detecting 2560x1440 - fullscreen was glitching
At 2560x1440 @ 150% scale, the app was detecting 1707x960 - fullscreen was glitching

At 1920x1080 @ 100% scale, the app was detecting 1920x1080 - fullscreen was glitching

Nice, please thank those users again for helping debug the issue. Would you be able to have one of them test with a build of 2.1.5-beta1 and 3.0-stable?

I'm pretty sure they will do this.

@ProbDenis If you managed to create a small project that reproduces the issue (e.g. extracting the main menu scene from Deep Sixed with similar display settings - or maybe even something simpler, we'd just need to be sure that it triggers the bug), that could be useful.

We could then try to look for Godot users with a 4k monitor who could reproduce the issue, and then debug it further (e.g. knowing the value of OS.get_screens_size() and OS.get_window_size() could be useful to see if indeed Godot misunderstands the downscaled resolutions.

I test to downscale a full hd monitor to other resolutions (I have 2 monitors) and godot report well actual monitor and operating system resolution for this monitor. I test to change resolution with godot opened in that screen, and godot reports well the new resolution (Always returns operating system resolution, not real screen resolution). Tested with the project attached here and with my own project. It will good to know monitor model and Graphic Card model to track hardware that have problems with godot...

(I know problem is with 4k monitor, but i test downscaling monitors, and that seems to be fine)

Both users are using an Nvidia GTX 970 with latest drivers on Windows 10.
Monitors are ASUS MG28UG and Samsung 28 UE590.

I doubt it's monitor-related. It might have something to do with how this particular OS+graphics driver combination handles resolution scaling. Maybe it's not even 4k-related, since most people won't use a resolution lower than the native resolution of their monitor.

https://steamcommunity.com/app/108600/discussions/6/142261352649498081/
https://github.com/glfw/glfw/issues/676

It麓s seems that win 10 + 4k have some kind of problems (Only open GL related maybe?)... In the time that some user with same card or 4k monitor appears it will be useful to read that.

It's probably time we add that Windows manifest file to describe the DPI scaling behaviour that Windows should use. Last time we tried it crashed some old Intel drivers, but those don't support OpenGL 3.3 anyway so we could try again in 3.0. And maybe they got fixed in the meantime for OpenGL 2.1 in 2.1.x and 3.1.

@ProbDenis Were you able to test #29550? If so, did it solve the issue?

Not yet. I don't have a 4K monitor and never experienced the bug myself, so I'll have make a new build of the game and see if I can contact one of the few players that were affected by this bug last year.

I have a 4k monitor. I tested it and it seems to be working well :-)

@xsellier Thanks for testing :slightly_smiling_face: I'll close this then.

Was this page helpful?
0 / 5 - 0 ratings