GNOME Bugzilla – Bug 789186
mutter performance drop with Nvidia PowerMizer and commit 383ba566bd7c2a76d0856015a66e47caedef06b6
Last modified: 2021-07-05 13:52:40 UTC
Offending commit: https://git.gnome.org/browse/mutter/commit/?id=383ba566bd7c2a76d0856015a66e47caedef06b6 There's suspicion that glXWaitVideoSync is the cause of it. With this commit - nvidia drops frequencies and Chromium\other apps like games drop fps to 30, shell starts to lag. When nvidia raises frequencies on load, it's again 60fps. You can trigger load by switching\opening new windows. You can monitor nvidia frequency in parallel. Without commit - nvidia drops frequencies, but Chromium is still smooth. gnome-shell fps drops to 30, you can clearly see it when moving Chromium window around the screen. but programs itself are unaffected. Fps changes only in shell itself. This is tested with and without HW acceleration in chromium. adjacent bugs: https://bugzilla.gnome.org/show_bug.cgi?id=781835 https://bugzilla.gnome.org/show_bug.cgi?id=652077
similar case https://bugs.launchpad.net/mir/+bug/1388490
It's not clear to me how this is "adjacent" rather than a total duplicate, given how often Bug 781835 namedrops that commit. If the latter, then we don't all get to have our own pet copies of bugs. *** This bug has been marked as a duplicate of bug 781835 ***
I've been told that my symptoms differ from what's being discussed in https://bugzilla.gnome.org/show_bug.cgi?id=781835 , so I created this bugreport. I'm sorry for any inconveniences.
Maybe I misread; sorry if so. Does your problem have CPU usage that is still OK, but just framerates being low or inconsistent? I originally read "performance drop" and "shell starts to lag" as meaning high load => low performance, but I see now that might not have been the right interpretation. I'll reopen if so!
OK, I'll try to explain better this time. I'm a non-native English-speaker, and I believe this is the cause of confusion. Example 1: I run glxgears with __GL_SYNC_TO_VBLANK=1 and have stable 60 fps as expected. Few moments later after starting glxgears, nvidia driver settles down and downclocks from power level 4 to power level 0. When this happens, glxgears observed performance drops to perceived 30 fps, but frame counter still shows stable 60 fps. If I raise nvidia power level to 4, everything is back to normal. Example 2. https://www.vsynctester.com/ Test reports stable 16 ms frame latency. When nvidia goes to power level zero, moving picture stutters as if it runs at 30 fps, but reported frame latency is still 16ms and 60 fps. -------- This behavior is observed only when running mutter with commit in question.
and > Does your problem have CPU usage that is still OK, but just framerates being low or inconsistent? i.e. when you see low framerates, is it because of CPU saturation, or is CPU usage fine? That to me would be the key detail that would differentiate this from the other bug.
CPU usage is fine, GPU usage is fine. The problem I described above is the only one I have. I tried every possible tweak like setting __GL_YIELD, __GL_THREADED_OPTIMIZATIONS etc etc. There are only 2 solutions for me: 1 - Run nvidia card at least at power level 1, not zero. This effectively means forcing GPU performance mode for general desktop usage (unacceptable for me). 2 - Revert the commit. ----- Maybe other nvidia cards are unaffected because of higher frequencies in power level 0, I just don't know. That would explain why this bug is not hyped yet.
PS. This is on gtx 960, driver version 387.34, 390.25, 390.48, whatever.
Thanks, sorry for my misunderstanding!
Thank you very much. I hope this bug will draw some attention one day. I opened it 6 months ago and you are the first who noticed it :)
I just don't get it. It's impossible that I'm the only one with this problem. Why no attention? Or gnome is only tested with wayland nowadays?
https://www.reddit.com/r/gnome/comments/7p5ore/discussiontrying_to_uncover_what_is_wrong_with/ Related. The same gpu exactly.
Same issue here and using a gtx 960 as well. Makes gnome pretty much unusable for me.
Same issue with GTX 650 Ti, driver 390.48, and GNOME 3.28. Running nvpowermizerd works very well as a workaround: https://github.com/mrpdaemon/nvpowermizerd
jeckhack has mentioned that this bug is fixed after applying this patch: https://gitlab.gnome.org/GNOME/mutter/merge_requests/281
jeckhack: Could you please try this fix instead? https://gitlab.gnome.org/GNOME/mutter/merge_requests/328
I can confirm that patch 281 fixes the issue.
Also note the second commit of https://gitlab.gnome.org/GNOME/mutter/merge_requests/363 provides a fix for this bug too. It replaces the first commit of https://gitlab.gnome.org/GNOME/mutter/merge_requests/281
I was in the process of writing up a bug report on the same issue when i stumbled upon this. The main difference is that in my case the issue is present ONLY if "Allow Flipping" option is DISABLED, and it is ENABLED by default. According to nvidia-settings src, this option controls buffer swap methods: if on OpenGL will swap by flipping when possible, otherwise it will always swap by blitting. It may be possible that this option wasn't present back in 2017 when this report was created, and it was blitting by default at the time. You might consider enabling flipping as a workaround, but be advised: this option is volatile and may introduce graphical glitches and slowdowns for certain applications. Screencasting software such as OBS-Studio is completely unusable with "Allow Flipping" enabled. I'll try out MR 363 or 281 in the meantime. Not sure if i should post a separate bug report on gitlab though...
Fix committed to mutter master, due for release in mutter 3.33.2 or later. https://gitlab.gnome.org/GNOME/mutter/commit/45244852ac
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.