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

vsync is not limiting FPS on macOS Monterey #56355

Closed
oronbz opened this issue Dec 30, 2021 · 5 comments
Closed

vsync is not limiting FPS on macOS Monterey #56355

oronbz opened this issue Dec 30, 2021 · 5 comments

Comments

@oronbz
Copy link

oronbz commented Dec 30, 2021

Godot version

3.4.2.stable

System information

macOS Monterey, GLES3, AMD Radeon Pro 5300M 4 GB

Issue description

Hi, I'm having an issue on macOS Monterey (not sure if it's on previous versions as well) where vsync doesn't work (it's not limiting the FPS to my monitor's HZ):

You can see in the image the extremely high fps 2k+ (which also comes up with high cpu usage ~80%), and vsync is enabled.

I've used the following workarounds to silent my CPU fans:

  • Force FPS does work if I set it, but I prefer to just enable vsync and let it do its job instead of fixing a number there (:
  • Low Processor Mode caps the FPS at 144, which also reduce CPU usage, but not recommended for games per its documentation.
  • I'm not sure what's Vsync Via Compositor is, but enabling it doesn't solve it.

Steps to reproduce

  1. Create a new project
  2. Create a Node2D scene
  3. Make sure Use Vsync is enabled on Project Settings -> Display -> Window
  4. Enabled Print FPS on Project Settings -> Debug -> Settings
  5. Run the scene and watch the FPS on the output

Minimal reproduction project

TestVSYNC.zip

@Calinou
Copy link
Member

Calinou commented Dec 30, 2021

cc @bruvzg

Can you reproduce this on the master branch? You can download a nightly build here.

Force FPS does work if I set it, but I prefer to just enable vsync and let it do its job instead of fixing a number there (:

If godotengine/godot-proposals#1284 is implemented, we could have a default FPS limit that's set to (monitor refresh rate + 1) to avoid excessive CPU/GPU usage when V-Sync fails to work.

@oronbz
Copy link
Author

oronbz commented Dec 30, 2021

Can you reproduce this on the master branch? You can download a nightly build here.

I've yet to compile godot, but I don't mind diving into it if needed, in any case the link to the nightly build gives 404

EDIT: I'll get it from here: https://hugo.pro/projects/godot-builds/

@oronbz
Copy link
Author

oronbz commented Dec 30, 2021

@Calinou on: v4.0.dev.calinou [9f05867]
things are a bit better, but still buggy:

When the window is on foreground i get 240 fps (my monitor is on 120hz),
When I move the window to my 60hz monitor I get 120 FPS.
It looks like it's doubling on the monitor Hz with FPS :D

But, when the window is on background (like when the editor is on focus) i get 3k+ FPS:

Screen Shot 2021-12-30 at 22 50 42

@Calinou
Copy link
Member

Calinou commented Dec 30, 2021

I've yet to compile godot, but I don't mind diving into it if needed, in any case the link to the nightly build gives 404

I fixed the link in my comment – it's https://hugo.pro/projects/godot-builds/ 🙂

@Calinou
Copy link
Member

Calinou commented Nov 15, 2022

Fixed in macOS 13.0 (this is a macOS bug): #64475

#66367 will provide a workaround for older macOS versions.

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

4 participants