Power manager specification... (request for comments).

Walter Bender walter.bender at gmail.com
Fri Aug 17 04:50:08 EDT 2007

Lets please be careful not to over-engineer. While Mike makes good
points, we have this wonderful human social network we can depend upon
as well. E.g., If I am downloading something from your machine, I can
ask you to hold on a second until I finish. Let's take advantage of
the fact that the kids are in the same community/school most of the
time and not worry so much about corner cases until we have some more
breathing room.


On 8/16/07, Mike C. Fletcher <mcfletch at vrplumber.com> wrote:
> Jim Gettys wrote:
> ...
> >> There seems to be no way to manually adjust the backlight level in
> >> ebook mode. What would be the policy for it? Leave it on all the time
> >> or dim down after some idle time? Also CPU (and wireless?) should go
> >> to suspend for most of time in ebook mode?
> >>
> >
> > We have code in at least our PDF viewer to literally do exactly this; as
> > soon as the page is rendered and it is idle, it puts the machine to
> > sleep.
> >
> For the activity developers in the audience:
>    This is (I believe) in the GIT read-activity/readactivity.py[1]
>    module.  The implementation uses the HardwareManager[2] service
>    (set_kernel_suspend) exposed over dbus to directly send the kernel
>    into suspended state.  AFAICS there's no allowance for tracking
>    whether something *else* might need the machine to be alive (e.g. a
>    download or the like being done in the background).  The same
>    Manager object has controls for various operations such as changing
>    brightness and the like.
> On the original topic of the thread (what the power manager should do):
>    I'm guessing eventually we'll want some of the logic currently in
>    the read activity to migrate into HardwareManager.  That is, allow
>    for signaling "inhibit_suspend( )" and "allow_suspend()"[3], rather
>    than directly setting suspend, such that a given activity can
>    declare that it must be allowed to continue processing in the
>    back-end.  Then you'd want something like "suggest_suspend()" so
>    that a foreground activity can tell the system "hey, I don't expect
>    to do anything for a second or two, if no-one objects, feel free to
>    suspend".
>     From there, a second level does a suggest-suspend from Sugar (or
>    whoever) on no-cpu, no-network (other than the autonomous routing),
>    no-input, for a given period.  No opinion on where/how to put that.
>    HardwareManager should likely send dbus events so that activities
>    can watch for resume, suggested-suspend, or what have you and adjust
>    behaviour accordingly.  Example usage scenario: switch a per-second
>    clock-updating timer to a per-minute timer.
> Hope this helps,
> Mike
> [1]
> http://dev.laptop.org/git.do?p=projects/read-activity;a=blob;f=readactivity.py;h=3eeb858cc5ea1dc67a60faee90628100479509be;hb=HEAD
> [2]
> http://dev.laptop.org/git.do?p=hardware-manager;a=blob;f=hardwaremanager.py;h=3154b17553621cc41fa947cbff2756372e6e37ec;hb=HEAD
> [3] with allow-suspend happening automatically after a short-ish timeout
> if the activity doesn't re-assert the inhibition
> --
> ________________________________________________
>  Mike C. Fletcher
>  Designer, VR Plumber, Coder
>  http://www.vrplumber.com
>  http://blog.vrplumber.com
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel

Walter Bender
One Laptop per Child

More information about the Devel mailing list