[Intrepid] kacpid and kacpi_notify consumes all CPU after resume

Bug #280088 reported by Gabriel Thörnblad
94
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Linux
Fix Released
High
linux (Ubuntu)
Fix Released
Medium
Andy Whitcroft
Nominated for Intrepid by Gabriel Thörnblad

Bug Description

After resuming from suspend to ram or suspend to disk, kacpid and kacpi_notify battles to keep CPU at about 90% if you have an extra battery in the media bay, or if you insert or remove an extra battery with the OS running.
This is on a Dell Latitude D810 on all Ubuntu 2.6.27-x kernels so far. The bug seems to be present with Dell laptops only.

Since there is a patch available upstream, I have posted a patched kernel to my PPA which resolves the problem for some of us.

deb http://ppa.launchpad.net/gabriel-thornblad/ubuntu intrepid main
deb-src http://ppa.launchpad.net/gabriel-thornblad/ubuntu intrepid main

Install with:
sudo apt-get install linux-generic-dock

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :
Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :
Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :
Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :
Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :
Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :
Revision history for this message
Brian Neltner (neltnerb) wrote :

I can confirm that this is an issue on my computer as well. I am using a Dell Latitude D620. My behavior is identical.

Revision history for this message
Christian Assing (chassing) wrote :

i think this bug is the same as http://bugzilla.kernel.org/show_bug.cgi?id=11563
suspend/resume works well if my dvd rom is in the media bay but disconnect the dvd rom (after a resume) the kacpid runaway :(

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

Good catch, Christian!
With the dvd rom attached, suspend/resume works fine here as well. Unfortunately, that means no extra battery which I am rather dependent upon.

Changed in linux:
status: Unknown → Fix Released
Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

After applying the patch set from Shaohua Li referenced in the upstream bug I no longer have this problem. I have only used it for a day but I have seen no other issues so far. Hopefully we can have it in Intrepid.

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

I should add that without the patch, the bug manifests if I pop in (or take out) my extra battery in the media bay. It is not directly connected to suspend/resume, that just happens to trigger it.

Changed in linux:
status: New → Confirmed
Revision history for this message
Jos Dehaes (jos-dehaes) wrote :

This is fixed since some time in intrepid for me.

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

Really? I am still suffering from the same problem. I wonder what the difference is between our systems.

Revision history for this message
BretM (bmogilefsky) wrote :

Gabriel, this is still happening for me as well in Intrepid, with all updates applied as of now.
My machine is a Dell Inspiron 600m, basically identical to the Latitude D600.

Definitely seems connected to the bay... I get it on suspend/resume with my extra battery in there.

I haven't tried the upstream patchset, but I'll be happy to try it if someone can give me a pointer to a straightforward way to get a custom kernel installed via package manager. (I'm trying to leave this machine in pristine/unmodified form as much as possible before giving it to a Linux virgin, am reluctant to put anything on here that a package manager can't work with.)

It'd be great to see that patchset get into Intrepid as in addition to this issue, the docking station for this machine has never worked on this machine in any previous Linux distribution that's run on it (and there have been many).

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

OK, I finally managed to get the patched kernel to compile in my PPA, so if you are brave enough you may try it. You know the usual disclaimers: it works for me but may blow up your computer. Here are the apt source entries you need:

deb http://ppa.launchpad.net/gabriel-thornblad/ubuntu intrepid main
deb-src http://ppa.launchpad.net/gabriel-thornblad/ubuntu intrepid main

Since there is no dependency from the original meta package you have to explicitly install the new kernel with
sudo apt-get install linux-image-2.6.27-8-generic linux-headers-2.6.27-8-generic
and I am not sure whether new releases of my package will trigger automatic updates. In that case I will add a new comment here so you know.

On a side note, the upstream patchset is now included in the acpi-test tree, and linux-next tree,
staged for 2.6.28-rc1. I guess that means that we will not see this in Intrepid unless there are great demands for this patch.

Revision history for this message
Christian Assing (chassing) wrote :

Gabriel, your kernel works fine for me. suspend/resume works with media bay battery or cdrom.

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

That is very good news, and thanks for letting us know.
I will keep this kernel updated with the latest patches for Intrepid, and I will try to keep an eye on the upstream kernel tree to see if any obvious patches for this problem trickles in. I don't want to pull everything from acpi-test since that may break other things.

description: updated
Revision history for this message
BretM (bmogilefsky) wrote : Re: [Intrepid beta] kacpid and kacpi_notify consumes all CPU after resume

Ditto here... All working fine, and I now feel much more confident about handing this laptop over to my Linux newb! Thanks a ton for putting the packages together. (I'd not seen PPA at all before, very cool idea.) I didn't have a chance to see if it works with the docking station yet, but will try if I have an opportunity.

I'm still a bit nervous about what happens when a new kernel package appears in the stock Intrepid repository and I'm not around to help her out if this kernel goes away, but it seems like a minor detail given that the laptop's performance and usability is so improved.

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

Again, thanks for letting me know. Since there are a few of us that will benefit, I will try to find the time this weekend to build a meta package (never tried) that will point to the latest patched kernel. This way updates would be handled automatically.

Revision history for this message
Christopher Peplin (chris.peplin) wrote :

Thanks for your work, Gabriel - I'm another person experiencing the problem that can benefit from the patch.

Revision history for this message
BretM (bmogilefsky) wrote :

Now I've had a chance to try it with the docking station. WOW, when I last tried it two years ago any interaction whatsoever with the docking station was a recipe for a crash, and now it pretty much works perfectly!

I also tried swapping the DVD in place of the extra battery. It didn't immediately show up, but when I suspended and resumed, it showed up and everything worked fine! (The only bad part was that I couldn't suspend, take it out, resume, and have it vanish... BUT, interacting with it just got a "no media" error rather than crash.)

This patch should definitely make it into a released Ubuntu kernel... It fixed so many problems for me, I feel like I just got a new machine. I now have tons of confidence that giving it to my niece will result in few problems. Thanks again, Gabriel, you made it easy to try out and if you hadn't it would have been a long while before I got time to work on it myself.

Revision history for this message
Andy Ross (andy-plausible) wrote :

I can confirm this with Intrepid on a Dell M65. With the DVD in the bay, things work normally. But plug the battery in and the kacpi threads start spinning after a resume, thus defeating the purpose to using the media bay battery. This is a regression since Gutsy, none of whose kernels showed the issue.

Revision history for this message
Stephen Gibson (stevieg-livejournal) wrote :

Confirming this issue on my Dell D610. I have applied the patch and I have not seen the issue since.

Good Job Gabriel!

Revision history for this message
Andreas Amsenius (andreas-amsenius) wrote :

I have a Dell d620 with media bay battery and can confirm this behavior after hibernate (probably suspend too, but have not confirmed).

Thanks for your work Gabriel! I will try your patch in a while if nothing happens on the official side.

Revision history for this message
Andy Ross (andy-plausible) wrote :

I can confirm that this but is *not* fixed in the 2.6.27-7-generic kernel that was just pushed. Is there any way to attract the attention of the ubuntu kernel team via this bug? My understanding is that all that's required is for someone to review and integrate this patch for the next kernel build.

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

Alright, I will try to assign this to the kernel-bugs team. If that is not correct, please forgive me.

Changed in linux:
assignee: nobody → kernel-bugs
Revision history for this message
Mike Bloom (mike-r-bloom) wrote :

You can add another Latitude D610 affected by this. For me, its triggered by removing the CD/DVD drive or resuming from standby. I'm back to using 8.04 for now but I'll definitely try this in the future, 8.10 is too good to pass up. Thanks for the work you put into this Gabriel.

Revision history for this message
Matt Foster (matt-foster42) wrote :

It certainly seems to be a Dell thing - my D620 exhibits has the exact same issue running 2.6.27-7-generic. Using the PPA kernel solves the problem for me. Good work - this surely needs to go into stock.

Revision history for this message
Vishal Vatsa (vvatsa) wrote :

I can also confirm this bug on Dell Latitude D620 with 2.6.27-7-generic, is there going to be an update ubuntu on this issue. Thanks to Gabriel for his work.

Revision history for this message
Tobias Richter (tsr-ubuntu) wrote :

Also is a problem on my D630 with stock 2.6.27-8-generic.

Revision history for this message
krishna (kss18) wrote :

I can confirm this with Dell Precision M65 Laptop as well. Running 2.6.27.7-generic

Revision history for this message
Tobias Richter (tsr-ubuntu) wrote :

2.6.27-10-generic has the problem, too. With that version out, I am a bit reluctant reverting back to the -8 version with the fix.

Revision history for this message
Brian Neltner (neltnerb) wrote :

The -8 version with the fix was working great for me, but when it upgraded to 2.6.27-9 the problem returned.

What gives? I thought this was fixed upstream months ago.

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

Since no member of the Ubuntu kernel team has had a look at this, all I can do is speculate. I think this is the deal: the patch is not just a few lines of obvious bug-fixes, it is a rewrite of the way the bay and dock is handled. It removes the old bay-module completely for starters. Because of this and since there are a limited number of people that are bit by this bug, I think the chances that this patch will go in the stock 2.6.27 kernel are pretty slim. It is however included in the coming 2.6.28 kernel, but I have no idea if that will ever make it to Intrepid.

Anyway, I have prepared a new kernel based on 2.6.27-9.19 with the patches applied. I also finally got around to building a meta package which automatically installs the latest version of the patched kernel. Please see the updated installation instructions in the bug description.

My ambitions are to follow the stable kernel releases (sorry Tobias, I just don't have the time to track the "proposed" kernel) and apply the patches as soon as possible after a new release. Since I have tried to follow Ubuntus guidelines for ppa-packages, the patched kernel will always be stable kernel version + 1, but will be "overridden" when a new official kernel version (with an ABI-bump) is released. Sorry for the inconvenience this may cause, but I have not come up with a better way. I guess you could uninstall the official linux-generic meta-package if you do not want any official kernels without the patch automatically installed, but it is not something I would recommend.

And I will be sure to pass along your encouraging words to certain family members who are not always thrilled to see me hunched over my laptop at night :-)

description: updated
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Based on the upstream bug report, the patch set which should resolve this bug was applied to the 2.6.28-rc1 upstream kernel. Based on this information these patches will definitely be available for the upcoming Jaunty kernel. A nomination has already been opened for Intrepid. It however looks like this bug was not appropriately assigned to the ubuntu-kernel-team which might partially explain why is hasn't received much attention. I'll go ahead an reassign accordingly. Thanks.

Changed in linux:
assignee: kernel-bugs → ubuntu-kernel-team
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Tobias Richter (tsr-ubuntu) wrote :

The fix works well in that it prevents kacpid and kacpi_notify from taking lots of CPU, but on my machine at least I can no longer hotplug my DVD-drive or my slotin disk. They are recognised when present at boot, but you cannot (re-)attach them later successfully. That only works for the secondary battery. Am I the only one with that problem?

Andy Whitcroft (apw)
Changed in linux:
assignee: ubuntu-kernel-team → apw
status: Triaged → In Progress
Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

Thanks for bringing this up, Tobias. I just realized that I see the same thing. I will remove the only new patch that I added for 2.6.27-10 and hopefully we will have hotplugging back.

Revision history for this message
Andy Whitcroft (apw) wrote :

@Gabriel Thornblad -- could you point me to the exact patches you are adding on top of -10 please. I would like to confirm I am using the right ones, or their mainline equivalents (see below).

I have tried to figure out which of these patches made the mainline release and back ported those to the soon to release -11 based kernel; one of the patches listed has already hit our tree via the .Y stable tree the remaining ones are:

    dock: fix eject request process (2.6.27-rc1 regression)
    dock: add _LCK support
    dock: add bay and battery hotplug support
    ACPI: introduce notifier change to avoid duplicates

Anyhow I have built some test kernels based on the -11 kernel in our tree plus these patches and would be interested if someone could test them and report back. They can be found at the following URL:

    http://people.ubuntu.com/~apw/lp280088/

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

@Andy Whitcroft -- the patches I used can be found here:
 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=47bf31adc541bef0c20de15e800e0011f1ae70c7
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=898b054f3eec5921320ae8614b5bdd7b07ea5b43
The last one I added only for my 2.6.27-10~ppa2 kernel.

I gave your new test kernel a whirl but unfortunately, it triggers the 100% CPU problem on my computer.

Regarding the lost hotplugging, it seems it was not due to the last patch I added. I will try to see what happened between 2.6.27-7 and 2.6.27-9 that caused this.

But I'm hoping Andy will beat me to it :-)

Revision history for this message
Mike Bloom (mike-r-bloom) wrote :

Hey Andy. I tried out your -11 kernel and I also still get this bug. The behavior seems to be exactly the same.

Hope this helps. Thanks.

Revision history for this message
imercado (im91367) wrote :

Gabriel, I just installed your patch on my Dell D610 and it seems to be working great. Thank you very much for making this available to those of us who were impacted by this issue. Now go and enjoy some well-deserved time with your family!!!

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

Bug still present in the published 2.6.27-11 kernel.
I have merged the changes and hopefully a new kernel will be available in a few hours.

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

"hopefully a new kernel will be available in a few hours."
From my ppa, that is. In case someone misunderstood my last comment.

Revision history for this message
Russ (russfink) wrote :

Hi - for n00bs, or n00buntu's, rather - can you post the exact sudo lines needed to access the patch, assuming your PPA is not yet in the apt-get configuration?

For me, I had to open Synaptic Package Manager, Settings, Repositories, Third-Party, and Add to put in your deb line, then quit Synaptic and went to the command line to do the install because I could not find "linux-generic-dock" in Synaptic's package list. There must be a more elegant way.

Thanks for the patch, I'm rebooting now (I started with 2.6.27-9 and Ubuntu 8.10).

Revision history for this message
Russ (russfink) wrote :

Now that I've patched and rebooted, I'm showing kernel version 2.6.27-12. I'm also showing something like 45 software updates available, and that a few of the security critical ones are kernel-related for versions that are less recent - specifically, linux-headers-2.6.27-11, linux-headers-2.6.27-11-generic, linux-image-2.6.27-11-generic.

Are these updates a direct result of applying the patch? Should I install these older versions, or should I refuse them? Please advise - thanks, Russ

PS: I hate my Dell (D610) ... ;-)

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

Don't despair Russ, you can install the updates you are seeing without problems. The new kernel update is just a repack of the former kernel released a few days ago - I think someone forgot to flag the kernel as a "security"-update.

Thanks for the suggestion of improving the instructions for installing the patch. I didn't want to make it too simple before some experienced users had tested the kernel - I could see crying children with non-bootable laptops before my eyes.

*****

Open question:
Has someone been brave enough to try Jaunty yet? Problems?

Revision history for this message
Jesse S (jdschwa) wrote :

On Inspiron 600m running Intrepid, 2.6.27-12 patch fixes the kacpid/kacpi_notify problem for me when I remove my CD drive to install extra battery. I still have the hotplug problem though: CD drive is only recognized if it was present at boot. If it was installed at boot, I can remove it and re-install it normally. If battery was installed instead of CD drive at boot, installing the CD drive later doesn't allow it to work.

Revision history for this message
Tobias Richter (tsr-ubuntu) wrote :

I might not be the first to try, but jaunty works fine.

No kacpi* processes gone mad and hotplugging is functional as well.

Revision history for this message
Russ (russfink) wrote : RE: [Bug 280088] Re: [Intrepid] kacpid and kacpi_notify consumes all CPU after resume

nice, thanks. I am obtaining a new laptop anyway. Dell sucks.

