Bug 242457

Summary: KWin blur effect has memory leak
Product: [Plasma] kwin Reporter: Andreas Kuhl <mail>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: hazica, shiningarcanine, vkrevs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: sysprof profile with blur
sysprof profile without the blur effect enabled

Description Andreas Kuhl 2010-06-22 10:11:43 UTC
Version:           unspecified (using Devel) 
OS:                Linux

I run KWin with compositing and blur effect enabled. KDE's overall memory consumption increases from ~900 MB to over 1.9 GB, then the system becomes quite unresponsive dued to swapping. Restarting KWin lets the memory consumption drop back to ~900MB.
I tried to pinpoint the error source by disabling plugins one by one. When I disable the blur plugin, the memory consumption no longer increases. Turning it back on makes the problem occur again.

Reproducible: Always



Expected Results:  
Memory consumtion would stay somewhat stable.
Comment 1 Andreas Kuhl 2010-06-22 10:17:50 UTC
Additional information: KWins memory consumption seems to stay more or less stable but Xorgs memory footprint grows insanely large. Nevertheless I think the problem lies within KWin as Xorgs memory consumption drops when restarting KWin.

I run an ATI MobilityRadion X1800 graphics card with the legacy fglrx driver. Unfortunally, I cannot test with radeon driver since it won't work with my graphics card.
Next week I will (hopefully) recieve my new laptop and can test with the latest fglrx driver if this makes any difference.
Comment 2 Andreas Kuhl 2010-06-22 10:18:40 UTC
Running KWin REV 1139384.
Comment 3 Max 2010-07-18 10:06:13 UTC
Created attachment 49276 [details]
sysprof profile with blur
Comment 4 Max 2010-07-18 10:06:58 UTC
Created attachment 49277 [details]
sysprof profile without the blur effect enabled
Comment 5 Max 2010-07-18 10:16:43 UTC
I finally got round to running sysprof on my system. I did 6 tests, 3 with blur, 3 without, under the same stress conditions(5 open windows, a bit of moving them about, resizing, etc). I've only attached two files here, because the others are almost identical.  The conclusion of the tests?

Kwin stays at about 34% under normal load, without the blur plugin. With it enabled, it skyrockets to 55%(a good 70% more than without blur.) I'll also attach some screenshots of the test results, in order for you to be able to catch an easier glimpse of them.
Comment 6 Max 2010-07-18 10:19:06 UTC
Oh, crap, people. Wrong tab!!! could someone please delete these comments? I'm really sorry.
Comment 7 Andreas Kuhl 2010-11-26 10:39:54 UTC
Seems fixed now in KDE SC 4.6 Beta 1. At least, no longer any suspicious memory/cpu consumption...
Comment 8 Richard 2010-12-10 20:16:22 UTC
*** Bug 250398 has been marked as a duplicate of this bug. ***
Comment 9 Richard 2010-12-10 20:19:17 UTC
(In reply to comment #7)
> Seems fixed now in KDE SC 4.6 Beta 1. At least, no longer any suspicious
> memory/cpu consumption...

Is it possible for this fix to be backported to 4.5.5? It is a major usability issue considering that Blur is enabled by default and it is not obvious that Blur is the cause.