[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
[Expired for mutter (Ubuntu) because there has been no activity for 60 days.] ** Changed in: mutter (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
"NVIDIA's EGL stream" implementation hasn't been used by GNOME for a few years so I don't think that's relevant. Unless the client is somehow using it, in which case it could be related to https://gitlab.gnome.org/GNOME/mutter/-/work_items/4279 .. But EGL stream support only exists to support Nvidia driver 470 and older. It shouldn't be relevant anymore. Separately, I wonder if disabling the new Nvidia optimization makes any difference. Please try adding this to /etc/environment: MUTTER_DEBUG_FORCE_RENDER_SOURCE=0 and reboot. If the variable doesn't fix anything then it should be removed. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
1) The Mutter presumed bug shows up with an NVidia graphics card. I do have an old but "highend" system. While I can test with mesa, mesa has a 24 FPS performance, so it is also a bad testbed. You have my system specs, but here are again: NVidia 3080 RTX Two monitors: - 4K HDR monitor at 200% DPI - 1 FullHD monitor at 100% DPI I expect most GNOME50.1 users are using it from a laptop with one monitor. The graphics card for them if they do heavy graphics is also likely NVidia. 2) You said: "Please try enabling this toggle: Alt+F2 > "lg" > Flags > DISABLE_DIRECT_SCANOUT" Anwer: I did and there was no difference (neither better or worse). * Because the stall persists even when direct scanout is disabled, this is not a Wayland buffer-starvation issue caused by the compositor holding onto too many buffers. * According to AI, this points to a frame-pacing and synchronization bottleneck between GNOME's Mutter compositor and NVIDIA's EGL stream/explicit sync implementation. When direct scanout is disabled, mrv2 is forced to render to an offscreen buffer, which Mutter then composites onto the screen. * BTW, I did check explicit sync is being used with WAYLAND_DEBUG=1 to rule that out too. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
I have concerns still: * There is no evidence of a Mutter bug yet that is affecting any other program. * There is evidence of heavy rendering in mrv2 causing those 20ms periods spent in eglSwapBuffers. There's really nothing else that can cause it other than an actual high GPU workload or the workload being relatively too high on a system that is in a low power mode. This can happen on very short time intervals if for example your render loop blocks and puts the CPU and GPU to sleep on a regular basis. They will stay in a low power mode even though you sometimes need them higher to maintain a smoother frame rate and faster render times. So make sure there are never any blocking calls (or the equivalent of a sleep) in the render loop. * Swap interval zero AND fullscreen direct scanout both require the toolkit to provide three buffers at a minimum to ensure the client is never blocked in acquiring or submitting new buffers while the compositor holds another one. If you use swap interval zero and your fullscreen window gets direct scanout at the same time then there's a chance the toolkit will need four buffers to prevent delays in that situation. I don't think this is well known to OpenGL developers, it's just something I learned from working on compositors. Please try enabling this toggle: Alt+F2 > "lg" > Flags > DISABLE_DIRECT_SCANOUT -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
Ok. Here's the results: 1) weston-simple-egl ok 59.99 FPS with fractional scaling 150% (I think that's way too simple an example and one that is just a geometry test) 2) You said "Wait, is mrv2 always using swap_interval zero?" (Not sure what you mean exactly, but if you mean __GL_SYNC_TO_VBLANK=0, that is indeed what I am using now to get around the bad performance with GNOME Shell and NVidia cards). If you refer to FLTK's swap_interval function, mrv2 allows it to choose it from its preferences. By the default swap_interval(1) is used on "Presentation" mode (ie. fullscreen viewport with no UI), and windowed uses swap_interval(0). 3) You said: "Although 20ms swap time is not good because it means your average frame rate can't exceed 50FPS. That is indeed correct and the performance with monitor at 150% fractional achieves 50-55 FPS. With 200% DPI, performance is 60FPS with NVidia variable or Vulkan) 4) You said: "Also does the bug occur in fullscreen or windowed modes?" The bad OpenGL performance does indeed occur in Windowed modes, Fullscreen with UI and Presentation mode (only viewport shown). -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
Also does the bug occur in fullscreen or windowed modes? -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
Wait, is mrv2 always using swap_interval zero? Zero would be correct for this type of application but it also means I've been testing the wrong kinds of apps. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
Bad example, sorry. eglgears_wayland is broken on KDE/Plasma too. I think that's an unrelated bug https://gitlab.freedesktop.org/mesa/demos/-/work_items/55 Please try this: sudo apt install weston weston-simple-egl Does that have a smooth frame rate? -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
That mostly makes sense. Although 20ms swap time is not good because it means your average frame rate can't exceed 50FPS. There are only 50 lots of 20ms in a second. You need to allow a couple of milliseconds overhead to get each frame out so realistically to achieve 60FPS the total frame time should stay under 14ms. Certainly Mutter may be to blame, it does have frame scheduling bugs from time to time. But to prove that we need to see bugs occurring with FLTK removed from the equation. There must be some other vsync-limited OpenGL program that has issues in GNOME 50. I've just tried eglgears_wayland and think that might be exhibiting new issues that other programs aren't... ** Package changed: ubuntu => mutter (Ubuntu) ** Changed in: mutter (Ubuntu) Status: Opinion => Incomplete -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
The inconsistent times spent in eglSwapBuffers, and the fact that __GL_SYNC_TO_VBLANK=0 works, both point to a mistake in the application or the toolkit. OpenGL will block by default (usually in eglSwapBuffers) in order to keep the frame rate synchronized to the vertical refresh frequency of the display. If "FLTK has its own way to control VSync" then you need to turn off OpenGL's vsync using "eglSwapInterval(display,0)" rather than __GL_SYNC_TO_VBLANK=0. Although I suggest you will get better results turning off FLTK's vsync and relying on OpenGL instead. ** Package changed: mutter (Ubuntu) => ubuntu ** Changed in: ubuntu Status: Incomplete => Opinion -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
More information: __GL_SYNC_TO_VBLANK=0 is an NVidia optimization. So the problem is in the NVidia driver or in GNOME 50.1's interaction with it. I've closed the FLTK issue about it as it is not an FLTK problem. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
Setting: export __GL_SYNC_TO_VBLANK=0 seemed to fix the OpenGL issue. That's actually puzzling as FLTK has its own way to control VSync. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
Now, here's the gnome.log for a similar run. As you can see, GNOME is really taking a long time in eglSwapBuffers. ** Attachment added: "gnome.log" https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+attachment/5972526/+files/gnome.log -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
Find attached first the kwin.log. ** Attachment added: "kwin.log" https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+attachment/5972525/+files/kwin.log -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
I added timing calculations to the eglSwapBuffers call, like:
auto t0 = std::chrono::high_resolution_clock::now();
eglSwapBuffers(display, surface);
auto t1 = std::chrono::high_resolution_clock::now();
printf("%s swap %.2f ms\n", pWindow->label(),
std::chrono::duration(t1-t0).count());
--
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to mutter in Ubuntu.
https://bugs.launchpad.net/bugs/2153492
Title:
Regression in OpenGL Wayland performance (not NVidia issue)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions
--
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
Find attached first the kwin.log. ** Attachment added: "kwin.log" https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+attachment/5972524/+files/kwin.log -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
glmark2-wayland is a geometry test so it does not apply. Firefox is a better test, albeit not good. It uses a single OpenGL surface and has no statistics to determine if/when it is dropping frames. My mrv2 OpenGL program has two OpenGL windows (OpenGL Viewport and a subwindow with an OpenGL Timeline) both updating at 60 FPS (if you provide a 60FPS video) and uses tone-mapping, which makes it way more demanding. Can I ask you to confirm that you do see the issue on your end: - Download mrv2 v1.6.4 from: https://github.com/ggarra13/mrv2/releases/download/v1.6.4/mrv2-v1.6.4-Linux-amd64.tar.gz - Download this sample movie file from: https://mega.nz/file/zWhA3YyA#DMQhnwsYZOemm6hSvfsBGFY4eJb_X1trHOCXcD5VpOE - Run mrv2 on the movie. - Use CTRL + h to bring up the HUD display and select FPS, which will show the actual FPS and drop frames. Ideally, it should show 60FPS and no or little drop frames. Thanks. On the meantime, I'll try to investigate in the FLTK Wayland innards if there's anything wrong. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
Thanks. I can't see anything wrong yet. Please try to find a more common OpenGL program that is affected. I would start by testing 'glmark2-wayland' and Firefox. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
** Attachment added: "vga.txt" https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+attachment/5972246/+files/vga.txt -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
** Attachment added: "monitors.txt" https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+attachment/5972244/+files/monitors.txt -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
** Attachment added: "monitors.txt" https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+attachment/5972245/+files/monitors.txt -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
** Attachment added: "journal.txt" https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+attachment/5972243/+files/journal.txt -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
Thanks for the bug report. Please run these commands to collect more system information: lspci -k -d::300 > vga.txt journalctl -b0 > journal.txt cp ~/.config/monitors.xml monitors.txt and attach the resulting text files here. Please also try to find a more common OpenGL program that is affected. I would start by testing 'glmark2-wayland' and Firefox. ** Changed in: mutter (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
[Bug 2153492] Re: Regression in OpenGL Wayland performance (not NVidia issue)
You can use FLTK_BACKEND=x11 to run the program under XWayland which also does not suffer from this performance hit. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2153492 Title: Regression in OpenGL Wayland performance (not NVidia issue) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2153492/+subscriptions -- desktop-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/desktop-bugs
