Bug 480693 - Major memory leak when changing wallpapers - nvidia
Summary: Major memory leak when changing wallpapers - nvidia
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image & Slideshow wallpaper plugins (show other bugs)
Version: 6.2.5
Platform: unspecified Linux
: HI major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: efficiency-and-performance, wayland-only
: 482483 486175 494063 499800 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-01 17:16 UTC by Nate Graham
Modified: 2025-04-10 17:29 UTC (History)
18 users (show)

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


Attachments
nvtop gpu memory (145.07 KB, image/avif)
2024-09-13 19:14 UTC, Dmitrii Chermnykh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2024-02-01 17:16:24 UTC
Everything from git master, Plasma 6 Wayland, Qt 6.6.0

Every time the wallpaper changes--either manually or via a slideshow-- plasmashell rises in memory usage for me by 20-100 Mb. It's quite dramatic and 100% reproducible.
Comment 1 Fushan Wen 2024-03-11 04:16:41 UTC
Cannot reproduce on X11. Is it fixed now?
Comment 2 Nate Graham 2024-03-11 15:36:37 UTC
It doesn't seem to be happening anymore, indeed.
Comment 3 vinkmr 2024-05-03 00:16:26 UTC
I am still running into the same issue.
Switching to 'Image Wallpaper type' works as workaround. I can also get the memory usage down by restarting the plasmashell via cmdline.
Comment 4 Nate Graham 2024-05-06 20:40:19 UTC
*** Bug 482483 has been marked as a duplicate of this bug. ***
Comment 5 vinkmr 2024-05-07 11:39:56 UTC
*** Bug 486175 has been marked as a duplicate of this bug. ***
Comment 6 vinkmr 2024-05-07 11:44:15 UTC
(In reply to Nate Graham from comment #4)
> *** Bug 482483 has been marked as a duplicate of this bug. ***

Is there anyway I can provide any logs?
I had this issue in Plasma 5 as well on WayLand.

OS: Fedora Linux 40 (KDE Plasma) x86_64
Kernel: 6.8.8-300.fc40.x86_64
DE: Plasma 6.0.4CPU: Intel i7-8750H (12) @ 4.100GHz 
GPU: Intel CoffeeLake-H GT2 [UHD Graphics 630] 
GPU: NVIDIA GeForce GTX 1070 Mobile
Comment 7 Nate Graham 2024-05-07 16:48:50 UTC
FWIW I can't personally reproduce this anymore with current git master. For me, when using a slideshow wallpaper, the memory usage goes up during the transition to a new wallpaper, but then it drops after the transition completes. Often it drops to a level lower than it was at before, in fact. Feels like there's some garbage collecting going on when switching.
Comment 8 Nate Graham 2024-05-07 16:58:37 UTC
While investigating and testing, I did notice a small leak with notifications though, for which I've opened Bug 486743.
Comment 9 unhappy-ending 2024-05-10 09:27:40 UTC
(In reply to Nate Graham from comment #7)
> FWIW I can't personally reproduce this anymore with current git master. For
> me, when using a slideshow wallpaper, the memory usage goes up during the
> transition to a new wallpaper, but then it drops after the transition
> completes. Often it drops to a level lower than it was at before, in fact.
> Feels like there's some garbage collecting going on when switching.

What version will current git master be released as?
Comment 10 Ilya Bizyaev 2024-05-10 09:36:57 UTC
This is still happening for me with git master FWIW, I don't think it's been fixed there.
Comment 11 Kai Uwe Broulik 2024-05-10 09:56:11 UTC
Yup, I am seeing a 60 MiB leak in heaptrack in the wallpaper stuff...
Comment 12 Kai Uwe Broulik 2024-05-10 10:08:08 UTC
But I cannot reproduce it rising as I change wallpapers
Comment 13 unhappy-ending 2024-05-10 10:19:54 UTC
(In reply to Kai Uwe Broulik from comment #12)
> But I cannot reproduce it rising as I change wallpapers

Can you reproduce it with slide show?
Comment 14 vinkmr 2024-05-15 21:13:13 UTC
(In reply to unhappy-ending from comment #13)
> (In reply to Kai Uwe Broulik from comment #12)
> > But I cannot reproduce it rising as I change wallpapers
> 
> Can you reproduce it with slide show?

Yup, I can. To make it quicker, setting the transition time to a few seconds does it.
Additionally, I am using two displays, one is my in-built laptop 1080p screen and an external 4K screen connected via HDMI.
I am using proprietary NVIDIA drivers.
Comment 15 vinkmr 2024-06-22 12:21:12 UTC
I upgraded to plasma 6.1 yesterday, so far the issue seems to be gone.
Comment 16 Ilya Bizyaev 2024-06-22 16:27:26 UTC
Not fixed for me, even in master.
Comment 17 unhappy-ending 2024-06-23 03:54:38 UTC
(In reply to Ilya Bizyaev from comment #16)
> Not fixed for me, even in master.

Same for me, still happening on 6.1
Comment 18 vinkmr 2024-06-23 18:14:25 UTC
FYI, someone mentioned that this might have been issue with the version of Qt installed.
This is what I have right now, and I no longer have the same memory leak issue.

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.5-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Manufacturer: Micro-Star International Co., Ltd.
Product Name: GE63 Raider RGB 8RF
System Version: REV:1.0
Comment 19 Ilya Bizyaev 2024-06-23 19:38:14 UTC
I have the exact same version of Qt, but can still easily reproduce the issue using the steps from https://bugs.kde.org/show_bug.cgi?id=486175.
Comment 20 unhappy-ending 2024-06-24 02:33:46 UTC
(In reply to vinkmr from comment #18)
> FYI, someone mentioned that this might have been issue with the version of
> Qt installed.
> This is what I have right now, and I no longer have the same memory leak
> issue.
> 
> Operating System: Fedora Linux 40
> KDE Plasma Version: 6.1.0
> KDE Frameworks Version: 6.3.0
> Qt Version: 6.7.1
> Kernel Version: 6.9.5-200.fc40.x86_64 (64-bit)
> Graphics Platform: Wayland
> Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
> Memory: 15.5 GiB of RAM
> Graphics Processor: Mesa Intel® UHD Graphics 630
> Manufacturer: Micro-Star International Co., Ltd.
> Product Name: GE63 Raider RGB 8RF
> System Version: REV:1.0

I had it with 6.7.1 and when I confirmed it's still an issue was with 6.7.2.
Comment 21 deags 2024-07-06 04:32:18 UTC
Seeing same issue on Arch *Garuda* with Plasma 6.1.2 - Setting wallpaper to 1sec change will raise plasmashell to 8gb + in a few minutes.
No such issue when slideshow is disabled.
Comment 22 Carsten Idemans 2024-08-08 00:03:43 UTC
Same here, I noticed when plasmashell was killed by oom-killer.

Plasma version: 6.1.3
Qt Version: 6.7.2
Wayland session
Had slideshow wallpapers enabled every 10 mins.

Now I inspect and can see it climbs rapidly at each change, so I set Image wallpaper for now.

Also now notice plasmashell memory usage climbs by tens of MB's when simply interacting with taskbar, hovering on window icons, viewing window previews, opening systemtray etc, never seems to release it, just climbs.


I never had the problem until I upgraded to Plasma 6.
Comment 23 Dmitrii Chermnykh 2024-09-13 19:12:36 UTC
I've noticed the same problem + major GPU memory leak on 6.1.90 (probably caused by the same problem, on some drivers GPU memory is shared with RAM or swapped into RAM)
Comment 24 Dmitrii Chermnykh 2024-09-13 19:14:21 UTC
Created attachment 173637 [details]
nvtop gpu memory

before [1] - GPU usage after plasmashell restart
[1] - setting wallpaper 1
[2] - setting wallpaper 2
[3] - setting wallpaper 1
[4] - setting wallpaper 2
Comment 25 Adam 2024-12-15 20:33:47 UTC
Bug still occurs for me on Wayland, but doesn't (and didn't)  on X11

Os: Arch Linux 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.4-arch1-1 (64-bit)
Graphics Platform: Wayland

proprietary NVIDIA drivers
Also on 4k TV through HDMI
Comment 26 TheFeelTrain 2024-12-31 00:10:03 UTC
Also happening for my friend on EndeavourOS.

Operating System: EndeavourOS 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.7-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X3D 8-Core Processor
Memory: 15,5 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2

Seems to be NVIDIA-only, I have been running slideshow on my AMD GPU all year long with no issues.
Comment 27 Dick Tracey 2025-01-19 00:55:28 UTC
Memory leak when using slideshow wallpaper is consistently happening here with plasmashell 6.2.5 on Arch Linux.
Using nvidia-open drivers 565.77.
Comment 28 Dick Tracey 2025-01-19 00:56:59 UTC
(In reply to Dick Tracey from comment #27)
> Memory leak when using slideshow wallpaper is consistently happening here
> with plasmashell 6.2.5 on Arch Linux.
> Using nvidia-open drivers 565.77.

A bit more information on my setup: using kwin_wayland 6.2.5, qt 6.8.1
Comment 29 TraceyC 2025-02-12 16:28:13 UTC
*** Bug 494063 has been marked as a duplicate of this bug. ***
Comment 30 TraceyC 2025-02-12 16:28:38 UTC
*** Bug 499800 has been marked as a duplicate of this bug. ***
Comment 31 reports_go_brrr 2025-02-15 00:38:39 UTC
Completely reproducible.

Operating System: Arch Linux
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.13.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 32 reports_go_brrr 2025-02-15 03:30:16 UTC
Need to mention that Memory leak is present only on Wayland session, X11 is not affected.

Operating System: Arch Linux 
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.13.2-arch1-1 (64-bit)
Graphics Platform: X11