• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

How to resolve extensive CPU consumption after UBports update?

Scheduled Pinned Locked Moved Support
16 Posts 4 Posters 1.1k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      AlainW94 @marc_aurel
      last edited by 7 Apr 2019, 23:11

      @marc_aurel you can try to check the cpu task with

      cpustat
      

      Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
      Never forget that they are much more ideas inside two heads than in one...

      M 1 Reply Last reply 8 Apr 2019, 08:34 Reply Quote 0
      • M Offline
        marc_aurel @AlainW94
        last edited by 8 Apr 2019, 08:34

        @AlainW94 Thanks for your suggestions. Her is the log output:

        %CPU   %USR   %SYS   PID S  CPU   Time Task
        32.65  26.53   6.12  2651 R    0  2.76m NetworkManager
        26.53  24.49   2.04   810 S    1  2.15m dbus-daemon
        11.22   2.04   9.18     1 S    1  1.19m /sbin/init
         8.16   0.00   8.16 17145 R    2  1.76s cpustat
         4.08   2.04   2.04  4140 S    1 14.98s /usr/lib/arm-linux-gnueabihf/sync-monitor/sync-monitor
         4.08   4.08   0.00  2756 R    0 21.38s /usr/lib/telepathy/mission-control-5
         4.08   2.04   2.04  2521 R    1 27.31s upstart-dbus-bridge
         3.06   3.06   0.00 27671 T    2  4.96s system-settings
         3.06   2.04   1.02  5069 S    0 16.23s unity8-dash
         3.06   1.02   2.04  3283 S    1 37.89s unity8
         3.06   2.04   1.02  1802 R    0 33.53s upstart
         2.04   1.02   1.02  4213 S    2 15.36s maliit-server
         2.04   0.00   2.04  2984 S    1  6.86s upstart-socket-bridge
         2.04   2.04   0.00 27996 S    2  2.16s /usr/bin/zeitgeist-daemon
         2.04   1.02   1.02  5501 S    0 14.26s /opt/click.ubuntu.com/dekko2.dekkoproject/current/lib/arm-linux-gnueabihf/bin/dekkod
         2.04   1.02   1.02  7053 S    2 13.59s /usr/bin/msyncd
         2.04   1.02   1.02   831 S    1  7.14s upstart-file-bridge
         2.04   0.00   2.04   934 S    0  2.43s [kworker/u:4]
         2.04   1.02   1.02  1035 S    1 10.87s /lib/systemd/systemd-udevd
         2.04   1.02   1.02  2707 S    2  9.63s /usr/lib/NetworkManager/nm-dispatcher
         2.04   1.02   1.02  3404 S    0  9.41s /usr/lib/evolution/evolution-addressbook-factory-subprocess
         2.04   1.02   1.02  3436 S    2 13.69s /usr/lib/arm-linux-gnueabihf/thumbnailer/thumbnailer-service
         2.04   1.02   1.02   685 S    1  6.95s upstart-local-bridge
         2.04   1.02   1.02  4944 S    1  8.36s /usr/lib/arm-linux-gnueabihf/indicator-network/indicator-network-service
         2.04   2.04   0.00  5940 S    0  8.78s /usr/lib/evolution/evolution-calendar-factory-subprocess
         1.02   0.00   1.02     7 D    0  2.49s [kworker/u:0H]
         1.02   1.02   0.00  2235 S    0  6.40s /usr/lib/udisks2/udisksd
         1.02   0.00   1.02     3 S    0  1.24s [ksoftirqd/0]
         1.02   0.00   1.02  5358 S    0  2.79s /usr/bin/ciborium
         1.02   0.00   1.02  2048 S    2  8.09s upstart-udev-bridge
         1.02   1.02   0.00  6365 S    0  9.60s /usr/lib/evolution/evolution-calendar-factory-subprocess
         1.02   1.02   0.00  2631 S    1  5.41s upstart-file-bridge
         1.02   0.00   1.02  2614 S    2  1.13s [ksoftirqd/2]
         1.02   1.02   0.00   806 S    1  5.22s rsyslogd
         1.02   0.00   1.02   156 S    0  0.56s [irq/253-msm_sdc]
         1.02   1.02   0.00  1273 S    2  5.78s unity-system-compositor
         1.02   1.02   0.00  3300 S    1  0.59s ofonod
         1.02   1.02   0.00  4096 S    2  3.59s /usr/lib/ubuntu-push-client/ubuntu-push-client
         1.02   0.00   1.02   176 S    0  7.30s [mmcqd/0]
         1.02   1.02   0.00   998 S    2 10.22s upstart-udev-bridge
         1.02   0.00   1.02  3277 S    0  2.41s [kworker/u:6]
         1.02   0.00   1.02   959 S    0  2.80s /system/bin/sensorservice
         1.02   1.02   0.00  2083 S    1 10.24s dbus-daemon
         1.02   0.00   1.02  2493 S    1 10.78s upstart-dbus-bridge
         1.02   0.00   1.02   939 S    1  1.28s /system/bin/logd
        

        I also realized another problem on my startup screen:

        20190408_102040.jpg

        A 1 Reply Last reply 8 Apr 2019, 09:34 Reply Quote 0
        • A Offline
          AlainW94 @marc_aurel
          last edited by 8 Apr 2019, 09:34

          @marc_aurel I have the feeling that it's coming from network manager. Can you try to put heure phone in flight mode then start again the command and check if the phone is cooling or not after 10 minutes please ? I'm not using the metrics on the screening, what is wrong please ?

          Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
          Never forget that they are much more ideas inside two heads than in one...

          M 1 Reply Last reply 8 Apr 2019, 11:36 Reply Quote 0
          • M Offline
            marc_aurel @AlainW94
            last edited by 8 Apr 2019, 11:36

            @AlainW94 Thanks, this was indeed a plausible assumption. Unfortunately enabling the flight mode, doesn't change the behaviour:

            %CPU   %USR   %SYS   PID S  CPU   Time Task
            29.41  21.01   8.40  2262 S    3  4.28m NetworkManager
            21.85  18.49   3.36   812 S    2  3.69m dbus-daemon
            15.13   6.72   8.40     1 S    2  2.09m /sbin/init
             7.56   0.84   6.72 18258 R    2  3.24s cpustat
             4.20   3.36   0.84 19903 S    0 27.49s unity8
             3.36   2.52   0.84  2471 R    2 45.48s upstart-dbus-bridge
             2.52   1.68   0.84  4142 R    3 18.83s /usr/lib/arm-linux-gnueabihf/indicator-network/indicator-network-service
             2.52   1.68   0.84  3625 S    2 18.67s /usr/lib/NetworkManager/nm-dispatcher
             2.52   1.68   0.84 28866 S    3  8.04s unity8-dash
             2.52   0.84   1.68  5008 R    2 35.56s /opt/click.ubuntu.com/dekko2.dekkoproject/current/lib/arm-linux-gnueabihf/bin/dekkod
             2.52   1.68   0.84  3556 S    2 20.62s /usr/lib/arm-linux-gnueabihf/sync-monitor/sync-monitor
             1.68   1.68   0.00 20085 R    2  0.24s upstart
             1.68   0.84   0.84  1005 S    3 19.59s /lib/systemd/systemd-udevd
             1.68   1.68   0.00 22193 S    2 13.34s /usr/bin/zeitgeist-daemon
             1.68   0.84   0.84   832 S    2 12.93s upstart-file-bridge
             1.68   0.84   0.84  5654 S    2 16.77s /usr/lib/evolution/evolution-calendar-factory-subprocess
             1.68   0.84   0.84  2163 S    0 13.54s /usr/lib/udisks2/udisksd
             1.68   0.00   1.68 27986 S    3  6.70s maliit-server
             1.68   0.84   0.84  3420 S    2 19.56s /usr/lib/arm-linux-gnueabihf/thumbnailer/thumbnailer-service
             1.68   1.68   0.00  1845 R    0 48.79s upstart
             1.68   1.68   0.00  6573 S    2 19.16s /usr/bin/msyncd
             1.68   0.00   1.68   176 S    0 13.06s [mmcqd/0]
             1.68   1.68   0.00  5610 S    2 17.24s /usr/lib/evolution/evolution-calendar-factory-subprocess
             1.68   0.84   0.84  3355 S    2 17.56s /usr/lib/evolution/evolution-addressbook-factory-subprocess
             1.68   0.84   0.84   997 S    2 17.93s upstart-udev-bridge
             1.68   0.84   0.84  2724 R    2 35.31s /usr/lib/telepathy/mission-control-5
             1.68   1.68   0.00  5199 S    2 16.77s /usr/lib/evolution/evolution-calendar-factory-subprocess
             1.68   0.00   1.68    36 S    0  6.66s [kworker/u:1]
             0.84   0.84   0.00   807 S    0 11.67s rsyslogd
             0.84   0.84   0.00  2074 R    0 13.53s upstart-udev-bridge
             0.84   0.00   0.84   297 S    2  4.24s [jbd2/mmcblk0p20]
             0.84   0.00   0.84 21454 S    2  0.17s trust-stored-skeleton
             0.84   0.84   0.00   941 S    3  5.14s /system/bin/logd
             0.84   0.00   0.84     4 S    0  1.19s [kworker/0:0]
             0.84   0.00   0.84     2 S    2  1.80s [kthreadd]
             0.84   0.84   0.00  2708 S    3 17.76s upstart-dbus-bridge
             0.84   0.00   0.84  3021 S    2 12.58s upstart-socket-bridge
             0.84   0.00   0.84  1031 S    3  2.32s /usr/lib/accountsservice/accounts-daemon
             0.84   0.00   0.84 18969 S    2  0.06s [kworker/2:1]
             0.84   0.00   0.84 31587 S    0  2.63s [kworker/u:7]
             0.84   0.00   0.84   840 S    3  4.35s /sbin/ueventd
             0.84   0.84   0.00 27982 S    0  2.78s /usr/lib/ubuntu-push-client/ubuntu-push-client
             0.84   0.00   0.84   681 S    2 12.61s upstart-local-bridge
             0.84   0.00   0.84   305 S    0  3.43s [loop0]
            
            G 1 Reply Last reply 8 Apr 2019, 11:46 Reply Quote 0
            • G Offline
              guru @marc_aurel
              last edited by 8 Apr 2019, 11:46

              You can strace the NetworkManager proc to try to understand what it keeps so busy, run:

              sudo su
              strace -o /tmp/nm.tr -p PID
              Ctrl-C
              vi /tmp/nm.tr
              

              PID is the proc id, 2262 in the above screen.

              M 1 Reply Last reply 8 Apr 2019, 12:28 Reply Quote 1
              • M Offline
                marc_aurel @guru
                last edited by 8 Apr 2019, 12:28

                @guru Thanks. Here is the document.

                I have limited skills to interpret the entries of the log. There is a repeating entry with futex. I think this could be reated to the error on the screenshot, I've posted.

                A G 2 Replies Last reply 8 Apr 2019, 13:03 Reply Quote 0
                • A Offline
                  AlainW94 @marc_aurel
                  last edited by 8 Apr 2019, 13:03

                  @marc_aurel They are a lot of entry related to anbox0, maybe an issue with Anbox ?

                  Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                  Never forget that they are much more ideas inside two heads than in one...

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    guru @marc_aurel
                    last edited by 8 Apr 2019, 13:46

                    Try to solve this:

                    $ grep /sys/devices/virtual/net/anbox0/driver nm.tr
                    readlinkat(AT_FDCWD, "/sys/devices/virtual/net/anbox0/driver", 0xfaa008, 99) = -1 ENOENT (No such file or directory)
                    readlinkat(AT_FDCWD, "/sys/devices/virtual/net/anbox0/driver", 0xfb1440, 99) = -1 ENOENT (No such file or directory)
                    readlinkat(AT_FDCWD, "/sys/devices/virtual/net/anbox0/driver", 0xf87600, 99) = -1 ENOENT (No such file or directory)
                    readlinkat(AT_FDCWD, "/sys/devices/virtual/net/anbox0/driver", 0xfab388, 99) = -1 ENOENT (No such file or directory)
                    
                    M 1 Reply Last reply 8 Apr 2019, 14:18 Reply Quote 0
                    • M Offline
                      marc_aurel @guru
                      last edited by marc_aurel 4 Aug 2019, 19:40 8 Apr 2019, 14:18

                      @guru Thanks for your suggestion. I have reinstalled the boot image as described in the documentation. Now it seems to be solved:

                      adb shell
                      sudo reboot -f bootloader # 'adb shell' will exit after this command
                      wget http://cdimage.ubports.com/anbox-images/anbox-boot-$CODENAME.img
                      sudo fastboot flash $PARTITIONNAME anbox-boot-$CODENAME.img
                      sudo fastboot reboot
                      rm anbox-boot-$CODENAME.img
                      

                      It seems, that the updates of UBports doesn't consider an Anbox installation and cause a conflict.

                      G 1 Reply Last reply 8 Apr 2019, 16:09 Reply Quote 0
                      • G Offline
                        guru @marc_aurel
                        last edited by 8 Apr 2019, 16:09

                        @marc_aurel said in How to resolve extensive CPU consumption after UBports update?:

                        @guru Thanks for your suggestion. I have reinstalled the boot image as described in the documentation. Not it seems to be solved:
                        ....

                        Is it solved NOW or NOT?

                        M 1 Reply Last reply 8 Apr 2019, 16:18 Reply Quote 0
                        • M Offline
                          marc_aurel @guru
                          last edited by 8 Apr 2019, 16:18

                          @guru Sorry. I don't know, how the "Not" came into the sentence. The device works fast now.

                          G 1 Reply Last reply 8 Apr 2019, 18:42 Reply Quote 0
                          • G Offline
                            guru @marc_aurel
                            last edited by 8 Apr 2019, 18:42

                            You might concider edit your post.

                            Any way, glad you solved your problem, even if I want to add, that I'd not install and use any Android app without having the source.

                            M 1 Reply Last reply 8 Apr 2019, 19:39 Reply Quote 0
                            • M Offline
                              marc_aurel @guru
                              last edited by 8 Apr 2019, 19:39

                              @guru Makes sense.

                              I also agree according Android apps. I deon't need them either. I test Anbox for our planned device for a conumer market, because most people of our focus group ask clearly for Android support.

                              The good thing of Anbox is, that this approach is a sandboxed container with no access to system ressources outside of the container. It's not yet possible to shut down and start Anbox to be sure, that the apps are only running, if I need them, a banking app for example. But I tthink, it could be possible. I tink it would be even possible to add more controll to this Android emulation.

                              1 Reply Last reply Reply Quote 0
                              13 out of 16
                              • First post
                                13/16
                                Last post