Ask / Submit
11

My app got rejected to store because of high power consumption, how to debug problems? [answered]

asked 2014-01-10 16:22:57 +0300

mkosola gravatar image

updated 2014-01-10 16:43:08 +0300

Kontio gravatar image

We need pointers on how to debug that and how it's tested in Harbour QA.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by pnuu
close date 2014-01-11 03:14:40.516314

1 Answer

Sort by » oldest newest most voted
16

answered 2014-01-10 16:41:19 +0300

Kontio gravatar image

updated 2014-08-23 12:17:31 +0300

kimmoli gravatar image

Harbour QA process is using powertop tool. We'll try to add some instructions how developer can debug and reproduce similar problems. This needs enabled developer mode on the Jolla device.

Steps to install powertop from command line: (note: pkcon requires root i.e. devel-su )

Add mer-tools repository:

ssu ar mer-tools

Refresh repository cache:

pkcon refresh

Install tool:

pkcon install powertop

After installing powertop tool, usage is easy via ssh over USB or WLAN connection. Difference between these connections is that device does not suspend when we have PC USB connection enabled and with WLAN device goes to suspend if we don't have any network traffic and display is turned off.

Powertop tool provides a list of all running processes which are waking up and how many times in a second. Compared to strace only one process is monitored, it does not tell all about the system, e.g. when our process has interaction with audio or network.

Harbour QA testing is mostly done with PC USB cable connection, application minimized to home screen and display is turned off. In this state application should not block suspend and wake ups should be minimal (< ~60, this is a reference value, final call has Harbour QA on case by case basis). A good practice is to take a "system state" before opening application and compare those results when application is minimized to home screen.

Suspend is blocked by wake locks. An easy test for that is catting /sys/power/wake_lock file. The file should be empty normally if nothing from user space is not blocking suspend. If application is using e.g. audio, then file should include "mce_cpu_keepalive" string.

Of course applications are allowed to do things in the background but that should be minimal for its own functionality. E.g are internet streaming.

Hopefully this post will help developers!

edit flag offensive delete publish link more

Comments

But since many important applications are still published outside Harbour QA (->Openrepos), we end users would need some tools to hunt down these power thieves. At least handy would be: - installation journal/log - cumulative statistics about resource usage (CPU, net IO, ...)

Couple of "wild" applications (Crest, Hunger Meter) show something, but I suppose they don't show anything cumulative ?

Upp15 ( 2014-02-06 17:38:51 +0300 )edit

Since 1.0.8.19 Tahkalampi, you need to be root (devel-su) to use pkcon

kimmoli ( 2014-07-17 14:24:45 +0300 )edit

Question tools

Follow
4 followers

Stats

Asked: 2014-01-10 16:22:57 +0300

Seen: 1,247 times

Last updated: Aug 23 '14