Bug 509310 - mediaframe causing VRAM memory leaks in plasmashell
Summary: mediaframe causing VRAM memory leaks in plasmashell
Status: RESOLVED DUPLICATE of bug 509123
Alias: None
Product: plasmashell
Classification: Plasma
Component: Media Frame widget (other bugs)
Version First Reported In: 6.4.4
Platform: Bazzite Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-09 15:16 UTC by Michele Noberasco
Modified: 2025-09-18 14:37 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Noberasco 2025-09-09 15:16:45 UTC
SUMMARY
mediaframe causing VRAM memory leaks in plasmashell

STEPS TO REPRODUCE
1. configure 2 media frame plasmoids on desktop, each pointing to a single image (I created them by dragging two image files from dolphin to desktop, and selected the relevant option)
2. configure them to update every minute
3. make sure the image files they point to change (I use this setup to display a couple of webcam images on my desktop, and have a script that updates the image files every 60 seconds)

OBSERVED RESULT
VRAM usage in plasmashell increases every time the images are updated.
With above steps, it increases by as much as 30 Mib per minute.
I used a script containing the following code to monitor VRAM usage:
VRAM=`nvidia-smi | grep plasmashell | awk -v N=8 '{print $N}' | sed -e "s/MiB$//"`
echo "plasmashell VRAM usage is: $VRAM MiB"
Here is a sample output:
set 09 16:59:14 bazzite monitor_vram.sh[2916212]: plasmashell VRAM usage is: 606 MiB
set 09 17:01:03 bazzite monitor_vram.sh[2917494]: plasmashell VRAM usage is: 638 MiB
set 09 17:03:03 bazzite monitor_vram.sh[2918826]: plasmashell VRAM usage is: 666 MiB
set 09 17:05:03 bazzite monitor_vram.sh[2920161]: plasmashell VRAM usage is: 698 MiB
set 09 17:07:03 bazzite monitor_vram.sh[2921517]: plasmashell VRAM usage is: 726 MiB
If left unattended, VRAM usage by plasmashell will keep increasing until physical GPU ram is exhausted, at which point system will become unstable (kde session may fail to open new apps / become unresponsive / crash).
As a mitigation, restarting plasmashell with following command
systemctl restart --user plasma-plasmashell
will temporarily bring VRAM usage back in check.
Removing the two mediaframe plasmoids will cause VRAM usage to stop increasing, but will not restore it. Only by restarting plasmashell VRAM is reclaimed.

EXPECTED RESULT
mediaframe should not cause plasmashell VRAM usage to increase indefinitely.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Bazzite 42
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2025-09-17 22:48:02 UTC
This is with an NVIDIA GPU, right?
Comment 2 Michele Noberasco 2025-09-18 00:25:17 UTC
(In reply to Nate Graham from comment #1)
> This is with an NVIDIA GPU, right?

Yes, I have a NVIDIA RTX 4000 Ada with nvidia-open drivers v. 580.82.07.
Comment 3 Harald Sitter 2025-09-18 14:35:48 UTC

*** This bug has been marked as a duplicate of bug 509123 ***
Comment 4 Harald Sitter 2025-09-18 14:37:02 UTC
Exactly the same presentation as the other issue. First it leaks into GPU memory and then gets moved into system memory every once in a while.