Android OS Battery Drain[Conclusion][Asus Zenfone 2 ZE551ML] - Android Q&A, Help & Troubleshooting

Zenfone users might have noticed that when we do not use the phone often the battery graph shows very high Android OS battery consumption, even more consumption than screen.Whereas, when we use the phone more often then the Android OS battery drain is reduced greatly.
In BetterBatteryStats you will see these two major wakelocks:
i)ospm_wake_lock
ii)earlysuspend wakelock
You will notice that this two wakelocks running all the time even when device is on standby.
This what actually makes Android OS to be running all time.
All of this are modules within the Linux Kernel power management.
Dont worry, It doesnt cause battery drain or keeping your device awake all time and not to enter deepsleep.
Here's some explanation:
i)ospm_wake_lock (Operating System Power Management OSPM):
Operating System Power Management (OSPM) is an operating system technology for managing the power of the underlying platform and switching it between different power states. OSPM enables a platform or system to implement the most efficient power mode and is applicable across all devices and components within a platform/system. OSPM is also known as Operating System-directed configuration and Power Management.
ii)earlysuspend_wakelock:
Earlysuspend provided a bit more of a gradient of states between on and suspended. The device may be still running, say playing some music, but the screen is off. In this case, it may make sense to power-down parts of the device that aren't going to be in-use if the screen is off: like touch sensors, or gpus.
Conclusion:
This is why Android OS keeps activity in the battery graph.
But it does not mean it drains battery juice because you'll see a higher percentage of usage, its actually the Power management taking place at the time. Power management is built into the Linux Kernel to handle the device power and had in imporved from 3.X+ linux kernels. These are the wakelocks which actually makes the phone to enter into deep sleep.

Screenshots
When i often used the phone-2nd screenshot
When i used the phone less often-1st screenshot

deleted

Related

[Q] Collin_ph Battery Tweak - Anything like this for Photon?

So before I got my MoPho I had been using a Hero for over two years, and the one tweak I found to be completely necessary was the Collin_ph Batter Tweak. If you never tried it, here's the basics:
What does it do?
This tweak creates a service that periodically checks the phone's power source.
If the power source changes, it reconfigures the device for maximum performace, battery and safety.
Tweaks compcache (if enabled) for current power source
Tweaks memory settings for current power source
Re-clocks CPU based upon battery remaining or current power source
Reclocks for maximum performance if on AC power
Reclocks for maximum performance and charging safety if on USB
Reclocks for performance and battery if on Battery
As Battery life is diminished, Maximum CPU frequency is lowered
Tweaks scaling charactaristics depending on power sourcee
CPU Scales up less frequently on battery power
CPU Scales up more frequently on USB/AC power
The CPU is allowed to scale dynamically in all charging states based upon CPU usage
Includes a batt-cfg utility to configure the system
You may load 1 of 2 pre built profiles
Manually configure CPU Frequencies in all charging states
Determine the percentage of underclocking as the battery drains
Configure how often to poll the power state / battery statys
Disable batt.sh service from running at startup
Includes a batt-rm.sh uninstall utility
Includes a batt-diag diagnostic utility
Includes an LED fix if your LED is stuck on
Includes optional experimental performance tweaks (disabled by default)
Includes optional Disk performance tweaks (enabled by default)
Includes optional froyo Audio quality fix (disables stagefright)
How does it do this?
The batt.sh service runs perodically to detect the power source through the kernel. When the service detects a change, it makes temporary changes to kernal run-time parameters. When you reboot, all changes are lost, however, if the batt,sh service is not disabled or uninstalled, upon startup, it will restore the settings.
If you're really interested, just look at the /system/bin/batt.sh script for all the gory details.
The service is started in /system/etc/init.local.rc
Click to expand...
Click to collapse
I really miss the ability to run a higher mhz when I'm plugged in, and lower my mhz when my battery is low or my phone is too hot. And as a service, there wasn't an app running at all times.
So my question is, is there anything like this out there for our photons? If not, how hard would it be to port (I have zero programming experience), since it looks like it's been ported to a number of other phones?
SetCPU profiles can do some of that, lower/higher clock speeds when battery hits X percent, the clock speeds for temps, the clock speed for charging(AC and DC), for when screens off, in call, etc.

How do I detect wakelocks inside of applications ?

Gents....
In the quest for battery life and RAM enhancements, and the fact that many applications use wake locks to keep themselves active in the RAM.....is there an easy method to identify which apps contain wake locks ?
I can see active apps easy enough, but does that state simply mean a wake lock is present ??
A little info from a dev or two would be much appreciated.......g
Bump....
gregsarg said:
Gents....
In the quest for battery life and RAM enhancements, and the fact that many applications use wake locks to keep themselves active in the RAM.....is there an easy method to identify which apps contain wake locks ?
I can see active apps easy enough, but does that state simply mean a wake lock is present ??
A little info from a dev or two would be much appreciated.......g
Click to expand...
Click to collapse
Not sure there's an extra easy way... Nonetheless, check out BetterBatteryStats, if you haven't done so already? It does detect Kernel as well as partial Wakelocks. Here's a link that should help: http://forum.xda-developers.com/wiki/Wakelocks
Also, if I remember correctly, you can open your favorite terminal emulator and type:
Su
dumpsys power
Your TE should display any at this point, and if your TE has a zero in the last two lines, there shouldn't be anything you need to worry about.
As far as RAM goes, Android has managed it well since Froyo 2.2, so its not really a concern that's worth your time. Nevertheless, I still find myself manually shutting down apps that I don't want held in RAM with SystemPanel or Taskiller anyway, d'oh! It's a bad habit - OCD problem for me, lol.., due to many years with Windows Mobile. Bottom-line is that Android will end idle app - process tasks as needed without our help, lol... and I'm sure you know that too.
In regard to battery life, here with Saurom 7.1, the display, mobile data, cell use, and cell standby, as well as an add-on ProximityScreenOff Pro app, consume the vast majority of the battery juice. That said, if I set wifi to sleep when the display is off and shut down mobile data, the battery life and deep sleep % increases dramatically.
Hope this helps a little...
Best to all,
R
Wakelock detector app
gregsarg said:
Gents....
In the quest for battery life and RAM enhancements, and the fact that many applications use wake locks to keep themselves active in the RAM.....is there an easy method to identify which apps contain wake locks ?
I can see active apps easy enough, but does that state simply mean a wake lock is present ??
A little info from a dev or two would be much appreciated.......g
Click to expand...
Click to collapse
You can check "Wakelock Detector" app which is available in Google Play
It has a simple UI which shows detail list of acquired wakelocks per each application
and as you mentioned, it shows active running apps on the top, which might have wakelock present at the moment.

High Current Consumption in idle state | 200-400 ma

Hey Folks,
I am using Stock with manually removed Bloatware. Root and Xposed are installed. My problem is the high current consumption of my Z5c. I get an average idle consumption between 200-450 ma. On my Z3c the consumption is between 50-150ma in idle state.
I tried several kernel. Stock kernel and androplus v20 - v27, in all kernel i get the same high comsumpition with interactive as governor. Brightness at the lowest and WIFI/DATA off. I use Amplify and in WLD i dont see any Problems. I dont use Facebook, only Whatsapp and GMail. Is somebody have the same problem?
Do you get same values?
Sry for my bad english
You should also check what apps are using CPU power. I had a somehow similar problem and found that some apps were pretty hungry.
I checked it already with a process monitor and the biggest cpu user is always system ui. In the battery usage stats of android, the highest usage come from display and android system.
I reflashed the .163 tft three days ago to start with a fresh installation, but the high consumption has remained.
Then maybe there's a setting that you are always making after flashing the system... Live wallpaper?
I have no other idea at the moment...
No live wallpaper or sth like that. Do anybody know the average ma consumption of Z5c?
Or is it the 810?
xanya said:
No live wallpaper or sth like that. Do anybody know the average ma consumption of Z5c?
Or is it the 810?
Click to expand...
Click to collapse
It's some of the system components or pre-shipped apps,
CM13 e.g. is able to achieve 1% per 4-8 hours or even less in idle (Airplane mode), but Stock ROM seemingly always keeps something in the phone busy,
my current suspicion is the fingerprint scanner, adaptive brightness, tap2wake, etc. - so system-side is keeping kernel-side awake, but wakelock detectors hardly show any wakelocks when most is blocked (e.g. via Amplify)
all of those work without hardly increasing battery consumption in AOSP and CM13;
so the only things left are apps and system services - or proprietary "****" that is hidden behind app-name, services and others
the Snapdragon 810 is a kind of hothead, it consumes quite a lot energy under close to full load but that doesn't explain the idle drain ...
Mine is regularly around 350 give or take a few, that might explain why I only get 4 hours of battery life ?
my widget pro(same app) says -12ma worst case while screen locked
maybe something running at the background
this phone got lot of problems
but battery is the only thing is pretty okay even without stamina
on average usage its about 2 days for me (heavy 1day)
only calls and sms (with data and wifi off even 4-10 days) android 6.0( build.185)
if the battery was li-poly it was abit better
i could solve the problem. It was the xposed module "flat style colored bars" in the current version ( from 2 May 2016; Version 2.1.0), which caused this high idle current consumption. I deinstalled also the latest "goolge play services" update. It was hard to find the guilty.
Now it is back to 100-150ma in idle state. This Thread can be closed.
Thank you for all your help.
xanya said:
i could solve the problem. It was the xposed module "flat style colored bars" in the current version ( from 2 May 2016; Version 2.1.0), which caused this high idle current consumption. I deinstalled also the latest "goolge play services" update. It was hard to find the guilty.
Now it is back to 100-150ma in idle state. This Thread can be closed.
Thank you for all your help.
Click to expand...
Click to collapse
How did you narrow it down to that app? I don't have that module installed but use xstana. That could be my problem.
First i listed the running cpu process per adb shell (root, with command top). The Sony Photo Analyzer used up to 20% of the cpu every time, so i removed it. After that, the System UI used the most of the cpu all time. I disabled all xposed modules for testing and voila the consumption was back at 100ma. So i go through the list and enabled the modules one by one and restarted it.
I am using XStana in the latest version, so it could be not the problem in your Phone.
My List of Xposed Modules:
Amplify, AppOpsXposed, Battery Home Icon, Blurred System UI (LP), BootManager, Flat Style Colored Bars (Version 2.0.1), GravityBOX (MM), Navbar music Visualizer, Prevent Running, XLED, XStana, XUIMod, YoutubeAdAway, Youtube Background Playback
So you see, i am using lot of modules, but the perfomance and battery consumption is as normal.
Hope i could help you with this information. It was very time-consuming to find the problem. You should also checkout google play services, revert back for testing to the last version if you dont find any other problem.

