Version: (using KDE 4.2.0) OS: Linux Installed from: SuSE RPMs While just doing nothing else then browsing (with konqueror) plasma and kwin suddenly start seemingly without any reason to produce heavy CPU load. I fired up gdb on plasma and got the following backtrace (doing the same on kwin from within a KDE session turned out to be a bad idea): (gdb) bt #0 0xffffe430 in __kernel_vsyscall () #1 0xb643be70 in writev () from /lib/libc.so.6 #2 0xb55a934b in ?? () from /usr/lib/libxcb.so.1 #3 0xb55a998e in ?? () from /usr/lib/libxcb.so.1 #4 0xb55a9abf in ?? () from /usr/lib/libxcb.so.1 #5 0xb55aaba7 in xcb_wait_for_reply () from /usr/lib/libxcb.so.1 #6 0xb72505d1 in _XReply () from /usr/lib/libX11.so.6 #7 0xb7245201 in XTranslateCoordinates () from /usr/lib/libX11.so.6 #8 0xb6a4d5a3 in QWidget::mapToGlobal(QPoint const&) const () from /usr/lib/libQtGui.so.4 #9 0xa9addf05 in AbstractTaskItem::iconGeometry (this=0x8997208) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/applets/tasks/abstracttaskitem.cpp:700 ---Type <return> to continue, or q <return> to quit--- #10 0xa9ae3e0e in TaskGroupItem::publishIconGeometry (this=0x8997208) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/applets/tasks/taskgroupitem.cpp:1022 #11 0xa9addcd4 in AbstractTaskItem::setGeometry (this=0x8997208, geometry=@0xbffd84f8) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/applets/tasks/abstracttaskitem.cpp:715 #12 0xb6f83711 in QGraphicsWidget::itemChange(QGraphicsItem::GraphicsItemChange, QVariant const&) () from /usr/lib/libQtGui.so.4 #13 0xb6f4226f in QGraphicsItem::setPos(QPointF const&) () from /usr/lib/libQtGui.so.4 #14 0xb6f827c3 in QGraphicsWidget::setGeometry(QRectF const&) () from /usr/lib/libQtGui.so.4 ---Type <return> to continue, or q <return> to quit--- #15 0xa9addcc9 in AbstractTaskItem::setGeometry (this=0x8997208, geometry=@0xbffd8840) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/applets/tasks/abstracttaskitem.cpp:714 #16 0xb6f87beb in ?? () from /usr/lib/libQtGui.so.4 #17 0xb6f8d77d in ?? () from /usr/lib/libQtGui.so.4 #18 0xb6f9493f in QGraphicsGridLayout::setGeometry(QRectF const&) () from /usr/lib/libQtGui.so.4 #19 0xb6f7c614 in QGraphicsLayout::activate() () from /usr/lib/libQtGui.so.4 #20 0xb6f7c69c in QGraphicsLayout::widgetEvent(QEvent*) () from /usr/lib/libQtGui.so.4 #21 0xb6f81b63 in QGraphicsWidget::event(QEvent*) () ---Type <return> to continue, or q <return> to quit--- from /usr/lib/libQtGui.so.4 #22 0xb69c38fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #23 0xb69cb75e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #24 0xb77af93d in KApplication::notify (this=0x805f868, receiver=0x8508cd8, event=0xbffd8df0) at /usr/src/debug/kdelibs-4.2.0/kdeui/kernel/kapplication.cpp:307 #25 0xb6753961 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 #26 0xb69ce84e in QCoreApplication::sendEvent(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #27 0xb6f82c46 in QGraphicsWidget::setGeometry(QRectF const&) () ---Type <return> to continue, or q <return> to quit--- from /usr/lib/libQtGui.so.4 #28 0xa9addcc9 in AbstractTaskItem::setGeometry (this=0x8508cd8, geometry=@0xbffd8f90) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/applets/tasks/abstracttaskitem.cpp:714 #29 0xb6f87beb in ?? () from /usr/lib/libQtGui.so.4 #30 0xb6f8d77d in ?? () from /usr/lib/libQtGui.so.4 #31 0xb6f7f1ef in QGraphicsLinearLayout::setGeometry(QRectF const&) () from /usr/lib/libQtGui.so.4 #32 0xb6f7c614 in QGraphicsLayout::activate() () from /usr/lib/libQtGui.so.4 #33 0xb6f7c69c in QGraphicsLayout::widgetEvent(QEvent*) () from /usr/lib/libQtGui.so.4 ---Type <return> to continue, or q <return> to quit--- #34 0xb6f81b63 in QGraphicsWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4 #35 0xb69c38fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #36 0xb69cb75e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #37 0xb77af93d in KApplication::notify (this=0x805f868, receiver=0x8296f28, event=0xbffd9540) at /usr/src/debug/kdelibs-4.2.0/kdeui/kernel/kapplication.cpp:307 #38 0xb6753961 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 #39 0xb69ce84e in QCoreApplication::sendEvent(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 ---Type <return> to continue, or q <return> to quit--- #40 0xb6f82c46 in QGraphicsWidget::setGeometry(QRectF const&) () from /usr/lib/libQtGui.so.4 #41 0xb6f87beb in ?? () from /usr/lib/libQtGui.so.4 #42 0xb6f8d77d in ?? () from /usr/lib/libQtGui.so.4 #43 0xb6f7f1ef in QGraphicsLinearLayout::setGeometry(QRectF const&) () from /usr/lib/libQtGui.so.4 #44 0xb6f7c614 in QGraphicsLayout::activate() () from /usr/lib/libQtGui.so.4 #45 0xb6f7c69c in QGraphicsLayout::widgetEvent(QEvent*) () from /usr/lib/libQtGui.so.4 #46 0xb6f81b63 in QGraphicsWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4 #47 0xb69c38fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) ---Type <return> to continue, or q <return> to quit--- () from /usr/lib/libQtGui.so.4 #48 0xb69cb75e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #49 0xb77af93d in KApplication::notify (this=0x805f868, receiver=0x82b74c8, event=0xbffd9c70) at /usr/src/debug/kdelibs-4.2.0/kdeui/kernel/kapplication.cpp:307 #50 0xb6753961 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 #51 0xb69ce84e in QCoreApplication::sendEvent(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #52 0xb6f82c46 in QGraphicsWidget::setGeometry(QRectF const&) () from /usr/lib/libQtGui.so.4 #53 0xb6f80191 in QGraphicsWidget::resize(QSizeF const&) () ---Type <return> to continue, or q <return> to quit--- from /usr/lib/libQtGui.so.4 #54 0xb8098241 in Panel::updateSize (this=0x82b74c8) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/containments/panel/panel.cpp:256 #55 0xb809974b in Panel::qt_metacall (this=0x82b74c8, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbffd9f9c) at /usr/src/debug/kdebase-workspace-4.2.0/build/plasma/containments/panel/panel.moc:79 #56 0xb6768580 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4 #57 0xb6769302 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4 #58 0xb7ed6dc3 in Plasma::Applet::sizeHintChanged (this=0x8296f28, ---Type <return> to continue, or q <return> to quit--- _t1=Qt::PreferredSize) at /usr/src/debug/kdelibs-4.2.0/build/plasma/applet.moc:211 #59 0xa9ad7529 in Tasks::changeSizeHint (this=0x8296f28, which=Qt::PreferredSize) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/applets/tasks/tasks.cpp:243 #60 0xa9ad87a7 in Tasks::qt_metacall (this=0x8296f28, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbffda0cc) at /usr/src/debug/kdebase-workspace-4.2.0/build/plasma/applets/tasks/tasks.moc:86 #61 0xb6768580 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4 #62 0xb6769302 in QMetaObject::activate(QObject*, QMetaObject const*, in---Type <return> to continue, or q <return> to quit--- t, void**) () from /usr/lib/libQtCore.so.4 #63 0xa9ae3ce3 in TaskGroupItem::sizeHintChanged (this=0x8508cd8, _t1=Qt::PreferredSize) at /usr/src/debug/kdebase-workspace-4.2.0/build/plasma/applets/tasks/taskgroupitem.moc:125 #64 0xa9ae41e2 in TaskGroupItem::updatePreferredSize (this=0x8508cd8) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/applets/tasks/taskgroupitem.cpp:595 #65 0xa9ae687b in TaskGroupItem::qt_metacall (this=0x8508cd8, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbffda22c) at /usr/src/debug/kdebase-workspace-4.2.0/build/plasma/applets/tasks/taskgroupitem.moc:99 #66 0xb6768580 in QMetaObject::activate(QObject*, int, int, void**) () ---Type <return> to continue, or q <return> to quit--- from /usr/lib/libQtCore.so.4 #67 0xb6769302 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4 #68 0xa9adbf23 in LayoutWidget::sizeHintChanged (this=0x84beaf8, _t1=Qt::PreferredSize) at /usr/src/debug/kdebase-workspace-4.2.0/build/plasma/applets/tasks/layoutwidget.moc:83 #69 0xa9adc462 in LayoutWidget::updatePreferredSize (this=0x84beaf8) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/applets/tasks/layoutwidget.cpp:381 #70 0xa9adcf84 in LayoutWidget::layoutItems (this=0x84beaf8) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/applets/tasks/layoutwidget.cpp:358 ---Type <return> to continue, or q <return> to quit--- #71 0xa9add3ea in LayoutWidget::qt_metacall (this=0x84beaf8, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbffda4cc) at /usr/src/debug/kdebase-workspace-4.2.0/build/plasma/applets/tasks/layoutwidget.moc:72 #72 0xb6768580 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4 #73 0xb6769302 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4 #74 0xa9ad7213 in Tasks::constraintsChanged (this=0x8296f28, _t1= {i = -1073896200}) at /usr/src/debug/kdebase-workspace-4.2.0/build/plasma/applets/tasks/tasks.moc:98 #75 0xa9ad7780 in Tasks::constraintsEvent (this=0x8296f28, constraints= ---Type <return> to continue, or q <return> to quit--- {i = -1073895708}) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/applets/tasks/tasks.cpp:168 #76 0xb7ee1581 in Plasma::Applet::flushPendingConstraintsEvents ( this=0x8296f28) at /usr/src/debug/kdelibs-4.2.0/plasma/applet.cpp:998 #77 0xb7ee1db8 in Plasma::Applet::timerEvent (this=0x8296f28, event=0xbffdac40) at /usr/src/debug/kdelibs-4.2.0/plasma/applet.cpp:1731 #78 0xb676304f in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4 #79 0xb6f81ba7 in QGraphicsWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4 ---Type <return> to continue, or q <return> to quit--- #80 0xb69c38fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #81 0xb69cb75e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #82 0xb77af93d in KApplication::notify (this=0x805f868, receiver=0x8296f28, event=0xbffdac40) at /usr/src/debug/kdelibs-4.2.0/kdeui/kernel/kapplication.cpp:307 #83 0xb6753961 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 #84 0xb6781b86 in ?? () from /usr/lib/libQtCore.so.4 #85 0xb677e060 in ?? () from /usr/lib/libQtCore.so.4 #86 0xb57339a8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 ---Type <return> to continue, or q <return> to quit--- #87 0xb5737063 in ?? () from /usr/lib/libglib-2.0.so.0 #88 0xb5737221 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #89 0xb677dfb8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #90 0xb6a5c785 in ?? () from /usr/lib/libQtGui.so.4 #91 0xb675201a in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #92 0xb67521da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #93 0xb6754895 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4 #94 0xb69c3777 in QApplication::exec() () from /usr/lib/libQtGui.so.4 ---Type <return> to continue, or q <return> to quit--- #95 0xb804f336 in kdemain (argc=1, argv=0xbffdb044) at /usr/src/debug/kdebase-workspace-4.2.0/plasma/shells/desktop/main.cpp:54 #96 0x08048782 in main (argc=134587112, argv=0x38) at /usr/src/debug/kdebase-workspace-4.2.0/build/plasma/shells/desktop/plasma_qgv_dummy.cpp:3 (gdb) c Continuing.
A single other conspicuousness is that the clock plasmaoid shows noon all the time (which can be remidied by changing a clock setting). But I doubt that this is related to the described CPU hogging.
perhaps syprof could say something more about the sudden cpu hogging, also try to restart kwin or tremporarly switch to another window manager, to exclude a possible cause
seems similar to my problem (https://bugs.kde.org/show_bug.cgi?id=184251), does xorg also uses an importan percentage of CPU?
I can confirm this .... The cpu.ohgging stop when issuing a kwin --replace & but then start again after a while.
Created attachment 35211 [details] sysprof of kwin using 100% cpu
Created attachment 35212 [details] plasma-desktop using 20% cpu
maybe it helps saying that i usse the nvidia driver 185.18.14 since the kwin 100% sysprof is speding much time in libGLcore.185.18.14
I (the reporter) use Intel graphics driver. So this problem is presumable independent of the graphics driver. I'm now using KDE-4.3 betas (from openSUSE factory) with composite effects disabled for severeal weeks and this kind of CPU hogging no longer happens to me.
ok ... disabeling composition with CTRL-SHIFT-F12 also stops the cpu-usage of kwin.
This is still present in KDE 4.3 rc2
@comment 9: > ok ... disabeling composition with CTRL-SHIFT-F12 also stops the cpu-usage of kwin. This is not what I did say, but may be it can be proven: I've been without composite and desktop effects for several weeks now and without suffering from this problem. So I activated desktop effects again. And again I observe increased and latent CPU activity of the kwin and Xorg and plasma-desktop processes. The difference compared with some weeks ago is that the cumulated load is far below 100%: top reports around 10% for each. At the other commenters: Are you observing 100% CPU load? If I send plasma-desktop a STOP signal CPU activity level stays increased. If I send kwin a STOP signal OR I deactivate composite thenXorg activity goes below 10%. So I would say activating composite makes kwin permanently interact with X (maybe just some pointless event processing) in a way that sets both under significant CPU load. The increased plasma-desktop CPU load is independent from composite and thus should have a completely different cause. It's advisable to deactivate composite when running on battery.
That is also what I see. Allthough plasma-desktop seems to be behaving necely in KDE 4.3rc2. Kwin is still a cpu-hog. Actually kwin eating cpu-cycles happenens every time I login, with no exception.
Whith kde 4.3 i still happenens. Both on a system with Nvidia drivers and one with intel-drivers.
OpenGL compositing usually (actually it depends on driver and GPU, load may be assigned to KWin or X11) loads the CPU on heavy screen updates (like a giant video background...) so you should activate the "Show paint" plugin and watch for fast flickering screen areas. Maybe some plasmoid runs wild and instantly updates (that does not mean there's any visual update - it could just repaint itself over and over again for no reason) As soon as you turn off compositing (or possibly switch to the XRender backend) this would no more be a problem (moving some data in VRAM is fast, cheap and done by the GPU - just textureFromPixmap can kill you - that does not mean the SHM or even fallback conversions would necessarily do any better...)
i notice the same problem with kde-4.3.3 xorg-server-1.6.5 an nvidia-drivers-190.42 activating show paint indicates that the whole screen is updated. and yes, switching effect off/on limits screen updates to single areas again. makes it sense to disable plasmoids one by one for testing if some of them is the cause?
No. If the entire screen repaints and toggling desktop FX clears the stage you want to test your effects, i.e. disable them all and reactivate them one by one. (There's a /small/ chance that plasma is the culprit as the desktop covers the entire screen and plasma reacts on effect toggling - but it's not very likely) Good candidates are fullscreen FX like - "wobbly windows" - the desktop switchers - the "magic lamp" - the "slide back" effect and - "scale in" (the window switchers are unlikely) My guess: try the wobble thing first ;-) (there's a reported bug)
it's the "minimize animation" plugin... how to reproduce: 1. enable the plugin 2. open kmail and configure it to always show in the systray (so it won't close if you press alt+f4 or if you click on kwin's close button (x) 3. hit alt+f4 or click on (x) or click on kmail's systray icon it seems to happen just with kmail (even when embedded into kontact) and disabling the plugin fix the whole screen update. as a side note: with QT_NO_GLIB set to 1 the kwin's cpu usage difference when the problem occurs is less perceptible (from 2-3% to 10-11% instead to 20%+).
In combination with the (shown) kmail systray icon i'm even able to generate a reproducable segfault in the minimize animation - i'm gonna look into it tonight
just to let you know: - the segfault is an alternative outcome due to an anvient private patch - the magiclamp effect shows the same behaviour - the problem appears to be that the window is minimzed and immediately deleted (probably gets extra closed) and by catching the deletion and removing the window from the animation stack i could fix this for both - i'll sort out my private (unrelated) code changes tonight and come up with a usable patch (if nobody else does)
SVN commit 1054144 by luebking: move animation handling to prePaintScreen, avoid multiple hash lookups BUG: 177985 BUG: 184859 catch windows closing during the animation M +42 -29 minimizeanimation.cpp M +1 -0 minimizeanimation.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1054144
SVN commit 1054146 by luebking: BUG: 177985 BUG: 184859 catch windows closing during the animation M +5 -0 magiclamp.cpp M +1 -0 magiclamp.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1054146
*** Bug 217785 has been marked as a duplicate of this bug. ***
*** Bug 218045 has been marked as a duplicate of this bug. ***
*** Bug 206910 has been marked as a duplicate of this bug. ***
*** Bug 179851 has been marked as a duplicate of this bug. ***