APMD-List:
Archives

  
Back

to

APMD

Home

      Index: [thread] [date] [subject] [author]
  From: Craig Markwardt <craigm@pcasun3.gsfc.nasa.gov>
  To  : Seth Golub <seth@thehouse.org>
<apmd-list@worldvisions.ca> Date: Wed, 12 May 1999 14:28:40 -0400 (EDT)

Re: apmd feature request

Avery Pennarun writes:
 > On Fri, May 07, 1999 at 12:44:44PM -0700, Seth Golub wrote:
 > 
 > > I'd like apmd to be able to run arbitrary commands when the laptop
 > > switches to and from battery power.
 > > 
 > > I see a couple messages from Craig Markwardt in the list archives
 > > proposing a more powerful scheme, but it's now a year later and no one 
 > > has implemented it, so perhaps this more modest approach would be best.
 > > 
 > > While it would be nice to be able to control my BIOS's power
 > > management settings based on whether it's plugged in, I don't even
 > > know how to change those things at runtime at all.
 > > 
 > > All I plan to do is change the runlevel based on whether I'm on
 > > battery, so I can have certain processes (bovine client) run only when
 > > I have unlimited power.
 > 

I have a working version of apmd which does many of the things that I
described in my original message.  One major issue was that it
requires some kernel support.  The kernel APM code, as it stands now,
does not allow a user-level program such as apmd to reject any suspend
or standyby events.  I felt that this would be important for true
power management.

I made some patches to do this, and submitted them to Stephen
Rothwell, the kernel APM maintainer, but they were promptly lost in
the press to finish Linux 2.2.

We can:
 * ignore the kernel stuff, but implement an event 
   "dispatcher" for everthing else.
 * make our own independent kernel changes.

The changes I made to apmd and the apm library were not trivial, but
did make the code more sane.  Merging Avery Pennarun's official
version with mine could take some time.  I'm willing to submit it.

Craig


Index: [thread] [date] [subject] [author]


Write to me! apenwarr@worldvisions.ca