Bug 313016 - aurorae decorations are slow with native graphicssystem
Summary: aurorae decorations are slow with native graphicssystem
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: aurorae (show other bugs)
Version: 4.9.97 (RC 2)
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 318567 320210 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-10 13:46 UTC by Laurent Bonnaud
Modified: 2013-05-24 13:48 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Bonnaud 2013-01-10 13:46:52 UTC
I use the focus follows mouse setting and the plastik theme.  When I hover the mouse over several windows the decoration change that shows the new active window is very slow to draw.

Here are several facts to narrow the problem down:
 - it occurs only with KDE 4.10 beta, RC1 and RC2.  I never had such a problem with previous KDE4 versions (4.0 to 4.9)
 - it occurs with the plastik decoration.  The oxygen decoration does not have such a problem.

Here are details about my system:
 - Ubuntu 12.10
 - graphic card: ATI RV635 [Mobility Radeon HD 3650]
 - radeon driver from Ubuntu 12.10 (I also tried git drivers from the oibaf PPA)


Reproducible: Always
Comment 1 Thomas Lübking 2013-01-10 13:50:48 UTC
Please provide the output of "qdbus org.kde.kwin /KWin supportInformation"
Do other aurorae decorations (what you get via "get more decorations...") show the same issue?
Comment 2 Laurent Bonnaud 2013-01-11 10:40:35 UTC
Here it is:

$ qdbus org.kde.kwin /KWin supportInformation
KWin Support Information:
The following information should be used when requesting support on e.g. http://forum.kde.org.
It provides information about the currently running instance, which options are used,
what OpenGL driver and which effects are running.
Please post the information provided underneath this introductory text to a paste bin service
like http://paste.kde.org instead of pasting into support threads.

==========================

Options
=======
focusPolicy: 2
nextFocusPrefersMouse: false
clickRaise: false
autoRaise: false
autoRaiseInterval: 750
delayFocusInterval: 0
shadeHover: true
shadeHoverInterval: 250
separateScreenFocus: false
activeMouseScreen: true
placement: 4
focusPolicyIsReasonable: false
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
showDesktopIsMinimizeAll: false
rollOverDesktops: true
focusStealingPreventionLevel: 0
legacyFullscreenSupport: false
operationTitlebarDblClick: 
commandActiveTitlebar1: 0
commandActiveTitlebar2: 1
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 5
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8                                                                                                              
commandWindow3: 8                                                                                                              
commandWindowWheel: 31                                                                                                         
commandAll1: 10                                                                                                                
commandAll2: 3                                                                                                                 
commandAll3: 14                                                                                                                
keyCmdAllModKey: 16777251                                                                                                      
showGeometryTip: false                                                                                                         
condensedTitle: false                                                                                                          
electricBorders: false                                                                                                         
electricBorderDelay: 150                                                                                                       
electricBorderCooldown: 350                                                                                                    
electricBorderPushbackPixels: 1                                                                                                
electricBorderMaximize: false                                                                                                  
electricBorderTiling: true                                                                                                     
electricBorderCornerRatio: 0.25                                                                                                
borderlessMaximizedWindows: false                                                                                              
killPingTimeout: 5000                                                                                                          
hideUtilityWindowsForInactive: false                                                                                           
inactiveTabsSkipTaskbar: false                                                                                                 
autogroupSimilarWindows: false                                                                                                 
autogroupInForeground: true                                                                                                    
compositingMode: 1                                                                                                             
useCompositing: false                                                                                                          
compositingInitialized: false                                                                                                  
hiddenPreviews: 1                                                                                                              
unredirectFullscreen: false                                                                                                    
glSmoothScale: 2                                                                                                               
glVSync: true                                                                                                                  
colorCorrected: false                                                                                                          
xrenderSmoothScale: false                                                                                                      
maxFpsInterval: 17                                                                                                             
refreshRate: 0                                                                                                                 
vBlankTime: 6144                                                                                                               
glDirect: true
glStrictBinding: true
glStrictBindingFollowsDriver: true
glLegacy: false

Compositing
===========
Qt Graphics System: native
Compositing is not active
Comment 3 Martin Flöser 2013-01-11 10:49:05 UTC
Don't use native with Aurorae themes. Better use the raster system.

