Need help in debugging/finding battery drain reason - Android Q&A, Help & Troubleshooting

Hello forum,
background info:
I have a rare Pansonic Android 5.0.2 phone (DMC-CM1) with an excellent camera, what is the reason why I want to keep this device.
There are NO custom roms available and no info about key combinations on how to get into stock recovery mode. I can go there with adb of course.
I found a key combination to get into fastboot, but Wiping cache/data to reset the device apparently did nothing, even if wating for hours. It seems as well as if Panasonic tampered with the stock bootloader :/ This is why I had to send it to service (adb was not enabled before).
They reflashed the device with 4.4.4 and I installed the updates to 5.0.2 OTA. Everything seemed fine until...
present problem:
...now I have a strange battery drain. Bevor I sent it it, I had about 2-3 days usage time with average usage, a little messageing, a few fotos. I do not use the phone much.
Now I get a maximum of around 16-20 hours out of it while it is just resting on the table. It also gets warm.
what have I done so far:
- I rooted the device and installed better battery stats from the forum here. It shows around 8-10% usage per hour. Before the problem showed, I had 1-2% usage.
- I uninstalled EVERY own installed app and even booted into safe mode -> same problem
- I disabled all google app packages -> same problem, but improved it a little
When I check the battery via android settings, it is telling me that "android-system" is using >20% of the battery. In active apps I can see this app is running the fast dormancy service. When I kill this service and force the complete app to stop, it gets _a little_ better, around 5-6% usage.
I recently killed forced stop on all services that where not qualcom or seemed essential to me and disables wifi and bluetooth and over night usage dropped to <1%/h, which seemed the problem could lie somewhere with services.
However using adb shell and pulling "top" info, I dont see a process using much CPU.
What else have I noticed, which might be unrelated:
-After charging I see a 100% wakelock from qpnp-charger, that disappears only after rebooting. Might indicate that something with qualcom is "wrong".
-I set wifi to be _never_ be running in sleep mode. Better battery stats is telling me, that wifi is 100% of the time running, even if I can see the symbol for wifi is not showing and comes up a few seconds after I wake the phone
You can see, I might need help on how to identify the problem here.
Any hints, tips, advice?
Please excuse my "messy" english, it is not my native language.
regards
Stefan

Related

Brainstorming: how to completely disable DataTracker-FD and Fast Dormancy

