Index: dev/acpica/acpi.c =================================================================== RCS file: /home/ncvs/src/sys/dev/acpica/acpi.c,v retrieving revision 1.243 diff -u -r1.243 acpi.c --- dev/acpica/acpi.c 9 Oct 2007 07:48:07 -0000 1.243 +++ dev/acpica/acpi.c 28 Jan 2008 01:52:19 -0000 @@ -2195,6 +2195,16 @@ } } + /* If devd(8) is not running, immediately enter the sleep state. */ + if (devctl_process_running() == FALSE) { + ACPI_UNLOCK(acpi); + if (ACPI_SUCCESS(acpi_EnterSleepState(sc, sc->acpi_next_sstate))) { + return (0); + } else { + return (ENXIO); + } + } + /* Now notify devd(8) also. */ acpi_UserNotify("Suspend", ACPI_ROOT_OBJECT, state); Index: sys/bus.h =================================================================== RCS file: /home/ncvs/src/sys/sys/bus.h,v retrieving revision 1.78 diff -u -r1.78 bus.h --- sys/bus.h 23 Feb 2007 12:19:07 -0000 1.78 +++ sys/bus.h 27 Jan 2008 08:58:27 -0000 @@ -83,6 +83,7 @@ * hook to send the message. However, devctl_queue_data is also * included in case devctl_notify isn't sufficiently general. */ +boolean_t devctl_process_running(void); void devctl_notify(const char *__system, const char *__subsystem, const char *__type, const char *__data); void devctl_queue_data(char *__data); Index: kern/subr_bus.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v retrieving revision 1.201 diff -u -r1.201 subr_bus.c --- kern/subr_bus.c 27 Jul 2007 11:59:56 -0000 1.201 +++ kern/subr_bus.c 27 Jan 2008 08:58:56 -0000 @@ -499,6 +499,15 @@ } /** + * @brief Return whether the userland process is running + */ +boolean_t +devctl_process_running(void) +{ + return (devsoftc.async_proc != NULL); +} + +/** * @brief Queue data to be read from the devctl device * * Generic interface to queue data to the devctl device. It is