Open Source Support Tools
 
Search Item
 
Summary
  Reported Issue
Title: [6712] CONFIG_ACPI_SLEEP=y prevents poweroff -- it reboots instead - tyan s2882
Project: kernel
Item Last Modified: Tue, 26 Aug 2008 00:44:11
Tags:  
 
 
2.6.18 2.6.22 2.6.23 2.6.24 2.6.25 32-bit Bug acpi acpi_hw_register_write acpi_power_off acpi_sleep_prepare add adding applied array asus attach bios called chipset cmd config console continue cpu dead debug delay depends devices disable disk dmesg drop dump end entry exist exit experimental export_rdev filesystem fix fixes git grep hardware host href kernel kernels late linux linux-kernel linux-kernel-2.6 loop machine_shutdown management md md2 mode move patch patches pci power poweroff race raid recent s5 serial set shutdown sleep something state status suspend t2 tail tested that vendor write xen
Details
[6712] CONFIG_ACPI_SLEEP=y prevents poweroff -- it reboots instead - tyan s2882
Reporter:   dean
Created:   Sun, 18 Jun 2006 20:15:00
Updated:   Tue, 26 Aug 2008 00:44:11
Key:   6712
Versions:   Not provided
Environment:  
Priority:   -1
Status:   Closed
Resolution:   CODE_FIX
Original Link:   http://bugzilla.kernel.org/show_bug.cgi?id=6712
Summary:   CONFIG_ACPI_SLEEP=y prevents poweroff -- it reboots instead - tyan s2882
Description:
Most recent kernel where this bug did not occur: unknown
Distribution: debian unstable
Hardware Environment: tyan s2882, amd64
Software Environment:
Problem Description:

if i build the kernel with CONFIG_ACPI_SLEEP=y and do "shutdown -h now" the
system reboots instead of powering off... if i disable that config option and
attempt to "shutdown -h now" the system powers off fine. i'd like to be able to
run vendor kernels... so resolving the problem with CONFIG_ACPI_SLEEP=y would be
cool.

oh the bios is the latest greatest from tyan (3.07 iirc).

Steps to reproduce:

"shutdown -h now"
Comments:
dean gaudet Sun, 18 Jun 2006 20:18:40
Created an attachment (id=8336) [details]
dmesg output
dean gaudet Sun, 18 Jun 2006 20:19:08
Created an attachment (id=8337) [details]
acpidump output
dean gaudet Sun, 18 Jun 2006 20:20:37
Created an attachment (id=8338) [details]
kernel config
dean gaudet Sun, 18 Jun 2006 20:24:03
oh and here's the tail end of serial console output all the way to the point
where it has reboot and grub has restarted (note i added a few printks of my own):

md: md0 stopped.
md: unbind
md: export_rdev(sda1)
md: md1 stopped.
md: unbind
md: export_rdev(sda2)
md: md2 still in use.
md: md2 still in use.
md: md2 still in use.
Stopping RAID array md2...failed (busy).
Stopping RAID arrays...done (2 array(s) stopped).
Mounting root filesystem read-only...done.
Will now halt.
sys_reboot: cmd=2309737967, pm_power_off=ffffffff8022cc99
sys_reboot: cmd=1126301404, pm_power_off=ffffffff8022cc99
md: stopping all md devices.
md: md0 switched to read-only mode.
md: md1 switched to read-only mode.
md: md2 still in use.
3w-xxxx: Shutting down host 0.
3w-xxxx: Shutdown complete.
acpi_sleep_prepare(5)
[ACPI Debug] String: [0x04] "SIOS"
Power down.
machine_shutdown()
acpi_power_off()
acpi_power_off called
hwsleep-0283 [02] enter_sleep_state : Entering sleep state [S5]
Press any key to continue.
Luming Yu Tue, 20 Jun 2006 08:05:00
Please continue to add some dead loop to track down the place triggering
reboot. Say, add a dead loop after
status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM1B_CONTROL,
PM1Bcontrol);
while(1);

If No reboot with this hack, then you need move on,
till you see reboot. Please reoprt back the results.

dean gaudet Thu, 22 Jun 2006 01:16:15
Created an attachment (id=8377) [details]
add some comments indicating where the reboot occurs

the attached patch indicates which write is causing the reboot... basically it
happens after the PM1Acontrol write for /* Write #2: SLP_TYP + SLP_EN */ ...
Zhang Rui Wed, 11 Jul 2007 01:35:30
Does this still exist in 2.6.22?
dean gaudet Wed, 11 Jul 2007 01:54:39
Subject: Re: CONFIG_ACPI_SLEEP=y prevents poweroff -- it reboots
instead - tyan s2882

CONFIG_ACPI_SLEEP seems to be gone in 2.6.22:

sixlark:/usr/src/linux-2.6.22/linux% find . -name Kconfig\* -type f | xargs
grep CONFIG_ACPI_SLEEP
zsh: done find . -name Kconfig\* -type f |
zsh: exit 123 xargs grep CONFIG_ACPI_SLEEP