Being fed up with the random wakelocks that Dialer produced on my Gingerbread P500, I spent a while searching for the cause. It turned out to be DataTracker-FD (found out using the amazing BetterBatteryStats app - http://www.cri.ch/sven/doku.php/computing/android/betterbatterystats ), which deals with Fast Dormancy (http://www.computerworld.com/s/article/9191759/Fast_dormancy_to_improve_smartphone_networking_and_battery_performance_ ).
Now, in theory, Fast Dormancy should be a great feature! But, if your network does not support it, DataTracker-FD will still drain a lot of battery through the wakelock. The SGSII secret code for deactivating it doesn't work on the P500, and neither does the nwk_info.db method. Luckily, you can deactivate (or change its timeout) through the LG hidden menu...
1. Dial 3845#*500#.
2. Go to Modem Setting > PDP Setting > [0] Set Fast Dormancy
3. Select your desired timeout (or "Disabled"). You should now be done! (will look at Battery Usage in a little bit, to see if a reboot/Dialer FC is also needed)
Optional step 4. If you still see no difference, set your desired timeout (or "Disabled") a few more times.
Hope it helps.
/* Edit: It doesn't seem to help, we might be back to square one. Does anyone have any idea on how to completely disable Fast Dormancy? We might need a dev to look at the source code of Dialer and make some modifications... Right now, if your phone stays awake after using Data, the only current workaround is FCing Dialer from Applications. */
EDIT 2: A SECOND TEST, USING THE ABOVE METHOD TO DISABLE FAST DORMANCY, YIELDS POSITIVE RESULTS! THE WAKELOCK IS NOT THERE ANYMORE, EVEN AFTER SEVERAL RECONNECTIONS TO HSDPA!
It needs way more testing though, I will reconnect to data and leave the phone idle (screen off), then see what happens, and I will reboot the phone to see if the setting persists.
EDIT 3: Yes, the setting persists, and the wakelock is still not running! The final test will be done after it has completely charged, because there still is a small possibility that the wakelock is so far not active just because the phone was charging.
Edit 4: Straight after unplugging the phone, DataTracker-FD started running, without being connected to HSDPA (I was in a phonecall). In 17 minutes (of mostly talking on the phone) it drained 1% of the battery - so, it should last for about 29 hours with the same usage. Now I have started HSDPA and left the phone idle for 10 minutes, to see how much it drains and how much it drains after I turn data off. It just might be that, while the phone is still awake, it doesn't drain a large amount of battery. If it actually still drains a lot, this tweak definitely only /seems/ to work while charging (maybe BetterBatteryStats was reporting false data or FD just doesnt' work when charging).
Edit 5: Here's a pleasant surprise. Right after connecting to HSDPA and putting the phone to sleep, the Awake bar in Battery Usage faded out. In 5 minutes of idling with data activated, the phone drained another 1% battery - not sure how well that is, since it amounts to 8 hours of data on a full charge, but it's better than 12 hours of idling with no data on a full charge. Currently repeating the test. Just got an email on Yahoo pushed, I'll get to see the influence on awake time of that as well.
Edit 6: After 10 minutes of idling with data ON, a bit over 1% of the battery is gone. This is a fantastic value, and the Awake bar is only dotted in this period of time. DataTracker-FD seems to be running a bit in the background during the data connection, but stopped once I turned it off. It might just be me, though, because aLogCat still can't find any entries for Fast Dormancy. Now leaving the phone idle with no data for a while to look at the evolution of Awake time.
Edit 7: After about 45 minutes of complete idling, the battery went down 2%. This would mean the battery would last for about a day and a half, which is meh, considering I OC'd the phone to 730 and don't really use a task manager.
The conclusion: YES, disabling Fast Dormancy does work using the above method, and it does help battery life!
Edit 8: After another unrelated reboot, DataTracker-FD is once again awake after using data, but this time it draws significantly less battery. The Battery Usage graph shows no difference between sleep times and awake-because-of-FD times.
Edit 9: During the night, the phone drained 30% battery, once again because of some random action of DataTracker-FD. This is still not a definite fix.
"Connection problem or invalid MMI code" when I dial that number..
I remember that long ago I dialed the number and everything was fine.
Well you shouldn't literally call it, just type it in Dialer and it should open the hidden menu.
metalboy94 said:
Well you shouldn't literally call it, just type it in Dialer and it should open the hidden menu.
Click to expand...
Click to collapse
When I just type it in dialer, nothing happens.
I see. It might not work on CM.
Updated the OP a couple of times, you might want to read it.
Considering I am still on Froyo v2.2.2, could this be of interest for me too? There's no abnormal battery drain on my phone, but if I can improve the battery life by tweaking this setting, I'd gladly do it.
masteryx said:
Considering I am still on Froyo v2.2.2, could this be of interest for me too? There's no abnormal battery drain on my phone, but if I can improve the battery life by tweaking this setting, I'd gladly do it.
Click to expand...
Click to collapse
I didn't have such problems on Froyo either. It MIGHT help, but as you can see from the numerous edits to the OP, it's not a clear win yet.
So it need to be disabled twice to stop working?
I've been looking for this service since using that Battery App but theres not much information of that in the web.
I'm not sure just how many times, but it took about 3-4 times for me until I was completely sure the wakelock stopped running and the phone went into deep sleep each time I locked it.
Yeah I think I got it doing it twice, FC phone and rebooting, btw maybe you can check system/etc/flex/flex.db and flex.xml there are fast dormancy settings there
@metalboy94 I mailed LG regarding Fast Dormancy and the reply i got was that P500 does not support fast dormancy. My phone does not switch from H to 3G. I tried enabling it many times using secret menu but it does not work.
I asked him if GB ROM/Baseband supports fast dormancy, he replied saying GB hasn't been released for India
Roqu3 said:
Yeah I think I got it doing it twice, FC phone and rebooting, btw maybe you can check system/etc/flex/flex.db and flex.xml there are fast dormancy settings there
Click to expand...
Click to collapse
There are? Thanks a bunch, gonna try those methods as well!
@atulalvenkar: Well, it still draws power from the battery, so at least they could have done something to the Dialer if it's not supported at all.
Edited the OP once again.
Are you guys checking on GB or Froyo ROM ? I can't see flex.db or flex.xml in froyo ? Stock or CM7
atulalvenkar said:
Are you guys checking on GB or Froyo ROM ? I can't see flex.db or flex.xml in froyo ? Stock or CM7
Click to expand...
Click to collapse
Stock GB. I found it, but you have to fill in the info for your operator if it's not on that list. Guess which is my situation.
metalboy94 said:
Stock GB. I found it, but you have to fill in the info for your operator if it's not on that list. Guess which is my situation.
Click to expand...
Click to collapse
Yeah my operator isn´t there also (I´m on a custom V20g ROM and I´m not from Romania) but i got the flex files from the Froyo stock so im going to try using that information to replace one of the V20g operators.
Also tried putting the Froyo ones on GB but get a lot of FC
Updated the OP again...
I tried to change the FD settings in the hidden menu, but the setting does not "stick", so I don't know if it's actually OFF or not.
However, I found that DataTracker-FD only keeps the phone awake when Wifi is on. If I'm always on 3G, FD seems to work and keep the phone asleep. Overnight with wifi off and 3G on, it only drained 2% battery.
I'm on official GB2.3.3 with PaoloM's kernel v5.
Strange.
hey maybe let´s try this:
Code:
ro.ril.disable.fd.plmn.prefix=23402,23410,23411,
have to put that on the build.prop then restart, the values must be changed to your carriers code, you can get that code from adb typing
Code:
adb shell
getprop gsm.operator.numeric
Then the system should show the number
tsuda said:
I tried to change the FD settings in the hidden menu, but the setting does not "stick", so I don't know if it's actually OFF or not.
However, I found that DataTracker-FD only keeps the phone awake when Wifi is on. If I'm always on 3G, FD seems to work and keep the phone asleep. Overnight with wifi off and 3G on, it only drained 2% battery.
I'm on official GB2.3.3 with PaoloM's kernel v5.
Strange.
Click to expand...
Click to collapse
But did you see how many MBs the phone used? Cause if it's too much, people will definitely prefer just turning the phone off.
@Roqu3: I think I tried that before and it didn't seem to make a difference.
Worth a shot tho.
I'll try both of your methods if I still have the issue when I get my phone back from the service center.
Sent from a crappy rebranded Huawei using my hands

