SUMMARY While playing games (Xwayland) on my iGPU+dGPU system, with the monitor connected to the iGPU while the game is running on the dGPU, I can see that - Kwin: 100% utilization on both GPUs - Mutter: 100% only on the dGPU, while the game is in fullscreen, mid-utilization otherwise (in "overview" mode for example, where compositing is happening) This would entirely remove performance issues where the iGPU is too slow to follow (see bug bug 510579) and would make using the iGPU as primary entirely equivalent (or better?) to plugging the screen to the dGPU in terms of performance, while having better power savings when the dGPU is unused (in which case it's entirely off, it saves 40W in my machine) I suspect that this is because gnome uses "accelerated iGPU/dGPU framebuffer sharing" in zero-copy mode [1] for which I could not see a counterpart in Kwin's code-base. Thank you very much! [1] https://gitlab.gnome.org/GNOME/mutter/-/blob/4ebec786d7aed50a9a2fb0d22305a1995378937d/src/backends/native/meta-renderer-native.c#L2031 SOFTWARE/OS VERSIONS Operating System: Gentoo Linux 2.18 KDE Plasma Version: 6.4.5 KDE Frameworks Version: 6.19.0 Qt Version: 6.9.3 Kernel Version: 6.17.2-tkg-eevdf (64-bit) Graphics Platform: Wayland Processors: 32 × AMD Ryzen 9 9950X3D 16-Core Processor Memory: 64 GiB of RAM (60.5 GiB usable) Graphics Processor 1: AMD Radeon Graphics Graphics Processor 2: AMD Radeon RX 6950 XT ADDITIONAL INFORMATION This came up while I was reporting bug 510579
Created attachment 185936 [details] Kwin: Overwatch iGPU+dGPU utilization
Created attachment 185937 [details] Mutter: Overwatch iGPU+dGPU utilization
The (very much implemented) zero copy mode is not relevant for this at all. Your investigation is welcome, but like I already said, you just happen to hit direct scanout on Mutter, because you didn't have a color profile set there. There is really nothing that can be done about your setup.
I am really sorry for bothering you, but there's something you seem to miss: - with the color profile disabled in KDE, the iGPU usage is still ~100%, - but it does fix VRR-FPS issue in bug 510579. - Gnome does not have that behavior and the iGPU usage is 0% I tried to disable fractional scaling in KDE (the only extra setting I had vs Gnome) but that made no difference. So there probably is something Kwin could do, given the difference in behavior in Kwin vs Mutter
PS: see the two videos attached to understand what I mean. Thanks again!
Okay, first thing to check would be if you actually get direct scanout, or if the color profile just happened to increase iGPU load enough to cause the issue. You can do that with the kwin debug console, just search for "kwin debug console" in krunner. The rightmost tab in it has the "showcompositing" effect, if you load it, it will show "compositing" in the top right unless direct scanout happens. The second thing to check, if you do get direct scanout, would be whether or not the iGPU is actually used by KWin or some other process. nvtop should be able to show that; you can run it through ssh (to not show anything above the fullscreen game).
Hey, Thank you very much for your time and for the instruction for this nifty debug feature to show whether direct scanout is happening or not ! So, I wasn't hitting direct scanout, and... Sorry for being ignorant... I had the color profile set to 'built-in' thinking that was the default mode (which fixed my VRR-FPS sync issue), I changed it to 'None' and I started hitting direct scanout with 0% iGPU usage. Apologies... and thank you again ! I'll make sure to document it and have this information be available in the wild