Bug 506197 - Memory leak only on Wayland
Summary: Memory leak only on Wayland
Status: RESOLVED DUPLICATE of bug 480693
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2025-06-26 06:01 UTC by Jaime Antonio Gonzalez
Modified: 2025-07-03 11:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
unresolved functions tree (439.67 KB, image/png)
2025-06-26 06:01 UTC, Jaime Antonio Gonzalez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaime Antonio Gonzalez 2025-06-26 06:01:58 UTC
Created attachment 182678 [details]
unresolved functions tree

SUMMARY

Plasmashell RAM usage keeps growing over time,  even when idling.

Doesn't happen on X11 session.


STEPS TO REPRODUCE
1. Use Wayland session
2. Leave the system running for 30 mins - 1 hour

OBSERVED RESULT

Memory usage grows exponentially over time.

EXPECTED RESULT

I shouldn't grow that much

SOFTWARE/OS VERSIONS

Operating System: EndeavourOS 
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-2400 CPU @ 3.10GHz
Memory: 8 GiB of RAM (7.7 GiB usable)
Graphics Processor 1: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2
Graphics Processor 2: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2


ADDITIONAL INFORMATION

Note: even though I have Intel HD2000 IGP as Device 1 and GTX 1060 as Device 2 (checked with inxi -G) both devices appear as GTX 1060.

Using heaptrack to trace the leak, it points to "unresolved functions" in libnvidia-eglcore.so, libnvidia-egl-wayland.so, libEGL-nvidia.so, going deeper into the tree it continues with unresolved functions in libQt6Gui.so and libQt6Quick.so

I will link the heaptrack zst file (it's big, around 30 MiB) so someone with better knowledge can inspect it and maybe can come up with a fix.

Heaptrack file: https://www.mediafire.com/file/1vatpv9omuss6ha/heaptrack.plasmashell.9283.zst/file
Comment 1 Nate Graham 2025-06-26 16:30:33 UTC
Do you use a slideshow wallpaper? If so, this is Bug 480693, which was traced to an issue in the NVIDIA driver.

Frankly, the issue you're seeing is almost certainly also an issue in the NVIDIA driver even if it's not that exact issue. Thanks for the debugging you've done to make that clear! It's very helpful.
Comment 2 Jaime Antonio Gonzalez 2025-07-03 06:11:16 UTC
(In reply to Nate Graham from comment #1)
> Do you use a slideshow wallpaper? If so, this is Bug 480693, which was
> traced to an issue in the NVIDIA driver.
> 
> Frankly, the issue you're seeing is almost certainly also an issue in the
> NVIDIA driver even if it's not that exact issue. Thanks for the debugging
> you've done to make that clear! It's very helpful.

Yes, I'm using the slideshow wallpaper.

I just tried with a static image and it leaks but not that crazy (around 160 MiB)

I tried slideshow only on monitor 2 (driven by the HD2000 IGP) it leaks a bit higher than no slideshow (around 175 MiB)

I tried slideshow only on monitor 1 (driven by the GTX1060) it leaks almost the same as slideshow only on monitor 2

But using slideshow on the 2 monitors, makes it leak big again. I have set the timer to switch images to 1 min.

Strangely, after killing and restarting plasmashell 3 or 4 times, it behaves correctly.
Comment 3 Nate Graham 2025-07-03 11:53:41 UTC
Thanks, it's Bug 480693 then. Any remaining leaks when *not* using a slideshow wallpaper are very likely to also be NVIDIA driver issues too.

*** This bug has been marked as a duplicate of bug 480693 ***