[Pkg-acpi-devel] Bug#579554: acpi-support: power.sh is not run if power adapter is unplugged while system is on standby

John Lindgren john.lindgren at tds.net
Sat May 1 17:52:59 UTC 2010


On Sat, 2010-05-01 at 19:17 +0200, Michael Meskes wrote:
> On Wed, Apr 28, 2010 at 11:16:21AM -0400, John Lindgren wrote:
> > at full brightness.  Since actual ACPI events will obviously not be
> > generated while the system is on standby, I think the system should
> > check what the power state is when it is turned on again and
> > run /etc/power.sh if the state has changed.  Alternatively, please
> > provide a script that is run when the system is powered on from standby
> > so that I can copy my script to dim the screen there.
> 
> How shall the execution of such a script be triggered? As you mentioned there
> is no acpi event generated because the system is on standby. However,
> acpi-support scripts are only triggered by acpi events. Obviously we can also
> run some scripts at startup or during shutdown, but I don't see how this
> package can change the way the system comes up from standby. CouldnÄt you just
> edit the corresponding scripts in pm-utils, assuming you use pm-utils to get
> into standby?

I'm looking at it from the user's standpoint: if there is a script to
respond to changes in the power supply, then that script should be run,
for consistency's sake, even if the actual physical change occurs while
the system is on standby.  As to how that would actually be implemented,
my idea is that the kernel should emit some sort of a trigger when the
system comes out of standby, just as it does when an ACPI event occurs.
Alternatively, I guess the power.sh script could be run from the suspend
script in pm-utils.  But (in my opinion) that would be an inferior
solution, since it would only work with pm-utils, not with any other
method of suspending the system.

Peace,
John Lindgren






More information about the Pkg-acpi-devel mailing list