Bug 187699 - Calendar standalone plasmoid on Desktop using 100% of CPU after resizing
Summary: Calendar standalone plasmoid on Desktop using 100% of CPU after resizing
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-clock (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 188898 189052 189234 190365 190461 193979 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-20 12:34 UTC by Danilo Cesar Lemes de Paula
Modified: 2009-05-25 17:45 UTC (History)
13 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 Danilo Cesar Lemes de Paula 2009-03-20 12:34:52 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

Calendar plasmoid is eating 100% of CPU.

To reproduce it:

- Add a new calendar plasmoid to desktop
- resize it
- See the High CPU usage.

The function whose is eating CPU is  CalendarApplet::timerEvent in KDE/kdebase/workspace/plasma/applets/calendar/calendar.cpp

I fixed it by using a QTimer insted of QObject timer/timeEvent, but, certainly, it's not the best approach.
Comment 1 Danilo Cesar Lemes de Paula 2009-04-02 21:04:30 UTC
I have reasons to believe that it occurs just with Nvidia graphics card.

Some Nvidia user can confirm it?
Comment 2 Lars Karlsson 2009-04-05 21:36:58 UTC
*** Bug 188898 has been marked as a duplicate of this bug. ***
Comment 3 Lars Karlsson 2009-04-05 21:38:13 UTC
Confirming. Also have an Nvidia card (8500GT) with 180.44 driver.
Comment 4 Dario Andres 2009-04-05 21:38:41 UTC
Reporter of bug 188898 is using nVidia drivers too
Comment 5 Dominik Tritscher 2009-04-05 23:13:25 UTC
Happens here to, using KDE 4.2.2 from Kubuntu packages. I have an Intel GMA 950, so this seems not NVidia related.
Comment 6 Wouter Haffmans 2009-04-06 21:49:26 UTC
Confirming: Same problem here (Gentoo, kde-testing repository), since KDE 4.2.2 (didn't notice it with KDE 4.2.1, I don't believe the bug was present there). Got an nVidia card too (9600GT), drivers 180.44. Compositing is on. Problem indeed seems to appear only after resizing the applet, as provided in the steps in the original report.
Comment 7 Miles Strombach 2009-04-06 23:00:53 UTC
Installed 4.2.2 from Gentoo's overlay today, I have the same problem.

Unfortunately, I have to say that I don't have an nVidia card. I've got an Intel  GM45 using xf86-video-intel-2.6.99.902 on xorg-server-1.6.0 with kernel 2.6.29

I don't even have to resize the widget to see the problem; moving it from the default position also triggers the bug.
Comment 8 Dario Andres 2009-04-06 23:17:27 UTC
I don't know how I missed the steps to reproduce

Here using:

Qt: 4.5.0 + qt-copy-patches-936035
KDE: 4.2.68 (KDE 4.2.68 (KDE 4.3 >= 20090327))
kdelibs svn rev. 949645 / kdebase svn rev. 949645
intel-dri 7.2-2
xorg-server 1.5.3
xf86-video-intel 2.4.3
on a Intel GMA x3100

on ArchLinux i686 - Kernel 2.6.28.8

I can reproduce the CPU usage bug.
Comment 9 Wouter Haffmans 2009-04-06 23:37:58 UTC
For me (see above, comment 6, too):
Qt: 4.4.2
KDE: 4.2.2
nvidia drivers: 180.44 (GeForce 9600GT)
Xorg 1.5.2
Gentoo AMD64 (Athlon 5200+, dual core), Kernel 2.6.27 (Gentoo r8).

One more thing I noticed: plasma uses up all the CPU of one core; the other core remains almost unused.

I can confirm the problem also occurs when merely moving the calendar applet, without resizing.

It seems that shutting down plasma (kquitapp) followed by starting it again solves the problem at least temporarily, even with a resized applet. I remember seeing the problem more than once, with several reboots, though.
Comment 10 Danilo Cesar Lemes de Paula 2009-04-07 01:12:30 UTC
SVN commit 950373 by danilocesar:

Fixing Plasmoid->Calendar resizing bug

BUG:187699
Plasma::Applet is using startTimer/timerEvent methods.
Using virtual timerEvent on Plasma::Applet's children cause conflicts.

So it was replaced by a singleShot. And it makes code simpler.



 M  +3 -13     calendar.cpp  
 M  +1 -5      calendar.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=950373
Comment 11 Dario Andres 2009-04-07 19:16:00 UTC
*** Bug 189052 has been marked as a duplicate of this bug. ***
Comment 12 Dario Andres 2009-04-07 19:16:49 UTC
@Danilo: did you backported the fix too ? Thanks
Comment 13 Tamás Németh 2009-04-07 20:16:34 UTC
What does backpost mean here? Will there be a KDE 4.2.3, or will I possibly get the fix via openSUSE KDE repositories?
Comment 14 Dario Andres 2009-04-07 20:18:18 UTC
@Tamás: the bug was fixed on the development code (KDE4.3.x) , it needs to be backported to the KDE4.2.x branch in order to be fixed for KDE4.2.3. (It's decision of OpenSUSE to include this as a separate fix on their packages)
Comment 15 Tamás Németh 2009-04-07 20:25:06 UTC
Many thanks for the answer.
Comment 16 Danilo Cesar Lemes de Paula 2009-04-07 21:09:50 UTC
@Dario: Humm, no, I forgot... 

I'll do it at night.

Thanks for reminding me =)
Comment 17 Dario Andres 2009-04-10 03:36:08 UTC
*** Bug 189234 has been marked as a duplicate of this bug. ***
Comment 18 Andrius Štikonas 2009-04-10 12:28:36 UTC
Backport to 4.2 branch:
http://websvn.kde.org/?view=rev&revision=951827
Comment 19 Danilo Cesar Lemes de Paula 2009-04-10 16:44:45 UTC
Thanks!
Comment 20 Andrea Scarpino 2009-04-14 13:51:35 UTC
(In reply to comment #18)
> Backport to 4.2 branch:
> http://websvn.kde.org/?view=rev&revision=951827

maybe there is an error at line 39 in calendar.cpp?
	     m_date(0),
I think, should be
	     m_date(0)
Comment 21 Andrius Štikonas 2009-04-14 13:55:46 UTC
The backport wasn't done by me, so I just commited the patch and somehow extra comma appeared. Sorry. And somebody already fixed it.
http://websvn.kde.org/branches/KDE/4.2/kdebase/workspace/plasma/applets/calendar/calendar.cpp?r1=951827&r2=951969
Comment 22 Dario Andres 2009-04-24 14:30:19 UTC
*** Bug 190365 has been marked as a duplicate of this bug. ***
Comment 23 Dario Andres 2009-04-25 15:33:58 UTC
*** Bug 190461 has been marked as a duplicate of this bug. ***
Comment 24 Dario Andres 2009-05-25 17:40:39 UTC
*** Bug 193979 has been marked as a duplicate of this bug. ***