Re: [acpi-jp 3096] Re: Update on ACPI with FreeBSD CURRENT on ThinkPad T30

From: Nate Lawson <nate_at_root.org>
Date: Thu, 4 Mar 2004 14:03:41 -0800 (PST)
On Wed, 3 Mar 2004, Dag-Erling [iso-8859-1] Smørgrav wrote:
> Nate Lawson <nate_at_root.org> writes:
> > Try using the sysctls from the new acpi_video module to turn off the
> > backlight, perhaps by turning the brightness way down.  If it works, put
> > it in /etc/rc.{suspend,resume}.
>
> /etc/rc.{suspend,resume} are useless since they (apparently) only run
> when you suspend manually using acpiconf(8) or apm(8).

apmd has always called the rc scripts, no matter how the suspend request
was generated.  It's only acpi that calls them directly from acpiconf.
The reason is simple.  apm requires a convoluted model that ties kernel
behavior to userland.  A suspend request goes out from the kernel, hits
apmd, and then is blocked or approved and then goes back to the kernel
before the actual suspend is initiated.  With -current, a conscious
decision was made that no critical services should depend on userland.

This applies to acpi in the following ways.  Power profile changes based
on AC adapter events go out to a usermode script, which can decide to
tweak power-saving settings based on the event.  If it's not present, the
worst that happens is that the system persists in performance/economy
mode.  On the other hand, hitting a critical high temp starts a shutdown
process entirely from kernel mode.  Since this has the potential to cause
system damage, userland can't be in the critical path for this.  What if
the system is hitting the high temp due to a fork bomb and the fan died?

-Nate
Received on Thu Mar 04 2004 - 13:03:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:46 UTC