[Q] Saving Android Battery Life in FLIGHT MODE

hallo,
i installed different kinds of android (SD version) on my HTC HD2, lastly i decided to use the MccM HD V6 SD SENSE FROYO and im very happy with that.
but ive got a problem: when im using flight mode while sleeping (usually 6-8hours), the battery loses 40-45% charge.
here is the situation:
- when im turning the device off and on again before using flight mode (means boot to wm6.5 artemis and then launching android, activating sim card and then setting device to flight mode) it tages 3-5% of charge during the night.
- when i do NOT reset the device, just enter flight mode after using the phone the whole day (facebook, google maps, ...) then the battery loses 40-45% charge as said before.
so the problem might be an application, which - once it is startet - always tries to connect when im flight mode. i startet using zdbox with autokill on lock, later also autokill system programs - no sucess.
lately i tried batteriefu, but this only stopped my data traffic/connection right now.
i have no idea, what to do against that. a friend told me, its not necessary to use taskkillers at all in android - whats your opinion?
maybe the SD android is a problem? (when programs use the SD card during night, it drains the battery?)
thnx in advance
markus
ps: sorry newbie, first thread in this board - when im doing wrong, just tell me - it was not on purpose.
Battery drain
wHY NOT JUST SWITCH THE PHONE OFF AT NIGHT????. Am I missing something??
Good luck
- galarm? (alarm use)
- and it takes time to go to wm6.5 and then launch android?
John, your shift key is stuck..
I can't help you directly, but SpareParts has a log feature that will tell you which applications cause the device to not enter sleep mode correctly (wake-lock), using that you should be able to locate the program causing the issue.
ok, spareparts was one of the things i uninstalled
spareparts or spareparts+?
thnx!
Normal spareparts should be able to do it (at least the one that came with my CM7 does)
ok, installed it, checkt the logs, loading battery and testing this night
interesting, last 2 nights there was a batteryloss of only 3-4%.
no idea why...
I've heard of roms / kernels taking a couple days to settle before some of the kinks go away, so it might be something of that sort. Otherwise I would assume your phone should be saving power if it's not connecting to networks as frequently
VVarboss said:
I've heard of roms / kernels taking a couple days to settle before some of the kinks go away, so it might be something of that sort. Otherwise I would assume your phone should be saving power if it's not connecting to networks as frequently
Click to expand...
Click to collapse
Y'know, I thought it was just me thinking this but I have noticed better performance once RevolutionROM has been in for 2 days or so.
I know there is politics for posting on a old thread but I saw this thread on Google while trying to see if this happened to anyone else.
I would like to report that right before bed I had 22%. My Samsung Skyrocket will eat right through 22% overnight if the cell radio is on. So without rebooting I turned on airplane mode (so I would have an alarm in the morning.) I woke up and my battery was at 28% I couldn't believe it. I will try to re-create this again. This was from 2am to 7am. In my battery details graph it even shows a little "hill" noting the increase.
I did hit the Task Killer button from my ES Task Manager widget right before airplane mode to make sure Facebook and Email were closed.
Any Input?
Have you tried betterbatterystats? I had high drain with new rom and seems to have been Audiout_2 which was started by the keyboard click. It was on by default in the ROM. Its off now and all is OK. Seems once it starts it must be continuously polling.
Sent from my HD2 using the power of Jelly Bean

