SailfishX extreme battery drain: How to find cause?

asked 2017-10-15 15:05:43 +0200

ossi1967 gravatar image

I'm fully aware that most users here report a great battery life on the Sony Xperia. So I don't assume that whatever happens on my phone is a general bug of the specific port.

However, the battery drain is so extreme that I doubt I will be able to use this phone as a daily driver for long. So I'm very motivated to find the cause for it and would be happy for any input. (Like: Which tools could I use, are there any likely, known issues, ... I just never paid attention because I never had battery issues with Sailfish devices so far.)

The problem is that the battery reading drops 20%-30% even overnight and keeps eating battery when in use. Last night I had a full charge before I went to bed, unplugged it... And woke up with 77% 8 hours later. (Android support was off that night.) The first time I noticed something was wrong was when the battery was at over 50% when I went to sleep and had dropped to 18% in the morning. This is certainly not what Sailfish devices normally do and I guess other SailfishX users don't see this behaviour, right?

The history of the device:

I bought it, upgraded Android and used it like a month or two with Android. Battery life was really great then and I hoped that it would be the same with SailfishX. (I mention this in order to make it clear the battery is OK, there shouldn't be a hardware issue.)

I used the "Linux only" way described over @ TMO to flash SailfishX. (I already had the very latest Android version on my phone installed OTA, everything went smooth.)

Finally, I backed up my data from the Jolla 1 and restored it to the Xperia. I went on re-installing all the Android- and Sailfish-Apps that I had grown used to.

I didn't pay attention to the battery consumption on day 1 because after a OS upgrade, Sailfish generally tends to do things it normally doesn't (like rebuild tracker database etc.). But now it has become apparent that something is wrong.

There was one tiny hickup with the backup I restored: Included in the backup was a now defunct XMPP account (the server is offline). It seems to me SailfishX couldn't cope with the situation because it didn't allow me to go online/offline for any such account. ("There are no accounts configured...") My first guess was that while it kept trying to reach the broken server, the phone used up all the battery. However, now I deleted the account in question, going on-/offline works... And the battery still doesn't last very long. I only mention this episode because it might make clever minds think of other things that can go wrong with a backup restore.

What's the recommended way of tracking down the issue?

edit retag flag offensive close delete



I'd start with the Android side of things. Disable it from starting automatically from the settings and reboot. Wait for a day or two and don't start any Android apps.

I've noticed that for instance Android HERE WeGo maps don't always close down properly and stay consuming CPU on the background.

After these I'd start looking into radio coverage by enforcing 3g if you normally use 2g/4g and vice versa. Radio can eat up battery really fast.

Also disable WIFI if you have it enabled. I've seen several high battery consumption situations where the WIFI is acting bad. (Although not yet with SailfishX, but I have it disabled by default.)

Manatus ( 2017-10-15 16:24:53 +0200 )edit

@Manatus: Thx. I had Wifi off during the night, but I'll pay more attention to mobile network settings now (which is a bit of a hit and miss on the Xperia). I'll also make sure I'll re-start the device after switching Android off just to make sure. Thanks for the input!

ossi1967 ( 2017-10-15 16:32:28 +0200 )edit

Did you try the app lighthouse? This might help to find out. The app SystemDataScope helps for long period logging.

poddl ( 2017-10-15 20:15:46 +0200 )edit

@poddl thank you. I checked with both top and lighthouse: There's a kworker process on my Xperia that constantly uses a little more than 3% of the CPU, no matter when I check, no matter for how long I stare at it, no matter if I check right on the device or from within an SSH session.
My Jolla 1 doesn't have such a 3%-all-the-time process.
Of course I don't know where it comes from or how it behaves when the phone is supposed to go to sleep. Maybe Systemdatascope can help me with that.

ossi1967 ( 2017-10-15 23:04:51 +0200 )edit

I have a number of kworker threads too (0.3% checked with top command).

Maybe check top and then Shift-T? That shows running times of processes. Assuming that there would be one badly behaving process (and not constantly launching new ones) this might give a clue.

The results change depending on what you do with your phone, but usually you should have 'lipstick' with most cpu time, then maybe 'maliit-server' (virtual keyboard) or sailfish-browser. Pulseaudio too, if you use talk a lot or do anything with audio.

Manatus ( 2017-10-15 23:32:59 +0200 )edit