Re: Suspend: RTC wakeup, sleep

2010-08-05 Thread John Gilmore
> > There is no 1-second ambiguity in the RTC. The CPU can only read out > > a value accurate to 1 second, but the CPU can tell precisely when the > > RTC "ticks" from one second to another, which gives it much higher > > precision if it's willing to wait. Its precision is greater than its > > ac

Re: Suspend: RTC wakeup, sleep

2010-08-02 Thread Richard A. Smith
On 07/29/2010 08:56 PM, John Gilmore wrote: >> With the RTC you have a 1 second ambiguity > > There is no 1-second ambiguity in the RTC. The CPU can only read out > a value accurate to 1 second, but the CPU can tell precisely when the > RTC "ticks" from one second to another, which gives it much

Re: Suspend: RTC wakeup, sleep

2010-07-29 Thread John Gilmore
> > By design, autosuspends should not change the timing behavior of programs; > > the idea is for the computer to act the same, but do so using less power. > > Autosuspend and lid-close suspends are identical in function. The only > difference is the allowed wakeup source. The CPU is turned of

Re: Suspend: RTC wakeup, sleep

2010-07-29 Thread Richard A. Smith
On 07/29/2010 04:45 AM, John Gilmore wrote: >> My power logging scripts originally used 'sleep'. But what I found was >> that if the time-to-suspend was shorter than sleep then the script would >> have cases where it would never run. > > Are we experiencing confusion between autosuspends and lid-

Re: Suspend: RTC wakeup, sleep

2010-07-29 Thread John Gilmore
> My power logging scripts originally used 'sleep'. But what I found was > that if the time-to-suspend was shorter than sleep then the script would > have cases where it would never run. Are we experiencing confusion between autosuspends and lid-close suspends? By design, autosuspends should n

Re: Suspend: RTC wakeup, sleep

2010-07-28 Thread Richard A. Smith
On 07/28/2010 11:44 AM, Paul Fox wrote: > > Or if the system wakes up after 50 seconds and doesn't suspend again, my > > program should run 100 seconds after it started to sleep. > > i'm afraid not. your sleep will be stretched by the duration of > the suspend. see the following. a 30 sec

Re: Suspend: RTC wakeup, sleep

2010-07-28 Thread Richard A. Smith
On 07/28/2010 05:34 AM, Hal Murray wrote: > Can somebody confirm that sleep does what I expect on suspended systems? > > My expectation is that the sleep timer logically ticks when suspended, but > that the system won't get woken up when the sleep timer expires. IIRC it does not. The mechanics o

Re: Suspend: RTC wakeup, sleep

2010-07-28 Thread pgf
oops. typo correction, below: i wrote: > hal wrote: > > > > Can somebody give me a pointer to some sample code that will wake up a > > suspended system in 5 minutes? I'm assuming there is some way to do this > > using the alarm interrupt from the RTC. > > use: > rtcwake -s 60

Re: Suspend: RTC wakeup, sleep

2010-07-28 Thread Paul Fox
hal wrote: > > Can somebody give me a pointer to some sample code that will wake up a > suspended system in 5 minutes? I'm assuming there is some way to do this > using the alarm interrupt from the RTC. use: rtcwake -s 600 -m mem to wake the system in 600 seconds, after suspending it

Suspend: RTC wakeup, sleep

2010-07-28 Thread Hal Murray
Can somebody give me a pointer to some sample code that will wake up a suspended system in 5 minutes? I'm assuming there is some way to do this using the alarm interrupt from the RTC. What should I have searched for? I poked around a bit, but didn't find much. (One wiki page from a few year