[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Detection of hibernation wake-up
From:       "David Boosalis" <david.boosalis () gmail ! com>
Date:       2008-10-22 0:25:14
Message-ID: 870c99310810211725q43c89df3r26270ec73adedfd4 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


One way you can do it is to parse the /var/log/kernel.log. For start ups for
suspends you will see something like
Oct 21, 16,:49:33 hunter kernel: PM::Finishing wakeup.

A few checks, sprinkled with a few boolean flags, perhaps a look at current
system time  might be enough info to determine if you are coming back from a
suspend.  Not a real sophisticated solution is it.



On Tue, Oct 21, 2008 at 3:17 PM, David Jarvie <djarvie@kde.org> wrote:

> Is there a way for an application to detect that the system has woken from
> hibernation? This is needed so that timers can be reset, since a timer
> counting down to a specific date/time will need adjustment by the length of
> time the system has been asleep.
>
> --
> David Jarvie.
> KAlarm author and maintainer.
> http://www.astrojar.org.uk/kalarm
>
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> unsubscribe <<
>
>

[Attachment #5 (text/html)]

One way you can do it is to parse the /var/log/kernel.log. For start ups for suspends \
you will see something like<br>Oct 21, 16,:49:33 hunter kernel: PM::Finishing \
wakeup.<br><br>A few checks, sprinkled with a few boolean flags, perhaps a look at \
current system time&nbsp; might be enough info to determine if you are coming back \
from a suspend.&nbsp; Not a real sophisticated solution is it.<br> <br><br><br><div \
class="gmail_quote">On Tue, Oct 21, 2008 at 3:17 PM, David Jarvie <span \
dir="ltr">&lt;<a href="mailto:djarvie@kde.org">djarvie@kde.org</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Is there a way for an \
application to detect that the system has woken from<br> hibernation? This is needed \
so that timers can be reset, since a timer<br> counting down to a specific date/time \
will need adjustment by the length of<br> time the system has been asleep.<br>
<font color="#888888"><br>
--<br>
David Jarvie.<br>
KAlarm author and maintainer.<br>
<a href="http://www.astrojar.org.uk/kalarm" \
target="_blank">http://www.astrojar.org.uk/kalarm</a><br> </font><br><br>
&gt;&gt; Visit <a href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub" \
target="_blank">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> to \
unsubscribe &lt;&lt;<br> <br></blockquote></div><br>



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic