Significant increase in battery consumption in recent days

shadewood_mole

New member
Thanks for that @Endercraft but I've not used adb before. Probably a daft question but I have a number of financial apps on my phone and they will not function on a rooted or modified phone. I take it that simple use of adb will not cause problems?
 

Endercraft

Moderator (& bug finder :D)
Adb doesn't need root. Your apps will work just fine (you might need to disable developer option after for some apps to work).
 

shadewood_mole

New member
Ok so I've installed adb on my PC and I'm seeing an authorised device. I sent the grant permission and didn't get any error so I assume it worked?
I created a macro with the dumpsys action and saved the output to a string. I got "no_cached_wake_locks=true" Is that what was expected?
 

Endercraft

Moderator (& bug finder :D)
You can run dumpsys power only and post the output here, the last part of first command should've extractee the wakelocks.
 

shadewood_mole

New member
Here is the full dump:
(in two parts due to forum text limits)


POWER MANAGER (dumpsys power)

Power Manager State:
Settings power_manager_constants:
no_cached_wake_locks=true
mDirty=0x0
mWakefulness=Awake
mWakefulnessChanging=false
mIsPowered=false
mPlugType=0
mBatteryLevel=88
mBatteryLevelWhenDreamStarted=89
mDockState=0
mStayOn=false
mProximityPositive=false
mBootCompleted=true
mSystemReady=true
mHalAutoSuspendModeEnabled=false
mHalInteractiveModeEnabled=true
mWakeLockSummary=0x0
mNotifyLongScheduled=+58s944ms
mNotifyLongDispatched=-1s64ms
mNotifyLongNextCheck=(none)
mUserActivitySummary=0x1
mRequestWaitForNegativeProximity=false
mSandmanScheduled=false
mSandmanSummoned=false
mBatteryLevelLow=false
mLightDeviceIdleMode=false
mDeviceIdleMode=false
mDeviceIdleWhitelist=[1000, 1001, 1007, 2000, 10014, 10015, 10018, 10019, 10020, 10021, 10024, 10025, 10030, 10034, 10049, 10058, 10067, 10076, 10077, 10083, 10087, 10092, 10106, 10170, 10370]
mDeviceIdleTempWhitelist=[]
mLastWakeTime=132255389 (120608 ms ago)
mLastSleepTime=128757539 (3618458 ms ago)
mLastSleepReason=timeout
mLastUserActivityTime=132375866 (131 ms ago)
mLastUserActivityTimeNoChangeLights=101904639 (30471358 ms ago)
mLastInteractivePowerHintTime=132375866 (131 ms ago)
mLastScreenBrightnessBoostTime=0 (132375997 ms ago)
mScreenBrightnessBoostInProgress=false
mDisplayReady=true
mHoldingWakeLockSuspendBlocker=false
mHoldingDisplaySuspendBlocker=true

Settings and Configuration:
mDecoupleHalAutoSuspendModeFromDisplayConfig=false
mDecoupleHalInteractiveModeFromDisplayConfig=true
mWakeUpWhenPluggedOrUnpluggedConfig=true
mWakeUpWhenPluggedOrUnpluggedInTheaterModeConfig=false
mTheaterModeEnabled=false
mSuspendWhenScreenOffDueToProximityConfig=true
mDreamsSupportedConfig=true
mDreamsEnabledByDefaultConfig=true
mDreamsActivatedOnSleepByDefaultConfig=false
mDreamsActivatedOnDockByDefaultConfig=true
mDreamsEnabledOnBatteryConfig=false
mDreamsBatteryLevelMinimumWhenPoweredConfig=-1
mDreamsBatteryLevelMinimumWhenNotPoweredConfig=15
mDreamsBatteryLevelDrainCutoffConfig=5
mDreamsEnabledSetting=false
mDreamsActivateOnSleepSetting=true
mDreamsActivateOnDockSetting=true
mDozeAfterScreenOff=true
mMinimumScreenOffTimeoutConfig=10000
mMaximumScreenDimDurationConfig=7000
mMaximumScreenDimRatioConfig=0.20000005
mScreenOffTimeoutSetting=30000
mSleepTimeoutSetting=-1
mMaximumScreenOffTimeoutFromDeviceAdmin=9223372036854775807 (enforced=false)
mStayOnWhilePluggedInSetting=0
mScreenBrightnessSetting=0
mScreenBrightnessModeSetting=1
mScreenBrightnessOverrideFromWindowManager=-1
mUserActivityTimeoutOverrideFromWindowManager=-1
mUserInactiveOverrideFromWindowManager=false
mDozeScreenStateOverrideFromDreamManager=2
mDrawWakeLockOverrideFromSidekick=false
mDozeScreenBrightnessOverrideFromDreamManager=38
mScreenBrightnessSettingMinimum=2
mScreenBrightnessSettingMaximum=255
mScreenBrightnessSettingDefault=68
mDoubleTapWakeEnabled=false
mIsVrModeEnabled=false
mForegroundProfile=0

