Bug 11563 - kacpi_notify and kacpid causing high cpu load after resume
Summary: kacpi_notify and kacpid causing high cpu load after resume
Alias: None
Product: ACPI
Classification: Unclassified
Component: ACPICA-Core (show other bugs)
Hardware: All Linux
: P1 high
Assignee: acpi_acpica-core@kernel-bugs.osdl.org
Depends on:
Reported: 2008-09-13 04:11 UTC by Johannes Engel
Modified: 2008-10-27 19:30 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.27-rc6
Regression: ---
Bisected commit-id:

dmidecode output (15.33 KB, text/plain)
2008-09-13 04:11 UTC, Johannes Engel
kernel output after resuming (124.32 KB, text/plain)
2008-09-13 04:12 UTC, Johannes Engel
acpidump output (108.46 KB, text/plain)
2008-09-15 14:06 UTC, Johannes Engel
lspci output before suspending (13.59 KB, text/plain)
2008-09-15 14:07 UTC, Johannes Engel
lspci output after resuming (13.59 KB, text/plain)
2008-09-15 14:08 UTC, Johannes Engel
output after resume without dvd drive (26.18 KB, text/plain)
2008-09-16 01:00 UTC, Johannes Engel
lspci output after resume after inserting dvd drive (26.18 KB, text/plain)
2008-09-16 01:00 UTC, Johannes Engel

Description Johannes Engel 2008-09-13 04:11:18 UTC
Latest working kernel version: ?
Earliest failing kernel version: 2.6.27-rc6, openSUSE kernel
Distribution: openSUSE 11.0
Hardware Environment: Dell Latitude D820, intel i945GM
Software Environment: suspend-0.80.20080523
Problem Description: Coming back after suspend to RAM the two processes kacpi_notify and kacpid cause very high cpu load. If I enable acpi debug logging they keep spamming my syslog.

Steps to reproduce: suspend to RAM and resume

I will attach dmidecode and kernel log
Comment 1 Johannes Engel 2008-09-13 04:11:56 UTC
Created attachment 17760 [details]
dmidecode output
Comment 2 Johannes Engel 2008-09-13 04:12:31 UTC
Created attachment 17761 [details]
kernel output after resuming
Comment 3 ykzhao 2008-09-15 05:41:59 UTC
Will you please attach the output of acpidump?
It will be great if you attach the output of lspci -vxx before and after suspend/resume.
Comment 4 Johannes Engel 2008-09-15 14:06:44 UTC
Created attachment 17790 [details]
acpidump output
Comment 5 Johannes Engel 2008-09-15 14:07:38 UTC
Created attachment 17791 [details]
lspci output before suspending
Comment 6 Johannes Engel 2008-09-15 14:08:17 UTC
Created attachment 17792 [details]
lspci output after resuming

The difference seems to be in the libata area as far as I can see.
Comment 7 ykzhao 2008-09-15 19:17:20 UTC
Hi, Johannes
   Will you please attach the output of lspci -vxxx(not lspci -vxx) before and after suspend/resume?
   I am sorry for my fault.
Comment 8 ykzhao 2008-09-15 23:50:15 UTC
Hi, Johannes
   Will you please try the early version kernel(for example: and see whether the system can work well after resuming?
   It will be great if you can confirm whether the windows can work well after resuming from S3?
Comment 9 ykzhao 2008-09-16 00:03:49 UTC
Hi, Johannes
    Will you please add the boot option of "libata.noacpi=1" on the 2.6.27-rc6 kernel and see whether the problem still exists?
Comment 10 Johannes Engel 2008-09-16 00:59:32 UTC
I can try later, but first I want to let you know about some new thing: I found out that it is apparently connected to the status of my dvd drive: If that is plugged in, everything works fine. If not, the described behaviour occurs.
To clarify I will attach the output of lspci -vxxx after resuming without the drive and the output after connecting the drive.
Comment 11 Johannes Engel 2008-09-16 01:00:20 UTC
Created attachment 17799 [details]
output after resume without dvd drive
Comment 12 Johannes Engel 2008-09-16 01:00:56 UTC
Created attachment 17800 [details]
lspci output after resume after inserting dvd drive
Comment 13 Shaohua 2008-09-16 22:52:28 UTC
can you please try this patch set?
Comment 14 Shaohua 2008-09-16 23:31:43 UTC
At runtime, can you check if hotplug dvd drive work?
Comment 15 Johannes Engel 2008-09-17 00:14:56 UTC
As far as I can see everything works perfect using that patchset (especially battery hotplug is nice :))
Inserting the drive gives:

