Bug 9148 - halt and poweroff do not shut the system down
Summary: halt and poweroff do not shut the system down
Status: REJECTED INSUFFICIENT_DATA
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Off (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: ykzhao
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-12 05:32 UTC by John Sigler
Modified: 2008-07-03 20:38 UTC (History)
0 users

See Also:
Kernel Version: 2.6.22.1-rt9
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Kernel configuration (17.84 KB, text/plain)
2007-10-12 05:38 UTC, John Sigler
Details
lspci -vvv output (8.15 KB, text/plain)
2007-10-12 05:44 UTC, John Sigler
Details
dmesg output (12.31 KB, text/plain)
2007-10-12 05:46 UTC, John Sigler
Details
acpidump output (68.57 KB, text/plain)
2007-10-12 05:56 UTC, John Sigler
Details
halt output (387.73 KB, text/plain)
2007-10-12 06:01 UTC, John Sigler
Details
2.6.22.10 kernel configuration (16.58 KB, text/plain)
2007-10-12 07:50 UTC, John Sigler
Details
2.6.22.10 poweroff output (387.83 KB, text/plain)
2007-10-12 07:54 UTC, John Sigler
Details
objdump -xd hwsleep.o (44.72 KB, text/plain)
2007-10-15 01:00 UTC, John Sigler
Details
objdump -xd hwregs.o (54.69 KB, text/plain)
2007-10-15 01:03 UTC, John Sigler
Details
Make acpi_enter_sleep_state() more verbose (3.42 KB, patch)
2007-10-15 03:02 UTC, John Sigler
Details | Diff
New poweroff output (1.76 KB, text/plain)
2007-10-15 03:12 UTC, John Sigler
Details
Verbose poweroff output (7.19 KB, text/plain)
2007-10-15 03:29 UTC, John Sigler
Details
2.6.23.1 kernel configuration (16.20 KB, text/plain)
2007-10-15 06:11 UTC, John Sigler
Details
2.6.23.1 poweroff output (4.86 KB, text/plain)
2007-10-15 06:21 UTC, John Sigler
Details
Verbose dmesg output (44.69 KB, text/plain)
2007-10-24 07:33 UTC, John Sigler
Details
2.6.25 kernel configuration (17.54 KB, text/plain)
2008-04-25 06:15 UTC, John Sigler
Details
2.6.25 dmesg output (10.34 KB, text/plain)
2008-04-25 06:16 UTC, John Sigler
Details
lspci -vxxx output (14.95 KB, text/plain)
2008-04-25 06:18 UTC, John Sigler
Details

Description John Sigler 2007-10-12 05:32:33 UTC
I'm using a PREEMPT_RT kernel.
http://rt.wiki.kernel.org/index.php/Main_Page

When I run 'halt' (from sysvinit-2.86) the kernel prints:

Halting.
Shutdown: hdc
ACPI: PCI interrupt for device 0000:01:05.0 disabled
ACPI: PCI interrupt for device 0000:01:04.0 disabled
ACPI: PCI interrupt for device 0000:01:03.0 disabled
ACPI: PCI interrupt for device 0000:01:02.0 disabled
Power down.
acpi_power_off called

But the system does not shut down. (The fans keep spinning, the LEDs keep shining, the LCD keeps displaying.) Basically, the motherboard is still providing power to every component, as if the power supply had refused to stop.

Same behavior when I run 'poweroff' instead of 'halt'.
Comment 1 John Sigler 2007-10-12 05:38:47 UTC
Created attachment 13129 [details]
Kernel configuration
Comment 2 John Sigler 2007-10-12 05:44:41 UTC
Created attachment 13130 [details]
lspci -vvv output

The system is all-Intel (Intel CPU, Intel north bridge, Intel south bridge, Intel integrated network controllers).
Comment 3 John Sigler 2007-10-12 05:46:43 UTC
Created attachment 13131 [details]
dmesg output
Comment 4 John Sigler 2007-10-12 05:56:13 UTC
Created attachment 13132 [details]
acpidump output
Comment 5 John Sigler 2007-10-12 06:01:49 UTC
Created attachment 13133 [details]
halt output

I set CONFIG_ACPI_DEBUG in my kernel configuration.

# cat /sys/module/acpi/parameters/debug_layer
Description                     Hex        SET
ACPI_UTILITIES                  0x00000001 [*]
ACPI_HARDWARE                   0x00000002 [*]
ACPI_EVENTS                     0x00000004 [*]
ACPI_TABLES                     0x00000008 [*]
ACPI_NAMESPACE                  0x00000010 [*]
ACPI_PARSER                     0x00000020 [*]
ACPI_DISPATCHER                 0x00000040 [*]
ACPI_EXECUTER                   0x00000080 [*]
ACPI_RESOURCES                  0x00000100 [*]
ACPI_CA_DEBUGGER                0x00000200 [*]
ACPI_OS_SERVICES                0x00000400 [*]
ACPI_CA_DISASSEMBLER            0x00000800 [*]
ACPI_COMPILER                   0x00001000 [*]
ACPI_TOOLS                      0x00002000 [*]
ACPI_ALL_DRIVERS                0xFFFF0000 [*]
-- 
debug_layer = 0xFFFF3FFF ( * = enabled)

# cat /sys/module/acpi/parameters/debug_level
Description                     Hex        SET
ACPI_LV_ERROR                   0x00000001 [*]
ACPI_LV_WARN                    0x00000002 [*]
ACPI_LV_INIT                    0x00000004 [*]
ACPI_LV_DEBUG_OBJECT            0x00000008 [*]
ACPI_LV_INFO                    0x00000010 [*]
ACPI_LV_INIT_NAMES              0x00000020 [*]
ACPI_LV_PARSE                   0x00000040 [*]
ACPI_LV_LOAD                    0x00000080 [*]
ACPI_LV_DISPATCH                0x00000100 [*]
ACPI_LV_EXEC                    0x00000200 [*]
ACPI_LV_NAMES                   0x00000400 [*]
ACPI_LV_OPREGION                0x00000800 [*]
ACPI_LV_BFIELD                  0x00001000 [*]
ACPI_LV_TABLES                  0x00002000 [*]
ACPI_LV_VALUES                  0x00004000 [*]
ACPI_LV_OBJECTS                 0x00008000 [*]
ACPI_LV_RESOURCES               0x00010000 [*]
ACPI_LV_USER_REQUESTS           0x00020000 [*]
ACPI_LV_PACKAGE                 0x00040000 [*]
ACPI_LV_ALLOCATIONS             0x00100000 [*]
ACPI_LV_FUNCTIONS               0x00200000 [*]
ACPI_LV_OPTIMIZATIONS           0x00400000 [*]
ACPI_LV_MUTEX                   0x01000000 [*]
ACPI_LV_THREADS                 0x02000000 [*]
ACPI_LV_IO                      0x04000000 [*]
ACPI_LV_INTERRUPTS              0x08000000 [*]
ACPI_LV_AML_DISASSEMBLE         0x10000000 [*]
ACPI_LV_VERBOSE_INFO            0x20000000 [*]
ACPI_LV_FULL_TABLES             0x40000000 [*]
ACPI_LV_EVENTS                  0x80000000 [*]
-- 
debug_level = 0xFFFFFFFF (* = enabled)
Comment 6 Alexey Starikovskiy 2007-10-12 06:53:42 UTC
Does power off work for you in case of non-rt kernel?
Comment 7 John Sigler 2007-10-12 07:50:49 UTC
Created attachment 13134 [details]
2.6.22.10 kernel configuration

I compiled a vanilla 2.6.22.10 kernel.
'poweroff' does not make the system shut down.
An incomplete ACPI implementation is a possibility.
Comment 8 John Sigler 2007-10-12 07:54:39 UTC
Created attachment 13135 [details]
2.6.22.10 poweroff output
Comment 9 Alexey Starikovskiy 2007-10-12 08:03:58 UTC
Do you know if it worked in any kernel before?
Comment 10 John Sigler 2007-10-12 08:53:45 UTC
I've just received this system. 2.6.22 is the only kernel I've run.
http://advantech.com/products/1U-Rackmount-Intel-Pentium-4Processor-based-Platform-with-4PCI-LAN-Ports-2-PCI-Expansion-Slots/mod_1-23A2W4.aspx
Comment 11 Alexey Starikovskiy 2007-10-12 09:41:37 UTC
From the log above you seem to miss 
/* Write #2: SLP_TYP + SLP_EN */
in acpi_enter_sleep_state(). There are should be call to hw_low_level_write with value of 3C0, but your log only mention 1C0 write (previous one).
Could you please insert some printks around this second write? only PM1A exists in  your machine. If you prefer patches, just say so...
Comment 12 John Sigler 2007-10-15 01:00:47 UTC
Created attachment 13160 [details]
objdump -xd hwsleep.o

Could it be an optimization bug?

$ gcc -v
Reading specs from /usr/lib/gcc/i486-slackware-linux/3.4.6/specs
Configured with: ../gcc-3.4.6/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.4.6
Comment 13 John Sigler 2007-10-15 01:03:30 UTC
Created attachment 13161 [details]
objdump -xd hwregs.o
Comment 14 Alexey Starikovskiy 2007-10-15 02:11:53 UTC
Hard to tell, hwregs.c should contain outb/inb, but I can't see one.
Could you try live CD from say Ubuntu, they also use 2.6.22, but different gcc version...
Comment 15 John Sigler 2007-10-15 03:02:31 UTC
Created attachment 13162 [details]
Make acpi_enter_sleep_state() more verbose
Comment 16 John Sigler 2007-10-15 03:12:13 UTC
Created attachment 13163 [details]
New poweroff output
Comment 17 John Sigler 2007-10-15 03:29:31 UTC
Created attachment 13164 [details]
Verbose poweroff output

Writing 15361 (i.e. 0x3C01) to ACPI_REGISTER_PM1A_CONTROL appears to hang my system in acpi_os_write_port(). What can I do about that?
Comment 18 Alexey Starikovskiy 2007-10-15 03:58:30 UTC
This is the write that should have turned your machine off.
Comment 19 John Sigler 2007-10-15 06:11:52 UTC
Created attachment 13165 [details]
2.6.23.1 kernel configuration
Comment 20 John Sigler 2007-10-15 06:21:26 UTC
Created attachment 13166 [details]
2.6.23.1 poweroff output

The problem is still present in 2.6.23.1
Comment 21 Daniele C. 2007-10-16 04:07:39 UTC
I am experiencing the same problem with kernel 2.6.22-r8 but I am almost sure it's due to my kernel parameter acpi=off

It previously worked without acpi=off.
Comment 22 Alexey Starikovskiy 2007-10-16 10:19:35 UTC
Please, keep "acpi=off" not working out of this bug report, because by this option  you essentially forbid OS to power off recent machines (with no APM support).
Comment 23 John Sigler 2007-10-24 07:33:21 UTC
Created attachment 13261 [details]
Verbose dmesg output

This is the boot log from a debug kernel.
Comment 24 Len Brown 2008-01-06 20:50:05 UTC
please try with "apm=off".
If that helps, please try with this config option set to =y:
# CONFIG_PM_LEGACY is not set
and the patch in bug 9194 without any .config change.
Comment 25 John Sigler 2008-03-05 05:35:54 UTC
I compiled 2.6.22.19 using the same 2.6.22.10 kernel configuration.
I then booted with apm=off.
When I run 'halt' the kernel prints:

Halting.
Shutdown: hdc
ACPI: PCI interrupt for device 0000:01:05.0 disabled
ACPI: PCI interrupt for device 0000:01:04.0 disabled
ACPI: PCI interrupt for device 0000:01:03.0 disabled
ACPI: PCI interrupt for device 0000:01:02.0 disabled
Power down.
acpi_power_off called
 hwsleep-0322 [01] enter_sleep_state     : Entering sleep state [S5]

But the system still does not shut down.
Comment 26 ykzhao 2008-04-22 03:02:55 UTC
Hi, John
    Will you please confirm whether the windows can work on this machine?
    Thanks.
Comment 27 ykzhao 2008-04-23 02:38:29 UTC
Hi, Joh
    Will you please try the latest kernel and see whether the proble still exists?
    Please attach the output of lspci -vxxx.
    Thanks.
Comment 28 John Sigler 2008-04-25 06:02:13 UTC
I booted 2.6.25 and when I run 'halt' the kernel prints:

Halting.
Shutdown: hdc
ACPI: PCI interrupt for device 0000:01:05.0 disabled
ACPI: PCI interrupt for device 0000:01:04.0 disabled
ACPI: PCI interrupt for device 0000:01:03.0 disabled
ACPI: PCI interrupt for device 0000:01:02.0 disabled
ACPI: Preparing to enter system sleep state S5
Power down.
acpi_power_off called
 hwsleep-0322 [00] enter_sleep_state     : Entering sleep state [S5]

The system does not shut down.
At this point, I do not believe it is a kernel issue.
Comment 29 John Sigler 2008-04-25 06:15:01 UTC
Created attachment 15912 [details]
2.6.25 kernel configuration
Comment 30 John Sigler 2008-04-25 06:16:46 UTC
Created attachment 15913 [details]
2.6.25 dmesg output
Comment 31 John Sigler 2008-04-25 06:18:16 UTC
Created attachment 15914 [details]
lspci -vxxx output
Comment 32 ykzhao 2008-05-04 06:24:42 UTC
Hi, John
    Please confirm whether windows can work well on this box?
    Thanks.
Comment 33 ykzhao 2008-07-03 20:38:30 UTC
As there is no response for more than two months, the bug will be rejected.

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