so... i don't know...

when i do "shutdown -h now" the box halts but does not power off.

-dena
dean gaudet Wed, 11 Jul 2007 02:08:33
Subject: Re: CONFIG_ACPI_SLEEP=y prevents poweroff -- it reboots
instead - tyan s2882

woops... i keep forgetting to drop the CONFIG_ when i do such greps.

there's an ACPI_SLEEP entry in drivers/acpi/Kconfig but it depends upon
(!SMP || SUSPEND_SMP) ... i apparently hadn't set SUSPEND_SMP...
rebuilding/etc. now.

-dean
dean gaudet Wed, 11 Jul 2007 09:14:37
Subject: Re: CONFIG_ACPI_SLEEP=y prevents poweroff -- it reboots
instead - tyan s2882

yep the problem is still there in 2.6.22.

-dean
t2@spudsoft co uk Sun, 19 Aug 2007 07:33:24
I think I'm affected by this issue too - any chance of some movement on it?

I'm running AMD64 with 2.6.22 - if I shutdown the machine it simply restarts.
This is definitely related to a kernel change because it didn't happen in
earlier kernels (I think it began in 2.6.20, but I'm not 100% on that).

These are the ACPI settings from my config, you can see the SLEEP is not set:
CONFIG_ACPI=y
# CONFIG_ACPI_SLEEP is not set
# CONFIG_ACPI_PROCFS is not set
# CONFIG_ACPI_AC is not set
# CONFIG_ACPI_BATTERY is not set
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_FAN=y
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_ACPI_CONTAINER=y
# CONFIG_ACPI_SBS is not set
CONFIG_X86_ACPI_CPUFREQ=y
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
CONFIG_PNPACPI=y
# CONFIG_THINKPAD_ACPI is not set
CONFIG_BLK_DEV_IDEACPI=y
CONFIG_ATA_ACPI=y
Natalie Protasevich Mon, 22 Oct 2007 22:58:10
Any update on this problem from the developer's side please?
Thanks.
Alexey Starikovskiy Mon, 22 Oct 2007 23:38:43
https://bugzilla.novell.com/show_bug.cgi?id=299882 and 292300.
looks quite similar. There are the patches in recent git for fixing that...
Natalie Protasevich Mon, 22 Oct 2007 23:51:12
Thanks... Dean, t2 - can you test the latest git please so we can close this
bug.
Fu Michael Mon, 03 Dec 2007 01:01:28
ping Dean, t2 for test of patch mentioned in comment# 13..
dean gaudet Mon, 17 Dec 2007 17:14:24
sorry for the delay -- the problem still exists in 2.6.24-rc5 ... i only
skimmed the referenced bug reports but they seem to refer to patches already in
upstream, so i'm hoping they're in 2.6.24-rc5. let me know if there's a patch
i should test on top of 2.6.24-rc5 (i'm not really git-savvy).
Len Brown Fri, 28 Dec 2007 21:44:27
If 2.6.24-rc5 still fails, then we still have a problem, for
the fix to https://bugzilla.novell.com/show_bug.cgi?id=299882
9c1c6a1ba786d58bd03e27ee49f89a5685e8e07b
(ACPI: sleep: Fix GPE suspend cleanup)
shipped in Linux-2.6.24-rc1-git6, which precedes 2.6.24-rc5
Zhang Rui Tue, 18 Mar 2008 00:07:28
Dean, could you please try the latest kernel release, say 2.6.24, and if the
problem is fixed?
dean gaudet Thu, 20 Mar 2008 07:23:46
this system is in production now... i can't experiment like i could
before. is there something 2.6.24 fixes which 2.6.24-rc5 doesn't?

thanks
-dean
D Herring Fri, 04 Apr 2008 19:01:39
I'm having the same problem on both 2.6.23.1 (distributed by Slamd64) and
2.6.24.4 (tweaked/compiled by me). CPU is an Athlon64X2, mobo is a Biostar
TF520 A2+ (nForce 520 chipset), gcc 4.1.2.

Here's a snippet from .config:
#
# Power management options
#
CONFIG_PM=y
# CONFIG_PM_LEGACY is not set
# CONFIG_PM_DEBUG is not set
CONFIG_SUSPEND_SMP_POSSIBLE=y
# CONFIG_SUSPEND is not set
CONFIG_HIBERNATION_SMP_POSSIBLE=y
# CONFIG_HIBERNATION is not set
CONFIG_ACPI=y
CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_SYSFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y
# CONFIG_ACPI_AC is not set
# CONFIG_ACPI_BATTERY is not set
CONFIG_ACPI_BUTTON=y
# CONFIG_ACPI_VIDEO is not set
CONFIG_ACPI_FAN=y
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y
# CONFIG_ACPI_SBS is not set
ykzhao Tue, 15 Apr 2008 01:05:58
Hi, Dean
Will you please try the latest kernel (2.6.25-rc9) and see whether the
problem still exists?
Thanks.
ykzhao Tue, 15 Apr 2008 01:45:32
Hi, D Herring
Will you please try the latest kernel (2.6.25-rc9) and see whether the
problem still exists?
Please attach the output of acpidump.
Thanks.
D Herring Mon, 28 Apr 2008 20:43:31
Created an attachment (id=15971) [details]
acpidump, nForce 520 chipset, kernel 2.6.25

I upgraded to 2.6.25; the problem still exists. Hopefully this ACPI dump is
helpful in identifying the problem.

Thanks for looking,
Daniel
ykzhao Wed, 30 Apr 2008 02:28:21
Will you please try the debug patch in the comment 5 of bug 10503 and see
whether the problem still exists?
Thanks.
ykzhao Sun, 04 May 2008 02:32:55
Hi, D Herring
Will you please try the debug patch in comment#5 of bug 10503 and see
whether the problem still exists?
It will be great if you can confirm whether the windows works well on this
machine?
Thanks.
D Herring Wed, 07 May 2008 18:28:16
I applied the patch (1-liner adding enable=0) and tested at least ten
shutdowns, of which it did work a few times. But a few others produced a
strange disk error during shutdown, so I'm sticking with an unpatched kernel
for actual use. These drives haven't had any other issues.

Somehow this feels like an uninitialized variable or race condition, but I
haven't worked through the code to see where. Maybe it is the hardware/bios.
FWIW, the same reboot happens with 2.6.23 running in 32-bit mode on another
linux install. Sorry; no MSWin available for testing.

I tried a few kernel parameters; acpi=off causes the machine to halt but not
power off, while acpi=strict and acpi=noirq didn't have any noticeable effect.
ykzhao Mon, 12 May 2008 02:25:01
Thanks for the test.
If the unpatched kernel is used, is the system still rebooted instead of
poweroff?
Thanks.
Mike Edwards Sat, 07 Jun 2008 15:13:08
(In reply to comment #0)
> Most recent kernel where this bug did not occur: unknown
> Distribution: debian unstable
> Hardware Environment: tyan s2882, amd64
> Software Environment:
> Problem Description:
>
> if i build the kernel with CONFIG_ACPI_SLEEP=y and do "shutdown -h now" the
> system reboots instead of powering off... if i disable that config option and
> attempt to "shutdown -h now" the system powers off fine. i'd like to be able to
> run vendor kernels... so resolving the problem with CONFIG_ACPI_SLEEP=y would be
> cool.
>
> oh the bios is the latest greatest from tyan (3.07 iirc).
>
> Steps to reproduce:
>
> "shutdown -h now"
Mike Edwards Sat, 07 Jun 2008 18:41:25
Just to toss my $0.02 in, I'm also experiencing this issue on the S2882. It
shows up in 2.6.24, though the 2.6.18 xen kernel in Debian appears to not have
it.
ykzhao Mon, 21 Jul 2008 20:21:49
Hi, Mike
Do you experience the similiar issue on your S2882? From your description
your system is rebooted instead of shutdown on 2.6.24 kernel, right? Please
attach the output of acpidump on your S2882.
Will you please disable some PCI devices in bios option and see whether the
problem still exists?
Will you please try the latest kernel(2.6.26-rc8)?
Thanks.
ykzhao Mon, 25 Aug 2008 22:04:44
As there is no response from the bug reporter for more than one month, the bug
will be rejected.
If the problem still exists, please reopen it.
thanks.
dean gaudet Tue, 26 Aug 2008 00:31:12
as i mentioned, the system is in production, i can't just try experimental
patches unless you can document to me why you think they solve the problem.
dean gaudet Tue, 26 Aug 2008 00:44:11
what the heck, it's late evening... i went for it.

2.6.26.1 seems to have solved the problem at least for the following config:

% grep ACPI /boot/config-`uname -r`
CONFIG_X86_64_ACPI_NUMA=y
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_SYSFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=m
CONFIG_ACPI_DOCK=m
CONFIG_ACPI_BAY=m
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=m
CONFIG_ACPI_NUMA=y
CONFIG_ACPI_WMI=m
CONFIG_ACPI_ASUS=m
CONFIG_ACPI_TOSHIBA=m
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_ACPI_CONTAINER=m
CONFIG_ACPI_SBS=m
CONFIG_X86_ACPI_CPUFREQ=m
CONFIG_X86_POWERNOW_K8_ACPI=y
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
CONFIG_HOTPLUG_PCI_ACPI=m
CONFIG_HOTPLUG_PCI_ACPI_IBM=m
CONFIG_PNPACPI=y
CONFIG_THINKPAD_ACPI=m
# CONFIG_THINKPAD_ACPI_DEBUG is not set
CONFIG_THINKPAD_ACPI_BAY=y
CONFIG_THINKPAD_ACPI_VIDEO=y
CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
CONFIG_BLK_DEV_IDEACPI=y
CONFIG_ATA_ACPI=y
# CONFIG_PATA_ACPI is not set