Bug 492097 - Major memory leak with GIF wallpaper and NVIDIA GPU
Summary: Major memory leak with GIF wallpaper and NVIDIA GPU
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image & Slideshow wallpaper plugins (other bugs)
Version First Reported In: 6.1.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: efficiency-and-performance
: 500680 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-08-23 18:33 UTC by Glenn Ivar Røsdal
Modified: 2025-10-08 13:52 UTC (History)
9 users (show)

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


Attachments
Chill_Mario_2023_ver__Pixel_Jeff.gif (418.00 KB, image/gif)
2024-08-23 21:37 UTC, Glenn Ivar Røsdal
Details
attachment-2852559-0.html (2.71 KB, text/html)
2024-08-23 22:03 UTC, Glenn Ivar Røsdal
Details
attachment-284659-0.html (1.64 KB, text/html)
2024-08-29 04:05 UTC, Glenn Ivar Røsdal
Details
GIF that has this memory leak. (BUG 500680) (37.52 KB, image/gif)
2025-02-24 22:36 UTC, poryvay.vladik
Details
attachment-2721165-0.html (1.40 KB, text/html)
2025-02-27 00:54 UTC, Glenn Ivar Røsdal
Details
attachment-618535-0.html (2.43 KB, text/html)
2025-04-11 03:59 UTC, Glenn Ivar Røsdal
Details
3080TI, 11+ GB of VRAM used in 3-4 Minutes (7.85 KB, image/png)
2025-04-11 17:01 UTC, Ambrosia
Details
2-frame 1920x1080 GIF Wallpaper for testing (661.13 KB, image/gif)
2025-04-11 17:02 UTC, Ambrosia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Glenn Ivar Røsdal 2024-08-23 18:33:03 UTC
I discovered yesterday, that you can provoke a major memory leak by putting a GIF wallpaper.

Resault while running steam, brave, discord and all that. The brave browser started to lag. Steam was hanging. Discord was dead.

It was so bad, I was sure it was my system. So I reinstalled my CachyOs.

All was fine all day. Put back my wallpaper, and the issues was there again.

plasma-shell ate all my 32gb of ram. I did record this and put it into the cachyos discord. Then others in the cachyos community also could reproduce the same issue. Then verified by the devs. 

I could take a standard wallpaper, again, and the system settle and did calm dawn to normal. Changed to the GIF wallpaper, and same problem over again.

Computer Information:
Manufacturer: ASUSTeK COMPUTER INC.

Model: ROG STRIX X670E-E GAMING WIFI

Form Factor: Desktop

No Touch Input Detected

Processor Information:
CPU Vendor: AuthenticAMD

CPU Brand: AMD Ryzen 7 7800X3D 8-Core Processor

CPU Family: 0x19

CPU Model: 0x61

CPU Stepping: 0x2

CPU Type: 0x0

Speed: 5050 MHz

16 logical processors

8 physical processors

Hyper-threading: Supported

FCMOV: Supported

SSE2: Supported

SSE3: Supported

SSSE3: Supported

SSE4a: Supported

SSE41: Supported

SSE42: Supported

AES: Supported

AVX: Supported

AVX2: Supported

AVX512F: Supported

AVX512PF: Unsupported

AVX512ER: Unsupported

AVX512CD: Supported

AVX512VNNI: Supported

SHA: Supported

CMPXCHG16B: Supported

LAHF/SAHF: Supported

PrefetchW: Unsupported

Operating System Version:
“CachyOS” (64 bit)

Kernel Name: Linux

Kernel Version: 6.10.6-3-cachyos

X Server Vendor: The X Org Foundation

X Server Release: 12401002

X Window Manager: KWin

Steam Runtime Version:

Video Card:
Driver: NVIDIA Corporation NVIDIA GeForce RTX 4090/PCIe/SSE2

Driver Version: 4.6.0 NVIDIA 560.35.03

OpenGL Version: 4.6

Desktop Color Depth: 24 bits per pixel

Monitor Refresh Rate: 137 Hz

VendorID: 0x10de

DeviceID: 0x2684

Revision Not Detected

Number of Monitors: 2

Number of Logical Video Cards: 1

Primary Display Resolution: 3840 x 2160

Desktop Resolution: 6035 x 2160