Android system - throttleservice CPU usage

Hello all,
I have this problem with battery drain which makes me really upset lately - it doesn't last even one day, but its charge up to 4200mV. First i thought its battery, but lately I've noticed the CPU usage for Android System process is around 50% all the time.
Installed watchdog and elixir2
On both usage is around 50%, even in offline mode, on elixir2 log for this process all the time i see this hundreds times every second:
Throttle Service
onPollAlarm - roaming=false, read=0, written=0, new total=8882132
What is this, what does it indicates and how to get rid of this?
Thanks for any suggestion
system 2.3.7 - MROM from january
I'm not familiar with the settings you are showing but I would start here http://forum.xda-developers.com/showthread.php?t=1726309 and see if that helps
Thanks, I will try blue sleep fix later, but for now i need to find out what exactly is drainin my battery, any suggestion how to do that, which exact part of "Android System" process is responsible, as, its kinda obvious, i cant kill this process
Ok, factory reset solved the issue...

[Q] How to get rid of s5p-ehci?

Hi all,
I experience problems with kernel wakelock, named "s5p-ehci". In random moment it's getting seized my phone and the phone stops sleeping. It looks like:
all other kernel wakelocks and partial wakelocks take less than 1 min of activity, whereas s5p-ehci is active during hours. So, for instance, if s5p-ehci is active at night - I am loosing about 4% of charge per hour (phone deep sleep time is 0%).
Temporary solution is to reboot the device: so s5p-ehci's activity time is between seconds and minute, later it gets crazy again and is active constantly. I did not succeed to find some relation between it and applications or system processes.
I am not an Android developer, but since there is no other kernel for my device (Meizu MX2) I'm eager to TURN OFF this damned s5p-ehci... Please, tell me, how to do it:
either via build.prop or via linux command or changing some configs.
I have tried to use other firmware, wiped my phone and tried to work without my apps, but all in vain: so I still don't know, WHY this s5p-ehci is on Earth getting so active so long all of the sudden. It has nothing to do with USB, because my phone is not plugged with cable when it happens
Nafiganado said:
Hi all,
I experience problems with kernel wakelock, named "s5p-ehci". In random moment it's getting seized my phone and the phone stops sleeping. It looks like:
all other kernel wakelocks and partial wakelocks take less than 1 min of activity, whereas s5p-ehci is active during hours. So, for instance, if s5p-ehci is active at night - I am loosing about 4% of charge per hour (phone deep sleep time is 0%).
Temporary solution is to reboot the device: so s5p-ehci's activity time is between seconds and minute, later it gets crazy again and is active constantly. I did not succeed to find some relation between it and applications or system processes.
I am not an Android developer, but since there is no other kernel for my device (Meizu MX2) I'm eager to TURN OFF this damned s5p-ehci... Please, tell me, how to do it:
either via build.prop or via linux command or changing some configs.
I have tried to use other firmware, wiped my phone and tried to work without my apps, but all in vain: so I still don't know, WHY this s5p-ehci is on Earth getting so active so long all of the sudden. It has nothing to do with USB, because my phone is not plugged with cable when it happens
Click to expand...
Click to collapse
Since it persistent across different versions of the software, I'm wondering if it is not hardware related, like the USB is shorting out or messed up (yes, I read that it wasn't plugged in during the main issue, but doesn't mean it is not the root cause). Have you tried using https://play.google.com/store/apps/details?id=com.uzumapps.wakelockdetector to see if maybe it can narrow down the source of your issues?
es0tericcha0s said:
Since it persistent across different versions of the software, I'm wondering if it is not hardware related, like the USB is shorting out or messed up (yes, I read that it wasn't plugged in during the main issue, but doesn't mean it is not the root cause). Have you tried using https://play.google.com/store/apps/details?id=com.uzumapps.wakelockdetector to see if maybe it can narrow down the source of your issues?
Click to expand...
Click to collapse
Hi,
yes, i've used Wakelock detector app as well as its advanced colleague - BetterBatteryStats. So that's how I've found out about "s5p-ehci" wakelock. And I can see there is no other reason of phone insomnia, besides s5p-ehci.
All other apps and processes consume CPU moderately. When s5p-ehci activity is moderate - phone sleeps well. When it gets berserk and is active during several hours - phone does not sleep at all during whole this time (deep sleep is 0%), instead works on minimal frequency (300MHz), however, it's about 40% of battery draining per night.
If it's a hardware issue - I wonder who can help me with that investigation. Services do not deal with such cases, since there is no permanent problem signs. In my case the process can behave properly during a day. Then, all of a sudden, it's getting active and some its activity lasts hours! Then it's getting back to normal again. I've looked at kernel log and system log. There is a lot of various events happening there: something is going on, then device sent to sleep, then again something is going on, then wakeup, in various cases wakeup reasons are different, I was unable to find some relevant info... I would send this log to anyone who could help me to find source of the problem.
I've rolled back to Android 4.1 firmware and installed custom kernel.
Here situation is better, but what I have discovered:
phone seems not to detect when it's being plugged off from charger - no matter, USB cable from computer or wall socket wire. s5p-ehci does not go away and sucks off my battery. What only helps is manually resetting EHCI power: setting 0 in ehci_power file. As a result, something is reset, ehci power is on again, but this sucker goes away and after that everything is fine until next charge. But I need to find a root of the problem!
Going on investigation - too view info in Internet...

