问题:待机两个小时电量从30% 降到9%
05-24 21:18:23.186946 <3>[52483.726590] (0)[147:bat_thread_kthr]AvgVbat=(3756,3750),AvgI=(0,0),VChr=104,AvgT=(30,28),SOC=(32,32),UI_SOC=32,ZCV=3817,CHR_Type=0 bcct:0:0 I:7000 Ibat:-266
SOC=(32,32) 电量 32%
kernel log :
05-25 00:12:23.104457 <6>[55298.924898] (0)[987:system_server]PM: suspend entry 2017-05-24 16:12:23.104457491 UTC
05-25 00:12:23.104471 <6>[55298.924912] (0)[987:system_server]PM: Syncing filesystems ... done.
05-25 00:12:23.207949 <6>[55299.028390] (0)[987:system_server]PM: Wakeup pending, aborting suspend
05-25 00:12:23.207977 <6>[55299.028418] (0)[987:system_server]active wakeup source: PowerManagerService.WakeLocks
05-25 00:12:23.213711 <6>[55299.034150] (3)[987:system_server]PM: suspend exit 2017-05-24 16:12:23.213711953 UTC
05-25 00:12:24.297376 <6>[55300.117815] (0)[987:system_server]PM: suspend entry 2017-05-24 16:12:24.297376876 UTC
05-25 00:12:24.297391 <6>[55300.117830] (2)[10918:Binder:939_17]PM: Syncing filesystems ...
05-25 00:12:24.407931 <6>[55300.228370] (2)[987:system_server]PM: Wakeup pending, aborting suspend
05-25 00:12:24.407960 <6>[55300.228399] (2)[987:system_server]active wakeup source: PowerManagerService.WakeLocks
05-25 00:12:24.412854 <6>[55300.233294] (1)[987:system_server]PM: suspend exit 2017-05-24 16:12:24.412854184 UTC
05-25 00:12:24.765816 <6>[55300.586255] (0)[987:system_server]PM: suspend entry 2017-05-24 16:12:24.765816414 UTC
05-25 00:12:24.765830 <6>[55300.586269] (0)[987:system_server]PM: Syncing filesystems ... done.
05-25 00:12:24.868568 <6>[55300.689007] (0)[987:system_server]PM: Wakeup pending, aborting suspend
05-25 00:12:24.868597 <6>[55300.689036] (0)[987:system_server]active wakeup source: PowerManagerService.WakeLocks
05-25 00:12:24.873538 <6>[55300.693977] (3)[987:system_server]PM: suspend exit 2017-05-24 16:12:24.873538799 UTC
05-25 00:12:25.259975 <6>[55301.080415] (3)[987:system_server]PM: suspend entry 2017-05-24 16:12:25.259975260 UTC
不断出现
suspend entry 2017-05-24 16:12:23.104457491 UTC 进入待机
suspend entry 2017-05-24 16:12:23.104457491 UTC 退出待机
active wakeup source: PowerManagerService.WakeLocks 唤醒源
sys log
05-25 01:13:10.417075 939 1607 D PowerManagerService: Releasing suspend blocker "PowerManagerService.WakeLocks".
05-25 01:13:10.423901 939 8293 D PowerManagerService: acquireWakeLockInternal: lock=16565988, flags=0x1, tag="NlpWakeLock", ws=WorkSource{10091 com.facebook.katana}, uid=10013, pid=1526
05-25 01:13:10.424081 939 8293 D PowerManagerService: updateWakeLockSummaryLocked: mWakefulness=Asleep, mWakeLockSummary=0x1
05-25 01:13:10.424172 939 8293 D PowerManagerService: updateUserActivitySummaryLocked: mWakefulness=Asleep, mUserActivitySummary=0x0, nextTimeout=0 (58054029 ms ago)
05-25 01:13:10.424252 939 8293 D PowerManagerService: updateDisplayPowerStateLocked: mDisplayReady=true, policy=0, mWakefulness=0, mWakeLockSummary=0x1, mUserActivitySummary=0x0, mBootCompleted=true, mScreenBrightnessBoostInProgress=false
05-25 01:13:10.424349 939 8293 D PowerManagerService: Acquiring suspend blocker "PowerManagerService.WakeLocks".
05-25 01:13:10.424742 939 8293 D PowerManagerNotifier: onWakeLockAcquired: flags=1, tag="NlpWakeLock", packageName=com.google.android.gms, ownerUid=10013, ownerPid=1526, workSource=WorkSource{10091 com.facebook.katana}
05-25 01:13:10.427397 939 10917 D PowerManagerService: releaseWakeLockInternal: lock=16565988 [NlpWakeLock], flags=0x0, total_time=3ms
05-25 01:15:04.097094 1526 1526 D ActivityThread: SVC-Calling onStartCommand: com.google.android.location.internal.server.GoogleLocationService@4beaeaa, flags=0, startId=71855
不断的出现释放与获取 NlpWakeLock ,并一直有启动GoogleLocationService 服务
这是google 位置服务不断唤醒导致的,只能关闭google 位置服务
安卓 7.0/7.1 息屏 NLPWakelock 唤醒引发异常耗电的一种解决方式