Sleep timeout: -1 ms
Screen off timeout: 30000 ms
Screen dim duration: 6000 ms

UID states (changing=false changed=false):
UID 1000: ACTIVE count=0 state=0
UID 1001: ACTIVE count=0 state=0
UID 1002: ACTIVE count=0 state=0
UID 1007: ACTIVE count=0 state=0
UID 1027: ACTIVE count=0 state=0
UID 1068: ACTIVE count=0 state=0
UID u0a14: INACTIVE count=0 state=11
UID u0a15: ACTIVE count=0 state=3
UID u0a20: ACTIVE count=0 state=7
UID u0a23: INACTIVE count=0 state=20
UID u0a25: ACTIVE count=0 state=3
UID u0a29: ACTIVE count=0 state=0
UID u0a30: ACTIVE count=0 state=6
UID u0a32: INACTIVE count=0 state=20
UID u0a34: ACTIVE count=0 state=0
UID u0a35: ACTIVE count=0 state=3
UID u0a36: ACTIVE count=0 state=5
UID u0a44: ACTIVE count=0 state=6
UID u0a52: INACTIVE count=0 state=20
UID u0a55: ACTIVE count=0 state=7
UID u0a72: INACTIVE count=0 state=20
UID u0a74: INACTIVE count=0 state=20
UID u0a77: ACTIVE count=0 state=0
UID u0a82: ACTIVE count=0 state=0
UID u0a83: ACTIVE count=0 state=7
UID u0a91: ACTIVE count=0 state=2
UID u0a92: INACTIVE count=0 state=20
UID u0a94: ACTIVE count=0 state=7
UID u0a99: INACTIVE count=0 state=20
UID u0a106: ACTIVE count=0 state=16
UID u0a114: ACTIVE count=0 state=7
UID u0a115: INACTIVE count=0 state=20
UID u0a116: INACTIVE count=0 state=20
UID u0a146: INACTIVE count=0 state=20
UID u0a148: ACTIVE count=0 state=8
UID u0a160: ACTIVE count=0 state=3
UID u0a161: INACTIVE count=0 state=20
UID u0a170: ACTIVE count=0 state=3
UID u0a173: INACTIVE count=0 state=20
UID u0a182: ACTIVE count=0 state=6
UID u0a321: INACTIVE count=0 state=17
UID u0i9: INACTIVE count=0 state=18

Looper state:
Looper (PowerManagerService, tid 38) {3167089}
Message 0: { when=+1s483ms what=1 target=com.android.server.display.AutomaticBrightnessController$AutomaticBrightnessHandler hashCode=a734470 }
Message 1: { when=+21s869ms what=1 target=com.android.server.power.PowerManagerService$PowerManagerHandler hashCode=8e73e9 }
Message 2: { when=+58s944ms what=4 target=com.android.server.power.PowerManagerService$PowerManagerHandler hashCode=32e886e }
(Total messages: 3, polling=true, quitting=false)

Wake Locks: size=0

Suspend Blockers: size=4
PowerManagerService.WakeLocks: ref count=0
PowerManagerService.Display: ref count=1
PowerManagerService.Broadcasts: ref count=0
PowerManagerService.WirelessChargerDetector: ref count=0

Display Power: state=ON

Battery saving stats:
Battery Saver is currently: OFF
Last ON time: 2023-11-27 13:34:23.877 -8h25m10s207ms
Last OFF time: 2023-11-27 18:04:50.808 -3h54m43s276ms
Times enabled: 1
 

shadewood_mole

