-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 prevents automatic sleeping due to the audio system #28039
Comments
Might be due to requiring the high perf GPU. This makes sense for exported games, but should maybe not be enabled by default for the editor itself. |
Can confirm this bug. To prevent it you have to close godot every time when you stop using computer. Otherwise Godot will burn your battery when you think the laptop is asleep. This is very problematic because when we talk about macbooks and other modern laptops, people may take a break (and put laptop asleep) easily 10 times a day. To use godot you should remember to close it every single time. If you don't, then when you next time try to use computer you find out that Godot has drained all the battery. So first it might sound like a small inconvenience but for some people and use cases this is a critical, software breaking bug. Perhaps editor setting that allows users to switch this behaviour off would solve the problem? |
@codespren Can't you still put the laptop to sleep manually in this case? This is generally what you should be doing to maximize its battery life, so it doesn't idle for a few minutes before going to sleep. I'm afraid making Godot use integrated graphics by default isn't an option, as it will probably feel sluggish on Retina displays (even when working on a 2D game). We could have a checkbox for this in the Editor Settings, but then, it should be implemented for all platforms. Also, which MacBook model do you have? |
It's MacBook Pro, Intel Core i5, 8 Gb memory and Intel Iris 1536 MB graphics card with MacOS Mojave. So I'm actually using Godot with integrated graphic card and doing 3D-stuff and Godot runs great but I'm using only lowpoly objects and don't use any demanding graphic settings. I can put it sleep manually by selecting sleep from menu or by closing lid and it behaves same way when Godot is running and when it is not. I only found out that Godot is not actually sleeping because first I left Godot running just like other software and later when I tried to continue working the battery was empty. I agree that It's better to use better graphics by default. Most users probably expect that. I also did some testing and other 3D software are also preventing sleeping, tested it with Unity and Blender. I'm starting to change my mind about this. Maybe laptop users should just deal with it and close those programs manually. Or write a script that closes them automatically when the laptop goes sleep. |
Exactly same issue with Macbook Pro, Godot quickly reduced my battary from percent 90 to 15 in 2 hours, while in sleep. Battery drain became stable after closing Godot. @akien-mga |
I'm going to look into this after work because it's bugging me. It looks like it might be the audio system preventing sleep. Perhaps the editor is always playing silent audio even if there aren't any active audio sources? Before and after closing godot:
|
In this case, this issue is a duplicate of #38154. See also this workaround:
|
I confirmed that it's the audio system. I have a hacky fix, and will continue discussion on #38154. |
Still exists on MacOs Ventura and Godot 3.5.1 |
CC @bruvzg |
I'm using Godot 4 Beta 7 and the issue still hasn't been resolved... |
4.0 Beta 9, still here |
4.0 RC2 still prevents sleep regardless of #71325 |
@xentripetal #71325 has nothing to do with this issue, this happens due to the audio system staying on at all times. |
Not sure if this is a side effect of this issue (if not I can open a new issue), but yesterday I noticed that when I close my MBP with Godot still running it also doesn't really go to sleep. The worse part however is, that the fans stop working but the MBP still produces a lot of heat. When I went back to it a few hours later it was pretty hot, and when I opened it the fans kicked in immediately. Can anybody else confirm if this is also caused by the audio system? |
I could notice this with the editor on Linux too (with no project running). I wonder if #64100 is actually not fixed in 4.0.2, since there is an Can you reproduce this if you disable Keep Screen On in the advanced Project Settings, then restart the editor?
Try starting the editor with the |
I have a question: |
It should be, if macOS is doing what it's telling users it's doing. macOS always sleeps on lid close by default unless you have an external monitor connected and the option to keep running when the lid is closed is enabled. |
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Godot version: 3.1
OS/device including version: Mac OSX 10.14
Issue description:
The godot editor is preventing Mac's from automatically sleeping, according to the activity monitor.
Steps to reproduce: Open any godot project.
The text was updated successfully, but these errors were encountered: