olpc-powerd on soas devxo-1

Paul Fox pgf at laptop.org
Thu Jun 18 00:45:32 UTC 2009


hi mikus --

mikus wrote:
 > This is the first F11-based build to come with this module included. 

to be honest, i'm almost as surprised to see it in a release as
you are.  no one tells me anything.  :-)

 >   I'm going to have to play with the thresholds -- it acts too soon 
 > for my liking.

be sure to read the section entitled "Configuration:" near the
top of /usr/sbin/powerd.  that's the sole documentation.  online
here:
    http://dev.laptop.org/git/users/pgf/powerd/tree/powerd

 > Was doing a 100MB+ rsync to my XO-1.  The screen dimmed, but the 
 > data transfer continued;  then the 'power' light started blinking, 
 > but the data transfer stopped (though unlike how 'suspend' worked in 
 > Joyride, here the external ethernet adapter did not get powered 
 > off).

i was with you until you got to the "though unlike..." part:  it's
physically impossible for power to be maintained to an external
USB device when the XO is suspended.

 > When I awakened the XO (by pressing the <shift> key), it took 
 > quite a bit of cogitation by the XO before the data transfer resumed 
 > -- but resume it did.

the other end of your transfer was busy setting longer and longer
timeouts while trying to get your XO to start responding again. 
it takes a bit for the two sides to get back in sync, much the
same as if you'd pulled the cable for a while, then plugged it
back in.

 >
 > Still, would be nice to inhibit (even if 
 > manually) 'suspending' while lengthy data transfers take place.

see the section (again, in /usr/sbin/powerd) called "Inhibiting
sleep".  you can either a) create a new file named after a
running process (which will disable suspend for as long as both
the file and the process exist) or b) touch a "special" file
periodically (more frequently than you've configured the XO to go
to sleep), and when you stop touching the file, sleep will no
longer be inhibited.  the two methods are equivalent, but one may
be more convenient than the other for some programs.

for manual inhibit, i'd recommend: 
    touch /var/run/powerd-inhibit-suspend/1
then remove it when suspending is okay again.

if you're doing it in a shell script, try:
    touch /var/run/powerd-inhibit-suspend/$$
and the inhibit will end when your script exits.

btw, if you want the latest versions of olpc-kbdshim and
olpc-powerd, use "yum update olpc-kbdshim" for the former, and
until powerd gets reviewed and hopefully accepted, fetch the
latest from http://dev.laptop.org/~pgf/rpms .)

paul
=---------------------
 paul fox, pgf at laptop.org




More information about the Fedora-olpc-list mailing list