New member
Drain stats:
Battery saver OFF ON
NonDoze NonIntr: 160m 202mAh( 8%) 75.5mAh/h 0m 0mAh( 0%) 0.0mAh/h
Intr: 77m 445mAh( 23%) 343.3mAh/h 0m 0mAh( 0%) 0.0mAh/h
Deep NonIntr: 895m 769mAh( 18%) 51.5mAh/h 0m 0mAh( 0%) 0.0mAh/h
Intr: 0m 0mAh( 0%) 0.0mAh/h 0m 0mAh( 0%) 0.0mAh/h
Light NonIntr: 759m 1012mAh( 21%) 80.0mAh/h 0m 0mAh( 0%) 0.0mAh/h
Intr: 1m 0mAh( 0%) 0.0mAh/h 0m 0mAh( 0%) 0.0mAh/h

Battery saver policy (*NOTE* they only apply when battery saver is ON):
Settings: battery_saver_constants
value:
Settings: (overlay)
value:
Adaptive Settings: battery_saver_adaptive_constants
value:
Adaptive Device Specific Settings: battery_saver_adaptive_device_specific_constants
value:
mAccessibilityEnabled=true
mPolicyLevel=0

Policy 'full'
advertise_is_enabled=true
vibration_disabled:config=true
vibration_disabled:effective=false
animation_disabled=false
fullbackup_deferred=true
keyvaluebackup_deferred=true
firewall_disabled=false
datasaver_disabled=true
launch_boost_disabled=true
adjust_brightness_disabled=true
adjust_brightness_factor=0.5
gps_mode=2
force_all_apps_standby=true
force_background_check=true
optional_sensors_disabled=true
aod_disabled=true
soundtrigger_disabled=true
quick_doze_enabled=true
enable_night_mode=true
Interactive File values:

Noninteractive File values:

Policy 'default adaptive'
advertise_is_enabled=false
vibration_disabled:config=false
vibration_disabled:effective=false
animation_disabled=false
fullbackup_deferred=false
keyvaluebackup_deferred=false
firewall_disabled=true
datasaver_disabled=true
launch_boost_disabled=false
adjust_brightness_disabled=true
adjust_brightness_factor=1.0
gps_mode=0
force_all_apps_standby=false
force_background_check=false
optional_sensors_disabled=false
aod_disabled=false
soundtrigger_disabled=false
quick_doze_enabled=false
enable_night_mode=false
Interactive File values:

Noninteractive File values:

Policy 'current adaptive'
advertise_is_enabled=false
vibration_disabled:config=false
vibration_disabled:effective=false
animation_disabled=false
fullbackup_deferred=false
keyvaluebackup_deferred=false
firewall_disabled=true
datasaver_disabled=true
launch_boost_disabled=false
adjust_brightness_disabled=true
adjust_brightness_factor=1.0
gps_mode=0
force_all_apps_standby=false
force_background_check=false
optional_sensors_disabled=false
aod_disabled=false
soundtrigger_disabled=false
quick_doze_enabled=false
enable_night_mode=false
Interactive File values:

Noninteractive File values:

Battery saver state machine:
Enabled=false
full=false
adaptive=false
mState=1
mLastChangedIntReason=0
mLastChangedStrReason=null
mBootCompleted=true
mSettingsLoaded=true
mBatteryStatusSet=true
mIsPowered=false
mBatteryLevel=88
mIsBatteryLevelLow=false
mSettingBatterySaverEnabled=false
mSettingBatterySaverEnabledSticky=false
mSettingBatterySaverStickyAutoDisableEnabled=true
mSettingBatterySaverStickyAutoDisableThreshold=90
mSettingBatterySaverTriggerThreshold=15
mBatterySaverStickyBehaviourDisabled=false
mLastAdaptiveBatterySaverChangedExternallyElapsed=0
AttentionDetector:
mMaximumExtensionMillis=240000
mMaxAttentionApiTimeoutMillis=2000
mLastUserActivityTime(excludingAttention)=132375866
mAttentionServiceSupported=false
mRequested=false

Profile power states: size=0

Wireless Charger Detector State:
mGravitySensor={Sensor name="gravity Non-wakeup", vendor="qualcomm", version=1, type=9, maxRange=156.99008, resolution=0.01, power=0.515, minDelay=5000}
mPoweredWirelessly=false
mAtRest=false
mRestX=0.0, mRestY=0.0, mRestZ=0.0
mDetectionInProgress=false
mDetectionStartTime=0 (never)
mMustUpdateRestPosition=false
mTotalSamples=0
mMovingSamples=0
mFirstSampleX=0.0, mFirstSampleY=0.0, mFirstSampleZ=0.0
mLastSampleX=0.0, mLastSampleY=0.0, mLastSampleZ=0.0


