> Date: Tue, 10 Aug 2010 23:15:32 +0200
> From: Mike Belopuhov <[email protected]>
> 
> Hi,
> 
> I have a Thinkpad X41 which doesn't do ACPI suspend properly
> (it immediately wakes up after 'zzz').  So I wonder if anyone
> can give me hints what to look at, or if someone is willing
> to take a closer look at acpidump?  I won't mind doing some
> debugging myself, but at the moment I'm clueless what to start
> looking at.  As I said it tries to suspend, blinks the "moon",
> then it comes back as if something woke it up.  I wasn't
> running X while doing that test.

Might be worth trying the attached diff.  Fixes a similar issue on my
old Dell laptop.

Index: acpi_machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/acpi_machdep.c,v
retrieving revision 1.38
diff -u -p -r1.38 acpi_machdep.c
--- acpi_machdep.c      8 Aug 2010 21:23:41 -0000       1.38
+++ acpi_machdep.c      10 Aug 2010 22:07:39 -0000
@@ -216,6 +216,9 @@ acpi_cpu_flush(struct acpi_softc *sc, in
                wbinvd();
 }
 
+#include <dev/ic/mc146818reg.h>
+void mc146818_write(void *, u_int, u_int);
+
 int
 acpi_sleep_machdep(struct acpi_softc *sc, int state)
 {
@@ -223,6 +226,8 @@ acpi_sleep_machdep(struct acpi_softc *sc
                printf("%s: acpi_sleep_machdep: no FACS\n", DEVNAME(sc));
                return (ENXIO);
        }
+
+       mc146818_write(NULL, MC_REGB, MC_REGB_24HR);
 
        /* i386 does lazy pmap_activate */
        pmap_activate(curproc);

Reply via email to