Catching resume from suspend?
kevin.krammer at gmx.at
Sat Dec 5 18:09:22 GMT 2009
On Saturday, 2009-12-05, Chani wrote:
> On December 5, 2009 09:21:38 Anders Lund wrote:
> > Hi,
> > Sorry for crossposting, I hope it is not too bad.
> > Now my problem: I have several plasma applets that uses qtimer to
> > schedule updates. These updates are then screwed up because of system
> > suspends (I close the lid of my laptop). So I can see two possible
> > solutions:
> > 1) a signal that informs about a resume from suspend/standby (I tried to
> > use the powersave plasma dataengine which have state variables, but they
> > are not updated during suspend/resume events)
> > 2) using brute force by checking the system time in intervals (such as
> > every minute). In a plasma event this would mean connecting to the time
> > dataengine and compare my scheduled time with the current.
> > I ask because I do not have the knowledge to decide what is the best
> > thing to do, or if 1) is possible at all - afaik it is not, since I
> > havent found any working solution for it (I know there is something
> > called KIdleTime in KDE 4.4, but I do not see how that could help in this
> > case).
> #2 is Bad and Wrong; imagine every widget doing that, it'd be ridiculous.
> #1 is the right direction, although the exact implementation may differ...
> ideally dataengines should get kicked when there's a time jump or suspend
> or whatever; all the code to handle this should be in libplasma or higher
> (solid?), and it should Just Work for any dataengine. :) and of course a
> signal should be available for non-plasma stuff.
> now, I get the feeling that since it doesn't Just Work yet, Solid doesn't
> provide us with any such signal. this feels like the sort of thing that
> solid *should* provide, but I don't know enough about the low-level
> details to say how it should be implemented.
This has recently been discussed on hardware-devel
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel