Bug 455193 - When kwin_x11 is running, animated wallpapers will cause heavy (video) memory leak when QT_XCB_GL_INTEGRATION=xcb_glx
Summary: When kwin_x11 is running, animated wallpapers will cause heavy (video) memory...
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image Wallpaper (show other bugs)
Version: master
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-12 23:43 UTC by Fushan Wen
Modified: 2023-01-05 14:32 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:
qydwhotmail: X11+


Attachments
leak.png (1.40 MB, image/png)
2022-06-12 23:43 UTC, Fushan Wen
Details
no leak.png (1.88 MB, image/png)
2022-06-12 23:44 UTC, Fushan Wen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2022-06-12 23:43:52 UTC
Created attachment 149652 [details]
leak.png

SUMMARY
If I set an animated wallpaper plugin as background, the memory consumption will go high very quickly and make the system unresponsive. But if I stop kwin_x11, there is no leak.


STEPS TO REPRODUCE
1. Set an animated wallpaper as desktop background
2. Wait for 5 minutes
3. Leak

OBSERVED RESULT
leak.png

EXPECTED RESULT
No leak.png

SOFTWARE/OS VERSIONS
Information for package kwin5:
------------------------------
Repository     : @System
Name           : kwin5
Version        : 5.25.80git.20220611T135804~dc9c431f-ku.150.1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/KDE:Unstable
Installed Size : 16.8 MiB
Installed      : Yes
Status         : up-to-date
Source package : kwin5-5.25.80git.20220611T135804~dc9c431f-ku.150.1.src
Upstream URL   : http://www.kde.org
Summary        : KDE Window Manager
Description    : 
    KWin is the window manager of the K desktop environment.

ADDITIONAL INFORMATION
Animated wallpaper plugin is from https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1831
Comment 1 Fushan Wen 2022-06-12 23:44:20 UTC
Created attachment 149653 [details]
no leak.png

This is without kwin_x11 running.
Comment 2 Fushan Wen 2022-06-12 23:47:51 UTC
Disable compositing and the leak seems also gone.
Comment 3 Fushan Wen 2022-06-12 23:51:57 UTC
No, disabling compositing doesn't help.
Comment 4 Fushan Wen 2022-06-15 01:00:11 UTC
qt_xcb_gl_integration=xcb_egl fixes the leak.
Comment 5 Bug Janitor Service 2022-06-15 01:41:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1845
Comment 6 Nate Graham 2022-09-08 13:55:59 UTC
With my Intel HD 620 GPU, I just tried setting a gif as my wallpaper and I see no memory increase.
Comment 7 Fushan Wen 2022-09-08 14:25:59 UTC
Need a bug report from more users after Plasma 5.26 is released
Comment 9 adamska156 2022-10-16 03:55:06 UTC
I'm noticing this issue as well.  It's definitely the new wallpaper gif I've set. I was using an old unsupported plugin for my animated wallpaper and decided to switch to the official support and was pretty much instantly hit with this bug. It quickly fills up my 32GB system. It's inconsistent sometimes though. Sometimes it takes 10 minutes. Other times it takes an hour to fill up the system. Not sure what the trigger is for the memory to start leaking.
Comment 10 Wladimir Palant 2022-11-21 06:07:54 UTC
It seems that I am observing the same memory leak but with the task switcher visualization. Switching tasks permanently increases buffers/cache memory, /proc/sys/vm/drop_caches has no effect on it. That’s roughly 40 MB each time the Grid visualization shows up, and still 7 MB if Large Icons visualization is used. End effect is the system becoming unresponsive, happens roughly after a day for me.

Restarting kwin_x11 releases the memory. Starting kwin_x11 with QT_XCB_GL_INTEGRATION=xcb_egl appears to make the leak go away.

I have the kwin-x11-5.26.3-1.fc37.x86_64 package installed (Fedora 37). The CPU is Intel i7-1165G7. Additional Nvidia GeForce graphics card is present but not currently active.
Comment 11 Wladimir Palant 2022-11-24 15:12:19 UTC
I filed bug 462202 on the memory leak caused by task switcher visualization, just in case it is caused by a different root issue. I managed to create a reduced test case and attached it there.
Comment 12 Fushan Wen 2023-01-05 13:20:12 UTC
The leak is gone after updating Mesa to the latest version (22.3.2)