-
-
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
Framerate drops to 1 FPS when Screen Energy Saving activates / screen turns off #87818
Comments
|
Mh yeah this feels like it might be related to "low consumption mode" (minimized window). Would be worth checking out #82222 if it indeed happens indeed to happen on a minimized window. |
I did print the time in seconds since start, the delta value and FPS in the _process function: seconds: 60.05 delta: 0.016 fps: 59 As you can see, when the monitor goes to sleep, the _process function is only called (exactly) once per second.
You mean a published game not made in Godot? I currently don't have any games installed on this PC, but I can install one tomorrow and test.
No, I can't. When the window is minimized, the issue doesn't occur anymore when the monitor turns off. Here is the code I used:
|
That's a very interesting and arguably relevant detail |
You know, I heard about some WSI limiting to 1 fps in certain circumstances. I wonder if there's something fishy going on. This is an nvidia card after all :P |
When dragging the window around quickly, the same thing happens: seconds: 9.81 delta: 0.061 fps: 31 As you see, there is an exact gap of 3 seconds. |
I just tested on a raspberry pi 4 and it has the same issue when the monitor turns off. So this issue is not caused by specific hardware/GPU/CPU, linux distribution, X11/wayland or desktop environment. Dragging the window around didn't cause problems though, so I guess this isn't related to the issue of turning off the monitor. |
@akyoto reported that a similar issue got fixed by the latest driver update: #88493 (comment) Could you try reproducing this issue again? |
@Riteo I can't test the latest drivers, as my linux distribution didn't ship it yet. I will do it once the driver is shipped. As I mentioned in my last post, the issue also occurs on a raspberry pi, so I don't think it's related to the nvidia driver. I just tested on Godot V4.3 dev4 and the issue is still there (Fedora 39, X11, nvidia driver 545). |
Oh right, sorry. I got things mixed up too, as that was a Wayland issue and this one isn't 😅 |
@akien-mga I think the new title doesn't fit the issue. As I mentioned in another post, dragging the window around seems to be another issue not related to the issue of turning off the monitor. Also, the "monitor off" issue occurs on X11 and also on wayland. |
Yeah I just tested myself to confirm. Tested both 4.2.1-stable and 4.3-dev4 / current I couldn't reproduce the issue with dragging the window, which was the easiest step to reproduce in the OP, so I suggest editing the OP to clarify that. I can reproduce the issue with Screen Energy Saving turning off the screen, on KDE Plasma on Fedora 39, both with X11 and Wayland sessions. On a Wayland session, it happens whether running with the X11 or Wayland display server. The FPS seems to drop to 1 when energy saving is toggled, and as soon as it ends it goes back to normal framerate:
I can also reproduce this fact, which is interesting to say the least. |
Tested this PR and it doesn't affect the bug described here:
But we established in another issue on Wayland that minimizing windows on KDE Plasma doesn't seem to have the same effect as you seem to observe on some other DEs/WMs, so this might need to be tested on multiple DEs. BTW, can anyone not on KDE Plasma reproduce the issue too? So far we've established the issue is triggered by KDE's "Screen Energy Saving" mode where it turns off the screen. I assume some other DEs might have similar features, but possibly with a different effect. |
@akien-mga I tested on a raspberry 4 with raspberry OS (which is based on debian and has another DE, not KDE) and was able to reproduce the issue. |
I tried:
All of them successfully reproduce the issue when the monitor is turned off. |
To clarify the "monitor turned off", do you folks reproduce this on an external monitor when physically powering it off, or only when letting the OS turn it off for power saving? On my end on a laptop (no physical button to power off the monitor):
|
I originally tested by letting the OS turning it off. I just tested now by pressing the button on my external monitor and I was NOT able to reproduce the issue. |
I wonder, can this be replicated on OpenGL or other Vulkan programs (e.g. vkcube)? This feels really weird. |
With the flag There is still a very short-lived hiccup when the monitor goes off, but it goes back to normal FPS shortly after:
|
Tested versions
v4.2.1.stable.official [b09f793]
System information
Godot v4.2.1.stable - Fedora Linux 39 (KDE Plasma) - X11 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 1650 (nvidia; 545.29.06) - 11th Gen Intel(R) Core(TM) i9-11900T @ 1.50GHz (16 Threads)
Issue description
In the MRP an audio is played every 0.2 seconds. As soon as the monitor turns off (due to energy saving), the audio is being played only around every 3 seconds.
Btw. the same issue also happens when dragging the window around.
Expected behaviour is of course that it should continue playing every 0.2 seconds.
Steps to reproduce
Minimal reproduction project (MRP)
MonitorTest.zip
The text was updated successfully, but these errors were encountered: