godotengine / godot

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

[4.0 - Beta 4] - After Windows 11 22H2 November 2022 Update, HTML5 Game Locked To 30 FPS? #68439

Closed ghost closed 1 year ago

ghost commented 2 years ago

Godot version

v4.0.beta4.official [e6751549c]

System information

Windows 11 Pro 64Bit 22H2 Nov'22 Update Edge/Firefox/Chrome/Opera Browsers

Issue description

Hi,

After Windows 11 Pro 64Bit 22H2 November 2022 update, Godot 4 HTML5 game is locked to 30 FPS? (in all Windows Internet browsers: Edge/Firefox/Chrome/Opera)

Running same HTML5 game on Linux Firefox/Chrome shows 60 FPS?

Seems like Microsoft is implementing some save electricity scheme for Internet browsers?

Any ideas?

Jesse

Steps to reproduce

Run: https://www.newgrounds.com/projects/games/1946017/preview in Windows 11(with 22H2 November 2022 update) Edge/Firefox/Chrome/Opera (make sure "Game Mode" is set to "Turbo" and then play the game - should be 60 FPS, but it's 30 FPS)

Minimal reproduction project

No response

akien-mga commented 1 year ago

Sounds like a problem between that Windows update and Nvidia drivers: https://www.digitaltrends.com/computing/windows-11-22h2-nvidia-gpu-gaming-performance/ https://nvidia.custhelp.com/app/answers/detail/a_id/5395

Upgrading to the latest Nvidia drivers should fix it.

ghost commented 1 year ago

Hi...

Sorry, I am running an AMD GPU on my test Windows 11 Pro 64Bit thin client: AMD Radeon RX Vega 7 8GB DDR4L GPU

Jesse

akien-mga commented 1 year ago

Googling for performance issues in 22H2, I also see references to performance issues on AMD chipsets: https://twitter.com/CapFrameX/status/1587732411525349377 Though not as dramatic as a 30 FPS framecap, which might be something else (VSync misbehaving).

I would suggest using Windows 11's feedback tool to report the regression to Microsoft: https://www.thewindowsclub.com/send-feedback-or-complain-about-windows-11-to-microsoft

I would also suggest making sure you're using the latest drivers from AMD. Windows Updates sometimes like to roll back to earlier drivers, instead of the latest one from the GPU vendor.

ghost commented 1 year ago

Hi,

I think the issue is somewhere on my end(in the source code). Been up for two days, let me sleep and wake up with a fresh perspective.

Jesse

Calinou commented 1 year ago

Your OS/driver/web browser/something else may be forcing double-buffered V-Sync (instead of triple-buffered V-Sync). This causes framerate to drop to half the monitor refresh rate (usually 30 FPS) as soon as the monitor refresh rate (usually 60 FPS) can't be sustained.

Try disabling V-Sync entirely and see if the problem persists, although it's difficult to disable V-Sync in browsers nowadays (if even possible).

ghost commented 1 year ago

Hi,

Thanks for the help.

I've gone through the code...code is fine... ...something changed with the most recent... Windows 11 22H2 November update that I just installed yesterday.

Not sure I or Godot devs can do anything about this now. I have the same issue on two completely different Windows 11 v22H2 computers.

Uggg, this is not cool MS.

Jesse

clayjohn commented 1 year ago

Looks like this is a known regression from the latest windows update. You will have to wait for a fix from Microsoft's end https://learn.microsoft.com/en-us/windows/release-health/status-windows-11-22h2#2950msgdesc

akien-mga commented 1 year ago

Looks like this is a known regression from the latest windows update. You will have to wait for a fix from Microsoft's end learn.microsoft.com/en-us/windows/release-health/status-windows-11-22h2#2950msgdesc

We can hope for a fix from MS but it seems like they're expecting us to do something too, reading that message.

Affected games and apps are inadvertently enabling GPU performance debugging features not meant to be used by consumers.

Workaround: If you are already on Windows 11, version 22H2 and are experiencing this issue, you might be able to resolve it by updating your games and gaming related apps to the latest version available.

Where can we find more info about these "GPU performance debugging features" we're not supposed to use?

Calinou commented 1 year ago

Some comment I got on the above update:

Yeah, that very first issue is a rough one. GeForce Experience's latency meter, as well as Special K's implementation of PresentMon both had to be patched to prevent Windows 11 22H2 from enabling those debug features.

Funny how PresentMon, a thing used to measure performance, causes performance problems now. Luckily the issue was patched a long time ago, but software does have to use a newer version of it to avoid the issue after upgrading to 22H2.

I think waiting it out is fine. There are thousands of apps out there that will never be patched to fix the regression – Microsoft will do something about it eventually.