godotengine / godot

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

Screen flicker/black screen when using the editor #80542

Open CrayolaEater opened 1 year ago

CrayolaEater commented 1 year ago

Godot version

4.1.stable

System information

Windows 11 pro - Vulkan (Forward +) - GPU AMD RX 7900 XTX - monitor Alienware AW3423DWF

Issue description

Using the editor causes screen flickering. I've never seen this issue in any type of application or game. Its not capturing on screen recording software so I had to record with a camera.

Steps to reproduce

For me just using the editor triggers this behaviour. I noticed that when you open multiple windows the flickering is more aggressive, sometimes the app goes black for a few seconds but that is very hard to reproduce.

Minimal reproduction project

There is no specific project that does this. I just attached the video sample:

https://github.com/godotengine/godot/assets/38570835/b0d1caf3-5498-496b-b361-11d675ea2cac

CrayolaEater commented 1 year ago

Here is an example of the godot's windows turning randomly black:

https://github.com/godotengine/godot/assets/38570835/98489eef-9e64-41e6-9b2c-57c0182eec4c

Calinou commented 1 year ago

Is variable refresh rate enabled on the monitor and Windows settings? If so, is it enabled for fullscreen applications only or for windowed applications as well?

Enabling VRR for windowed applications can be problematic with Godot, as it only redraws when needed to reduce CPU/GPU utilization. I recommend making VRR only enabled for fullscreen applications, which is the default.

Also, if you're using an HDMI cable, try using a DisplayPort cable or vice versa. Some monitors can have glitches when using one type of connector that don't occur when using another connector type.

Henry78 commented 9 months ago

The same happended for me on Linux/Wayland when I started it up (for the first time) and clicked on "Local Projects > New".

Graphics:
  Device-1: Intel CometLake-H GT2 [UHD Graphics] driver: i915 v: kernel
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Ti Mobile] driver: nvidia
    v: 545.29.06
  Device-3: Realtek Integrated_Webcam_HD driver: uvcvideo type: USB
  Display: wayland server: X.org v: 1.21.1.10 with: Xwayland v: 23.2.3
    compositor: gnome-shell v: 45.2 driver: X: loaded: modesetting,nvidia
    dri: iris gpu: i915 resolution: 3840x2400~60Hz
  API: EGL v: 1.5 drivers: iris,kms_swrast,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 23.3.2-arch1.2
    renderer: Mesa Intel UHD Graphics (CML GT2)
  API: Vulkan v: 1.3.274 drivers: nvidia,intel surfaces: xcb,xlib,wayland
CrayolaEater commented 9 months ago

Is variable refresh rate enabled on the monitor and Windows settings? If so, is it enabled for fullscreen applications only or for windowed applications as well?

Enabling VRR for windowed applications can be problematic with Godot, as it only redraws when needed to reduce CPU/GPU utilization. I recommend making VRR only enabled for fullscreen applications, which is the default.

Also, if you're using an HDMI cable, try using a DisplayPort cable or vice versa. Some monitors can have glitches when using one type of connector that don't occur when using another connector type.

Yes it is enabled, however even using the black theme on the editor still gives this result. Issue also occurs on hdmi/dp connectors.

Flogah commented 7 months ago

I had the same issue with 4.2.1 stable Disabling G-Sync for windowed applications fixed the black flickering for me (using godot in windowed mode) It's essentially VRR, but I wanted to point to this specific fix

lucibefallen commented 3 months ago

I had the same issue with 4.2.1 stable Disabling G-Sync for windowed applications fixed the black flickering for me (using godot in windowed mode) It's essentially VRR, but I wanted to point to this specific fix

Thank you so much, this has been happening for me with every version that released after 4.2.1 and this fixed it

JalvinGaming commented 2 months ago

Turn on "Update Continuously" in the Editor Settings.

juse4pro commented 2 months ago

@JalvinGaming Thanks for the suggestion. Unfortunately I had the same issue and setting this did not fix it. So I can't confirm that this is a potential work around. :(

Niriel commented 1 month ago

Since Calinou's link using "latest" 404s, I link here to the 4.1 version: Enabling VRR for windowed applications can be problematic with Godot

Using "Update Continuously" is working for me with my single 144 Hz G-Sync monitor. In my NVidia Control Panel, under Display/Set up G-Sync, the checkbox for Enable G-Sync is ticked, and the radio button is set to Enabled for windowed and full screen mode.