And maybe Thomas was right to not replace Plastik by something that requires raster ;-)
Comment 4 Laurent Bonnaud 2013-01-11 11:06:35 UTC
There are many aurorae variants.  I installed the most popular that is this one:

Air-oxygen 0.4  
Window Decoration Aurorae

BTW when switching theme kwin crashed with this backtrace:

Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb1c50980 (LWP 27633))]

Thread 3 (Thread 0xaf753b40 (LWP 6326)):
#0  0xb772c424 in __kernel_vsyscall ()
#1  0xb2c0796b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb74ee64c in __pthread_cond_wait (cond=0xb6721670 <QTWTF::pageheap_memory+20720>, mutex=0xb6721658 <QTWTF::pageheap_memory+20696>) at forward.c:139
#3  0xb660f1cd in QTWTF::TCMalloc_PageHeap::scavengerThread (this=this@entry=0xb671c580 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#4  0xb660f1ff in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0xb671c580 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#5  0xb2c03d4c in start_thread (arg=0xaf753b40) at pthread_create.c:308
#6  0xb74e0d3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xae248b40 (LWP 6327)):
#0  0xb2c37dcd in __GI_clock_gettime (clock_id=1, tp=0xae248088) at ../sysdeps/unix/clock_gettime.c:116
#1  0xb5e6bfb5 in do_gettime (frac=0xae248080, sec=0xae248078) at tools/qelapsedtimer_unix.cpp:123
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#3  0xb5f5336e in QTimerInfoList::updateCurrentTime (this=0xaee00b34) at kernel/qeventdispatcher_unix.cpp:343
#4  0xae24818c in ?? ()
#5  0x00000000 in ?? ()

Thread 1 (Thread 0xb1c50980 (LWP 27633)):
[KCrash Handler]
#7  0xb6a5f6ce in QDeclarativeItem::~QDeclarativeItem (this=0x9e80460, __in_chrg=<optimized out>) at graphicsitems/qdeclarativeitem.cpp:1668
#8  0xb6a1e124 in ~QDeclarativeElement (this=0x9e80460, __in_chrg=<optimized out>) at ../../include/QtDeclarative/../../src/declarative/qml/qdeclarativeprivate.h:87
#9  QDeclarativePrivate::QDeclarativeElement<QDeclarativeItem>::~QDeclarativeElement (this=0x9e80460, __in_chrg=<optimized out>) at ../../include/QtDeclarative/../../src/declarative/qml/qdeclarativeprivate.h:87
#10 0xb5f34783 in qDeleteInEventHandler (o=o@entry=0x9e80460) at kernel/qobject.cpp:4277
#11 0xb5f36f10 in QObject::event (this=0x9e80460, e=0x9e62428) at kernel/qobject.cpp:1176
#12 0xb6a59ad4 in QDeclarativeItem::event (this=0x9e80460, ev=0x9e62428) at graphicsitems/qdeclarativeitem.cpp:3748
#13 0xb541139c in QApplicationPrivate::notify_helper (this=0x98e9070, receiver=0x9e80460, e=0x9e62428) at kernel/qapplication.cpp:4562
#14 0xb5415daf in QApplication::notify (this=0x9e62428, receiver=0x9e80460, e=0x9e62428) at kernel/qapplication.cpp:3944
#15 0xb719d2b1 in KApplication::notify (this=0xbfeebf78, receiver=0x9e80460, event=0x9e62428) at ../../kdeui/kernel/kapplication.cpp:311
#16 0xb7629e7f in notify (e=0x9e62428, o=0x9e80460, this=0xbfeebf78) at ../../kwin/main.cpp:371
#17 KWin::Application::notify (this=0xbfeebf78, o=0x9e80460, e=0x9e62428) at ../../kwin/main.cpp:367
#18 0xb5f2078e in QCoreApplication::notifyInternal (this=0xbfeebf78, receiver=0x9e80460, event=0x9e62428) at kernel/qcoreapplication.cpp:915
#19 0xb5f2497d in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#20 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x988a130) at kernel/qcoreapplication.cpp:1539
#21 0xb5f24c0c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1432
#22 0xb54c882d in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#23 QEventDispatcherX11::processEvents (this=0x98e9050, flags=...) at kernel/qeventdispatcher_x11.cpp:75
#24 0xb5f1f26c in QEventLoop::processEvents (this=this@entry=0xbfeebdf8, flags=...) at kernel/qeventloop.cpp:149
#25 0xb5f1f561 in QEventLoop::exec (this=0xbfeebdf8, flags=...) at kernel/qeventloop.cpp:204
#26 0xb5f24cba in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#27 0xb540efc4 in QApplication::exec () at kernel/qapplication.cpp:3823
#28 0xb762c901 in kdemain (argc=3, argv=0xbfeec064) at ../../kwin/main.cpp:537
#29 0x0804855b in main (argc=3, argv=0xbfeec064) at kwin_dummy.cpp:3