Cryogenmod 13. Ridiculous battery drain.

Hi,
I am very new to this and I created this account in the hope that someone will be able to help me. Please be gentle with me and explain things like I'm five.
I recently installed CM13 on to my Galaxy S2 and the battery drain is ridiculous. For example, it was fully charged fifty minutes ago but it is now at 89% - and for a majority of that time it has been in aeroplane mode. I am using Wi-Fi only when not in aeroplane mode and while this hastens the battery drain, it's not by a huge percentage.
My phones stats are:
Android version: 6.0.1
CyanogenMod version: 13.0-20160404-NIGHTLY-i9100
Kernel version: 3.0.101-CM-g3419d27 [email protected] #1
GAPPS: BaNkS-Dynamic-GApps-6.x.x-10-20-15
TWRP: IsoRec_TWRP_3.0.0-0_i9100
Things I have tried:
Using privacy guard to stop Google Play Store and various other apps from starting on boot and staying awake.
Setting the screen brightness level to the absolute minimum.
Setting the screen to go to sleep after 15 seconds inactivity.
Turning off Wi-Fi scanning.
Setting my e-mail pushes to one hour instead of instantly (which I especially hate).
Turning off voice recognition.
Setting location mode to battery saving.
Installing Advanced Task Killer, Greenify and/or DU Battery Saver.
Recalibrating the (new) battery - manually and with the battery calibration app.
Resetting network settings.
And various other things that I can't recall right now.
I recently installed GSam Battery Monitor, but it's not telling me much at the moment - just that the screen uses 64% and apps use 36%, and the average battery life per complete charge is at 7h 13m (3h 20min active).
If I go to settings > battery, it's telling me even less - the screen has used 4%, CyanogenMod System uses 2%.
I've read on other forums that installing a different kernel will improve it, but others have said it won't make any difference. Either way, I have no idea where to get the kernel from. I'm starting to think I must have installed something very wrong when the battery life on my phone won't even last eight hours. I have spent the past couple of days browsing to try and find out what I can do, and I think I'm about to go cross eyed.
Can anyone please help? Please remember that I am a complete newcomer to this so I may be asking some really stupid questions.
Thank you in advance for any help offered. I really don't want to go back to my 3GS now.
Hey,
I'm also on CM13 and also have battery drain, since Android 6 is really heavy, but definitely not as bad as you.
One thing you else could try is the app "BetterBatteryStats" which is available for free on XDA - just search. In my opinion it's the best available app for battery statistics. You can check out which app is keeping your device awake at standby.
But in your case, as you already tried a lot, I recommend to simply do a clean install of CM again. Really looks like there were little errors while flashing, or the Rom's zip file got somehow corrupted at the download. So download ROM and Gapps again, go to recovery, wipe /system, /data, /cache and reflash ROM and Gapps. Perhaps use another Gapps package than you used before. Also consider choosing the littlest available one. Maybe the issue will be gone then. Really hope this helps somehow.
Was I gentle enough?

Categories

Resources