Hope some of that means something to you!
 

Endercraft

Moderator (& bug finder :D)
From what I can see, at the time you ran the command it seems that there were no wakelocks held. I don't have time to read every line fight now though.
 

Jacob L

Moderator (Lawsonator)
Maybe reduce your screen timeout. Settings > display > screen timeout.

I use MacroDroid to disable accessibility services at night along with MacroDroid categories and individual macros when not in use.
 

shadewood_mole

New member
Maybe reduce your screen timeout. Settings > display > screen timeout.

I use MacroDroid to disable accessibility services at night along with MacroDroid categories and individual macros when not in use.
Thanks but screen time is not the problem.

Something has changed that is causing Macrodroid to use significantly more battery %age than it did previously.

Screenshot_20231117-195026.png


Previously Macrodroid was a very small user of power (and still is on another of my phones) but it is proving hard to pin down.
 

Jacob L

Moderator (Lawsonator)
There have been a few minor updates in the last few days, have you got them?

Are there any errors in your logs in the green MacroDroid tile?
 

dhj49er

Well-known member
Thanks but screen time is not the problem.

Something has changed that is causing Macrodroid to use significantly more battery %age than it did previously.

View attachment 7712


Previously Macrodroid was a very small user of power (and still is on another of my phones) but it is proving hard to pin down.
Are you using geofence in macros?

If so, try disabling the macros or the category if all such macros are in it.

Check MD usage over 24 hours.

Has it gone down?
 

shadewood_mole

New member
Are you using geofence in macros?

If so, try disabling the macros or the category if all such macros are in it.

Check MD usage over 24 hours.

Has it gone down?
Hi there @dhj49er, As I've mentioned earlier I have no geofence triggers so it's not that.
And the diagnostics don't appear to show any wake lock problems.
So it's a mystery at the moment what is causing the increased drain.
 

dhj49er

Well-known member
Hi there @dhj49er, As I've mentioned earlier I have no geofence triggers so it's not that.
And the diagnostics don't appear to show any wake lock problems.
So it's a mystery at the moment what is causing the increased drain.
Have you tried saving all your macros ( via export) and then deleting all the macros, to see if the increased battery consumption is still present?

If the increased consumption is not present, it would suggest to me that a macro(s) is the likely cause.
 

gilesbradley

New member
Yes I've noticed significantly reduced battery life in recent days and Macrodroid is the top consumer at over 19% today. My phone usage hasn't changed .
 
Last edited:

dhj49er

Well-known member
Yes I've noticed significantly reduced battery life in recent days and Macrodroid is the top consumer at over 10%. My phone usage hasn't changed .

Between better battery life and the significantly reduced battery life, has any of the following happened:-

Has the phone had an update?
Have you installed updates of any apps?
Have you changed any phone settings?

If the answer to all is no, then I would reset the phone by power off.

On the restart, disable MD. Let the phone run long enough to see the battery life, it should be back to better. If not, something other than MD is causing the reduced battery life.

If battery life is better, enable MD and check the battery life.

If the significantly reduced battery life is observed I would run MD with no macros. Make sure you save (export) your macros, so after this test can import them.

With no macros what is the battery life?

In my experience resetting the phone is usually sufficient to correct a bad system setting or a misbehaving app.
 

dhj49er

Well-known member
Just for comparison
I have Galaxy S23 running Android 13.
In battery usage list of apps, MD is 13th from the top with 0.7% for the current session - battery charged 16 hours ago, with 63% battery used , 7hrs SOT and 8hrs of deep sleep.
 
Last edited:

gilesbradley

New member
Thanks. It's difficult to recall what MD's battery use used to but it just always seems to be at the top now, with double figure % usage by the end of the day. In my software developer days we used to be able to run a trace to find cpu 'hotspots' in the code. I feel there must be one of my macros that has a hotspot but I guess the only way to discover this is to have only one running at a time. Pretty laborious.
 

gilesbradley

New member
Update :
Yesterday I backed up all macros and deleted and reinstalled MD. That didn't seem to help.

Today I've disabled ALL macros but kept MD enabled - it shouldn't be doing anything. But already it's the top battery consumer at 3.4%, 2 hours since the last full charge. I've had the app open only very briefly.

Something is definitely wrong somewhere!

But it's my favourite app so I'd love a solution please.

Thank you
 
Top