Then System settings crashed with this backtrace:

Application: System Settings (systemsettings), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb1ec5740 (LWP 6463))]

Thread 3 (Thread 0xae71eb40 (LWP 6464)):
#0  0xb2fdddcd in __GI_clock_gettime (clock_id=1, tp=0xae71df68) at ../sysdeps/unix/clock_gettime.c:116
#1  0xb5f72fb5 in do_gettime (frac=0xae71df60, sec=0xae71df58) at tools/qelapsedtimer_unix.cpp:123
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#3  0xb605a36e in QTimerInfoList::updateCurrentTime (this=0xade02074) at kernel/qeventdispatcher_unix.cpp:343
#4  0x7fffffff in ?? ()
#5  0xb605a6fa in QTimerInfoList::timerWait (this=0xade02074, tm=...) at kernel/qeventdispatcher_unix.cpp:450
#6  0x7fffffff in ?? ()

Thread 2 (Thread 0xadd19b40 (LWP 6465)):
#0  0xb7756424 in __kernel_vsyscall ()
#1  0xb32de96b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb5d1664c in __pthread_cond_wait (cond=0xb44e0670 <QTWTF::pageheap_memory+20720>, mutex=0xb44e0658 <QTWTF::pageheap_memory+20696>) at forward.c:139
#3  0xb43ce1cd in QTWTF::TCMalloc_PageHeap::scavengerThread (this=this@entry=0xb44db580 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359
#4  0xb43ce1ff in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0xb44db580 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464
#5  0xb32dad4c in start_thread (arg=0xadd19b40) at pthread_create.c:308
#6  0xb5d08d3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb1ec5740 (LWP 6463)):
[KCrash Handler]
#7  0xb3e276ce in QDeclarativeItem::~QDeclarativeItem (this=0x8a0c170, __in_chrg=<optimized out>) at graphicsitems/qdeclarativeitem.cpp:1668
#8  0xb3de6124 in ~QDeclarativeElement (this=0x8a0c170, __in_chrg=<optimized out>) at ../../include/QtDeclarative/../../src/declarative/qml/qdeclarativeprivate.h:87
#9  QDeclarativePrivate::QDeclarativeElement<QDeclarativeItem>::~QDeclarativeElement (this=0x8a0c170, __in_chrg=<optimized out>) at ../../include/QtDeclarative/../../src/declarative/qml/qdeclarativeprivate.h:87
#10 0xb603b783 in qDeleteInEventHandler (o=o@entry=0x8a0c170) at kernel/qobject.cpp:4277
#11 0xb603df10 in QObject::event (this=0x8a0c170, e=0x87fadf0) at kernel/qobject.cpp:1176
#12 0xb3e21ad4 in QDeclarativeItem::event (this=0x8a0c170, ev=0x87fadf0) at graphicsitems/qdeclarativeitem.cpp:3748
#13 0xb661439c in QApplicationPrivate::notify_helper (this=0x84e87a0, receiver=0x8a0c170, e=0x87fadf0) at kernel/qapplication.cpp:4562
#14 0xb6618daf in QApplication::notify (this=0x87fadf0, receiver=0x8a0c170, e=0x87fadf0) at kernel/qapplication.cpp:3944
#15 0xb71882b1 in KApplication::notify (this=0xbfb97dfc, receiver=0x8a0c170, event=0x87fadf0) at ../../kdeui/kernel/kapplication.cpp:311
#16 0xb602778e in QCoreApplication::notifyInternal (this=0xbfb97dfc, receiver=0x8a0c170, event=0x87fadf0) at kernel/qcoreapplication.cpp:915
#17 0xb602b97d in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#18 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=52, data=0x84a0130) at kernel/qcoreapplication.cpp:1539
#19 0xb602bc0c in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=52) at kernel/qcoreapplication.cpp:1432
#20 0xb602bced in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1194
#21 0xb6611fc4 in QApplication::exec () at kernel/qapplication.cpp:3823
#22 0x08050422 in main (argc=5, argv=0xbfb97ed4) at ../../../systemsettings/app/main.cpp:49

