Re: Power Manager Question...
Re: Power Manager Question...
- Subject: Re: Power Manager Question...
- From: Ethan Bold <email@hidden>
- Date: Wed, 28 Apr 2004 15:20:19 -0700
Hey Jerry-
Good question. I suspect this is due to a PM timer issue, where we
don't fully reset the sleep timer unless the system was awoken by a key
press (or clamshell open or power button press). You probably need to
fake a keypress, as you suspected.
The AppleScript fake click MIGHT work - I don't know any AppleScript
though, and I don't know how their mouseClicks filter through the
system. If you can send me a script I can check whether it tickles the
PM timers or not.
Alternatively, this C program will fake a key press:
// cc -o keypress keypress.c -framework Carbon
#include <Carbon/Carbon.h>
main() {
UpdateSystemActivity(OverallAct);
return 0;
}
-ethan
On Apr 28, 2004, at 12:46 PM, Jerry LeVan wrote:
>
This might not be the best forum for this question but I don't
>
know quite where to look for an solution...
>
>
I have a program that uses the IO Power Manager API to queue a
>
wake request to fire about a minute and 15 seconds before cron is
>
scheduled
>
to fire ( at 3:15 in the morning).
>
>
Examining the system log I see that the system goes back to sleep
>
in about 3~4 minutes after the wakeup call. The Energy Saver panel
>
is set to sleep in 15 minutes of inactivity.
>
>
Why is there such a big discrepancy in the time? It appears to me
>
that a big backup might get timed out by the sleep mechanism...
>
>
I suspect there might be some watchdog timer set every time a key is
>
pressed or the mouse moves, at 3:15 there is no one about to jiggle
>
the keyboard/mouse.
>
>
Is there a software solution to this problem...would an Applescript
>
system event fake click do the job?
>
>
I guess one solution would be to point a photosensor at the screen so
>
that when the wakeup occurs, the sensor could cut power to a
>
electromagnet
>
holding a ball above the key board but that seems like overkill :)
>
>
Jerry
>
_______________________________________________
>
darwin-kernel mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.