Subject: POWERHOOK_DEBUG for ACPI S3 on Lenovo T60 (was Re: T60 status: speedstep works, ACPI S1 fails, S3 locks hard)
To: None <port-i386@NetBSD.org>
From: Brian de Alwis <bsd@cs.ubc.ca>
List: port-i386
Date: 11/08/2006 11:15:30
On 2006.10.11 18:49:08 -0300, Jared D. McNeill wrote:
> On 11-Oct-06, at 5:31 PM, Greg Troxel wrote:
> >[TOTAL HANG, had to hold power button for ~5 seconds]
> >
> >Any clues on how to debug this?
> 
> Please try a kernel with options POWERHOOK_DEBUG.

Oops, I missed this message.  From -current as of last night,
setting machdep.sleep_state=3 produces:

    acpi0: entering state 3
    dopowerhooks softsuspend: audio0 piixide0 atabus1 atabus0 cbb0 pci6 ehci0 ehci0 uhci3 uhci3 uhci2 uhci2 uhci1 uhci1 uhci0 uhci0 pci5 pci4 ath0 ath0 pci3 wm0 pci2 pci1 pci0 pms0 pckbd0
    dopowerhooks suspend: audio0 piixide0 atabus1 atabus0 cbb0 pci6 ehci0 ehci0 uhci3 uhci3 uhci2 uhci2 uhci1 uhci1 uhci0 uhci0 pci5 pci4 ath0 ath0 pci3 wm0 pci2 pci1 pci0 pms0 pckbd0pckbd0: suspending...
    .
    ======== acpi_printcpu() debug dump ========
    gdt[ffff:cbac0000] idt[07ff:c0e39000] ldt[0018] tr[0160] efl[00000082]
    eax[3f567000] ebx[cc586bc8] ecx[00000000] edx[0000000d]
    esi[00000002] edi[00000002] ebp[cc586a5c] esp[cc5869d0]
    cr0[8001003b] cr2[08059008] cr3[3f567000] cr4[00000680]
    cs[0008] ds[0010] es[0010] fs[0030] gs[0010] ss[0010]

There was a beep at some point, but I can't determine precisely
when it happened.  And the the machine appears to hang, and I have
to do the hold-power-button until the machine powers off.

I repeated this three times, and the values in eax, ebx, ebp, esp,
and cr3 varied, with eax and cr3 having the same first 5 digits,
and ebx, ebp, and esp having the same first 5 digits.

(If this helps, I also tried a `reboot' which caused the machine
to beep repeatedly and appear to lock up.)

Brian.

-- 
  Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/
      "Amusement to an observing mind is study." - Benjamin Disraeli