Review Request: Add suspend-signal to powerdevil and make plasma time dataengine detecting clock skrews

Sebastian Kügler sebas at kde.org
Mon Sep 13 18:16:11 CEST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5320/#review7578
-----------------------------------------------------------


To be honest, I don't like this patch.

The correct solution is to get a SIGNAL "resumed()", which is caught by the dataengines and which then just updates. The polling and retrying in timeengine.cpp is really ugly, IMO. (No offense ;)) I want this fixed in Solid to get a reliable signal that we're resumed now.

Your patch doesn't take hibernation into account, btw, which has the exact same problem. Also starting two second polling for two minutes when the user hits suspend looks like draining the battery unnecessarily (CPU wakeups), which is exactly not what you want on machines where suspend/resume is critical.

Thanks a lot for looking into this (admittedly very annoying) problem, but I think that this is just a workaround for something that is important enough to be fixed in the right way.


/trunk/KDE/kdebase/workspace/plasma/generic/dataengines/time/timeengine.h
<http://svn.reviewboard.kde.org/r/5320/#comment7732>

    remove whitespace



/trunk/KDE/kdebase/workspace/plasma/generic/dataengines/time/timeengine.h
<http://svn.reviewboard.kde.org/r/5320/#comment7733>

    rm whitespace



/trunk/KDE/kdebase/workspace/plasma/generic/dataengines/time/timeengine.h
<http://svn.reviewboard.kde.org/r/5320/#comment7734>

    rm whitespace



/trunk/KDE/kdebase/workspace/plasma/generic/dataengines/time/timeengine.cpp
<http://svn.reviewboard.kde.org/r/5320/#comment7735>

    ws



/trunk/KDE/kdebase/workspace/plasma/generic/dataengines/time/timeengine.cpp
<http://svn.reviewboard.kde.org/r/5320/#comment7736>

    ws



/trunk/KDE/kdebase/workspace/plasma/generic/dataengines/time/timeengine.cpp
<http://svn.reviewboard.kde.org/r/5320/#comment7738>

    it's clock skew



/trunk/KDE/kdebase/workspace/plasma/generic/dataengines/time/timeengine.cpp
<http://svn.reviewboard.kde.org/r/5320/#comment7737>

    ws



/trunk/KDE/kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.cpp
<http://svn.reviewboard.kde.org/r/5320/#comment7731>

    This is problematic. You cannot assume that we resumed already, since the job in 808 is async. Suspension can still happen at this point.



/trunk/KDE/kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.cpp
<http://svn.reviewboard.kde.org/r/5320/#comment7730>

    remove whitespace


- Sebastian


On 2010-09-13 11:20:38, Björn Ruberg wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5320/
> -----------------------------------------------------------
> 
> (Updated 2010-09-13 11:20:38)
> 
> 
> Review request for Plasma and Solid.
> 
> 
> Summary
> -------
> 
> NOTE: This a little bit ugly as I have to workaround the missing "going to suspend"-signal in the linux userland
> 
> This patch adds a signal to powerdevil that is emitted when a suspend/hibernate/standby is requested there. The signal is caught by the time engine what starts to look for an unexpected change in system time for two minutes by polling. If a clock skrew is detected, all sources are updated immediatly.
> 
> This fixes the bug that the plasma clocks are showing old time after suspending your machine up until 59 seconds (whenever the normal update is scheduled). This is not exactly a patch for bug 181380. But the clock skrew detection code can be used quite similar for detecting normal time changes. I'll look into that as soon this is accepted.
> 
> Please tell me whether I can commit this to 4.5 trunk as it is a bugfix for a nasty glitch.
> 
> 
> This addresses bug 181380.
>     https://bugs.kde.org/show_bug.cgi?id=181380
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdebase/workspace/plasma/generic/dataengines/time/timeengine.h 1166313 
>   /trunk/KDE/kdebase/workspace/plasma/generic/dataengines/time/timeengine.cpp 1166313 
>   /trunk/KDE/kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.h 1166313 
>   /trunk/KDE/kdebase/workspace/powerdevil/daemon/PowerDevilDaemon.cpp 1166313 
>   /trunk/KDE/kdebase/workspace/powerdevil/daemon/org.kde.PowerDevil.xml 1166313 
> 
> Diff: http://svn.reviewboard.kde.org/r/5320/diff
> 
> 
> Testing
> -------
> 
> Suspended machine, waited three minutes, woke up again - and noticed that all clocks on screen showed the correct time almost immediatly :)
> 
> 
> Thanks,
> 
> Björn
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100913/848f7a16/attachment-0001.htm 


More information about the Plasma-devel mailing list