Bug 8224

Summary: S4 hang - MacBook Core Duo
Product: ACPI Reporter: Mike Harris (atarimike)
Component: Power-Sleep-WakeAssignee: Pavel Machek (pavel)
Severity: normal CC: acpi-bugzilla, bunk
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.21-rc5 Subsystem:
Regression: --- Bisected commit-id:
Attachments: output of `dmesg -s64000`
Output of acpidump
patch 2.6.21-rc5 -> commit d459094083c3a23b31514bbe31cc3f4c21ed4445

Description Mike Harris 2007-03-16 23:24:55 UTC
Most recent kernel where this bug did *NOT* occur:
Distribution: Fedora Core 6
Hardware Environment: MacBook Core Duo
Problem Description: When I suspend the machine to disk (echo "disk" 
> /sys/power/state), the system hangs after the following messages on the 
Stopping tasks ... done
Shrinking memory... done (11627 pages freed)
Freed 46508 kbytes in 0.26 seconds (178.81 MB/s)
Suspending console(s)

It hangs here. Interestingly, sending hitting the power button 3 times will 
wake it up. After that, it suspends normally. On restore, it hangs 
after "Suspending console(s)", and only wakes up after 3 power button presses. 
Unfortunately, it then handles those events and shuts down.
Attached is the output of `dmesg -s64000` and acpidump.

Steps to reproduce:
Comment 1 Mike Harris 2007-03-16 23:26:32 UTC
Created attachment 10804 [details]
output of `dmesg -s64000`

This is after it boots up from a suspend.
Comment 2 Mike Harris 2007-03-16 23:27:18 UTC
Created attachment 10805 [details]
Output of acpidump
Comment 3 Len Brown 2007-03-21 18:25:53 UTC
what is the most recent kernel where this worked?
Comment 4 Adrian Bunk 2007-03-26 17:31:00 UTC
Does setting CONFIG_HPET_TIMER=n in the .config help?
Comment 5 Mike Harris 2007-03-26 22:43:22 UTC
I've tested 2.6.21-rc5, and things have improved. Resume works fine, but 
suspend still has some problems:
After I do 'echo "disk" > /sys/power/state', it switches to a console mode, 
but displays no text. The hard drive appears to be working. When it is done, 
it sits at the console with no text. As soon as I hit any key (not just send 
an ACPI event), the system powers down. If I hit a key while it is suspending, 
nothing happens and it will still hang. It resumes fine.
This happens whether I suspend from X or the console. Let me know if you need 
any logs or anything.
Comment 6 Mike Harris 2007-03-26 23:49:51 UTC
Setting CONFIG_HPET_TIMER=n or CONFIG_NO_HZ=n does not change anything.
Comment 7 Pavel Machek 2007-03-27 06:15:09 UTC
killall klogd before attempting to suspend so you can see _where_ it hangs.
Comment 8 Mike Harris 2007-03-27 12:14:26 UTC
Following Pavel's advice and killing klog, I get the following messages as it 
suspends to disk (this is all typed, so bear with me).

<lots of 'ACPI: PCI Interrupt...">
<saving image data pages>
Wrote 292760 kbytes in 16.81 seconds (17.41 MB/s)
Disabling non-boot CPUs ...
CPU 1 is now offline
SMP alternatives: switching to UP code
CPU1 is down
Synchronizing SCSI cache for disk sda:
APCI: PCI interrupt for device 0000:01:00.0 disabled
Comment 9 Adrian Bunk 2007-03-27 15:24:37 UTC
Created attachment 10968 [details]
patch 2.6.21-rc5 -> commit d459094083c3a23b31514bbe31cc3f4c21ed4445

Current git contains a patch that might be related to your problem.

This patch updates the kernel sources from 2.6.21-rc5 to the latest -git tree
(that will become 2.6.21-rc6).

Does it help?
Comment 10 Mike Harris 2007-03-27 17:37:37 UTC
That git patch fixes things.
Screen is still blank while it suspends (unless I kill klogd), but I'm not sure 
if that's what its supposed to do. It turns off normally though.
Comment 11 Anonymous Emailer 2007-03-29 00:55:37 UTC
Reply-To: pavel@ucw.cz

> That git patch fixes things.
> Screen is still blank while it suspends (unless I kill klogd), 

That is expected behaviour. Can you close the report?