[  255.502166] ACPI: \_SB_.PCI0.IDE0.SEC0.MAST - docking
[  255.504641] ata2: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0xe frozen
[  255.504655] ata2: ACPI event
[  255.504703] ata2: soft resetting link
[  255.532205] psmouse.c: GlidePoint at isa0060/serio1/input0 lost sync at byte 1
[  255.533308] psmouse.c: GlidePoint at isa0060/serio1/input0 lost sync at byte 1
[  255.534432] psmouse.c: GlidePoint at isa0060/serio1/input0 lost sync at byte 1
[  255.550896] psmouse.c: GlidePoint at isa0060/serio1/input0 - driver resynched.
[  255.658582] ata2.00: ATAPI: PHILIPS DVD+/-RW SDVD8820, AD20, max UDMA/33
[  255.715624] ata2.00: configured for UDMA/33
[  255.715643] ata2: EH complete
[  255.742881] scsi 1:0:0:0: CD-ROM            PHILIPS  DVD+-RW SDVD8820 AD20 PQ: 0 ANSI: 5
[  255.743150] scsi 1:0:0:0: Attached scsi generic sg1 type 5
[  255.795111] Driver 'sr' needs updating - please use bus_type methods
[  255.935626] sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
[  255.935638] Uniform CD-ROM driver Revision: 3.20
[  255.937023] sr 1:0:0:0: Attached scsi CD-ROM sr0

Removing gives:
[  318.150054] ata2.00: disabled
[  318.150140] ACPI: \_SB_.PCI0.IDE0.SEC0.MAST - undocking
[  318.150967] ata2.00: detaching (SCSI 1:0:0:0)
[  318.152069] ACPI: \_SB_.PCI0.IDE0.SEC0.MAST - docking
[  318.152585] ACPI: Unable to dock!
Comment 16 Lucas Nussbaum 2008-09-24 00:53:37 UTC

I'm affected by this bug as well, on a Dell Latitude D610:
With the DVD drive in the media bay => no problem
Without the DVD drive in the media bay => kacpid + kacpi_notify using 100% CPU after resume.

I can help with testing a patch targetted at 2.6.27, if needed.
Comment 17 ykzhao 2008-09-24 00:57:00 UTC
Hi, Lucas
    Please try the patch set as what Shaohua said in comment #13.
Comment 18 Lucas Nussbaum 2008-09-24 04:50:49 UTC
linus' git tree fails to build with the patch:

  Building modules, stage 2.
  MODPOST 2109 modules
ERROR: "acpi_os_hotplug_execute" [drivers/acpi/dock.ko] undefined!
WARNING: modpost: Found 6 section mismatch(es).
To see full details build your kernel with:
make[3]: *** [__modpost] Error 1
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/tmp/linux-2.6'
make[1]: *** [debian/stamp-build-kernel] Error 2
make[1]: Leaving directory `/tmp/linux-2.6'
dpkg-buildpackage: failure: debian/rules build gave error exit status 2

I would be easier if you had a git repo I could pull from.
Comment 19 Johannes Engel 2008-09-24 04:53:15 UTC
Did you apply the whole patch set or only one patch?
Comment 20 Lucas Nussbaum 2008-09-24 05:44:36 UTC
all of it, AFAIK. There were some conflicts that I had to solve manually.
Comment 21 Zhang Rui 2008-09-24 18:41:31 UTC
please add "EXPORT_SYMBOL(acpi_os_hotplug_execute);" below the definition of acpi_os_hotplug_execute.
Comment 22 Lucas Nussbaum 2008-09-25 02:00:18 UTC
it works fine with the patch (after adding EXPORT_SYMBOL). I tried to suspend/resume 3 times.

What's the next step to get it into 2.6.27?
Comment 23 Lucas Nussbaum 2008-09-25 22:17:55 UTC
actually, a few minutes after resuming, my touchpad, and some of my keyboard's keys, stopped working. so something might still be broken.
Comment 24 Len Brown 2008-10-16 13:16:16 UTC
a refreshed version of the patch series mentioned in comment #13
is included in the acpi-test tree, and linux-next tree,
staged for 2.6.28-rc1.
Comment 25 Len Brown 2008-10-27 19:30:22 UTC
shipped in linux-2.6.28-rc1

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