Waking XO-1.75 with RTC
pgf at laptop.org
Mon Jul 16 06:34:30 EDT 2012
> George Hunt wrote (on power at lists.laptop.org):
> > Does anyone have experience waking up an XO via the RTC? Manual
> > entries for rtcwake make it sound pretty easy. But there's no real
> > substitute for experience.
> rtcwake with a delta time works for me on XO-1.75, you can see a
> rather technical example in /runin/runin-sus, but it boils down to
> sudo rtcwake --seconds 60 --mode mem
> I'm not sure if it works with an absolute time ... I doubt it, but
> I've not had a moment to try it. We don't have a need for absolute
> time wakeup in the OLPC OS builds.
i'm not sure i've tried an absolute wakeup time either, but i know
of no reason it shouldn't just work.
as james implies, the complication for george's scheme is that our
power management daemon (/usr/sbin/powerd -- it's a (large) shell
script, so feel free to take a look) uses the RTC itself, so it's
likely that a user's setting of the RTC will be lost in somewhat short
i'm sure powerd could help make what you want to do easier than it is
now. please let me know if you'd like to continue working on this.
there's one more wakeup timer available, implemented as a delta timer
in milliseconds (32 bits, or at least 31), that's in the EC. we don't
use that during normal operations with powerd, so it might be useful.
we've talked about having powerd use that, rather than the RTC, but
there are some technical details that prevent that at the moment.
> You can easily use a delta time sleep until the clock is close to
> start of school day.
> The system will wake if there is another reason to; like keyboard,
> touchpad, network, or battery state of charge change. This is another
> good reason to use a delta time.
> The following is deeper detail than is needed:
> Sridhar Dhanapalan wrote (on power at lists.laptop.org):
> > Interesting idea. My understanding is that the XO-1.75 has two RTCs -
> > not sure why.
> One is inside the CPU, but it is unpowered if the system is off. It
> is used by rtcwake, and remains powered during suspend. Access to it
> is fast.
> The other is external to the CPU and is powered even when the system
> is off, using a battery, so that it keeps time. It cannot be used to
> wake the system. Access to it is over a serial bus. This is the RTC
> maintained by Open Firmware.
> CC: devel at lists.laptop.org 'cause this is a more general question than
> James Cameron
> Devel mailing list
> Devel at lists.laptop.org
paul fox, pgf at laptop.org
More information about the Devel