upowerd consuming one whole core if battery low

Bastien Nocera hadess at hadess.net
Wed Jul 2 03:51:07 PDT 2014


On Wed, 2014-07-02 at 12:09 +0200, Václav Krpec wrote:
> Hello everybody,
> 
> as a follow-up of the previous post, this time I include
> strace log.
> upower seems to read battery info in busy loop:
> it appears to me that there's a failure in an attempt to recvmsg (EAGAIN)
> (that might be the busy loop triger).
> It's then followed by polling & reading the battery info.
> Lots of the polls are non-blocking; I bet that's the cause.
> 
> Does the above make any sense?

The amount of polling doesn't look out of the ordinary. Your best bet is
to install something like sysprof:
https://git.gnome.org/browse/sysprof

(also available in distros)

and make sure that upower and its dependencies are either built with
debug or have debuginfo packages installed.

This should point to where most of the time is spent.

It would be useful to reiterate which exact version of upower you're
using, and maybe try a version of your distribution with upower 0.99.x
if you're using an older version.

Cheers



More information about the devkit-devel mailing list