Commit Graph

16 Commits

Author SHA1 Message Date
rpaulo
a7f2f1e583 wpa_supplicant should be able to reassociate when resuming, so remove a
comment saying it can't.
2013-07-04 07:32:40 +00:00
jkim
824572aa99 Revert r227528 and r227787. This hack is no longer necessary since r233580. 2013-02-15 22:58:44 +00:00
jkim
234d88c288 Revert r211288 and move the logic to the acpi_timer itself. 2012-02-08 20:31:42 +00:00
glebius
3aadfef004 Better use pkill(1) in last commit.
Submitted by:	pjd
2011-11-21 12:23:22 +00:00
glebius
973126c7ae On some laptops it is important to re-open /dev/psm after resume. moused(8)
was capable to do this upon SIGHUP for more than a decade. Automate this
via rc.resume in default installation.
2011-11-15 12:59:07 +00:00
jkim
fe93fcde05 Consistently use full pathnames for external commands. 2010-08-13 21:23:13 +00:00
jkim
0622ee44e5 Enforce ACPI timer as the timecounter hardware before we change sleep state
unless it is the current timer.  When we have resumed successfully, restore
the previous timecounter hardware if it was changed earlier.  Only the ACPI
timer is guaranteed to increase monotonically between S-state changes.
2010-08-13 20:43:19 +00:00
thompsa
412a8c5e97 Change the module example to kldload since this is the resume side. 2008-07-21 22:55:40 +00:00
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
njl
00a572d32f Fix a usage message. 2003-12-30 17:30:39 +00:00
njl
dc92f60c73 Add support for /etc/rc.suspend and /etc/rc.resume for ACPI. They are
called directly from acpiconf(8).  Change both scripts to take a
subsystem (apm|acpi) and sleep level (suspend,standby|1-5) argument.
2003-12-30 17:28:06 +00:00
dougb
1e8ecc617b Apply a more consistent style to the echo statements in /etc/ scripts.
* Put quotes around each line
* Single quotes for lines with no variable interpolation
* Double quotes if there is
* Capitalize each word that begins a line
* Make echo -n 'Doing foo:' ... echo '.' more of a standard

No functionality changes
2000-12-17 08:16:06 +00:00
obrien
6700db6a71 Add copyright notices. Other systems have been barrowing our /etc files
w/o giving any credit.
2000-10-08 19:20:36 +00:00
sheldonh
d8a93d30ec Apply a consistent style to most of the etc scripts. Particularly, use
case instead of test where appropriate, since case allows case is a sh
builtin and (as a side-effect) allows case-insensitivity.

Changes discussed on freebsd-hackers.

Submitted by:	Doug Barton <Doug@gorean.org>
1999-09-13 15:44:20 +00:00
peter
289c0d262f $Id$ -> $FreeBSD$ 1999-08-27 23:37:10 +00:00
iwasaki
be16db802f Put apmd configuration and rc files in /etc.
Update some files for apmd.
1999-07-10 18:02:42 +00:00