Primary Display Size: 36.22" x 20.35" (41.54" diag), 92.0cm x 51.7cm (105.5cm diag)

Primary VRAM: 24564 MB

Sound card:
Audio device: Nvidia GPU a3 HDMI/DP

Memory:
RAM: 31721 Mb

VR Hardware:
VR Headset: None detected

Miscellaneous:
UI Language: English

LANG: en_GB.UTF-8

Total Hard Disk Space Available: 101245 MB

Largest Free Hard Disk Block: 55723 MB

Storage:
Number of SSDs: 5

SSD sizes: 4000G,4000G,3840G,250G,0B

Number of HDDs: 0

Number of removable drives: 0
Comment 1 Nate Graham 2024-08-23 19:14:01 UTC
Can you attach the GIF wallpaper that makes it happen for you?
Comment 2 Glenn Ivar Røsdal 2024-08-23 21:37:36 UTC
Created attachment 172894 [details]
Chill_Mario_2023_ver__Pixel_Jeff.gif

fre. 23. aug. 2024, 21:14 skrev Nate Graham <bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=492097
>
> Nate Graham <nate@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|REPORTED                    |NEEDSINFO
>             Summary|Major Memory leak           |Major memory leak with GIF
>                    |                            |wallpaper
>          Resolution|---                         |WAITINGFORINFO
>                  CC|                            |nate@kde.org,
>                    |                            |notmart@gmail.com,
>                    |                            |qydwhotmail@gmail.com
>           Component|general                     |Image Wallpaper
>
> --- Comment #1 from Nate Graham <nate@kde.org> ---
> Can you attach the GIF wallpaper that makes it happen for you?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Glenn Ivar Røsdal 2024-08-23 22:03:53 UTC
Created attachment 172895 [details]
attachment-2852559-0.html

It might take some time before the memory ramps up. Some of the users spent
15 -20 min before it started. For me was around 3min, with a few programs
up and running at the same time. I was using 2x 4k screens with that
wallpaper

fre. 23. aug. 2024, 23:37 skrev Vexy <trixxnet@gmail.com>:

>
> fre. 23. aug. 2024, 21:14 skrev Nate Graham <bugzilla_noreply@kde.org>:
>
>> https://bugs.kde.org/show_bug.cgi?id=492097
>>
>> Nate Graham <nate@kde.org> changed:
>>
>>            What    |Removed                     |Added
>>
>> ----------------------------------------------------------------------------
>>              Status|REPORTED                    |NEEDSINFO
>>             Summary|Major Memory leak           |Major memory leak with
>> GIF
>>                    |                            |wallpaper
>>          Resolution|---                         |WAITINGFORINFO
>>                  CC|                            |nate@kde.org,
>>                    |                            |notmart@gmail.com,
>>                    |                            |qydwhotmail@gmail.com
>>           Component|general                     |Image Wallpaper
>>
>> --- Comment #1 from Nate Graham <nate@kde.org> ---
>> Can you attach the GIF wallpaper that makes it happen for you?
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>
>
Comment 4 Nate Graham 2024-08-28 22:57:17 UTC
Thanks. on current git master, I'm unable to reproduce the issue after an hour with that wallpaper active. Let's call it fixed in Plasma 6.2, but if after upgrading to Plasma 6.2, you can still experience the issue, then feel free to re-open the bug report and we can investigate further. Perhaps it's an NVIDIA driver bug. I'm using an Intel HD630 iGPU, FWIW.
Comment 5 Glenn Ivar Røsdal 2024-08-29 04:05:34 UTC
Created attachment 173068 [details]
attachment-284659-0.html

Ok, I'll check it out. Due I have an gpu with intel as well.

tor. 29. aug. 2024, 00:57 skrev Nate Graham <bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=492097
>
> Nate Graham <nate@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>          Resolution|WAITINGFORINFO              |FIXED
>              Status|NEEDSINFO                   |RESOLVED
>    Version Fixed In|                            |6.2.0
>
> --- Comment #4 from Nate Graham <nate@kde.org> ---
> Thanks. on current git master, I'm unable to reproduce the issue after an
> hour
> with that wallpaper active. Let's call it fixed in Plasma 6.2, but if after
> upgrading to Plasma 6.2, you can still experience the issue, then feel
> free to
> re-open the bug report and we can investigate further. Perhaps it's an
> NVIDIA
> driver bug. I'm using an Intel HD630 iGPU, FWIW.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 6 Nate Graham 2025-02-24 20:19:17 UTC
*** Bug 500680 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2025-02-24 20:19:45 UTC
Got a new report in Bug 500680 from someone using Plasma 6.3.1; re-opening.
Comment 8 poryvay.vladik 2025-02-24 22:36:45 UTC
Created attachment 178846 [details]
GIF that has this memory leak. (BUG 500680)
Comment 9 Nate Graham 2025-02-26 19:12:01 UTC
That file is actually a .mp4 movie, not a GIF. Can you attach the GIF file that causes this?
Comment 10 poryvay.vladik 2025-02-26 21:16:32 UTC
(In reply to Nate Graham from comment #9)
> That file is actually a .mp4 movie, not a GIF. Can you attach the GIF file
> that causes this?

Just tested the gif that was thrown here earlier. (https://bugs.kde.org/attachment.cgi?id=172894)
It also has a memory leak. In 2-3 minutes, the system completely crashes. Perhaps this is a quirk of Nvidia?
Comment 11 Glenn Ivar Røsdal 2025-02-27 00:54:56 UTC
Created attachment 178933 [details]
attachment-2721165-0.html

I was starting to wonder if it was related to the resize bug that was
eating the memory. Not visited the issue since. Nor did i tinker with open
and closed drivers at that time. Pretty much ran everything in stock

ons. 26. feb. 2025, 22:16 skrev <bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=492097
>
> --- Comment #10 from poryvay.vladik@gmail.com ---
> (In reply to Nate Graham from comment #9)
> > That file is actually a .mp4 movie, not a GIF. Can you attach the GIF
> file
> > that causes this?
>
> Just tested the gif that was thrown here earlier.
> (https://bugs.kde.org/attachment.cgi?id=172894)
> It also has a memory leak. In 2-3 minutes, the system completely crashes.
> Perhaps this is a quirk of Nvidia?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 12 TraceyC 2025-04-10 17:29:16 UTC
I also tested with the Chill Mario animated gif wallpaper (https://bugs.kde.org/attachment.cgi?id=172894) on a system with an nvidia gpu, git-master Plasma, using the proprietary nvidia drivers
After a couple of hours, I see no memory leak. 

nvidia driver: 570.133.07
kernel: 6.12.21

If anyone is still seeing this, what specific nvidia driver do you have? Also, what kernel?
(If anyone is seeing this with a different gpu, please specify that)
Thanks
Comment 13 Glenn Ivar Røsdal 2025-04-11 03:59:50 UTC
Created attachment 180165 [details]
attachment-618535-0.html

I will test it with in 12 hours. Using the same distro as i originaly used
for 1.5 years now that is Cachyos. Then let you know.

tor. 10. apr. 2025, 19:51 skrev TraceyC <bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=492097
>
> TraceyC <kdedev@tlcnet.info> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|REPORTED                    |NEEDSINFO
>                  CC|                            |kdedev@tlcnet.info
>            Keywords|                            |efficiency-and-performance
>            See Also|                            |
> https://bugs.kde.org/show_b
>                    |                            |ug.cgi?id=480693
>          Resolution|---                         |WAITINGFORINFO
>
> --- Comment #12 from TraceyC <kdedev@tlcnet.info> ---
> I also tested with the Chill Mario animated gif wallpaper
> (https://bugs.kde.org/attachment.cgi?id=172894) on a system with an
> nvidia gpu,
> git-master Plasma, using the proprietary nvidia drivers
> After a couple of hours, I see no memory leak.
>
> nvidia driver: 570.133.07
> kernel: 6.12.21
>
> If anyone is still seeing this, what specific nvidia driver do you have?
> Also,
> what kernel?
> (If anyone is seeing this with a different gpu, please specify that)
> Thanks
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 14 Glenn Ivar Røsdal 2025-04-11 12:21:18 UTC
fre. 11. apr. 2025, 05:59 skrev Vexy <trixxnet@gmail.com>:

> Tested it now. Still a problem here. I did attach
>
> tor. 10. apr. 2025, 19:51 skrev TraceyC <bugzilla_noreply@kde.org>:
>
>> https://bugs.kde.org/show_bug.cgi?id=492097
>>
>> TraceyC <kdedev@tlcnet.info> changed:
>>
>>            What    |Removed                     |Added
>>
>> ----------------------------------------------------------------------------
>>              Status|REPORTED                    |NEEDSINFO
>>                  CC|                            |kdedev@tlcnet.info
>>            Keywords|
>> |efficiency-and-performance
>>            See Also|                            |
>> https://bugs.kde.org/show_b
>>                    |                            |ug.cgi?id=480693
>>          Resolution|---                         |WAITINGFORINFO
>>
>> --- Comment #12 from TraceyC <kdedev@tlcnet.info> ---
>> I also tested with the Chill Mario animated gif wallpaper
>> (https://bugs.kde.org/attachment.cgi?id=172894) on a system with an
>> nvidia gpu,
>> git-master Plasma, using the proprietary nvidia drivers
>> After a couple of hours, I see no memory leak.
>>
>> nvidia driver: 570.133.07
>> kernel: 6.12.21
>>
>> If anyone is still seeing this, what specific nvidia driver do you have?
>> Also,
>> what kernel?
>> (If anyone is seeing this with a different gpu, please specify that)
>> Thanks
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>
>
Comment 15 Glenn Ivar Røsdal 2025-04-11 12:23:14 UTC
Here you see my system is out of memory.



fre. 11. apr. 2025, 14:20 skrev Vexy <trixxnet@gmail.com>:

>
> fre. 11. apr. 2025, 05:59 skrev Vexy <trixxnet@gmail.com>:
>
>> Tested it now. Still a problem here. I did attach
>>
>> tor. 10. apr. 2025, 19:51 skrev TraceyC <bugzilla_noreply@kde.org>:
>>
>>> https://bugs.kde.org/show_bug.cgi?id=492097
>>>
>>> TraceyC <kdedev@tlcnet.info> changed:
>>>
>>>            What    |Removed                     |Added
>>>
>>> ----------------------------------------------------------------------------
>>>              Status|REPORTED                    |NEEDSINFO
>>>                  CC|                            |kdedev@tlcnet.info
>>>            Keywords|
>>> |efficiency-and-performance
>>>            See Also|                            |
>>> https://bugs.kde.org/show_b
>>>                    |                            |ug.cgi?id=480693
>>>          Resolution|---                         |WAITINGFORINFO
>>>
>>> --- Comment #12 from TraceyC <kdedev@tlcnet.info> ---
>>> I also tested with the Chill Mario animated gif wallpaper
>>> (https://bugs.kde.org/attachment.cgi?id=172894) on a system with an
>>> nvidia gpu,
>>> git-master Plasma, using the proprietary nvidia drivers
>>> After a couple of hours, I see no memory leak.
>>>
>>> nvidia driver: 570.133.07
>>> kernel: 6.12.21
>>>
>>> If anyone is still seeing this, what specific nvidia driver do you have?
>>> Also,
>>> what kernel?
>>> (If anyone is seeing this with a different gpu, please specify that)
>>> Thanks
>>>
>>> --
>>> You are receiving this mail because:
>>> You reported the bug.
>>
>>
Comment 16 Glenn Ivar Røsdal 2025-04-11 12:32:11 UTC
Had to reboot the system, to give you the system info

fre. 11. apr. 2025 kl. 14:22 skrev Vexy <trixxnet@gmail.com>:

> Here you see my system is out of memory.
>
>
>
> fre. 11. apr. 2025, 14:20 skrev Vexy <trixxnet@gmail.com>:
>
>>
>> fre. 11. apr. 2025, 05:59 skrev Vexy <trixxnet@gmail.com>:
>>
>>> Tested it now. Still a problem here. I did attach
>>>
>>> tor. 10. apr. 2025, 19:51 skrev TraceyC <bugzilla_noreply@kde.org>:
>>>
>>>> https://bugs.kde.org/show_bug.cgi?id=492097
>>>>
>>>> TraceyC <kdedev@tlcnet.info> changed:
>>>>
>>>>            What    |Removed                     |Added
>>>>
>>>> ----------------------------------------------------------------------------
>>>>              Status|REPORTED                    |NEEDSINFO
>>>>                  CC|                            |kdedev@tlcnet.info
>>>>            Keywords|
>>>> |efficiency-and-performance
>>>>            See Also|                            |
>>>> https://bugs.kde.org/show_b
>>>>                    |                            |ug.cgi?id=480693
>>>>          Resolution|---                         |WAITINGFORINFO
>>>>
>>>> --- Comment #12 from TraceyC <kdedev@tlcnet.info> ---
>>>> I also tested with the Chill Mario animated gif wallpaper
>>>> (https://bugs.kde.org/attachment.cgi?id=172894) on a system with an
>>>> nvidia gpu,
>>>> git-master Plasma, using the proprietary nvidia drivers
>>>> After a couple of hours, I see no memory leak.
>>>>
>>>> nvidia driver: 570.133.07
>>>> kernel: 6.12.21
>>>>
>>>> If anyone is still seeing this, what specific nvidia driver do you
>>>> have? Also,
>>>> what kernel?
>>>> (If anyone is seeing this with a different gpu, please specify that)
>>>> Thanks
>>>>
>>>> --
>>>> You are receiving this mail because:
>>>> You reported the bug.
>>>
>>>
Comment 17 Glenn Ivar Røsdal 2025-04-11 13:13:41 UTC
I tried to upload some images and a video, showing the whole process until it kills my system. Telling me it was fine to upload under 26mb, seems like it all failed. But yes nothing has changed so far of the issue here im sitting. Ate my 32Gb of ram within 5min, then i got a critical error that the kernel killed plasmashell.service

Linux 6.14.2-2-cachyos
KDE Plasma 6.3.4
Driver Version: 570.133.07
Comment 18 Glenn Ivar Røsdal 2025-04-11 13:55:31 UTC
Some of the community did go in and test it as well. 

One user tested on laptop with a AMD gpu, and it seemed fine. Then we made an even more agressive GIF file to replicate the issue, and it ate all the 32gb of ram in about 1min. We get more input on the problem later on. We have a user that has more experience in linux then me from the CachyOs distro community, that will come in with some input comments later on today. The other user will do some test, when comming home again. 

We think its tied to the Nvidia driver at this point.
Comment 19 Ambrosia 2025-04-11 17:00:54 UTC
CPU: Intel(R) Core(TM) i7-8700K CPU
GPU: NVIDIA GeForce RTX 3080 Ti
Driver Version: 570.133.07
OS: Arch Linux / CachyOS
Kernel: 6.14.1-2-cachyos #1 SMP PREEMPT_DYNAMIC

I can reproduce this issue; For testing, I made a simple 1920x1080 GIF wallpaper that merely consists of 2 frames and just a couple indexed colors.
After applying it to both my monitors, it took about 3-4 minutes for my 3080TI to reach 95% of memory usage (11.5GB of 12GB).

I will attach the btop++ memory output, as well as the wallpaper itself. Warning: it's not pretty, but it is *pretty effective*.
Comment 20 Ambrosia 2025-04-11 17:01:40 UTC
Created attachment 180179 [details]
3080TI, 11+ GB of VRAM used in 3-4 Minutes

3080TI, 11+ GB of VRAM used in 3-4 Minutes - btop++ output
Comment 21 Ambrosia 2025-04-11 17:02:31 UTC
Created attachment 180180 [details]
2-frame 1920x1080 GIF Wallpaper for testing

2-frame 1920x1080 GIF Wallpaper for testing, created in GIMP, small indexed color palette. Efficient at filling the VRAM up in minutes.
Comment 22 Bug Janitor Service 2025-04-26 03:47:21 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 23 TraceyC 2025-05-29 22:20:37 UTC
(In reply to Ambrosia from comment #21)
Thanks for the wallpaper for testing. Using this wallpaper, I was not able to reproduce the memory leak on two systems, on git-master
- One has an integrated AMD GPU
- The other has a discrete NVIDIA GPU and integrated Intel, using the proprietary NVIDIA drivers -  I added the wallpaper to two external displays

I'll leave this open so more experienced contributors can investigate further and try to narrow down the root cause
Comment 24 trolca 2025-07-21 22:40:07 UTC
(In reply to Ambrosia from comment #21)
This wallpaper and any other gif wallpaper still causes a memory leak for me on proprietary NVIDIA drivers (575.64.04) on a discrete GPU.
Comment 25 Nate Graham 2025-08-07 00:24:56 UTC
It's still likely a driver bug, but I'll leave this open on the off chance there's something we can do about it. Ultimately though NVIDIA should be investigating it.
Comment 26 David Edmundson 2025-10-08 13:47:15 UTC
There in an issue that is fixed in Qt 6.10

(https://invent.kde.org/qt/qt/qtdeclarative/-/commit/8c54efe9fb007701eff6c5caad3c4ee54c714dc5) 
This would have affected nvidia only as we force non-threaded rendering there.