From owner-acpi-jp@jp.FreeBSD.org Fri Dec  6 12:52:38 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id gB63qcl27579;
	Fri, 6 Dec 2002 12:52:38 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from axe-inc.co.jp (axegw.axe-inc.co.jp [61.199.217.66])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id gB63qc227574;
	Fri, 6 Dec 2002 12:52:38 +0900 (JST)
	(envelope-from takawata@axe-inc.co.jp)
Received: from axe-inc.co.jp ([192.47.224.47])
	by axe-inc.co.jp (8.9.3+3.2W/3.7W) with ESMTP id MAA19134;
	Fri, 6 Dec 2002 12:52:33 +0900 (JST)
Message-Id: <200212060352.MAA19134@axe-inc.co.jp>
To: Mathew Kanner <mat@cnd.mcgill.ca>
Cc: acpi-jp@jp.FreeBSD.org, current@jp.FreeBSD.org
In-reply-to: Your message of "Thu, 05 Dec 2002 11:47:33 EST."
             <20021205114733.R77878@cnd.mcgill.ca>
From: User Takawata <takawata@axe-inc.co.jp>
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Fri, 06 Dec 2002 12:52:44 +0900
X-Sequence: acpi-jp 2024
Subject: [acpi-jp 2024] Re: DP2 won't stay powered off
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: takawata@axe-inc.co.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+021206

In message <20021205114733.R77878@cnd.mcgill.ca>, Mathew Kanner wrote:
>Hello,
>	I've noticed some odd behavior when I installed DP2 on my
>machine last night.  When I "shutdown -p now", the machine will turn
>itself back-on in about twenty minutes.  This would be nice feature if
>I had asked for it.
>	I've never seen this before with -current (which I hhaven't
>visited in about six months) or -stable with apm.
>	The machine is an abit bp6, dual celeron.  I've never updated
>the bios, and I assume this is an acpi problem.
>	-current isn't booted at the moment but more specific
>information can be provided.

Would you try this patch and "sysctl hw.acpi.disable_on_poweroff=0"?

(I did try on older version, but does not tested in the head version.)
I think disabling ACPI subsystem on power off is valid only as 
quirk, because the spec does not claimed to be do so.

Index: acpi.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/acpica/acpi.c,v
retrieving revision 1.81
diff -u -r1.81 acpi.c
--- acpi.c	24 Nov 2002 02:27:07 -0000	1.81
+++ acpi.c	5 Dec 2002 07:49:40 -0000
@@ -427,6 +427,10 @@
     SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
 	OID_AUTO, "verbose", CTLFLAG_RD | CTLFLAG_RW,
 	&sc->acpi_verbose, 0, "verbose mode");
+    SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
+		   OID_AUTO, "disable_on_poweroff", CTLFLAG_RD | CTLFLAG_RW,
+		   &sc->acpi_disable_on_poweroff, 0, "ACPI subsystem disable on poweroff");
+    sc->acpi_disable_on_poweroff = 1;
     sc->acpi_sleep_delay = 0;
     sc->acpi_s4bios = 1;
     if (bootverbose)
@@ -869,8 +873,10 @@
 acpi_shutdown_pre_sync(void *arg, int howto)
 {
 
+    struct acpi_softc *sc = arg;
+
     ACPI_ASSERTLOCK;
-    
+
     /*
      * Disable all ACPI events before soft off, otherwise the system
      * will be turned on again on some laptops.
@@ -879,7 +885,8 @@
      *     before powering down, since we may still need ACPI during the
      *     shutdown process.
      */
-    acpi_Disable((struct acpi_softc *)arg);
+    if(sc->acpi_disable_on_poweroff)
+	acpi_Disable(sc);
 }
 
 static void
Index: acpivar.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/acpica/acpivar.h,v
retrieving revision 1.37
diff -u -r1.37 acpivar.h
--- acpivar.h	31 Oct 2002 17:58:38 -0000	1.37
+++ acpivar.h	5 Dec 2002 07:49:53 -0000
@@ -65,6 +65,7 @@
 
     int			acpi_sleep_delay;
     int			acpi_s4bios;
+    int			acpi_disable_on_poweroff;
 
     int			acpi_verbose;
 
