Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godot 2.1.4 Graphics Corrupt in Fullscreen mode on 4K monitor #16817

Closed
ProbDenis opened this issue Feb 19, 2018 · 23 comments
Closed

Godot 2.1.4 Graphics Corrupt in Fullscreen mode on 4K monitor #16817

ProbDenis opened this issue Feb 19, 2018 · 23 comments

Comments

@ProbDenis
Copy link
Contributor

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.

@akien-mga akien-mga added this to the 2.1 milestone Feb 19, 2018
@akien-mga
Copy link
Member

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.

@akien-mga
Copy link
Member

(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 )

@ProbDenis
Copy link
Contributor Author

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?

@akien-mga akien-mga changed the title Godot 2.1.4 Graphics Corrupt in Fullscreen mode Godot 2.1.4 Graphics Corrupt in Fullscreen mode on 4K monitor Feb 19, 2018
@Calinou
Copy link
Member

Calinou commented Feb 19, 2018

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.

@ProbDenis
Copy link
Contributor Author

That didn't fix it unfortunately.

@Ranoller
Copy link
Contributor

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

@ProbDenis
Copy link
Contributor Author

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.

@akien-mga
Copy link
Member

@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.

@ProbDenis
Copy link
Contributor Author

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.

@ProbDenis
Copy link
Contributor Author

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

@ProbDenis
Copy link
Contributor Author

ProbDenis commented Feb 24, 2018

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

@akien-mga
Copy link
Member

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?

@ProbDenis
Copy link
Contributor Author

I'm pretty sure they will do this.

@Ranoller
Copy link
Contributor

Ranoller commented Feb 24, 2018

@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)

@ProbDenis
Copy link
Contributor Author

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

@ProbDenis
Copy link
Contributor Author

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.

@Ranoller
Copy link
Contributor

https://steamcommunity.com/app/108600/discussions/6/142261352649498081/
glfw/glfw#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.

@akien-mga
Copy link
Member

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.

@xsellier
Copy link
Contributor

This should be fixed by #29550

@Calinou
Copy link
Member

Calinou commented Jun 21, 2019

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

@ProbDenis
Copy link
Contributor Author

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.

@xsellier
Copy link
Contributor

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

@Calinou
Copy link
Member

Calinou commented Oct 15, 2019

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

@Calinou Calinou closed this as completed Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants