Bug 12183 - Poweroff doesn't - PackardBell V7900
Summary: Poweroff doesn't - PackardBell V7900
Status: CLOSED DUPLICATE of bug 8549
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: 2008-12-08 12:53 UTC by Pablo
Modified: 2008-12-29 19:31 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.27.5-117.fc10.i686
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
acpidump (91.50 KB, text/plain)
2008-12-09 13:58 UTC, Pablo
Details
dmesg -s64000 (36.19 KB, text/plain)
2008-12-09 14:00 UTC, Pablo
Details
dmesg -s64000 (28.57 KB, text/plain)
2008-12-11 04:42 UTC, Pablo
Details
dmesg -s64000 (58.57 KB, text/plain)
2008-12-11 04:45 UTC, Pablo
Details
lspci -vxxx (26.74 KB, text/plain)
2008-12-11 04:46 UTC, Pablo
Details
lspci -vxxx (27.82 KB, text/plain)
2008-12-11 04:47 UTC, Pablo
Details
/proc/acpi/battery/BAT0/* (833 bytes, text/plain)
2008-12-13 16:16 UTC, Pablo
Details
acpidump with ec.c #define debug uncommented (91.50 KB, text/plain)
2008-12-14 06:39 UTC, Pablo
Details
dmesg -s64000 with ec.c #define debug uncommented (56.50 KB, text/plain)
2008-12-14 06:39 UTC, Pablo
Details
lspci -vxxx with ec.c #define debug uncommented (27.80 KB, text/plain)
2008-12-14 06:40 UTC, Pablo
Details
[Debug patch]: Force to make ACPI/legacy mode switch regardless of current mode (815 bytes, patch)
2008-12-14 21:26 UTC, ykzhao
Details | Diff
try the attached tool to read/write some I/O port (2.47 KB, patch)
2008-12-14 21:35 UTC, ykzhao
Details | Diff
acpidump with last kernel and patch (91.50 KB, text/plain)
2008-12-16 14:54 UTC, Pablo
Details
dmesg -s64000 with last kernel and patch (56.42 KB, text/plain)
2008-12-16 14:55 UTC, Pablo
Details
The ACPI sci interrupt is disabled when entering S3/S5 (2.17 KB, text/x-patch)
2008-12-16 20:06 UTC, ykzhao
Details
acpidump irq disabled patch (91.50 KB, text/plain)
2008-12-17 12:39 UTC, Pablo
Details
dmesg -s640000 irq disabled patch (35.01 KB, text/plain)
2008-12-17 12:39 UTC, Pablo
Details
ACPI is initialized after scanning pci devices (2.17 KB, patch)
2008-12-22 01:17 UTC, ykzhao
Details | Diff
acpidump acpi after scanning patch (91.50 KB, text/plain)
2008-12-22 13:19 UTC, Pablo
Details
dmesg -s64000 acpi scanning patch (56.50 KB, text/plain)
2008-12-22 13:20 UTC, Pablo
Details

Description Pablo 2008-12-08 12:53:30 UTC
Latest working kernel version: no one
Earliest failing kernel version: all I used
Distribution: Now Fedora 10 but I tried many
Hardware Environment:
PackardBell V7900
lspci:
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:00.0 VGA compatible controller: ATI Technologies Inc M56P [Radeon Mobility X1600]
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
06:02.0 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)
06:02.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 01)
06:02.3 Mass storage controller: O2 Micro, Inc. Integrated MS/xD Controller (rev 01)
06:08.0 Ethernet controller: Intel Corporation PRO/100 VE Network Connection (rev 02)

Software Environment:
 Fedora 10 & KDE
Problem Description:
My laptop doesn't shutdown correctly in many distros I've proven.
The last message my laptop shows is
"acpi power off called"
In fedora 10 the last message is "System halted"
And always stays there making me pushing down the power button for a while to get a successfull power off.
I suffered always this issue in every distro with every kernel that I've proven
Steps to reproduce:
Just Shutdown
Comment 1 Len Brown 2008-12-08 19:28:11 UTC
I don't suppose it works if you boot in APM mode with "acpi=off"?

Please include the output of dmesg -s64000 and attach the output
from acpidump.
Comment 2 Pablo 2008-12-09 13:58:46 UTC
Created attachment 19229 [details]
acpidump

acpidump
About acpi=off I tried the following:

acpi=off doesn't work the system doesn't start I need to put noapic

With acpi=off and noapic don't shutdown correctly
The last message when I shutdown is

Halting System
System halted

and stays there I have to push down the power button

And the messeage by default (with acpi) is

Halting System
Power Down

and stays there I have to push down the power button too
Comment 3 Pablo 2008-12-09 14:00:37 UTC
Created attachment 19230 [details]
dmesg -s64000

dmesg-s64000
Comment 4 ykzhao 2008-12-10 18:13:22 UTC
Hi, Pablo
    Will you please confirm whether the box can be shutdown on windows XP? 
    Will you please boot the system with ACPI disabled and attach the output of lspci -vxxx, dmesg?
    Will you please add the boot option of "maxcpus=1" and see whether the system can be shutdown correctly? Of course please attach the output of dmesg, lspci -vxxx.
    Thanks.
Comment 5 Pablo 2008-12-11 04:42:07 UTC
Created attachment 19248 [details]
dmesg -s64000 

boot options acpi=off noapic

Doesn't shutdown correctly
Comment 6 Pablo 2008-12-11 04:45:20 UTC
Created attachment 19249 [details]
dmesg -s64000  

boot options maxcpus=1

The system works with only one core only but doesn't shutdown completely too
Comment 7 Pablo 2008-12-11 04:46:16 UTC
Created attachment 19250 [details]
lspci -vxxx

boot options acpi=off noapic
Comment 8 Pablo 2008-12-11 04:47:02 UTC
Created attachment 19251 [details]
lspci -vxxx

boot options maxcpus=1
Comment 9 Pablo 2008-12-12 08:50:16 UTC
Oh I forget to confirm that Windows XP shutdown ok
Comment 10 Len Brown 2008-12-12 13:52:49 UTC
dmesg shows this system has additional, possibly related, EC problems:

Linux version 2.6.27.5-117.fc10.i686
...
ACPI: EC: missing confirmations, switch off interrupt mode.
ACPI Exception (evregion-0419): AE_TIME, Returned by Handler for [EmbeddedControl] [20080609]
ACPI Error (psparse-0530): Method parse/execution failed [\_SB_.BAT0._BST] (Node f7816b10), AE_TIME
ACPI Exception (battery-0360): AE_TIME, Evaluating _BST [20080609]

Are you able to reliably get consistent output to this command?

grep . /proc/acpi/battery/BAT0/*

Are you able to build a kernel.org kernel from source?
If yes, please uncomment this line in drivers/acpi/ec.c
/* #define DEBUG */
and report the last thing you see on a poweroff attempt.
Comment 11 Pablo 2008-12-13 16:05:30 UTC
ok, kernel 2.6.27.8 from kernel.org build from source with #define bug uncommented:


