godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.82k stars 21.13k forks source link

Window flickering #77337

Open d0n3val opened 1 year ago

d0n3val commented 1 year ago

Godot version

4.0.3-stable, I've tested it also on 4.0.2 and 4.0.0

System information

Windows 10, NVidia 4070 latest drivers

Issue description

Only by clicking on the window I get a weird flickering on the screen. It happens even before selecting any project, in the launcher, but it is more apparent opening an empty project. It seems to react to just clicking with the mouse on the screen, but in the end it happens by itself.

https://github.com/godotengine/godot/assets/627698/694dfe93-6423-46ce-a69d-45815731da8d

Steps to reproduce

Just open the launcher and click on it, you will start seeing black frames Open an empty project, click in the editor also will give black frames. Run an empty project, the window will start showing (not responding) in the title as you just click on it

Minimal reproduction project

No need, it already happens in the launcher. It is more apparent with a full empty project running (check video)

Calinou commented 1 year ago

Can you reproduce this after switching to the Mobile or Compatibility rendering methods in the top-right corner?

Can you reproduce this after enabling Single Window Mode in the Editor Settings, then restarting the editor?

d0n3val commented 1 year ago

I can confirm it still happens in Mobile and Compatibility rendering method. I tried also switching Single Window Mode in and out and it does not affect the outcome.

Feels to me like a 4070 driver bug. My old 2070 was working fine.

How can I be of more help ?

Calinou commented 1 year ago

Feels to me like a 4070 driver bug. My old 2070 was working fine.

On Windows 11, Godot works just fine for me on a RTX 4090 and a recent NVIDIA driver downloaded from nvidia.com (not sure which one exactly, I'm not on Windows right now). Make sure to use a driver from nvidia.com, not Windows Update.

On Linux, I use NVIDIA 530.41.03 which works fine too.

Do you have any external software that interacts with the desktop in general, such as Stardock Fences? This may be a different form of https://github.com/godotengine/godot/issues/32990.

d0n3val commented 1 year ago

I have tried the nvidia drivers 531.79 and the two previous ones. I am right now on nvidia studio driver 531.61.

The problem persist in all those.

I have a software to handle multiple desktops called SylphyhornPlus - I've tried to remove but problem still persist. A part from that is a recently installed window 10, not much more software on it.

My problem seems similar but unrelated with #32990 since the flickering is not when using pop-ups, just by clicking on the screen anywhere.

d0n3val commented 1 year ago

I have tried the last three nvidia drivers, right now testing the studio drivers but no luck, it still happens. I've also uninstall th nvidia drivers and I still have it. Perhaps it is not tied to graphics drivers after all. It seems connected to just receiving input.

It specifically happens when I click on the empty window. Looking at the performance, you can see those peaks are when I just go to the empty window and spam left-mouse click in it:

image

lazaromenezes commented 1 year ago

I'm seeing a similar issue with Mobile renderer, but with the game debug window. I haven't try Compatibility yet. It happens the most when I start the xbox screen recorder.

https://github.com/godotengine/godot/assets/8123916/816823e8-91e2-4df9-bc00-0946fa33b44c

I'm running it into a Windows 11 box, with a 3060 and driver version 535.50.

I just got started with the engine so I don't know which kind of details could be usefull, please let me know if there's any usefull data I could provide :)

fractilegames commented 1 year ago

I have seen very similar looking black flickering on Godot 3.6 beta 3 on Linux (with Intel integrated GPU). It happens randomly. Sometimes days go by without seeing it and when it appears it usually passes after a while without doing anything.

I initially though it only affected the editor and didn't worry about it too much but I have now seen it happen on Steam Deck too (of course while showing my game in public).

Unfortunately I don't have any information that helps tracking this down right now.

valkyrienyanko commented 1 year ago

I have similar issue except the black flickering only occurs while in-game and it happens at random. Sometimes it's there, sometimes it's not. Happens in v4.1.1.stable.mono.official [bd6af8e0e] and Godot 4 latest dev build.

My specs:

fractilegames commented 1 year ago

I saw this flickering again and this time I managed to capture screenshots at the right time (two consecutive screenshots):

image image

It looks like only the 3D viewport is flickering while 2D UI rendered in the root viewport is not. So my case seems to be quite different from the others here.

Calinou commented 1 year ago

Can you test whether https://github.com/godotengine/godot/pull/80566 resolves this?

fractilegames commented 1 year ago

Can you test whether #80566 resolves this?

I can't because this is happening in Godot 3.6 beta3.

jupiterbjy commented 1 year ago

Just confirming, happening at 4.1.3 stable - not happening in 4.1.2 stable, could this be a regression bug?

Video

To make sure this isn't display issue, added white image at background for clear comparison.

Flicker happen on almost every mouse-hover between panels or window switch.

https://github.com/godotengine/godot/assets/26041217/13acf904-326f-4424-9941-19daba6f4671

Reproducible file

Reproducible file is not required, this literally happen as soon as I create new project.

System info

Additional notes

image

Issue is resolved by setting 'continuous editor update' which forces the editor updates.

As enabling that gives a warning popup that using this as workaround is not recommended and one should bug report if such is required, hence here I am!

Lemme know if there's more resource like logs, etc I can share.

d0n3val commented 12 months ago

Let me add that I re-installed Linux with NVidia drivers in the same computer and the problem is now gone.

jupiterbjy commented 12 months ago

So this could be just NVidia being Nvidia? I don't see any update on Windows driver yet so guess I should wait with continuous update on.

What's driver version you're having on linux? Mine reports 546.01

ix-56h commented 11 months ago

Just confirming, happening at 4.1.3 stable - not happening in 4.1.2 stable, could this be a regression bug?

Video

To make sure this isn't display issue, added white image at background for clear comparison.

Flicker happen on almost every mouse-hover between panels or window switch. 20231106_071121.mp4

Reproducible file

Reproducible file is not required, this literally happen as soon as I create new project.

System info

* OS: Win11 Education 64bit 22H2 (22621.2428)

* CPU: R5 5800X

* GPU: RTX 3070

* Affected Godot version: 4.1.3 stable

* Display running at 240Hz

Additional notes

image

Issue is resolved by setting 'continuous editor update' which forces the editor updates.

As enabling that gives a warning popup that using this as workaround is not recommended and one should bug report if such is required, hence here I am!

Lemme know if there's more resource like logs, etc I can share.

I had the same issue, it has been solved after disabling freesync on my monitor settings.

Calinou commented 11 months ago

If it's only the Godot window flickering, this is likely due to the same cause as https://github.com/godotengine/godot/issues/84137.

If you entire monitor is flickering, this is likely VRR flicker which is a hardware issue that can't be fixed by Godot. Disable VRR by disabling G-Sync or FreeSync in your monitor settings, or change settings to make VRR only effective in fullscreen applications.

jupiterbjy commented 11 months ago

It was impossible to capture the black frames with OBS even at 120Hz(monitor at 240) so I used phone camera to capture that only godot window is flickering. That indicate it may not be on godot side, will wait for new nvidia driver and update about the issue.

Or should I be better just straight up testing with 4.2 master branch? lemme know what you prefer!

juse4pro commented 2 months ago

I also got this bug since I switched my PC setup to a RTX4060 and a 144Hz G-Sync compatible Screen (single). The screen is actually the same and everything worked perfectly before I got the new GPU. Had a 1660 Ti before.

Setting the Hz to 60 or disabling G-Sync entirely did not fix the problem unfortunately. Not only in the editor but also games made with Godot have this issue when clicking.

Tested on 4.3.