> Date: Tue, 14 Apr 2009 09:39:52 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 280088] Re: [Intrepid] kacpid and kacpi_notify consumes all CPU after resume
>
> I might not be the first to try, but jaunty works fine.
>
> No kacpi* processes gone mad and hotplugging is functional as well.
>
> --
> [Intrepid] kacpid and kacpi_notify consumes all CPU after resume
> https://bugs.launchpad.net/bugs/280088
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in The Linux Kernel: Fix Released
> Status in “linux” source package in Ubuntu: In Progress
>
> Bug description:
> After resuming from suspend to ram or suspend to disk, kacpid and kacpi_notify battles to keep CPU at about 90% if you have an extra battery in the media bay, or if you insert or remove an extra battery with the OS running.
> This is on a Dell Latitude D810 on all Ubuntu 2.6.27-x kernels so far. The bug seems to be present with Dell laptops only.
>
> Since there is a patch available upstream, I have posted a patched kernel to my PPA which resolves the problem for some of us.
>
> deb http://ppa.launchpad.net/gabriel-thornblad/ubuntu intrepid main
> deb-src http://ppa.launchpad.net/gabriel-thornblad/ubuntu intrepid main
>
> Install with:
> sudo apt-get install linux-generic-dock
>

_________________________________________________________________
Rediscover Hotmail®: Get quick friend updates right in your inbox.
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009