Halting system...
md: stopping all md devices.
sd 0:0:0:0: [sda] Synchronizing SCSI cache
sd 0:0:0:0: [sda] Stopping disk
e100 0000:06:08.0: PCI INT A disabled
ACPI: Preparing to enter system sleep state S5
Disabling non-boot CPUs ---
Breaking affinity for irq 1
Breaking affinity for irq 9
Breaking affinity for irq 16
Breaking affinity for irq 20
CPU 1 is now offline
SMP alternatives: switching tu UP code
CPU1 is down
Power down.
acpi_power_off called


I don't now, but is weird CPU 1 is now offline ... what about cpu0?
Comment 12 Pablo 2008-12-13 16:16:43 UTC
Created attachment 19284 [details]
/proc/acpi/battery/BAT0/*
Comment 13 ykzhao 2008-12-14 05:28:19 UTC
Hi, Pablo
    Will you please attach the output of acpidump?
    Thanks.
Comment 14 Pablo 2008-12-14 06:39:14 UTC
Created attachment 19287 [details]
acpidump with ec.c #define debug uncommented

kernel version 2.6.27.8  
#define debug in ec.c
Comment 15 Pablo 2008-12-14 06:39:53 UTC
Created attachment 19288 [details]
dmesg -s64000 with ec.c #define debug uncommented
Comment 16 Pablo 2008-12-14 06:40:31 UTC
Created attachment 19289 [details]
lspci -vxxx with ec.c #define debug uncommented
Comment 17 ykzhao 2008-12-14 21:26:17 UTC
Created attachment 19306 [details]
[Debug patch]: Force to make ACPI/legacy mode switch regardless of current mode

Hi, Pablo
    Will you please try the debug patch on the latest kernel and see whether the box can be shutdown?
    Thanks.
    Please not attach the output of lspci -vxxx.
Comment 18 ykzhao 2008-12-14 21:35:23 UTC
Created attachment 19307 [details]
try the attached tool to read/write some I/O port

Will you please boot the system with ACPI disabled (by adding the boot option of "acpi=off")and do the following test? 
    a. ./iow --addr 0xb2 --width 8 --value 0xA0
    b. ./iow --addr 0x404 --width 16 --value 0x3C01

    After doing the above test, please confirm whether the box can be shutdown.
    Thanks.
Comment 19 Pablo 2008-12-16 14:52:56 UTC
I tried the patch in the last kernel but it doesn't work either..

Haltin system...
md: stopping all md devices.
sd 0:0:0:0: [sda] Synchronizing SCSI cache
sd 0:0:0:0: [sda] Stopping disk
e100 0000:06:08.0: PCI INT A disabled
ACPI: Preparing to enter system sleep state S5
Disabling non-boot CPUs ...
Breaking affinity for irq 1
Breaking affinity for irq 9
Breaking affinity for irq 16
Breaking affinity for irq 20
CPU 1 is now offline
SMP alternatives: switching to UP code
CPU1 is down
Power down.
acpi_power_off called

and stays there
Comment 20 Pablo 2008-12-16 14:54:17 UTC
Created attachment 19337 [details]
acpidump with last kernel and patch
Comment 21 Pablo 2008-12-16 14:55:02 UTC
Created attachment 19338 [details]
dmesg -s64000 with last kernel and patch
Comment 22 Pablo 2008-12-16 15:19:48 UTC
I tried with acpi=off and noapic the test
   a. ./iow --addr 0xb2 --width 8 --value 0xA0

With a. a0 is wrote en port

   b. ./iow --addr 0x404 --width 16 --value 0x3C01

With b. the box suddenly shutdown like if it hadn't have enough battery to stay power on
Comment 23 ykzhao 2008-12-16 20:03:26 UTC
Hi, Pablo
   thanks for the test. From the test it seems that the poweroff still can't work after the debug patch is applied.(In the debug patch the system is switched to ACPI mode regardless of current mode).
   But from the info it seems that the system can be shutdown by writing 0x3C01 to PM1A control register after the system is booted with ACPI disabled and then switched to ACPI mode by writing ACPI_ENABLE to SMI command port.
   
   It is very interesting. In fact when the system is booted with ACPI enabled, the 0x3C01 will also be written into the PM1A control register. But unfortunately the system can't be shutdown. 
   The difference is that no acpi driver is loaded while doing test in comment #22.
   Thanks.
   
Comment 24 ykzhao 2008-12-16 20:06:14 UTC
Created attachment 19340 [details]
The ACPI sci interrupt is disabled when entering S3/S5

Will you please try the debug patch and see whether the system can be shutdown correctly?
   In the debug patch the ACPI SCI interrupt will be disabled when entering S3/S5.
   Thanks.
Comment 25 Pablo 2008-12-17 12:38:38 UTC
it doesn't work either.

I had to modify manually main.c in drivers/acpi/sleep cause your patch version and my main's version (kernel 2.6.27.8) I think are different cause it doesn't work (hunk #1 failed at16 main.c)
Comment 26 Pablo 2008-12-17 12:39:26 UTC
Created attachment 19347 [details]
acpidump irq disabled patch
Comment 27 Pablo 2008-12-17 12:39:55 UTC
Created attachment 19348 [details]
dmesg -s640000 irq disabled patch
Comment 28 ykzhao 2008-12-18 01:17:23 UTC
Hi, Pablo
    thanks for the confirm. From the test it seems that the issue still exists after the patch in comment #24 is applied.
    
    But in the test of comment #22 the system is shutdown after writing 0x3C01 to PM1A control register when the system is booted with ACPI disabled.
    
    Thanks.
    
Comment 29 ykzhao 2008-12-22 01:17:56 UTC
Created attachment 19421 [details]
ACPI is initialized after scanning pci devices

Will you please try the debug patch on the latest kernel(2.6.28-rc8) and see whether the system can be shutdown?
   In the debug patch the ACPI is initialized after scanning pci devices.
   Thanks.
Comment 30 Pablo 2008-12-22 13:19:10 UTC
Created attachment 19435 [details]
acpidump acpi after scanning patch

kernel 2.6.28-rc8
Doesn't shutdown
Comment 31 Pablo 2008-12-22 13:20:00 UTC
Created attachment 19436 [details]
dmesg -s64000 acpi scanning patch
Comment 32 ykzhao 2008-12-22 16:54:37 UTC
Hi, Pablo
    Thanks for the test.
    From the test we know that it won't be affected by the initial order between ACPI and PCI. 
    Now I have no idea about how to get the root cause of this bug.
    In fact we have another similar bug:8549.  The system can't be shutdown with ACPI. But it can be shutdown by writting S5 SLP_TYPE to PM1A control register when the system is booted without ACPI.
    Thanks.
Comment 33 ykzhao 2008-12-22 22:39:36 UTC
Hi, Pablo
    We have another similar bug(8549) on kernel bugzilla. And I have no idea about how to get the root cause of this bug.
    And this bug will be marked as the duplicate of bug8549.
    Thanks.

*** This bug has been marked as a duplicate of bug 8549 ***
Comment 34 Pablo 2008-12-23 02:26:56 UTC
ok I will follow the bug on the other box.
Thanks.
Comment 35 ykzhao 2008-12-23 17:08:46 UTC
Hi, Pablo
    thanks for the understanding.
    Do you have an opportunity to try the two debug patches in http://bugzilla.kernel.org/show_bug.cgi?id=8549#C73,74 and see whether the system can be shutdown?
    If the two debug patches are tried, you needn't use the command of "poweroff" or "shutdown". It is done automatically in the boot phase.
    Thanks.

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