All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc MERLIN <marc_powertop at merlins.org>
To: powertop@lists.01.org
Subject: Re: [Powertop] USB devices get wrong power use values
Date: Sun, 22 Sep 2013 16:54:00 -0700	[thread overview]
Message-ID: <20130922235400.GE1886@merlins.org> (raw)
In-Reply-To: 20130921032203.GA8125@merlins.org

[-- Attachment #1: Type: text/plain, Size: 2288 bytes --]

So, I asked on the linux-usb list, and one thing I quickly found out is that the
Watt value given by powertop 2.4 is way off for USB devices:

Alan Stern wrote the following:

Do you have a bug on powertop 2.4 mis-calculating USB power use, both when 
power is plugged in and when it's not?

Thanks,
Marc

On Sun, Sep 22, 2013 at 12:38:56PM -0400, Alan Stern wrote:
> > > gandalfthegreat:/sys/bus/usb/devices/3-1.6/power# grep . *
> > > active_duration:61227648
> > > async:enabled
> > > autosuspend:2
> > > autosuspend_delay_ms:2000
> > > connected_duration:66830880
> > > control:auto
> > > level:auto
> > > persist:1
> > > runtime_active_kids:0
> > > runtime_active_time:18870052
> > > runtime_enabled:enabled
> > > runtime_status:active
> > > runtime_suspended_time:5324088
> > > runtime_usage:0
> >
> > This all looks correct.
>
> Since then, I've confirmed that I don't have the problem some time after
> reboot. It may be that the device doesn't seem to sleep well after I've used
> it once.
>
> What's interesting, is that I see this when power is plugged in:
>
> Power est.  Events/s    Category       Description
>   8.18 W    100.0%      Device         USB device: Yubico Yubikey II (Yubico)
>   8.13 W    100.0%      Device         USB device: Integrated Camera (Chicony Electronics Co., Ltd.)
>
> Once I go to batteries, I see this:
> Summary: 760.1 wakeups/second,  718.9 GPU ops/seconds, 0.0 VFS ops/sec and 6.9% CPU use
>
> Power est.              Usage       Events/s    Category       Description
>   8.32 W    100.0%                      Device         USB device: Yubico Yubikey II (Yubico)
>   2.52 W     73.3%                      Device         Display backlight
>
> Somehow I know that my Yubikey isn't using 8W, so powertop numbers need to
> be taken with a grain of salt.

I don't know where powertop gets its numbers from.  Perhaps it uses the
value reported by the device (bMaxPower).  That value is only a
maximum; it doesn't change to reflect the actual usage.

-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/

             reply	other threads:[~2013-09-22 23:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-22 23:54 Marc MERLIN [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-10-12 11:16 [Powertop] USB devices get wrong power use values Sergey Senozhatsky
2013-10-13 15:33 Arjan van de Ven
2013-10-13 16:22 Marc MERLIN
2013-10-13 18:48 Arjan van de Ven
2013-10-13 22:10 Marc MERLIN
2013-10-13 22:38 Arjan van de Ven
2013-10-18  0:01 Marc MERLIN
2013-10-18  0:24 Marc MERLIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130922235400.GE1886@merlins.org \
    --to=powertop@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.