[Nexus 5 Q&A, Help & Troubleshooting] Elias_grodin:
I copied the extract below from a post on the Google Android Open Source Project which seems to be dead on my issue.

https://code.google.com/p/android/i...4.4.2 android system battery drain&colspec=ID Type Status Owner Summary Stars

QUOTE

This is NOT a "small" issue (referring to the priority). It's becoming a deal-killer for the Nexus 5. After a full charge at 9:30AM, the phone is completely drained by 1:30PM. A new phone should last more than four hours on a charge.

"Android System" is listed in the battery app as having taken 51% of the power in the battery window.

...you can see that the phone (yesterday) was doing well after I restarted it, but then something happened and its battery usage went WAY up. The screen was off that entire time, and yet it seemed to be active almost constantly.

As I said above, I'm a developer, so I decided to hop into adb shell and see what top has to say.

When the phone is on and idle, I see very little system usage:

User 7%, System 5%, IOW 0%, IRQ 0%

User 24 + Nice 0 + Sys 18 + Idle 276 + IOW 0 + IRQ 0 + SIRQ 0 = 318

PID PR CPU% S #THR VSS RSS PCY UID Name

769 0 6% S 82 988748K 92700K fg system system_server

4346 0 3% R 1 1332K 488K shell top

1399 0 0% S 7 7220K 492K root /system/bin/mpdecision

190 0 0% S 28 33080K 3440K nobody /system/bin/sensors.qcom

955 0 0% S 26 942496K 101376K fg u0_a12 com.android.systemui

12267 0 0% S 1 0K 0K root kworker/u:1

...

But as soon as the screen went off, the "system_server" task SPIKED:

User 52%, System 3%, IOW 0%, IRQ 0%

User 120 + Nice 215 + Sys 25 + Idle 278 + IOW 1 + IRQ 0 + SIRQ 0 = 639

PID PR CPU% S #THR VSS RSS PCY UID Name

769 1 53% S 83 1024348K 93328K fg system system_server

4346 0 0% R 1 1332K 488K shell top

4684 0 0% S 38 909516K 50868K bg u0_a60 com.google.android.music:main

10257 1 0% S 42 909916K 42568K bg u0_a73 com.google.android.youtube

29526 0 0% S 1 0K 0K root kworker/0:2

4716 2 0% S 23 912680K 45896K bg u0_a5 android.process.media

...

system_server (probably the system usage above) is jumping up to 53% when the phone is asleep.

What could be going on here? WHY would the CPU use go way UP when the phone is "asleep"? I assume that you didn't release a phone that always does this, and presumably there is a bad app interaction with KitKat, but there's also a bug in KitKat in that it's not reporting WHAT app is causing the problem.

After looking at "top" above and realizing that the problem gets worse after the phone goes to sleep, I decided to capture a logcat and see what happened. After a fresh reboot, I hooked up logcat and started capturing to see what would happen. It got MUCH noisier after the phone went to "sleep."

I watched the logcat output and saw that it quieted down until about 10 seconds before the screen went dark. Then it goes nuts.

Among other things, the moment I put the phone to sleep I start seeing onDataStateChanged thrashing: For the two minutes between boot and sleep, I see one message with the onDataStateChanged. It looks like it's retrying a data connection once every minute, and it takes about 40 second to do each retry.

I'm seeing REQUEST_GET_NEIGHBORING_CELL_IDS/RIL_REQUEST_GET_CELL_INFO_LIST come up about 3-5 times a minute. The phone is sitting still on my desk. I don't think the neighboring cells are changing that often.

I'm seeing "Got device state change intent: android.net.conn.CONNECTIVITY_CHANGE" about 17-19 times per minute. Similar connectivity messages like:

"ConnectivityService: [CheckMp] isMobileOk: not connected ni=NetworkInfo: type: mobile_hipri[LTE], state: DISCONNECTED/DISCONNECTED, reason: lostDataConnection, extra: fast.t-mobile.com, roaming: false, failover: false, isAvailable: true, isConnectedToProvisioningNetwork: false"

...are also coming up multiple times per minute.

Finally, I'm seeing "YouTube : apps.youtube.app.prefetch.PrefetchService.onStartCommand" similarly about 14-19 times per minute.

It's looking a LOT like the problem is that, when the phone is on the edge of a service area, it thrashes on reconnection. So if you happen to be close to the edge of a cell, or in a basement that's partially shielded, then it kills the battery in a matter of hours.

This did NOT happen on my last phone (the Galaxy Nexus). In fact, that phone got more "ticks" of signal in the basement, so I'm starting to wonder if part of the problem is a poor antenna on the Nexus 5.

In case someone from Google wants to see the whole log (or another one I captured a half hour later), I'll keep it around. Email me and I'll send it. I don't want to have to filter it for potentially private information, so I'm not posting it publicly, but I'd trust an [MENTION=222739]google[/MENTION] or [MENTION=5711379]ANDROID[/MENTION] email address with it.

UNQUOTE