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

            Bug ID: 509310
           Summary: mediaframe causing VRAM memory leaks in plasmashell
    Classification: Plasma
           Product: plasmashell
      Version First 6.4.4
       Reported In:
          Platform: Bazzite
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Media Frame widget
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: 1.0

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

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

Reply via email to