Bug 242985 - 4.5's Blur effect causes high CPU consumption for KWin
Summary: 4.5's Blur effect causes high CPU consumption for KWin
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: git master
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 240360 248562 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-28 00:47 UTC by markuss
Modified: 2010-09-26 13:45 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
glxinfo (18.67 KB, application/octet-stream)
2010-07-05 16:02 UTC, G Cohen
Details
glxinfo (24.16 KB, application/octet-stream)
2010-07-23 17:26 UTC, adibudeen
Details
glxinfo (7.43 KB, text/plain)
2010-09-26 09:20 UTC, Anshul Jain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markuss 2010-06-28 00:47:11 UTC
Version:           SVN (using Devel) 
OS:                Linux

With the new Blur effect (enabled by default) the smallest things such as scrolling with the text cursor through a text input field in Rekonq and Firefox cause KWin to consume roughly 20% CPU on a Core2 Duo 2GHz.

Reproducible: Always




openSUSE 11.2, 32 bit with mostly default packages (Xorg 7.4)
NVidia GeForce 9200M with v195.36.24 drivers.
OpenGL compositing.
KDE SC 4.5rc1.
Comment 1 markuss 2010-06-29 00:20:32 UTC
Don't know if it's of any relevance, but the bug is still the same with the new NVidia v256.35 drivers.
Comment 2 vaniaz 2010-07-01 15:21:57 UTC
I too experience this bug. kde 4.5 rc1, opensuse 11.2 x86_64. My cpu is core i7 820. At first, everything is ok, but after few hours system becomes extremly slow(and cpu is loaded for 20% or more). Disabling blur restores system performance
Comment 3 markuss 2010-07-02 09:14:49 UTC
According to http://blog.martin-graesslin.com/blog/2010/06/prblems-with-desktop-effects-in-rc1/ it's a driver bug.
Comment 4 Martin Flöser 2010-07-02 22:26:45 UTC
(In reply to comment #3)
> According to
> http://blog.martin-graesslin.com/blog/2010/06/prblems-with-desktop-effects-in-rc1/
> it's a driver bug.
No that blog post is not related to this bug report.
Comment 5 Martin Flöser 2010-07-05 15:32:27 UTC
SVN commit 1146195 by graesslin:

Support for adding a driver blacklist to be used in the lanczos filter and blur effect.
It uses a new config group Blacklist in kwinrc with two subgroups for Lanczos and Blur.
The key of each entry in the group referrences the vendor either using GL_VENDOR or GL_RENDERER, e.g. "Intel" in renderer for Intel based chips.
The value of the entries is a stringlist containing exactly the renderer information. This way it is possible to blacklist several mesa driver versions which are buggy.
The blacklist is currently empty and will be filled with a kconf update script (which could also be done by distributions). So all users who experience problems and are subscribed to the bugs receiving this message, please upload your glxinfo.
An example for a blacklist:
[Blacklist][Lanczos]
NVIDIA=GeForce 9400M/PCI/SSE2

CCBUG: 243181
CCBUG: 242985

 M  +11 -1     effects/blur/blur.cpp  
 M  +9 -0      lanczosfilter.cpp  
 M  +32 -0     lib/kwineffects.cpp  
 M  +10 -0     lib/kwineffects.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1146195
Comment 6 Martin Flöser 2010-07-05 15:37:16 UTC
SVN commit 1146196 by graesslin:

Backport rev 1146195:
Support for adding a driver blacklist to be used in the lanczos filter and blur effect.
It uses a new config group Blacklist in kwinrc with two subgroups for Lanczos and Blur.
The key of each entry in the group referrences the vendor either using GL_VENDOR or GL_RENDERER, e.g. "Intel" in renderer for Intel based chips.
The value of the entries is a stringlist containing exactly the renderer information. This way it is possible to blacklist several mesa driver versions which are buggy.
The blacklist is currently empty and will be filled with a kconf update script (which could also be done by distributions). So all users who experience problems and are subscribed to the bugs receiving this message, please upload your glxinfo.
An example for a blacklist:
[Blacklist][Lanczos]
NVIDIA=GeForce 9400M/PCI/SSE2
    
CCBUG: 243181
CCBUG: 242985



 M  +11 -1     effects/blur/blur.cpp  
 M  +9 -0      lanczosfilter.cpp  
 M  +32 -0     lib/kwineffects.cpp  
 M  +10 -0     lib/kwineffects.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1146196
Comment 7 G Cohen 2010-07-05 16:02:46 UTC
Created attachment 48607 [details]
glxinfo
Comment 8 Martin Flöser 2010-07-15 20:59:20 UTC
SVN commit 1150353 by graesslin:

Intel drivers add a whitespace at the end of the renderer string which makes it impossible to get a good blacklist with equal comparison.
So let's switch to a contains check, which makes it easier to have a blacklist, e.g. just GeForce.
CCBUG: 243181
CCBUG: 242985

 M  +9 -4      kwineffects.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1150353
Comment 9 Martin Flöser 2010-07-15 21:01:14 UTC
SVN commit 1150354 by graesslin:

Backport rev 1150353:
Intel drivers add a whitespace at the end of the renderer string which makes it impossible to get a good blacklist with equal comparison.
So let's switch to a contains check, which makes it easier to have a blacklist, e.g. just GeForce.
CCBUG: 243181
CCBUG: 242985



 M  +9 -4      kwineffects.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1150354
Comment 10 Martin Flöser 2010-07-15 22:42:30 UTC
SVN commit 1150382 by graesslin:

First version of blacklist update script.
It blacklists for Lanczos
Intel: GM45 Express with Mesa 7.8.2 and 965GM with Mesa 7.7.1 and 7.8.2
Ati: DRI R600 with Mesa 7.8.1 and 7.8.2

For Blur
Intel: currently no card (we have to block all cards in the effect)
Ati: Mesa drivers as for Lanczos and Radeon HD 3650 with fglrx driver 3.3.9901
NVIDIA: GeForce 6150 with driver series 195

This is what I could read from the bug reports. There must be more versions which have to be blacklisted.
Please post your glxinfo for your cards to the bug report if it is not yet in the list.
I do not yet backport the blacklist to branch in the hope to get more versions for the list.
BUG: 243181
BUG: 242985

 M  +2 -2      CMakeLists.txt  
 AM            kwin_blacklist.sh  
 A             kwin_blacklist.upd  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1150382
Comment 11 markuss 2010-07-23 00:30:21 UTC
*** Bug 240360 has been marked as a duplicate of this bug. ***
Comment 12 adibudeen 2010-07-23 17:26:17 UTC
Created attachment 49439 [details]
glxinfo

I experience this bug with an Nvidia GeForce 9500 GT/PCI/SSE2 and driver 195.36.24
Comment 13 Martin Flöser 2010-07-27 20:41:16 UTC
SVN commit 1155625 by graesslin:

Backport the driver blacklist for Lanczos and blur filter to 4.5 branch.
CCBUG: 243181
CCBUG: 242985



 M  +2 -2      CMakeLists.txt  
 AM            kwin_blacklist.sh  
 A             kwin_blacklist.upd  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1155625
Comment 14 adibudeen 2010-08-05 08:17:19 UTC
Strangely, my problem appears to be gone now, although I am not sure why.
Comment 15 Alejandro Nova 2010-08-19 21:03:38 UTC
Right before release (4.4.95, before SVN 1155625) the blur performance on my laptop improved (GeForce 6150, 256 series drivers). However, it still stays low, because of a lack of optimizations and the low performance of GeForce 6150 (after all, Windows 7 blur performance wasn't stellar here, and Vista's blur performance was abysmal, also, KDE, Vista and 7 kept the GPU running at maximum speed).

I suggest you, however, to remove the blacklist for blur under 256 series drivers. The bug that made the blur performance painful here (an arrange of NVIDIA memory leaks) is fixed. Also, to have a low performance platform enables you to optimize more ;).
Comment 16 Alejandro Nova 2010-08-19 21:11:43 UTC
Also, if I remove my card from the blacklist, the idle performance stays at 15%, sometimes hovering at 20%. Again, this is an unoptimized setup (Blur tries to blur behind my Chrome opaque window).
Comment 17 Martin Flöser 2010-08-21 07:38:39 UTC
*** Bug 248562 has been marked as a duplicate of this bug. ***
Comment 18 Francisco Villalobos 2010-09-13 20:03:10 UTC
Please include the Intel 945GM video card (a.k.a. GMA 950 27A2) because freezes the entire plasma desktop.

