Disabling powersaving temporarily from olpc-session?

Paul Fox pgf at laptop.org
Fri Jul 9 23:20:39 EDT 2010


hal wrote:
 > 
 > martin.langhoff at gmail.com said:
 > > what would be the right way to signal to powerd that for this session
 > > aggressive suspend should be suspended, or its timeout lengthened to several
 > > minutes, without affecting the "normal" setting? 
 > 
 > My notes say that:
 >   touch /var/run/powerd-inhibit-suspend
 > Will inhibit suspend.

close, but not quite.   /var/run/powerd-inhibit-suspend/ is a directory.

 > 
 > Google finds this:
 >   http://www.mail-archive.com/devel@lists.laptop.org/msg22607.html
 > 

google is a good reference.  when all else fails, read the
comments in /usr/bin/powerd.  overly verbose, perhaps, but
hopefully complete.  :-)

there's no good way to lengthen the timeout temporarily.  to
disable, create a file in /var/run/powerd-inhibit-suspend/ whose
name is the pid of the session.  i.e., in olpc-session, do:
     touch /var/run/powerd-inhibit-suspend/$$

there's no need to clean up, so the exec at the end of
olpc-session isn't a problem.

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



More information about the Devel mailing list