Re: Debugging a sleepless Mac

2011-03-16 Thread Aaron Burghardt
On Mar 16, 2011, at 2:50 PM, Laurent Daudelin wrote: >> Just calling UpdateSystemActivity() once every minute is enough to prevent >> sleeping. no need to keep the system busy nor to install PMNotification >> visible in pmset. >> And checking if a running process call this function from time to

Re: Debugging a sleepless Mac

2011-03-16 Thread Tony Romano
Not sure if it was mentioned, but did you look at the /var/log/DiagnosticMessages log, it should have all the sleep activity messages. Tony Romano On 3/16/11 11:36 AM, "Michael Nickerson" wrote: > >On Mar 16, 2011, at 8:37 AM, Matt Gough wrote: > >> I've just been adding code to supp

Re: Debugging a sleepless Mac

2011-03-16 Thread Michael Nickerson
On Mar 16, 2011, at 8:37 AM, Matt Gough wrote: > I've just been adding code to support NSWorkspaceWillSleepNotification. > Having lowered my Computer sleep time right down and left the Mac untouched > for several minutes, my code never fires and the Mac doesn't actually go to > sleep. Even wit

Re: Debugging a sleepless Mac

2011-03-16 Thread Laurent Daudelin
On Mar 16, 2011, at 11:23, Jean-Daniel Dupas wrote: > > Le 16 mars 2011 à 19:00, Laurent Daudelin a écrit : > >> On Mar 16, 2011, at 09:35, Matt Gough wrote: >> >>> On 16 Mar 2011, at 15:32, Kyle Sluder wrote: >>> On Wed, Mar 16, 2011 at 5:37 AM, Matt Gough wrote: > So it seems that

Re: Debugging a sleepless Mac

2011-03-16 Thread Jean-Daniel Dupas
Le 16 mars 2011 à 19:00, Laurent Daudelin a écrit : > On Mar 16, 2011, at 09:35, Matt Gough wrote: > >> On 16 Mar 2011, at 15:32, Kyle Sluder wrote: >> >>> On Wed, Mar 16, 2011 at 5:37 AM, Matt Gough wrote: So it seems that something else is preventing idle sleep, but I've no idea h

Re: Debugging a sleepless Mac

2011-03-16 Thread Laurent Daudelin
On Mar 16, 2011, at 09:35, Matt Gough wrote: > On 16 Mar 2011, at 15:32, Kyle Sluder wrote: > >> On Wed, Mar 16, 2011 at 5:37 AM, Matt Gough wrote: >>> So it seems that something else is preventing idle sleep, but I've no idea >>> how to find the culprit. Is there some defaults setting I can us

Re: Debugging a sleepless Mac

2011-03-16 Thread Dave Keck
> Apart from user interactions, what other sorts of activity automatically > prevent idle sleep? I seem to recall an issue where a program's logging was preventing sleep, which I believe was simply due to the file activity. fs_usage may help there. ___

Re: Debugging a sleepless Mac

2011-03-16 Thread Nick Zitzmann
On Mar 16, 2011, at 10:59 AM, Kyle Sluder wrote: > On Mar 16, 2011, at 9:35 AM, Matt Gough wrote: > >> Apart from user interactions, what other sorts of activity automatically >> prevent idle sleep? > > Time Machine, I think? Also, I know that turning on Internet connection sharing in the Sh

Re: Debugging a sleepless Mac

2011-03-16 Thread Kyle Sluder
On Mar 16, 2011, at 9:35 AM, Matt Gough wrote: > Apart from user interactions, what other sorts of activity automatically > prevent idle sleep? Time Machine, I think? --Kyle Sluder___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Debugging a sleepless Mac

2011-03-16 Thread Matt Gough
On 16 Mar 2011, at 15:32, Kyle Sluder wrote: > On Wed, Mar 16, 2011 at 5:37 AM, Matt Gough wrote: >> So it seems that something else is preventing idle sleep, but I've no idea >> how to find the culprit. Is there some defaults setting I can use that will >> log what the OS wants to do at sleep

Re: Debugging a sleepless Mac

2011-03-16 Thread Kyle Sluder
On Wed, Mar 16, 2011 at 5:37 AM, Matt Gough wrote: > So it seems that something else is preventing idle sleep, but I've no idea > how to find the culprit. Is there some defaults setting I can use that will > log what the OS wants to do at sleep time and what is blocking it? According to the I/O

Re: Debugging a sleepless Mac

2011-03-16 Thread Aaron Burghardt
On Mar 16, 2011, at 8:37 AM, Matt Gough wrote: > So it seems that something else is preventing idle sleep, but I've no idea > how to find the culprit. Is there some defaults setting I can use that will > log what the OS wants to do at sleep time and what is blocking it? Leaving a Terminal sess

Re: Debugging a sleepless Mac

2011-03-16 Thread Jean-Christophe Helary
On 16 mars 11, at 21:37, Matt Gough wrote: > So it seems that something else is preventing idle sleep, but I've no idea > how to find the culprit. Is there some defaults setting I can use that will > log what the OS wants to do at sleep time and what is blocking it? Do you have an external dis

Re: Debugging a sleepless Mac

2011-03-16 Thread John Joyce
> I've just been adding code to support NSWorkspaceWillSleepNotification. > Having lowered my Computer sleep time right down and left the Mac untouched > for several minutes, my code never fires and the Mac doesn't actually go to > sleep. Even without my app running and leaving the Mac for seve

Debugging a sleepless Mac

2011-03-16 Thread Matt Gough
I've just been adding code to support NSWorkspaceWillSleepNotification. Having lowered my Computer sleep time right down and left the Mac untouched for several minutes, my code never fires and the Mac doesn't actually go to sleep. Even without my app running and leaving the Mac for several hours