Public bug reported:

When playing music I can see quite high CPU usage (about 20% altogether)
by media-hub-server and pulseaudio. This seems excessive and likely
causes us to use quite a lot more power than we need.

The top of top looks like so:

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 2773 phablet   20   0  342008  22344  15984 S 13,0  2,3   2:53.92 
media-hub-serve
 2548 phablet    9 -11  368208  12028   8448 S  6,8  1,2   1:32.37 pulseaudio
16126 phablet   20   0    6284   1284    768 R  1,6  0,1   0:00.28 top
 2806 phablet   20   0  524540 110060  40520 S  1,3 11,2   0:51.24 unity8
 4991 phablet   20   0  389448  96144  30532 S  1,3  9,8   0:30.70 qmlscene

I suspect unity8/qmlscene are rendering playback progress unnecessarily
when the screen is off, but media-hub-server and pulseaudio use about
20% CPU together.

dbus-monitor shows quite high activity every second:

method call sender=:1.136 -> dest=core.ubuntu.media.Service serial=13885 
path=/core/ubuntu/media/Service/sessions/6; 
interface=org.freedesktop.DBus.Properties; member=Get
   string "org.mpris.MediaPlayer2.Player"
   string "Position"
method return sender=:1.51 -> dest=:1.136 reply_serial=13885
   variant       int64 93624866996
method call sender=:1.136 -> dest=core.ubuntu.media.Service serial=13886 
path=/core/ubuntu/media/Service/sessions/6; 
interface=org.freedesktop.DBus.Properties; member=Get
   string "org.mpris.MediaPlayer2.Player"
   string "Duration"
method return sender=:1.51 -> dest=:1.136 reply_serial=13886
   variant       int64 306988000000
method call sender=:1.136 -> dest=core.ubuntu.media.Service serial=13887 
path=/core/ubuntu/media/Service/sessions/6; 
interface=org.freedesktop.DBus.Properties; member=Get
   string "org.mpris.MediaPlayer2.Player"
   string "Position"
method return sender=:1.51 -> dest=:1.136 reply_serial=13887
   variant       int64 93638280996
method call sender=:1.136 -> dest=core.ubuntu.media.Service serial=13888 
path=/core/ubuntu/media/Service/sessions/6; 
interface=org.freedesktop.DBus.Properties; member=Get
   string "org.mpris.MediaPlayer2.Player"
   string "Duration"
method return sender=:1.51 -> dest=:1.136 reply_serial=13888
   variant       int64 306988000000
method call sender=:1.136 -> dest=core.ubuntu.media.Service serial=13889 
path=/core/ubuntu/media/Service/sessions/6; 
interface=org.freedesktop.DBus.Properties; member=Get
   string "org.mpris.MediaPlayer2.Player"
   string "Position"
method return sender=:1.51 -> dest=:1.136 reply_serial=13889
   variant       int64 93653857996
method call sender=:1.136 -> dest=core.ubuntu.media.Service serial=13890 
path=/core/ubuntu/media/Service/sessions/6; 
interface=org.freedesktop.DBus.Properties; member=Get
   string "org.mpris.MediaPlayer2.Player"
   string "Position"
method return sender=:1.51 -> dest=:1.136 reply_serial=13890
   variant       int64 93657725996
method call sender=:1.136 -> dest=core.ubuntu.media.Service serial=13891 
path=/core/ubuntu/media/Service/sessions/6; 
interface=org.freedesktop.DBus.Properties; member=Get
   string "org.mpris.MediaPlayer2.Player"
   string "Duration"
method return sender=:1.51 -> dest=:1.136 reply_serial=13891
   variant       int64 306988000000
method call sender=:1.136 -> dest=core.ubuntu.media.Service serial=13892 
path=/core/ubuntu/media/Service/sessions/6; 
interface=org.freedesktop.DBus.Properties; member=Get
   string "org.mpris.MediaPlayer2.Player"
   string "Position"
method return sender=:1.51 -> dest=:1.136 reply_serial=13892
   variant       int64 93666179996
method call sender=:1.136 -> dest=core.ubuntu.media.Service serial=13893 
path=/core/ubuntu/media/Service/sessions/6; 
interface=org.freedesktop.DBus.Properties; member=Get
   string "org.mpris.MediaPlayer2.Player"
   string "Duration"
method return sender=:1.51 -> dest=:1.136 reply_serial=13893
   variant       int64 306988000000

:1.51 is pulseaudio, :1.136 is music app.

$ system-image-cli -i
current build number: 323
device name: krillin
channel: ubuntu-touch/rc-proposed/bq-aquaris.en
last update: 2016-05-01 13:37:17
version version: 323
version ubuntu: 20160429
version device: 20160329-a9bacdb
version custom: 20160324--36-54-vivid

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: media-hub 4.1.0+15.04.20160407.1-0ubuntu1 [origin: 
LP-PPA-ci-train-ppa-service-stable-phone-overlay]
Uname: Linux 3.4.67 armv7l
ApportVersion: 2.17.2-0ubuntu1.8
Architecture: armhf
Date: Tue May  3 11:25:19 2016
InstallationDate: Installed on 2016-04-29 (4 days ago)
InstallationMedia: Ubuntu 15.04 - armhf (20160429-020305)
SourcePackage: media-hub
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: canonical-devices-system-image
     Importance: Undecided
         Status: New

** Affects: media-hub (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug armhf third-party-packages vivid

** Also affects: canonical-devices-system-image
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1577700

Title:
  High CPU usage during music playback

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1577700/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to