When I switch window:
 - for the window gaining focus there is no slowness 
 - for the window losing focus I see some king of blinking in the window title but nothing to report a bug about
Comment 5 Laurent Bonnaud 2013-01-11 12:56:11 UTC
Switching the Qt Graphics System from "native" to "raster":

$ qdbus org.kde.kwin /KWin supportInformation | grep Qt
Qt Graphics System: raster

does indeed fix the problem for the Platik decoration.  Thanks for the workaround!

However the original problem remains: the Platik decoration which is very simple and worked well in previous KDE versions should not be that slow in KDE 4.10.
Comment 6 Thomas Lübking 2013-01-11 13:14:01 UTC
(In reply to comment #5)
> However the original problem remains: the Platik decoration which is very
> simple and worked well in previous KDE versions should not be that slow in
> KDE 4.10.

Use the Laptop decoration instead.
Plastik was unmaintained and had (visual) bugs, if you want to preserve the look you _might_ be better off using a "dekorator" or eventually "smaragd" (beryl/emerald interpreter) theme instead.

@Martin
Did my proposal about a "one size fits all" legacy/a11y deco actually made it to the list?

Marking as upstream, but it's actually wontfix since the way QGraphicsView works, it's fast with  raster painting (or when setting a GL scene as backend, could be problematic in our case and given *cough* some *cough* drivers don't even like a second context) only; thus one either has to use that or omit the invocation of QGraphicsViews.
As Qt dropped the native graphicssystem for 5.0 i doubt there'll ever be a change to that situation.
Comment 7 Martin Flöser 2013-01-11 13:18:12 UTC
On Friday 11 January 2013 13:14:01 you wrote:
> @Martin
> Did my proposal about a "one size fits all" legacy/a11y deco actually made
> it to the list?
I remember something, but are not sure whether it was on the mailinglist or on 
a bug report or review request
Comment 8 Mark Rose 2013-02-20 19:47:32 UTC
If anyone one else runs into this in Kubuntu, it can be fixed by going to System Settings -> Desktop Effects -> Advanced and setting Qt graphics system to Raster.
Comment 9 Thomas Lübking 2013-04-18 22:17:50 UTC
*** Bug 318567 has been marked as a duplicate of this bug. ***
Comment 10 davidblunkett 2013-04-29 15:45:52 UTC
I can confirm this bug in kububtu 13.04 - plastik decorations lead to painfully slow mouse focus
Comment 11 davidblunkett 2013-04-29 15:50:21 UTC
I can also state that switching to "raster" described above improves but does not entirely fix the problem - mouse focus is noticeably slower for plastik and sometimes (when switching desktops) the focus doesn't seem to switch to some windows (focus under mouse) unless the mouse is moved in and out of the window.

Using laptop is snappy and reliable whatever setting is used.

I don't know what the default settings were in kubuntu 12.10 but I did not have this problem a week ago before I upgraded!
Comment 12 Thomas Lübking 2013-04-29 18:17:24 UTC
No setting has changed - the implementation of the current "Plastik" decoration is not comparable to the former one.

I assume you're /not/ using compositing (shadows and translucency)?
Comment 13 davidblunkett 2013-04-30 20:37:33 UTC
I've got compositing turned off and now I'm using oxygen which seems fine (mainly because I find it annoying rather than anything else).
Comment 14 Thomas Lübking 2013-05-24 13:48:39 UTC
*** Bug 320210 has been marked as a duplicate of this bug. ***