Android system battery question

Is it normal for android system to take around 25-30% battery usage? Settings says it's using 1hr+ cpu usage. Anyway to see which process under android system is consuming the most cpu usage. Also is the system standy(on older phones you can see this) entry now folded into android os/ android system?

[HELP] [KERNEL] Why there are 4 separate sections for schedtune.prefer_idle?

From my understanding, Kernels that have schedutil governor has a CPU frequency boosting feature which gives the CPU a push from the back to do a job faster than it was supposed to.
It does make the phone notably faster and smoother but if not configured properly the battery takes a hit.
Enabling schedtune.prefer_idle turns off that frequency boost of a running core and forces the workload on an idle core. But there seem to be 4 separate options to enable schedtune.prefer_idle and I have no idea what they are and how they are gonna affect the kernel after enabling/disabling
Those 4 options are :
• Foreground
• Background
• Real-Time
• Top App
Here are the pictures if you want to take a look.
https://imgur.com/a/sxuBvWR
https://imgur.com/a/8e4nuxj
Can someone tell me what each function does? Thanks in advance
@TrenchFullOfSlime can you help me out one more time if possible?
schedtune.prefer_idle appears to influence only one thing: whether a process will share time on an already-active core or wake up an idle core. The latter uses more power but gives the process more resources. CPU frequencies are determined by the _boost toggles, with schedtune.boost determining how aggressively the frequency is changed (accepted values are 0-100, so I guess it's an abstract scale hiding the actual size of the frequency steps). This apparently works by lying to the governor about how heavy a process is: https://lwn.net/Articles/706374/
https://forum.xda-developers.com/t/...-pixel-xl-and-eas-even-more-smoother.3528807/ suggests not going over 10.
https://forum.xda-developers.com/t/screen-on-time.3923963/page-9 suggests "turning off prefer.idle and enabling stune.boost reduced power use by 15% without affecting responsiveness" (paraphrased). Turning both on could increase responsiveness at the cost of greater power use, turning both off would do the opposite.
As for the different categories, they determine what triggers this behavior. You might prioritize performance for foreground apps, but battery efficiency for background apps. It can also be used to increase boot times: https://source.android.com/devices/tech/perf/boot-times
More information: https://www.fatalerrors.org/a/schedtune-learning-notes.html
TrenchFullOfSlime said:
schedtune.prefer_idle appears to influence only one thing: whether a process will share time on an already-active core or wake up an idle core. The latter uses more power but gives the process more resources. CPU frequencies are determined by the _boost toggles, with schedtune.boost determining how aggressively the frequency is changed (accepted values are 0-100, so I guess it's an abstract scale hiding the actual size of the frequency steps). This apparently works by lying to the governor about how heavy a process is: https://lwn.net/Articles/706374/
https://forum.xda-developers.com/t/...-pixel-xl-and-eas-even-more-smoother.3528807/ suggests not going over 10.
https://forum.xda-developers.com/t/screen-on-time.3923963/page-9 suggests "turning off prefer.idle and enabling stune.boost reduced power use by 15% without affecting responsiveness" (paraphrased). Turning both on could increase responsiveness at the cost of greater power use, turning both off would do the opposite.
As for the different categories, they determine what triggers this behavior. You might prioritize performance for foreground apps, but battery efficiency for background apps. It can also be used to increase boot times: https://source.android.com/devices/tech/perf/boot-times
More information: https://www.fatalerrors.org/a/schedtune-learning-notes.html
Click to expand...
Click to collapse
I don't know who you are, I don't know what you do but I feel like you are an angel! You went through all the troubles to get those links only to answer me which made me so happy.
If I'm being honest, the way you describe things is incredible. I didn't have to read a sentence twice. You can be a good writer or a teacher if you try.
Thank you so much

Categories

Resources