This is the full info (lspci)>

Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller  Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)(rev 03)
Comment 19 Unknown 2010-09-26 06:37:08 UTC
Nvidia GTX480 here, using drivers 260.19.04. Blur effect still eats up performance.
Comment 20 Anshul Jain 2010-09-26 09:16:53 UTC
Hi,
I'm using an Intel 450MHD graphics card on KDE 4.5.1 (openSUSE 11.2). The output from  grep KWin::CompositingPrefs::detectDriverAndVersion ~/.xsession-errors says:-

kwin(10839) KWin::CompositingPrefs::detectDriverAndVersion: GL version is "2.1 Mesa 7.8.2" 
kwin(10839) KWin::CompositingPrefs::detectDriverAndVersion: Detected driver "intel" , version "20100328" 
kwin(10839) KWin::CompositingPrefs::detectDriverAndVersion: GL vendor is "Tungsten Graphics, Inc" 
kwin(10839) KWin::CompositingPrefs::detectDriverAndVersion: GL renderer is "Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20100328 2010Q1 x86/MMX/SSE2" 
kwin(10839) KWin::CompositingPrefs::detectDriverAndVersion: GL version is "2.1 Mesa 7.8.2" 
kwin(10839) KWin::CompositingPrefs::detectDriverAndVersion: Detected driver "intel" , version "20100328" 

I tried to blacklist the graphics card in ~/.kde4/share/config/kwinrc and added the line:-


[Blacklist][Lanczos]
Intel=Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20100328 2010Q1 x86/MMX/SSE2:-:2.1 Mesa 7.8.2

However, I still get a plasma freeze when I change anything in systemsettings. Can someone help me on what am I doing incorrectly in the blacklist entry?
Comment 21 Anshul Jain 2010-09-26 09:20:49 UTC
Created attachment 51999 [details]
glxinfo
Comment 22 Thomas Lübking 2010-09-26 13:45:19 UTC
@anshui
you likely encounter bug #241402, which is entirely unrelated to this item