https://bugs.kde.org/show_bug.cgi?id=466771

Kai Krakow <k...@kaishome.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |k...@kaishome.de

--- Comment #32 from Kai Krakow <k...@kaishome.de> ---
I've first seen this on Plasma 6 with Gen4 Intel iGPU using wayland. It doesn't
happen with Xorg on that same system.

Maybe related:

On my NVIDIA system, the same thing happens with wayland quite easily if I run
wayland during gaming/streaming with OBS. It's really bad, I've gone back to
Xorg.

But even with Xorg, kwin_x11 and plasma-shell often crash and restart after 2+
hours, causing severe stutters in game and causing framedrops in
recording/streaming. When this happens, plasmashell already uses 2 GB of VRAM.
I really don't know why it eats so much VRAM, and it probably crashes because
it fails to allocate anything more. VRAM usage of plasmashell it absurd, even
when idle, it already uses 800+ MB, after some light usage, it easily uses 1+
GB already.

The nvidia-drivers can do some cleanup every once in a while (a feature called
"CPMM", please ask NVIDIA developers about the details, I'm not allowed to
disclose the tuning parameters: it's active by default with 10min cleanup
interval). It brings usage down from 800 MB initially to only 170 MB (using 15
seconds cleanup interval [1]). But that only means that plasmashell piles up a
lot of render surfaces or render buffers it never cleans up on its own. This
feature only works for GL, so if you switch to Vulkan using "kcmshell6
qtquicksettings", it shows the bad behavior again.

Unfortunately, using the software renderer no longer works in Plasma 6: it
renders icons to the wrong positions or completely removes them from rendering
as soon as you hover the mouse over them. But in this mode, plasmashell uses
only 4 MB of VRAM and I'm seeing no negative performance impact. In Plasma 5,
this has been the game changer.

Now with Plasma 6, the system isn't really usable if you stress the system with
VRAM allocations as games usually do. And that's not limited to NVIDIA, it
happens on Intel iGPUs too, and usually very quickly because of the low amount
of shared VRAM. And with wayland, all of this is handled exceptionally bad,
Xorg is a little more forgiving.

While wayland works beautifully (ultra-smooth desktop, proper scaling etc) for
light desktop usage, everything causes havoc if you do some real work like
having lots of open windows on multiple monitors (4 in my instance), rendering
or gaming, especially with OBS. Plasma starts to fight with every process in
the system over GPU resources. There's no longer an option to use software
rendering because rendering is just broken with it. I really don't need
hardware accelerated rendering for the plasmashell: In the end, it's just a bar
to switch between applications, and launcher and notification manager. But it's
the main consumer of GPU resources on a KDE desktop, and it fights for it
really hard, hurting performance more than what is gained by hardware
rendering.

Currently I can work around it by using QSV with OBS (instead of NVENC),
limiting my main game VRAM usage through DXVK and using a short CMPP interval
only for plasmashell. But that only helps short term, longer sessions are
really borked, and after more than 2 days of usage, I'd rather need to reboot
before trying anything else.

Also, it's a little more stable by using the NVIDIA open kernel drivers: they
seem to handle VRAM a little different. But even if drivers can or should fix
it, VRAM usage of plasmashell is still absurdly high and it will hurt
performance for gaming - no matter what a driver can do.

I hope this gets fixed sooner than later, that would be great. :-)

[1]: This low interval has some unwanted side-effects in OBS as it cleans up
OBS render resources, too, leading to repeated frametime spikes during
recording or streaming.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to