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

Vulkan: Editor constantly uses 1-2% CPU while doing nothing on empty project due to Vulkan lacking 2D batching #71084

Closed
tustin2121 opened this issue Jan 8, 2023 · 10 comments · Fixed by #92797

Comments

@tustin2121
Copy link

Godot version

v4.0.beta10.mono.official [d0398f6]

System information

MacOS Catilina 10.15.6, MacBook Air

Issue description

I just downloaded 4.0 beta 10 and started a new project, and simply sitting and staring at the empty project screen causes my mac's fan to spin up and stay spinning on high. The editor isn't doing anything, but it apparently just can't sit still? The CPU usage is always at at least 1% or 2%, and it apparently wakes the processor at least 150 times per second.

I would expect simply staring at the editor with nothing on screen would leave the CPU alone. If I swipe away to another screen or minimize the editor, I would expect the CPU usage to fall as well, but the editor still uses 1-2% constantly. There's no way I can use Godot if it is going to eat my laptop's battery just doing literally nothing...

image

Steps to reproduce

Open a new project and just sit and wait. Going to the AssetLib tab seems to speed up the process, but it's not required.

Minimal reproduction project

N/A

@Zireael07
Copy link
Contributor

I suspect this is the audio system?

@Calinou
Copy link
Member

Calinou commented Jan 8, 2023

Duplicate of #38154.

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2023
@tustin2121
Copy link
Author

coreaudiod was using a high percentage of CPU when Godot was open. I changed the audio system to "Dummy" in the project settings and restarted the editor, and now that usage in coreaudiod is gone, but the editor itself is still using the same amount of CPU. So it's either something other than the audio system, or I guess the audio system is still outputting dummy sound data to the dummy driver?

image

@Calinou
Copy link
Member

Calinou commented Jan 8, 2023

Can you reproduce this on 3.5.1?

@tustin2121
Copy link
Author

Downloaded 3.5.1, opened a blank project in it, modified the Project Settings to make it use the Dummy audio driver. The numbers in the process monitor seem worse, but my computer is not heating up and spinning up the fan to high. Whatever is making 4.b10 eat my batteries and turn my macbook into an airplane is not happening in 3.5.1.

image

@Calinou
Copy link
Member

Calinou commented Jan 8, 2023

Whatever is making 4.b10 eat my batteries and turn my macbook into an airplane is not happening in 3.5.1.

Can you reproduce in 4.0.beta10 after switching the rendering method to Forward Mobile? Also try GL Compatibility.

@tustin2121
Copy link
Author

The 4.0.b10 project I've been testing on has been using the mobile renderer. Switching to gl_compatability makes the fan calm down:

image

Switching to the forward_plus renderer makes the fan spin up again after a while:

image

I guess I'll be using the gl_compatibility renderer for a while.

@Calinou
Copy link
Member

Calinou commented Jan 8, 2023

This is likely because the editor is much slower to render when using Vulkan due to lack of 2D batching. See also #70869.

@Calinou Calinou changed the title Editor constantly uses 1-2% CPU while doing nothing on empty project Vulkan: Editor constantly uses 1-2% CPU while doing nothing on empty project due to Vulkan lacking 2D batching Jan 8, 2023
@clayjohn
Copy link
Member

clayjohn commented Jan 8, 2023

To me this sounds like vsync may not be working in on the macOS builds.

@Calinou
Copy link
Member

Calinou commented Jan 8, 2023

To me this sounds like vsync may not be working in on the macOS builds.

This should be fixed in macOS 13.0 (Ventura), but you'll need to upgrade as this is an upstream issue: #56355

#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

Successfully merging a pull request may close this issue.

5 participants