Bug 81166

Summary: upowerd consumes almost one whole CPU core when battery is low
Product: upower Reporter: vencik <vencik>
Component: generalAssignee: Richard Hughes <richard>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: medium CC: peter
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: strace & sysprof logs (*.ok.* files added for reference when there's no problem)

Description vencik 2014-07-10 10:14:01 UTC
Created attachment 102528 [details]
strace & sysprof logs (*.ok.* files added for reference when there's no problem)

Platform description:
This is observed on my Toshiba Portege Z30-A-12N running Debian Jessie.
Jessie comes with upower v0.9.23, however, I'm experiencing the same behaviour
after upgrading to v0.99.0 from Sid.

Problem description:
When the laptop battery approaches emptiness (capacity goes below 10% or so),
upowerd starts to consume very high CPU time --- almost one whole core.
As soon as the AC adapter is connected, the problem disappears.
Consult with Bastien Nocera at the devkit-devel ML lead to hypothesis that
excessive writing of the battery history might be the problem cause.
See strace & sysprof logs attached (these are from v0.99.0).

Note that upower --monitor[-detail] doesn't show any notable difference in
the amount of events generated (when the problem emerges).
That means 12 per 2 seconds, all 12 in one batch.
Comment 1 Peter Wu 2014-11-18 12:26:23 UTC
This matches the description in bug 82659, patch is available.

*** This bug has been marked as a duplicate of bug 82659 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.