Bug 10224 - kacpid and kacpi_notify takes 90 % of cpu
Summary: kacpid and kacpi_notify takes 90 % of cpu
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Interrupts (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: ykzhao
URL:
Keywords:
: runaway_kacpid (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-11 09:44 UTC by Jithin Emmanuel
Modified: 2008-05-28 18:03 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.24
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
dmesg (31.73 KB, application/octet-stream)
2008-03-11 09:45 UTC, Jithin Emmanuel
Details
Output of acpidump (102.07 KB, application/octet-stream)
2008-03-13 04:42 UTC, Jithin Emmanuel
Details
dmesg in 2.6.25 with acpi debugging on (124.61 KB, application/octet-stream)
2008-03-13 07:46 UTC, Jithin Emmanuel
Details
/proc/interrupts in 2.6.25 with debugging on (1.35 KB, application/octet-stream)
2008-03-13 07:47 UTC, Jithin Emmanuel
Details
acpidump in 2.6.25 with acpi debugging on (102.07 KB, application/octet-stream)
2008-03-13 07:49 UTC, Jithin Emmanuel
Details
output of grep acpi /proc/interrupts; grep . /sys/firmware/acpi/interrupts/* (1.53 KB, application/octet-stream)
2008-03-13 07:52 UTC, Jithin Emmanuel
Details
try the debug patch (597 bytes, patch)
2008-03-13 22:25 UTC, ykzhao
Details | Diff
dmesg in 2.6.24 with acpi patch (46.15 KB, application/octet-stream)
2008-03-14 09:12 UTC, Jithin Emmanuel
Details
the updated patch (2.17 KB, patch)
2008-03-17 23:01 UTC, ykzhao
Details | Diff
patch included in linux-2.6.25-git16 (3.77 KB, patch)
2008-04-30 21:00 UTC, Len Brown
Details | Diff

Description Jithin Emmanuel 2008-03-11 09:44:21 UTC
Latest working kernel version:2.6.24
Earliest failing kernel version:2.6.22
Distribution:Ubuntu
Hardware Environment:Pentium Core 2 Duo, Intel 945 GCNL mother board, Nvidia 8600 GT
Software Environment:Gnome
Problem Description:i dual boot with windows XP. If the system is shutdown for a few days and i start linux. There is no problem. But if i start windows and then linux. This kacpid & kacpi_notify eats my cpu. My earlier system was Pentium iV + intel 865 GBF mother board. There was no such problems with that system. This problem appeared after i upgraded my hardware.

Steps to reproduce:Use the hardware configuration listed and dual boot with windows.
Comment 1 Jithin Emmanuel 2008-03-11 09:45:42 UTC
Created attachment 15215 [details]
dmesg

This is the output of dmesg
Comment 2 Andrew Morton 2008-03-11 10:59:23 UTC
> Latest working kernel version:2.6.24
> Earliest failing kernel version:2.6.22

I will assume that these were reversed.  That 2.6.22 works OK and that
2.6.24 does not.
Comment 3 Jithin Emmanuel 2008-03-11 18:35:52 UTC
Sorry my mistake. The problem was there for both kernels. In my old hardware there was no such problems which ever kernel i used.
Comment 4 ykzhao 2008-03-11 19:08:14 UTC
Hi, Jithin
    It seems that the problem is related to acpi interrupt floods.   
    Will you please enable the ACPI debug function in kernel configuration and boot the system with the option of "acpi.debug_layer=0x010004 acpi.debug_level=0x8000017" ?
    
    After the system is booted, please attach the output of dmesg and /proc/interrupts. 
    It will be great if you can attach the output of acpidump.
    
    Thanks.
     
Comment 5 Len Brown 2008-03-12 19:07:33 UTC
> The problem was there for both kernels.
clearing regression flag on this report, as apparently this
problem happens with all kerenls that run on this machine.

in addition to the questions above...

running 2.6.25, please paste the output of this command:

grep acpi /proc/interrupts; grep . /sys/firmware/acpi/interrupts/*
Comment 6 Jithin Emmanuel 2008-03-13 04:42:32 UTC
Created attachment 15235 [details]
Output of acpidump
Comment 7 Jithin Emmanuel 2008-03-13 04:48:54 UTC
 ykzhao, do i have to recompile kernel to enable acpi debugging?

I have attaches output of acpidump. Now i am going to install 2.6.25 kernel and i will post information you are asking.
Comment 8 Jithin Emmanuel 2008-03-13 07:46:42 UTC
Created attachment 15236 [details]
dmesg in 2.6.25 with acpi debugging on
Comment 9 Jithin Emmanuel 2008-03-13 07:47:50 UTC
Created attachment 15237 [details]
/proc/interrupts in 2.6.25 with debugging on
Comment 10 Jithin Emmanuel 2008-03-13 07:49:34 UTC
Created attachment 15238 [details]
acpidump in 2.6.25 with acpi debugging on
Comment 11 Jithin Emmanuel 2008-03-13 07:52:12 UTC
Created attachment 15239 [details]
output of grep acpi /proc/interrupts; grep . /sys/firmware/acpi/interrupts/* 

i had acpi debugging on
Comment 12 ykzhao 2008-03-13 18:26:13 UTC
    Thank for the info.
    Now it is confirmed that the bug is caused by the ACPI interrupt flood. And the GPE 0x1D is triggered at very high rate. (In fact there is a similar bug 9781)
    
    On this desktop the GPE 0x1D is a wakeup GPE and shared by three device : Sleep button, PS2K, PS2M. And GPE 0x1D will be configured as Run_Wake(Runtime wakeup) gpe in button driver. 
    According to ACPI spec the wake events should not be intermixed with
non-wake (runtime) events on the same GPE input. In this desktop the wake
events are intermixed with the non-wake(runtime) events on the same 0x1D gpe
input. It is incorrect.
    
    Thanks.
Comment 13 Jithin Emmanuel 2008-03-13 19:05:17 UTC
Thank you ykzhao so all i need is to recompile the kernel with the patch you provided in bug 9781
Comment 14 Jithin Emmanuel 2008-03-13 19:17:33 UTC
And can you tell me when will it get fixed in kernel itself
Comment 15 Zhang Rui 2008-03-13 19:49:48 UTC
Well, this is a duplicate of bug 9781.
The problem is caused by a violation of ACPI spec.
The patch in bug 9781 can not be upstream as it's just a work around.
The most important thing for us is to make clear why it works in Windows, and why boot after a windows boot changes the symptom in Linux.
Comment 16 Jithin Emmanuel 2008-03-13 22:02:04 UTC
So is this a problem with my hardware violating ACPI spec. or with linux kernel?
Comment 17 ykzhao 2008-03-13 22:25:07 UTC
Created attachment 15259 [details]
try the debug patch

Will you please try the debug patch and see whether the problem still exists?

In this patch OSPM will call _PSW method to disable the device's ability to
wake up the system. 
Thanks.
Comment 18 ykzhao 2008-03-13 22:27:58 UTC
What Rui said in comment #15 is right. The problem is caused by the violation of ACPI spec. 

Will you please try the debug patch in comment #17 and see whether the problem still exists? Please add the boot option required in comment #1 and attach the output of dmesg.
Thanks.
Comment 19 Jithin Emmanuel 2008-03-14 09:12:42 UTC
Created attachment 15268 [details]
dmesg in 2.6.24 with acpi patch

I applied the patch for 2.6.24. Now its working correctly. Problem has been solved. Thank you for helping me out. Is the patch same with 2.6.25?
Comment 20 ykzhao 2008-03-17 17:45:37 UTC
*** Bug 9781 has been marked as a duplicate of this bug. ***
Comment 21 ykzhao 2008-03-17 23:01:02 UTC
Created attachment 15319 [details]
the updated patch

The attached patch is updated patch.
In this patch OSPM will call the _PSW object directly to disable the device's ability to wake the sleeping system.
Comment 22 Jithin Emmanuel 2008-03-18 02:48:16 UTC
I have some information. I dont know if it's relevant or not. My system has on board LAN. When i used opensuse and debian, to get this device functional i have to enable 
      "Wake on LAN after shutdown" from the devices properties in Windows.
Comment 23 Jithin Emmanuel 2008-03-18 10:05:49 UTC
I believe the culprit in my desktop board d945GCNL. I fount in net that there is ACPI problem with this board when installing windows 2000. There is a BIOS update which fixes this. I installed it but no luck. It does'nt fix for linux!
After the update i found something in dmesg. I do not know if it is of any help

intel_rng: Firmware space is locked read-only. <4>intel_rng: If you can't or
 don't want to <4>intel_rng: disable this in firmware setup, and <4>intel_rng: if
 you are certain that your <4>intel_rng: system has a functional
 RNG, try<4>intel_rng: using the 'no_fwh_detect' option.
Comment 24 Dennis 2008-03-19 08:47:41 UTC
I tested both patches, in comment #17 and the updated in comment #21 and the bug seems fixed in my system, still im not sure why the system worked after hard reseting windows. 
Comment 25 Len Brown 2008-04-30 21:00:46 UTC
Created attachment 15995 [details]
patch included in linux-2.6.25-git16

shipped in linux-2.6.25-git16
729b2bdbfa19dd9be98dbd49caf2773b3271cc24
ACPI : Disable the device's ability to wake the sleeping system in the boot phase
Comment 26 Ben Duffield 2008-05-28 03:39:23 UTC
I have this problem only since upgrading to 2.6.25 - it isn't there with 2.6.24 which I am using now (I downgraded).
Where do I find linux-2.6.25-git16 mentioned above?
Comment 27 Ben Duffield 2008-05-28 11:57:59 UTC
Additional info for above - it only occurs when I have resumed from disk after having hibernated using s2disk. On a normal boot it doesn't happen.
Comment 28 ykzhao 2008-05-28 18:03:59 UTC
Hi, Ben
   Maybe the problem of your laptop is different with this bug.
   Will you please open a new bug and attach the output of dmesg, acpidump, lspci -vxxx?
   Thanks.

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