Bug 190311 - digital clock has a significant delay before updating time after suspending
Summary: digital clock has a significant delay before updating time after suspending
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-clock (show other bugs)
Version: unspecified
Platform: openSUSE Unspecified
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
: 253399 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-22 01:33 UTC by Claus Wilke
Modified: 2010-11-10 22:56 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 Claus Wilke 2009-04-22 01:33:09 UTC
Version:            (using KDE 4.2.2)
Installed from:    SuSE RPMs

The digital clock takes forever to react to a change in time. I.e., if I change the time using the date command at the console, the digital clock may show the wrong time for quite a while; my estimate is up to a minute.

The same happens when waking up the computer from sleep/hibernate. For quite a while, the digital clock shows the time at which the computer was hibernated.

I think a wait of maybe 1-2 seconds would be acceptable, but 30 seconds or more is not.
Comment 1 Aaron J. Seigo 2009-04-22 02:41:51 UTC
"takes forever"

it takes between 0 and 60 seconds, less if you have "show seconds" in which case it's between 0 and 500 ms.

i doubt you'd rather we wake up the cpu once a second (or more?) to check the time for the 99.9% of the time it's just fine so as to drain your battery better. being off for a minute seems like the lesser evil here.

as for changing time, try doing it via the gui and the clock should update ..

as for re-checking on restoring from hibernate/sleep, that looks to be a HAL (and then Solid) feature that needs implementing first.

i'll let Kevin decide what to do with that ...
Comment 2 Claus Wilke 2009-04-22 05:24:54 UTC
So it's 30 seconds on average. That's a long time when you are staring at the clock wondering what's going on.

But apparently there are two separate issues:
1. Updating when the time is changed manually.
I can accept the argument that that's a rare case and might not need to be addressed. However, it's weird when you change the clock on the console while looking at the clock in your panel, and the clock in the panel doesn't seem to notice that anything happened. Would waking up the clock every 3-5 seconds really be such a drain on power? I don't think it's necessary to wake up the clock every second or more often.

2. After hibernation/sleep.
That's a much more frequent case. I encounter it at least once a day. The clock in my panel is my primary clock, and it happens all the time to me that I wake up my laptop and stare at the clock waiting for it to show the right time. I think this issue really needs to be solved.

As for using the gui to change the time, I just wanted to point out that the digital clock applet itself does not provide an obvious way to change the time. That's where I would look when trying to set the time.
Comment 3 Kevin Ottens 2009-04-22 09:09:03 UTC
Sounds more like something which should be handled by powerdevil IMO. On the libsolid* side we shouldn't take care about what's going on in desktop apps. It's more up to powerdevil to "do something" (whatever it is) when resume is over.
Comment 4 Dario Freddi 2009-04-22 12:24:04 UTC
This is, in my opinion, a more wide problem in which applications need to be notified of a resume for suspension. The most sane approach would be having a signal in PowerDevil's DBus interface (even better in the fd.o.PowerManagement one) ResumingFromSuspension(), to which applications (and I'm looking at the clock, amarok, kopete, etc) can attach. This was what PowerDevil was built for, after all, and that's the solution that looks the most sane to me. 

Opinions?
Comment 5 Dario Andres 2009-04-24 14:39:57 UTC
About issue no.1: bug 181380
Comment 6 Björn Ruberg 2010-09-13 13:55:34 UTC
I specify this bug on the suspend issue. Bug #181380 is for changing the system time.

Concerning the suspend problem, I have a workaround in reviewboard:
http://reviewboard.kde.org/r/5320
Comment 7 Christoph Feck 2010-10-06 19:05:33 UTC
*** Bug 253399 has been marked as a duplicate of this bug. ***
Comment 8 Dario Freddi 2010-11-10 01:13:12 UTC
Since 4.6, r1194833, there is now a signal on the DBus interface of KDE Power Management system which signals a resume event. Plasma can now use that for updating the clock. Reassigning to the clock applet.
Comment 9 Björn Ruberg 2010-11-10 22:56:21 UTC
SVN commit 1195347 by ruberg:

BUG: 190311
Timeengine does now trigger an updated on all clocks on the new dbus resumedFromSuspend signal. 
Caution: You have to make sure to use the upower and not the hal-backend for this to work



 M  +8 -0      timeengine.cpp  
 M  +1 -0      timeengine.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1195347