njl 79d6390885 Update the suspend/resume user API while maintaining backwards compat.
Improvements:
* /etc/rc.suspend,rc.resume are always run, no matter the source of the
  suspend request (user or kernel, apm or acpi)
* suspend now requires positive user acknowledgement.  If a user program
  wants to cancel the suspend, they can.  If one of the user programs
  hangs or doesn't respond within 10 seconds, the system suspends anyway.
* /dev/apm is clonable, allowing multiple listeners for suspend events.
  In the future, xorg-server can use this to be informed about suspend
  even if there are other listeners (i.e. apmd).

Changes:
* Two new ACPI ioctls:  REQSLPSTATE and ACKSLPSTATE.  Request begins the
  process of suspending by notifying all listeners.  acpi is monitored by
  devd(8) and /dev/apm listener(s) are also counted.  Users register their
  approval or disapproval via Ack.  If anyone disapproves, suspend is vetoed.
* Old user programs or kernel modules that used SETSLPSTATE continue to
  work.  A message is printed once that this interface is deprecated.
* acpiconf gains the -k flag to ack the suspend request.  This flag is
  undocumented on purpose since it's only used by /etc/rc.suspend.  It is
  not intended to be a permanent change and will be removed once a better
  power API is implemented.
* S5 (power off) is no longer supported via acpiconf -s 5 or apm -z/-Z.
  This restores previous behavior of halt/shutdown -p being the interface.
* Miscellaneous improvements to error reporting

Approved by:	re
2007-06-21 22:50:37 +00:00
..
2005-01-18 20:02:45 +00:00
2005-02-13 22:25:33 +00:00
2005-05-20 12:44:04 +00:00
2005-02-09 18:07:17 +00:00
2005-07-15 15:32:52 +00:00
2005-02-13 22:25:33 +00:00
2005-02-13 22:25:33 +00:00
2007-03-15 04:09:40 +00:00
2006-09-29 16:46:01 +00:00
2005-01-18 20:02:45 +00:00
2005-02-09 18:07:17 +00:00
2006-07-20 09:38:46 +00:00
2005-02-13 22:25:33 +00:00
2007-06-13 02:08:04 +00:00
2007-05-14 18:04:07 +00:00
2006-11-12 21:43:21 +00:00
2007-04-05 21:17:52 +00:00
2006-09-29 17:57:04 +00:00
2006-11-16 13:43:05 +00:00
2006-06-29 09:18:16 +00:00
2005-01-18 20:02:45 +00:00
2006-09-01 09:24:28 +00:00
2006-09-29 17:57:04 +00:00
2005-01-18 20:02:45 +00:00
2007-01-20 23:24:11 +00:00
2005-02-13 22:25:33 +00:00
2006-10-10 07:19:30 +00:00
2006-09-29 17:57:04 +00:00
2005-01-18 20:02:45 +00:00
2006-09-30 19:07:03 +00:00
2007-05-12 12:42:00 +00:00
2005-01-18 20:02:45 +00:00
2007-04-27 12:09:31 +00:00
2006-08-22 08:03:01 +00:00
2007-05-25 16:05:17 +00:00
2005-02-13 22:25:33 +00:00
2005-06-03 15:25:13 +00:00
2005-02-09 18:07:17 +00:00
2005-02-13 22:25:33 +00:00
2007-02-15 02:45:14 +00:00
2007-01-20 08:24:02 +00:00
2005-01-18 20:02:45 +00:00
2006-08-14 08:49:08 +00:00
2007-02-09 09:23:10 +00:00
2007-03-16 12:36:54 +00:00
2006-10-12 01:59:34 +00:00
2006-09-24 09:18:36 +00:00
2007-01-20 08:24:02 +00:00
2006-08-22 08:03:01 +00:00
2006-07-27 14:52:12 +00:00
2005-01-18 20:02:45 +00:00
2006-12-22 23:23:59 +00:00
2007-06-11 04:05:15 +00:00
2005-02-13 22:25:33 +00:00
2005-02-13 22:25:33 +00:00
2006-10-18 12:35:24 +00:00
2007-01-28 08:53:48 +00:00