yashsingh1/xdaforums huggingface dataset:
[Moto G Q&A, Help & Troubleshooting] Radra:
I don't think it could be an app because I tested so many roms with/without installing my apps that I use everyday. I'm in airplane mode now, I'll reply in a few hrs with my results

I will! also, my problem could be anything because I triggered it.

I bought this second-hand Moto G LTE like 1 or 2 weeks ago and It worked so fine with 4.4.4 (I should've done a backup) but I like messing things around and as I said I did some things that triggered this strange and annoying bug

PD: Do you guys know the best way to see wakelocks? Thanks
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
Use wakelock detector app, it requires root. Charge phone fully and allow wakelock detector to capture stats for a few hours.

Note that the GPS drain doesn't always happen, bug is hit and miss.
[Moto G Q&A, Help & Troubleshooting] Radra:
Update: I tested it for 1 hour with Wifi ON, GPS OFF, without my apps and just Google apps (also clean O.S. because I flashed 4.4.4 stock again).

It drained 3% from 96 to 93 in just less than an hour (48 min more or less)

Now I will test with airplane
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
Can you go yo wakelock settings and chose advanced mode and see what wakelocks show then.
[Moto G Q&A, Help & Troubleshooting] Radra:
View attachment 3171788

WTF is 1013
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
1013 is when an audio wakelock is held. If you touch the wakelocks shown you will see more detail.

---------- Post added at 01:44 PM ---------- Previous post was at 01:41 PM ----------

4% awake overall isn't that high. My phone is usually 1% or 2% but I don't have a lot of syncing going on.

Your Google play services is a bit high though, can you post the screen shot which shows more details if you touch the Google play services wakelock please.

---------- Post added at 01:48 PM ---------- Previous post was at 01:44 PM ----------

The 1013 could tie into audio from YouTube. I know 1013 is a bit higher than YouTube but 1013 always has some wakelock time even when no audio happens at all for some reason.
[Moto G Q&A, Help & Troubleshooting] Radra:
View attachment 3171836 Last night it went from 61 to 45. It's very frustrating
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
That second wakelock under Google services is to do with Google fit wear. When Google updated play services a while back that wakelock appeared. My phone then was more awake and I stopped the offending services using 'disableservices' app. If you touch the wakelock and hold it allows you to copy as text and paste so you can see full name. Then search in disableservices app and stop it.

There are a few Google fit wakelocks, I disabled two and it made my phone go back to normal .

However you may find if it's draining in airplane mode then it really is the GPS bug and then there is no hope.
[Moto G Q&A, Help & Troubleshooting] Radra:
Thank you very much for your help! I'll do some tests (airplane included) so It'll take me 1 day to do it
[Moto G Q&A, Help & Troubleshooting] Radra:
Update: I did a test with airplane and it drained battery as well. It went from 65 to 58.

Apparently I don't have the GPS problem but I have another problem I can't identify... This is weird

View attachment 3173504
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
I don't see the drain in that pic, the graph is flat when its in airplane mode.
[Moto G Q&A, Help & Troubleshooting] Radra:
Yeah It didn't drain like when I was without airplane (around 15%) but there's still drain. With airplane it drained 7% (from 65 to 58) in 8 hours when it's supposed to drain nothing or at least (1 or 2 percent).

I don't know why the graph shows nothing drain but It drained
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
OK, I looked closer, now I can see the drain happens quickly at the start of airplane mode then it flattens out for most of the time. That isn't the GPS bug then. With GPS bug it drains constantly.

Not sure what it is then, very odd as phone shows its not awake. But must be some app draining it somehow.
[Moto G Q&A, Help & Troubleshooting] Sportfreunde:
Mine has more drain I find between 100-90ish%. Like if I charge it to 100 then take it off within an hour it'll be at 97 or 96% without usage then even out it's weird.

Fairly sure wakelocks aren't in issue, might be alarms I dunno. I've done the battery calibration thing with 100% charge at 8 hours than another one hour charge then another one hour charge. Also use Amplify.

Viber is the only app I need running constantly in the background.

Window Manager lock and ActivityManager-Launch are the two biggest wakelocks in the past 16 hours at 10 mins and 2 mins respectively
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
I have purchased a second hand XT1032 from eBay about a week ago. It looks like it was originally locked to Tescos but is now SIM unlocked. Apart from that its identical to my original phone.

I have used TWRP to backup my original moto g and restored it to the eBay moto g. So both phones are the same from a software point if view.

Guess what - NO GPS battery drain bug on the eBay moto g (I tried to make the drain appear for the last three days but I just can't).

To me this proves its a fault in the original phone's hardware as I (and some others) thought.

I will report this on the moto forums but no doubt Motorola will ignore it as no way will they admit to faulty hardware. I'll let you know.

So I now have a 100% working phone and the old one I will give to my missus.

I just hope the battery drain doesn't suddenly start to happen.
[Moto G Q&A, Help & Troubleshooting] eemgee:
Mine started life as a Tesco mobile locked phone, but always had the drain.

I guess mine would be a early batch as I got it in late November 2013.
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
My original was also an early batch, I think I got it in Dec 2013.
[Moto G Q&A, Help & Troubleshooting] neu - smurph:
Mine with the drain was purchased Jan 14 from Tesco.
[Moto G Q&A, Help & Troubleshooting] eemgee:
Current widget is working on lollipop now. So I'm back to having it set to alert me, if I get 10 consecutive minutes of more than 25mAh drain with the screen off..

Not ideal but at least I know before the battery dies.
[Moto G Q&A, Help & Troubleshooting] snowboard:
I bought mine Dec 13 fron amazon UK and the gps battery drain has forced me to keep location off all the time.

Any news after the update to Lollipop ??? Or is the location battery drain not software related at all ?
[Moto G Q&A, Help & Troubleshooting] andyrock:
Mine was purchased in December 2013 from handtech. My girlfriend's was as well but the drain in hers is much less frequent.
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
A few posts/pages back eemgee says he still had the drain on lollipop, not sure if that was stock lollipop or a custom ROM though.
[Moto G Q&A, Help & Troubleshooting] Radra:
There' is not an official firmware for our device, we must wait for a release to see if LP fix it
[Moto G Q&A, Help & Troubleshooting] Nandeh:
OTA Loliipop is releasing right now for Moto G 2013...
[Moto G Q&A, Help & Troubleshooting] eemgee:
Mine is on Brazilian stock lollipop tested still has drain flashed EU lollipop radio over the weekend and no difference, still draining.
[Moto G Q&A, Help & Troubleshooting] thoughtblocked:
It would be helpful to know if your phones are even entering deep sleep.

Currently, there's a bug with one of the core google apps where it isn't releasing a wakelock therefore

the phone is forced to run at 300MHz, even when the display is off.
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
It does enter deep sleep and there are no wakelocks.
[Moto G Q&A, Help & Troubleshooting] neu - smurph:
Tested yesterday on 5.0.2 UK Tesco variant and still getting drain after GPS. Its a shame as initial impressions are that in general standby battery use is better (lost only 5% in 8 hours at work yesterday with mobile data and sync active). After using GPS on way home drain was about 1.7% per hour in airplane mode and in excess of 2% with wifi/sync on.

GPS was a bit glitchy as-well - repeatedly losing satellite lock for a few seconds.

Edit - Glitchy GPS fixed following a factory reset - post use drain is still present.
[Moto G Q&A, Help & Troubleshooting] Radra:
Wait for the official LP firmware for maybe a fix. If it's not fixed I'll sell my Moto G as well
[Moto G Q&A, Help & Troubleshooting] eemgee:
It hasn't fixed it, and I doubt 5.1 will either. On the up side standby time when drain isn't happening is amazing now.
[Moto G Q&A, Help & Troubleshooting] Radra:
How do you know if it has not even been released? (for our variant)
[Moto G Q&A, Help & Troubleshooting] eemgee:
Well I don't know what yours is but GB is out, 4.4.4 had it 5 has it.
[Moto G Q&A, Help & Troubleshooting] Bambasty:
L 5.0.2 unfortunately doesn't fix the bug.

Using a Moto G 2nd gen I tried the official L update and switched to Cyanogenmod 12 nightly (=L 5.0.2) afterwards.

In both battery drain can be reproduced after using GPS for a while. I first noticed the problem with stock 4.4.4, so all recent versions seem to be affected.

GSam Battery Monitor Pro with root for detecting wakelocks doesn't show any. So that energy vampire must be deeper within the system. Maybe a driver or it's in hardware, if so hopefully a workaround to reinitialize that affected component correctly can be designed. Wasting 25% battery (or one hour of screen time) during the day hidden behind normal usage is not acceptable. This means at least 50% drain every 24h for nothing. Keeping GPS constantly disabled or restarting the phone every time after using it is a bit awkward and somewhat contrary to the intended usage of a modern smartphone. :(
[Moto G Q&A, Help & Troubleshooting] pete007:
To anyone suffering this bug (GPS related), there has been an activity on the motorola forum regarding this bug. The moderator is asking users who have this bug to pm him additional information about the phone. Please if you have this bug, pm him. Here is the forum https://forums.motorola.com/posts/5a07d40ff2?commentId=903110#903110

The more users submit them their info the better. Let's hope they solve it.
[Moto G Q&A, Help & Troubleshooting] eemgee:
To save a bit of time, motorola tom is asking for bug reports taken in airplane mode while the drain is happening.

I'm not expecting anything wrong to show in the bug reports. But we never know.
[Moto G Q&A, Help & Troubleshooting] CJMom:
I think I actually know what's the real cause of the battery drain here. and it's not the GPS.

Since my device is rooted I decided to check this problem a little further and this is what I found:

When I open Google Maps even with GPS off I can see the process /system/bin/akmd8963 is constantly using 2% of the CPU (kernel mode) even after I closed Maps and wiped it off the cache.

This process remains active and consume ~2% of the cpu until you reboot your phone.

I tried looking online what this process might be and its turned out the this connected to the magnetic and orientation sensors (which helps getting GPS lock)

my assumption is that some GPS related apps utilize these sensors and others not and therefore the drain doesn't happening after every GPS usage.

If anyone could confirm this, just open Google maps with GPS off, and exit it.

then go to Options -> Developer Options -> Show CPU Usage wait a few seconds and check if you can see akmd8963 in the top of that list. now leave your phone in idle and check if the drain is happening.
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
No, I don't see that. If it were the case then the phone would also show as being awake in the battery stats which it doesn't.

The drain also happens only when (and after) GPS has been used.
[Moto G Q&A, Help & Troubleshooting] CJMom:
This is a system process and it always running in the background it won't show the device as awaken in stats.

akmd8963 is not in the top of the list or the drain is not happening? I have the LTE version maybe it's different.
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
The drain happens once GPS has been used, never any other time. Earlier in the thread other users have noticed the battery pulling more charge once GPS has been used. No software issues are seen, ie phone sleeps as normal, no wakelocks.
[Moto G Q&A, Help & Troubleshooting] neu - smurph:
I've got no persistent process showing in the CPU overlay after running maps on my unrooted phone (with GPS enabled or not). The drain post GPS occurs for me after using GPS with different navigation app. A factor is period of time GPS is used for - 12 minutes or thereabouts or more
[Moto G Q&A, Help & Troubleshooting] der-joker:
Is this bug present in 5.1 Roms (GPE or CM-Based ones)?

Maybe someone could test it?
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
It is present in lollipop.
[Moto G Q&A, Help & Troubleshooting] der-joker:
Guys, can you test this on your rooted phone:

1. Use GPS for a while

2. Be sure the drain is present

3. Kill "com.qualcomm.services.location" and "com.google.process.location" via shell

kill $(pidof com.qualcomm.services.location) $(pidof com.google.process.location)

Don't worry, the two services will be restarted automatically

4. Report if the drain is still present

This stopps the drain on my xt1032 with stock brasil 5.0.2
[Moto G Q&A, Help & Troubleshooting] eemgee:
I need noob instructions, I'm getting command not valid :eek:
[Moto G Q&A, Help & Troubleshooting] der-joker:
@up

open TerminalEmulator app (I prefer this one)

then type

su
kill $(pidof com.qualcomm.services.location) $(pidof com.google.process.location)

Ofcourse you can do this via adb shell too.
[Moto G Q&A, Help & Troubleshooting] eemgee:
No go :(

View attachment 3262218
[Moto G Q&A, Help & Troubleshooting] der-joker:
Busybox is missing on your system and you are not root.
[Moto G Q&A, Help & Troubleshooting] eemgee:
I'm rooted but no busybox, I'll get it now and try to set drain before bed.

Edit: no I'm not good enough for this, I get operation not permitted now. Someone that knows stuffs will have to try it.

If it works is there a way to automate it?
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
This does NOT stop the drain for me I killed the two processes (did a 'ps' to find them in terminal and killed each by its PID). Drain continues. This is on android 4.4.4.
[Moto G Q&A, Help & Troubleshooting] der-joker:
I did a more detailed test today:

* used GPS (via Ingress) from 8:30am to 9:00am

* put phone into airplanemode at 9:00am

--> at 12:00pm the drain was present with 1,0% per hour (from 39% to 36%; measured via BetterBatteryStats)

* killed the two services at 12:00pm

* left airplanemode at 3:00 pm

--> no more drain at 3:00pm, battery stayed at 36%

I will repeat this test with a fully charged battery.

[MENTION=5632484]eemgee[/MENTION]

you have to type "su" before "kill ..."
[Moto G Q&A, Help & Troubleshooting] eemgee:
It comes back with "tmp-mksh: 2297: not found"
[Moto G Q&A, Help & Troubleshooting] eemgee:
from motorola forum
[Moto G Q&A, Help & Troubleshooting] eemgee:
It ask seems to have gone a bit quiet on this now.
[Moto G Q&A, Help & Troubleshooting] cesc1972:
This bug is so annoying and persistent, I'm tired of having to reboot the phone every time I use the gps :-/
[Moto G Q&A, Help & Troubleshooting] asdroid:
Hi, i have LL 5.0.2 and i have this annoing battery drain bug after using GPS.

But 2 days ago for the very first time i dont'had to restart my phone: before i turn off localizaton i switch from 'GPS only' (i use always olny GPS when travelling) to 'high precision'. After that battery drain was not present.

I don't know if this was only luky: somebody can test this?

Bye
[Moto G Q&A, Help & Troubleshooting] eemgee:
Why is it fine when location is switched off then? The fact that it is deep sleeping is why no one has figured out what the problem is.

I can comfortably get 4 days from a charge on a almost 2 year old phone.
[Moto G Q&A, Help & Troubleshooting] Largamelion:
So my GF bought the Moto G 2015 (1GB/8GB) a few weeks back and noticed the drain last night when she put the phone in airplane mode for the first time. When we went to bed the battery was almost completely charged (about 90%) and when we woke up 8 hours later it was down to 12%, that's nearly 80% in 8 hours, 10%/1h!! There were barely any wakelocks and at the top of battery usage was 'Android system'. I can't believe such a bug is still around after more than a year and even in a new generation of their phones. I'll be reading through this thread to see if there's any fixes but from what I read so far it has something to do with the gps and location services. I was looking at the Moto X Style for my next phone but if this is the way Motorola handles their software issues I'll be looking elsewhere.
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
Clearly that is not the GPS bug. Read the thread rather then jumping to conclusions. For a start the GPS bug means roughly 1.5% per hour drain.
[Moto G Q&A, Help & Troubleshooting] eemgee:
Well I've been using a moto g3 for a few days now and I'm happy that the GPS bug isn't there.
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
Hi, I sent you a private xda message if you would like to read it. Thanks.
[Moto G Q&A, Help & Troubleshooting] snowboard:
my phone is

XT1032 UK retail brought from Amazon UK .

Problem happens on 4.3 stock and 4.4.2 stock.

Baseband version is MSM8626BP_1032.340.63.00R.

Is it safe to publish the serial number ?

Had the same problem.

Wrote on other threads too.

Have been trying to pinpoint the problem.

Could not find the solution based on software.

It does not happen all the time. I even had a 5 days standby.

One think I noticed though is that sometimes the battery charges to 100% very quickly.

Like no way so quick. Maybe in 1.30 hour.

So me thinks could be battery hardware issue.
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
I can charge to 100% in 1:30-2:00hrs with my charger. If you can run tests it would be good especially using GPS then not using GPS, I'm convincing myself its GPS related somehow. As with my reply to other posts please double check all battery stats look normal when you see the drain, ie android OS not high for example.
[Moto G Q&A, Help & Troubleshooting] stianeklund:
Battery Glitch?

I just got a Moto G (upgraded from the Samsung Captivate) from Amazon.co.uk. Plugged it into my computer yesterday, had USB Debugging on, rooted unlocked phone running stock 4.4.2 on ART. As I plugged it I heard the low battery sound, and noticed it was suddenly down to 1%, I knew I had at least 35% before plugging it in.

I charged it up to 100% again, and rebooted just to make sure, haven't had the problem since. Could this be a hardware issue, or more likely a software / battery calibration glitch?
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
Different problem, please read the thread before posting, there are other threads related to your issue, thanks.
[Moto G Q&A, Help & Troubleshooting] eemgee:
I had this problem then it went away, so I put location services back on and g'now. still had no drain, so I thought woohoo great!

after about a week drain started again.... nothing changed just woke up one morning and saw is lost about 10% :(
[Moto G Q&A, Help & Troubleshooting] allen chen:
Try this setting workaround

Hi, Guys,

Nice to meet you, this is my first post here, XDA is a great site with great people.

My Moto G has got this battery drain problem as well for past weeks and yesterday I saw this setting workaround on a HK site:

Go to Google settings/Android Device Manager and untick both box.

Go to Location/Location Services and untick both box.

As for Location/Mode, the site didnt specify on that so I set it on Battery Saving.

My phone used to lose about 15% battery during my sleep but with the setting my phone only lost 5% last night from 12 to 8 this morning and it was on 3G.

Sorry for posting this after just testing it for a night but this is a serious problem that needs a immediate fix.

Thank you.
[Moto G Q&A, Help & Troubleshooting] Mickeyvdb:
Have used my MotoG yesterday two times with GPS. After this I could not notify any additional battery drain. All back to normal after turning off GPS.

So I have to agree that my occasional battery drain is not comparable to the one you describe. Sorry for posting this different problem in this thread.
[Moto G Q&A, Help & Troubleshooting] fubag:
terrible battery life from last charge, only 50 mins screen time and 54 mins of phone calls, GSAM not showing any unsual battery wakelocks etc.
[Moto G Q&A, Help & Troubleshooting] if0rg0t:
Results from experiment #1 (WiFi) night# 1

BBS log

http://pastebin.com/gcxqM6Ui

Battery Drain Log:

1393170109804;95;-0.24890746906322153;true

1393155646598;96;-0.5084268932970128;true

1393148565934;97;-2.8614099915667888;true

1393147307813;98;-0.29219963338686;true

1393134987469;99;-1.995958184676031;false

1393133183824;100;22.879586642134665;false
[Moto G Q&A, Help & Troubleshooting] aayush_neov:
My experience

I too was bugged by this wifi sleep policy causing battery drain in sleep mode.

Then i did few tweaks !!

I unticked the SHOW NOTIFICATION checkbox from Google Play serivces and other google apps.

And the result is there for you to see in my battery stats screenshot :fingers-crossed::fingers-crossed::fingers-crossed::fingers-crossed:
[Moto G Q&A, Help & Troubleshooting] if0rg0t:
By notification, are you referring to the notification LED? You turned that off?
[Moto G Q&A, Help & Troubleshooting] aayush_neov:
Go to APP INFO

and untick the SHOW NOTIFICATIONS box.

It basically takes away the running priority of that app. So in case of multitasking/ Idling that app will be closed by the system more frequently
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
Interesting, and doesn't look like you rebooted at all?

I unticked the android system manager options in Google settings and rebooted. Tried my usual test using GPS to force the battery drain and this time I can't reproduce the issue. Reticked settings and rebooted, tested GPS again and also no issues.

Very very weird.
[Moto G Q&A, Help & Troubleshooting] vkk178:
I believe one of the reasons some people are getting bad battery is because the battery is not fully getting charged to its peak voltage level . Ideally for Li-Ion batteries the peak voltage should not cross 4.2 V .However I believe Motorola batteries have a different Li-Ion chemistry allowing them to charge to higher voltages ( 4.32 V) thereby offering greater battery capacities . In my case I have noticed it drop from 4.32 to 4.29 in one week , which I'm not sure sounds great .

To help analyze this can the people having both good battery and bad battery life post the "Battery voltage" at 100 % with the charger connected ? That way we'll know if there is a pattern . You can get this info by typing *#*#4636#*#* in the dialer

One more useful information to check is , how much time it takes to charge the battery from 20 % to 100 % . Mine Takes more than 2 hours with the provided Motorola 500ma charger .
[Moto G Q&A, Help & Troubleshooting] scott_doyland:
This is not the problem, please read the thread to understand the issue.
[Moto G Q&A, Help & Troubleshooting] vkk178:
Well why can't if be ; if we looking for reasons other than software for battery drain .Wifi ,GPS are listed as possible reasons . Faulty battery could another culprit IMHO .Unless offcourse we have definite information that it is not . Please provide this info if you have .
[Moto G Q&A, Help & Troubleshooting] snowboard:
I had the drain issue again yesterday and I rebooted so It went away.

Don't know what was causing it.
[Moto G Q&A, Help & Troubleshooting] if0rg0t:
Something was clearly going on with your wifi. There was some sort of activity which was using the wifi. I don't think any of us in this thread have seen a similar problem.
[Moto G Q&A, Help & Troubleshooting] if0rg0t:
The good 'ol tick re-tick solution :) Sigh, this is weird.