Bug 1141 - acpi_poweroff fails to power down SMP machine
Summary: acpi_poweroff fails to power down SMP machine
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Off (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Len Brown
URL:
Keywords:
: 2005 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-24 13:30 UTC by Ronald Moesbergen
Modified: 2004-10-27 12:03 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.0-test4
Tree: Mainline
Regression: ---


Attachments
.config (19.74 KB, text/plain)
2003-08-24 13:30 UTC, Ronald Moesbergen
Details
lspci -vvv output (9.69 KB, text/plain)
2003-08-24 13:31 UTC, Ronald Moesbergen
Details
acpidmp output (49.81 KB, text/plain)
2003-08-24 13:41 UTC, Ronald Moesbergen
Details
dmidecode output (9.05 KB, text/plain)
2003-08-24 13:41 UTC, Ronald Moesbergen
Details
my workaround patch for fixing random S5 hang on Dell precision 350 (1.04 KB, patch)
2003-08-25 01:09 UTC, Luming Yu
Details | Diff
proposal patch (588 bytes, patch)
2004-03-02 01:03 UTC, Shaohua
Details | Diff
patch for 2.6 (561 bytes, patch)
2004-03-07 17:41 UTC, Shaohua
Details | Diff
patch for 2.4 (615 bytes, patch)
2004-03-07 17:42 UTC, Shaohua
Details | Diff

Description Ronald Moesbergen 2003-08-24 13:30:07 UTC
Distribution: Gentoo
Hardware Environment: Asus P4GX8 bios 1006 (latest), E7205 chipset, Intel P4 3.06HT
Problem Description:
When i try to shutdown my machine i get the following message:
acpi_poweroff called
and then nothing happens. When i enable acpi debug statements an extra line is
displayed saying something like 'entering state S5' and again nothing happens. 
About one in 5 times the machine actually powers down, but it's rare. It has
done this on every 2.5.x and 2.6.x kernel i've tried (from 2.5.70 up to test4)
When i use apm the machine does shut down properly. config and lspci -vvv are
attached.
Comment 1 Ronald Moesbergen 2003-08-24 13:30:36 UTC
Created attachment 715 [details]
.config
Comment 2 Ronald Moesbergen 2003-08-24 13:31:11 UTC
Created attachment 716 [details]
lspci -vvv output
Comment 3 Ronald Moesbergen 2003-08-24 13:41:04 UTC
Created attachment 717 [details]
acpidmp output
Comment 4 Ronald Moesbergen 2003-08-24 13:41:25 UTC
Created attachment 718 [details]
dmidecode output
Comment 5 Luming Yu 2003-08-25 01:09:44 UTC
Created attachment 723 [details]
my workaround patch for fixing random S5 hang on Dell precision 350

This patch fix my problem, I don't know whether it can work for you.
Comment 6 Ronald Moesbergen 2003-08-25 11:57:52 UTC
Your patch fixed the problem. Thanks! I've shut down about 5 times in a row and it worked 
everytime. Will this patch be merged into mainline? 
Comment 7 Ruben Puettmann 2003-09-18 07:13:46 UTC
This Patch don't help on IBM Thinkpad R40
Comment 8 Andrew E. Schulman 2003-11-14 11:40:36 UTC
I also have this problem, on an Abit IS7 mobo with i865 chipset, P4 2.4C, kernel
2.6.0-test4.  The patch doesn't fix it.  Problem persists in 2.6.0-test9.

I have 2 logical processors (hyperthreading), and in fact my machine powers down
correctly about 50% of the time, and hangs the other 50%.  Coincidence?  Not
sure yet.  I'm going to disable SMP and see if the problem goes away.  Not a
solution, but maybe useful information.
Comment 9 Stian Jordet 2003-12-02 08:56:09 UTC
After a lot of testing now, I can conclude that Luming's patch fixed my random
poweroff-problem with an Asus CUV266-DLS. In two weeks I'll see if it helps my
Rioworks motherboard as well :) Why haven't this patch been merged? (yeah, it's
me again. Sorry.)
Comment 10 Rein Kadastik 2003-12-26 02:36:46 UTC
The patch workd nicely on Asus A7S333 motherboard with 2.6.0 final kernel. Still
shows the acpi_power_off called message but after 1-2 seconds switches the
machine off. I think, that the patch should be incorporated into mainstream kernel
Comment 11 Jan Mynarik 2004-01-20 08:32:27 UTC
Just a success report: workaround patch works great on Abit BP6 dual-celeron
motherboard. Tested with 2.6.1-rc3.
Comment 12 Len Brown 2004-01-20 21:59:55 UTC
for the SMP systems that don't power-off reliably w/o this patch... 
Do they power-off if booted with "nosmp" or a UP kernel? 
 
The reason I haven't integrated the workaround patch is that it 
is a workaround.  We need to fix the root cause. 
 
thanks, 
-Len 
 
Comment 13 Ronald Moesbergen 2004-01-21 11:13:32 UTC
Just tried it with an UP kernel and indeed the machine shuts down fine ...
Comment 14 Stian Jordet 2004-01-21 11:20:39 UTC
I have been testing all day, and with 2.6.1 SMP I had four successful shutdowns
of a total of eleven tries. 2.6.1 UP I got six successfull shutdowns in a row.
Then I tried with 2.6.1-mm5, which has a newer acpi, and now it always
shutdowns, even with SMP :) (at least on my five-six tries).

But on my other, more problematic smp box, this does not help. Will try with UP
on that tomorrow.
Comment 15 Stian Jordet 2004-01-27 09:02:04 UTC
On my Rioworks motherboard, this patch doesn't help me. But compiling a non-smp
kernel does. With uni processor kernel, it poweroff everytime. Thanks.
Comment 16 Shaohua 2004-03-02 01:03:55 UTC
Created attachment 2265 [details]
proposal patch

please try this patch. I found that all poweroff failures occur on CPU1. This
patch allows poweroff only in CPU0. My HT box can poweroff correctly with this
patch.
Comment 17 Stian Jordet 2004-03-02 03:33:01 UTC
Yup, fixes both my boxes that had this problem :) Thanks.
Comment 18 Ronald Moesbergen 2004-03-02 12:27:05 UTC
fixed it for me too.. tnx!
Comment 19 Andrew E. Schulman 2004-03-04 00:46:08 UTC
That's confirmed.  I applied the new patch, and have now successfully shut down
7 of the last 7 times.

Thanks Shoahua, looks like you nailed it.
Comment 20 Shaohua 2004-03-07 17:41:27 UTC
Created attachment 2297 [details]
patch for 2.6
Comment 21 Shaohua 2004-03-07 17:42:07 UTC
Created attachment 2298 [details]
patch for 2.4
Comment 22 Len Brown 2004-03-10 18:20:02 UTC
*** Bug 2005 has been marked as a duplicate of this bug. ***
Comment 23 Len Brown 2004-03-12 21:07:38 UTC
accepted into acpi patch. 
Comment 24 Greg 2004-03-18 02:31:19 UTC
Sorry for the stupid question but how do I build the patched code and get my
kernel (2.6.3-4mdkenterprise) to use it? Thanks.
Comment 25 Len Brown 2004-03-20 00:45:50 UTC
cd .../src 
patch -Np1 < fix.patch 
make bzImage 
... 
 
 
 

Note You need to log in before you can comment on or make changes to this bug.