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 4.3.beta1 editor lagging even on empty project with VRR enabled in Nvidia profile #93155

Closed
PauliusMM opened this issue Jun 14, 2024 · 12 comments · Fixed by #93737
Closed

Comments

@PauliusMM
Copy link

PauliusMM commented Jun 14, 2024

Tested versions

4.3.beta1

System information

Windows 11, RTX 3080, AMD 5800X3D

Issue description

For some reason 4.3.beta1 is lagging a lot, I am getting VRR balck screen flashes and while checking FPS it constantly jumps 40-175, while 4.3.dev6 is totally fine, framerate never drops

Steps to reproduce

Use 4.3.beta1

Minimal reproduction project (MRP)

N/A

@PauliusMM PauliusMM changed the title Godot 4.3.beta1 lagging even on empty project Godot 4.3.beta1 editor lagging even on empty project Jun 14, 2024
@Chaosus Chaosus added this to the 4.3 milestone Jun 14, 2024
@JekSun97
Copy link
Contributor

Please provide a video if possible, this is difficult to test.
Starting from version 4.0, the editor actually has worse performance compared to version 3

@PauliusMM
Copy link
Author

PauliusMM commented Jun 14, 2024

This is the 4.3.dev6

20240614_135712.mp4

This is the 4.3.beta1

20240614_135750.mp4

something on the 4.3.beta1 triggers VRR, while on 4.3.dev6 it's perfectly fine, one solution kinda mitigated these flashes was to enable continues updating

at one point 4.3.beta1 even forced my monitor tu turn off VRR, probably crash or something

also I saw small thing that resizing window on 4.3.dev6 gave avg ~21fps, while on 4.3.beta1 it was ~12fps on empty project

@akien-mga akien-mga moved this from Unassessed to Release Blocker in 4.x Release Blockers Jun 14, 2024
@Calinou
Copy link
Member

Calinou commented Jun 14, 2024

I suggest enabling VRR for fullscreen applications only, which is the default in the NVIDIA Control Panel. Enabling VRR for windowed applications comes with a bunch of caveats like this one; only use this option if you're OK with the downsides, or your monitor has a particularly good VRR implementation.

With VRR disabled, can you check the CPU/GPU utilization when running the Godot editor with Update Continuously enabled on both 4.3.dev6 and 4.3.beta1?

@PauliusMM Remember that for GitHub video previews to work, you need to have a blank line before and after the video URL. I edited your post accordingly, but remember to do this in the future 🙂

@PauliusMM
Copy link
Author

Sorry for the video mistakes

It would be totally fine with disabling VRR if this happened on all versions of 4.*, I even decided to test 4.2.stable and it is fine, VRR barely triggers at all, nothing similar happens like 4.3.beta1 where even when the window does nothing the framerate is jumping while on other versions VRR triggers only when a stuff is being interacted which is fine as it's not constant like 4.3.beta1 and no black flashes appear, maybe some kind of constant redrawing is happening in 4.3.beta1

From performance checks nothing much unusual, seems to be similar in all version maybe 4.3.beta1 has lower GPU usage when constantly resizing window with more small spikes, but it's hard to tell, cpu usage is very similar in all versions

@PauliusMM
Copy link
Author

PauliusMM commented Jun 14, 2024

Big update, so it seems disabling the new setting v-sync mode in editor settings and relaunching the editor (as changing to disabled without relaunching does nothing) fixed all the problems, even with VRR jumping up and down, no more black flashes and made window resizing super smooth

@clayjohn
Copy link
Member

clayjohn commented Jun 18, 2024

@PauliusMM When you say you disabled the new setting v-sync mode. Are you saying that you set the project setting vsync_mode to VSYNC_DISABLED. In other words you simply disabled vsync?

I am a bit confused as Vsync is not a new setting

edit: I looked through the changelog and have found 1 potential culprit: #85188

@Calinou
Copy link
Member

Calinou commented Jun 18, 2024

See also #48364. Since that PR was merged, the V-Sync project setting no longer affects the editor.

@PauliusMM
Copy link
Author

I am talking about the editor vsync settings

image

@akien-mga akien-mga changed the title Godot 4.3.beta1 editor lagging even on empty project Godot 4.3.beta1 editor lagging even on empty project with VRR enabled in Nvidia profile Jun 27, 2024
@Calinou
Copy link
Member

Calinou commented Jun 27, 2024

These options look relevant in NVIDIA Profile Inspector:

1

2

3

Could anyone on an affected monitor test this on the Godot profile that Godot creates on its first startup? I can't reproduce this issue locally.

cc @aitorciki

@akien-mga akien-mga moved this from Release Blocker to Bad in 4.x Release Blockers Jun 28, 2024
@aitorciki
Copy link
Contributor

My setup: LG Oled + Windows 11 + Nvidia 2070 Super.

Using VRR only in full screen mode (recommended for Windows, as windowed mode is known to be buggy), I can't replicate the issue.

Forcing VRR also in windowed mode replicates the issue though (not the black flashes, but refresh rate is unstable and randomly jumping between 40fps and my setup target 60fps).

Setting Godot's Nvidia profile's GSYNC Application Mode to Fullscreen only as proposed by @Calinou solves the issue in my case.

@aitorciki
Copy link
Contributor

@Calinou I've put together a quick and dirty hack to test forcing only-fullscreen G-SYNC in the NVIDIA Godot profile, it works: even if I setup the driver to perform VRR on full-screen and windowed modes, Godot won't trigger VRR when windowed, solving the FPS fluctuations when using the editor.

Would you like me to tidy it and up and make a PR?

@aitorciki
Copy link
Contributor

I've gone ahead and created a PR to discuss there: #93737

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Bad
Development

Successfully merging a pull request may close this issue.

8 participants