[Sugar-devel] announce: alternate power management
pgf at laptop.org
pgf at laptop.org
Fri Mar 13 18:25:01 EDT 2009
david wrote:
> Very cool!
>
> How well will this integrate with the power management systems other
> distros are using? Can it become a 'Value Added' for other netbook
> manufacturers?
while i'd love to say i did a lot of research and prep in order
to make sure my little project was api compliant and future
compatible with other power management systems, i can't say that.
my goal's were small: to produce a lighter weight skeleton on
which to hang XO power management, in order to reduce the effort
needed to add some small features (that i wanted) to the current
functionality, and to make sure it was distro, desktop, and UI
independent. (i also wanted to prove to myself that it could
really be done the way i was picturing it).
paul
>
> david
>
> On Fri, Mar 13, 2009 at 4:33 PM, <pgf at laptop.org> wrote:
> > hi --
> >
> > i had an itch that needed scratching, and the result is a
> > reimplementation of much (but not all) of what ohmd does
> > currently.
> >
> > i've thought for some time (and i believe cjb agrees) that ohmd
> > is needlessly difficult to maintain and modify for our purposes
> > on the XO. Â small improvements are difficult to implement
> > quickly.
> >
> > since my heart is with more quasi-embedded systems than the XO's
> > current incarnation, part of my goal was to do a rewrite which
> > was not dependent on hald, dbus, or X11 -- power management
> > should work well from a console screen, and be available even if
> > none of those services is running.
> >
> > i call the service i wrote "powerd". Â it gets user idle/active
> > reports from the olpc-kbdshim daemon (which is watching all
> > user keypress and touchpad activity in any case), and it gets
> > reports regarding the hardware inputs (power button, lid and
> > ebook switches, ac adapter status, battery level, etc) either
> > from another small daemon that monitors /dev/input/event{0,1,2},
> > or from /sys nodes directly.
> >
> > it basically recreates ohmd's "dim after a bit, then sleep"
> > behavior, with some additions:
> >
> > Â - a power button splash screen: Â a second press of the power
> > Â Â button invokes shutdown, simply waiting for a brief timeout
> > Â Â invokes suspend, and any user activity cancels. Â (i even
> > Â Â managed to kinda sorta convey all that with graphics. Â i'm
> > Â Â sure every UI person that sees it will roll their eyes.)
> >
> > Â - configurable timeouts for screen dim and sleep. Â the dim
> > Â Â level is configurable.
> >
> > Â - different power management behavior when on wall power vs.
> > Â Â battery -- many laptop owners don't need to be miserly with
> > Â Â power when running from an external source. Â powerd makes
> > Â Â this behavior selectable.
> >
> > Â - different power behavior when in ebook mode (though detection
> > Â Â may be unreliable -- i think the ebook switch suffers from
> > Â Â some issues we previously noticed with the lid switch). Â this
> > Â Â should let you configure things like a very short timeout until
> > Â Â idle-suspend, and/or no screen dimming, when in ebook mode. Â (i
> > Â Â find the frequent on/off nature of the backlight when reading
> > Â Â in ebook mode to be a distraction.)
> >
> > Â - clean shutdown on critically low battery. Â (currently set at
> > Â Â a reported 5%, at which point my laptop would only run for
> > Â Â another couple of minutes.)
> >
> > Â - the ability to run arbitrary scripts after a resume. Â (perhaps
> > Â Â to reinit usb devices that don't suspend/resume properly? Â haven't
> > Â Â used this much yet.)
> >
> > Â - ease of customization, given that it's written in everyone's
> > Â Â favorite interpreted language.
> >
> > Â unimplemented:
> >
> > Â - inhibiting idle suspend based on system or network load.
> > Â Â i.e., the system will dim or suspend when watching a video.
> > Â Â (there are hooks in place where these features should be
> > Â Â implemented -- they're just not coded at all.) Â there's
> > Â Â no /etc/ohmd directory, so it honors /var/run/inhibit-idle-suspend
> > Â Â instead.
> >
> > Â - no special support for the wireless mesh, whatsoever. Â i
> > Â Â couldn't remember how it was supposed to work, and i recall
> > Â Â cjb saying it's hard to figure out whether the mesh is active
> > Â Â or not.
> >
> > Â - there's some support for wake-on-wlan, but it's not well tested.
> >
> > Â finally a big one:
> > Â - proper support for USB keyboards and mice. Â i recently
> > Â Â realized that since olpc-kbdshim only monitors the built-in
> > Â Â keyboard and touchpad, powerd will think the user is idle
> > Â Â while they type on a USB keyboard, and cheerfully suspend
> > Â Â regardless. Â (in my case, most of the time i want to
> > Â Â auto-suspend is when i'm running on battery, and not using
> > Â Â external devices, so i sort of forgot about this case.)
> >
> > anyway, code is available here:
> > Â Â http://dev.laptop.org/git/users/pgf/powerd/
> > and rpms are here:
> > Â Â http://dev.laptop.org/~pgf/rpms/
> >
> > you'll need to install both olpc-kbdshim and olpc-powerd (in that
> > order). Â when installed, olpc-powerd disables ohmd, and reenables
> > it when uninstalled. Â (so it's relatively safe to try.)
> >
> > there's no gui or other convenience for configuration --
> > see/etc/powerd/powerd.conf. Â the installed defaults should be
> > reasonable. Â and you'll need to run:
> > Â Â echo reconfig >/var/run/powerevents
> > after making changes to the config file.
> >
> > paul
> > =---------------------
> > Â paul fox, pgf at laptop.org
> > _______________________________________________
> > Sugar-devel mailing list
> > Sugar-devel at lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
> >
=---------------------
paul fox, pgf at laptop.org
More information about the Sugar-devel
mailing list