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 editor prevents screen from going to sleep #69167

Closed
Uxeron opened this issue Nov 25, 2022 · 7 comments
Closed

Godot editor prevents screen from going to sleep #69167

Uxeron opened this issue Nov 25, 2022 · 7 comments

Comments

@Uxeron
Copy link
Contributor

Uxeron commented Nov 25, 2022

Godot version

v4.0.beta6.official [7f8ecff]

System information

Windows 10

Issue description

While the Godot editor is open, the screen will never go to sleep and will always remain ON.
This seems to be caused by the setting display/window/energy_saving/keep_screen_on being enabled by default. This makes sense for a game, however, it's enabled for the editor too, with no way to disable it.

Steps to reproduce

Check your screen sleep delay (on Windows 10: Settings -> System -> Power & sleep)
Open the Godot editor and leave the computer idle for a while.
Notice how the screen remains awake, even after enough time has passed.

Alternatively

Run powercfg /requests in Windows command prompt.
Notice that it mentions "Godot Engine running with display/window/energy_saving/keep_screen_on = true" under [DISPLAY], while referencing the editor executable by path.

image

Minimal reproduction project

N/A

@Calinou
Copy link
Member

Calinou commented Nov 25, 2022

Can you reproduce this on 3.5.1?

Either way, the project setting should be ignored in the editor and the editor should never keep the screen on (except if a progress operation is currently ongoing, such as importing resources or baking lightmaps).

@Uxeron
Copy link
Contributor Author

Uxeron commented Nov 25, 2022

I cannot reproduce this on 3.5.1, the screen turns off properly and powercfg does not report any locking.

@Calinou Calinou added this to the 4.0 milestone Nov 25, 2022
@RedMser
Copy link
Contributor

RedMser commented Nov 26, 2022

There is an editor feature override for this setting, but it is not handled by the editor. See #64100

@Calinou
Copy link
Member

Calinou commented Dec 16, 2022

I can confirm this on 4.0.beta8 (Linux).

@vancura
Copy link

vancura commented Jan 4, 2023

The same issue is on macOS (v4.0.beta10.mono.official [d0398f62f] on macOS 13.2). It prevents monitor sleep when the screensaver runs; even LoginWindow can't get the screen to sleep.

EDIT: Same with the non-mono version.

@Calinou
Copy link
Member

Calinou commented Jan 6, 2023

There is an editor feature override for this setting, but it is not handled by the editor. See #64100

This can be fixed by disregarding the setting within the editor (by checking for Engine::get_singleton()->is_editor_hint() where the setting is used), and removing the .editor override. In general, I think running the project from the editor is expected to prevent sleeping. What shouldn't prevent sleeping is the editor itself.

@Uxeron
Copy link
Contributor Author

Uxeron commented Feb 13, 2023

Fixed by #71325.

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

Successfully merging a pull request may close this issue.

4 participants