Revision history for this message
Gabriel Thörnblad (gabriel-thornblad) wrote :

Yes, Jaunty works great and hotplugging is back. I can recommend everybody with this issue to upgrade. A word of advice is to stay away from ext4 for now, though.

For those of you who wish not to upgrade, I unfortunately managed to break my build system and can no longer provide up-to-date kernels with the dock-patches applied. If you ask real nice I might give it another try...

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Marking this Fix Released based on the previous comment from Gabriel, the original bug reporter. Thanks.

Changed in linux (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
shechaiyah (emicra8) wrote :

I have no extra battery. This is a rig my son built. He knows Ubuntu; I do not.
kacpid and kacpi_notify COME UP with Update Manager.
So long as Update Manager is up, kacpid is using 87% of my cpu.
That is not okay.
How do I reset Update Manager so it only comes up when I want it to come up?

Please call me. This bug is driving me crazy; I crash all day long and I can't get my work done.
408-259-9575 Emily

Help!!!

Revision history for this message
Brett Alton (brett-alton-deactivatedaccount) wrote :

This still effects my HP Pavillion a200n and 503n machines using Ubuntu 8.04.3

'kacpid' and 'kacpi_notify' must be killed by 'sudo killall' while grub must load the kernel with the 'acpi=off' and 'apm=off flags.

Changed in linux:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.