yashsingh1/xdaforums huggingface dataset:
[X Style (Pure) Android Development] rehpyc:
[MENTION=2400758]dirtyhank[/MENTION], any chance you'd be open to changing the default governor and governor tunables for the kernel? I think the default interactive tunables leave a bit to be desired, so simply changing the min/max clock speeds doesn't do much in terms of battery life and smoothness.

Still tweaking the tunables for the interactive governor, but I may be pushing my personal limit (around 6hr 50m SOT over 2 days) on this one (attached). (note: do NOT expect to see this type of SOT unless you have apps (Greenify, Amplify, PowerNap, etc.) being used that are optimized to keep apps/services from running when you don't want them to. This is why out of over 21 hours off the charger, the phone has only been awake ~30m of the time I wasn't actually using the phone).

P.S. Depending on if you're using EX Kernel manager app or Kernel Adiutor, cluster 1 = small and cluster 2 = big
[X Style (Pure) Android Development] dirtyhank:
Sure, why not. What governor+tunables combo do you propose? Keep in mind I want the default values to be a bit more on the performance side.
[X Style (Pure) Android Development] somecro:
Quick question for guys using EX Kernel Manager? I've noticed recently that new options in the CPU and GPU tab will pop-up for a few seconds and then dissapear after that. For example,yesterday I was browsing through the CPU tab and suddenly out of nowhere a new option appeared called something like ''MP Decision - Disabled'' (something like that,not 100% sure) and after I clicked on it it dissapeared. I don't know if I'm going crazy or are those options for specific governors?
[X Style (Pure) Android Development] gpz1100:
[MENTION=2400758]dirtyhank[/MENTION],

Any thoughts on how to fix this ril issue -

See post http://xdaforums.com/showpost.php?p=66327883&postcount=1245
[X Style (Pure) Android Development] dirtyhank:
What modem and ROM version are you using?
[X Style (Pure) Android Development] gpz1100:
Rom and version as indicated in my sig - Rom: TruePureXMM 2.6.2, Kernel: Frankenclark v.10.
[X Style (Pure) Android Development] maidguitar:
Curious, are you using moto display or moto voice? Or none?
[X Style (Pure) Android Development] rehpyc:
No moto display. I have the LED light go on with notifications using https://play.google.com/store/apps/details?id=br.com.itsmeton.motoledenabler.

I use to use moto voice, but I ended up finding that it'd trigger in my pocket when the phrase wasn't even said. I do, however, use Moto's hands-free driving mode often.
[X Style (Pure) Android Development] lafester:
Looking for (flashing) notification led as well.

Did not see an answer to this.
[X Style (Pure) Android Development] dirtyhank:
When I switch between 3G/LTE Phone Services spikes for a few seconds but quickly settles down to negligible CPU usage. Tried several times but never got stuck.

Can you send me logcat and dmesg right after the Phone Services gets stuck in high CPU usage?
[X Style (Pure) Android Development] TGiFallen:
Man I love the work you've done into getting crazy battery life. Curious, do you using Amplify and/or Greenify? if so, want to share your Amplify settings?

I find there is a lot of motorola specific alarms, wakelocks and services that amplify can block, a community effort to figure out what is what would be awesome.

Did you find out anything related to the moto Display doing the pulsing and if you can make the behaviour back like frankenkernel 0.9 ?
[X Style (Pure) Android Development] Psykitt:
deleted
[X Style (Pure) Android Development] rehpyc:
While I've done a good share of optimizing my phone to completely minimize the amount of time it's awake while the screen is off, [MENTION=2400758]dirtyhank[/MENTION] is to thank for providing such a great kernel. With a lot of people often only getting 3-5 hrs of SOT off of less than a day's charge, I created a thread HERE to help people get better battery life. There have probably been some added adjustments to Amplify, and I DO use the aggressive doze w/ Greenify now, but everything else should be the same.

[MENTION=2400758]dirtyhank[/MENTION], would you be opposed to having 2 different configurations available (one for non-gamers/battery savers, another for performance) and allowing users to choose which configuration to go with via Aroma installer? I'm going to create a .sh file of my current settings (battery saving, obviously), to see if you also find it more fluid than the default interactive tuneables. Gonna start working on adjusting it for more performance.
[X Style (Pure) Android Development] gpz1100:
Check your PM for a link to the log files.

What provider are you using?
[X Style (Pure) Android Development] dirtyhank:
Thanks, I'll take a look.

My carrier is Vodafone.

EDIT: you're getting tons of RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE and RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE messages in the modem log. I've checked on my device and barely get any. That alone could keep the RIL busy.
[X Style (Pure) Android Development] dirtyhank:
Yep, I want to do something with Aroma Installer to allow some customization at flash time. Just need to spend some time going through the AI stuff and wrap my head around it.

In the meantime it'd be great if you can create a script with you settings. I'm thinking about posting some start-up scripts with different profiles people could run from init.d.
[X Style (Pure) Android Development] rehpyc:
It's been around 2-3 years since I last coded stuff for Aroma for the Samsung S3 (lol old phone), but I'll see if anything has changed and help you out if desired.

I'll create a script with what I've been running with so far. It's obviously good for battery savings, even though I don't really notice any lag. However, I don't play any games really, so I'll leave that to others to test. After some others test it, I'll work on a script for performance settings. Are init.d scripts still even needed? KA Adiutor Mod hasn't seemed to have any issues retaining settings on reboot.
[X Style (Pure) Android Development] guile50:
AFAI have seen, KA settings stick on boot fine on my phone. Brazilian Xt1572 running trupure 2.8, but even on stock settings were applied on boot.
[X Style (Pure) Android Development] HikingMoose:
Settings mostly stick for me. The one that isn't is the vibration intensity. I keep raising it up 75-80% and then it's right back to 60 and I miss calls and texts.

Where is the kernel adiutor mod everyone is talking about? The one made by Yoinx?
[X Style (Pure) Android Development] chrislui:
same here

after reboot, vibration intensity will back to 60%.
[X Style (Pure) Android Development] MrMeeseeks:
That's the one. ?
[X Style (Pure) Android Development] TGiFallen:
I have tried using the aggressive doze with Greenify, but it seems to break my alarm clock app. Do you use your phone as an alarm?

And thanks for the link. I'm glad I've never experienced only 3-5 hours of screen on time, I've always got over 6.
[X Style (Pure) Android Development] dirtyhank:
From what I've seen Aroma should be pretty straightforward. My only concern is that apparently is no longer being maintained.

KAM works fine for me too but init.d scripts allow better customization. And some useful sample scripts can also serve as a starting point for other people to build their own and hopefully share.
[X Style (Pure) Android Development] guile50:
I use greenify with aggressive doze and it doesn't break my alarm at all, power nap's aggressive doze didn't broke it either. I use the stock clock one, tho, don't know about third party ones.
[X Style (Pure) Android Development] gpz1100:
What do you suppose these errors are the result of? I don't recall ever touching the roaming setting in the phone setting, just what ever the handsfree activation set it to (sprint's way of provisioning a device) when the sim/deviec was activated.

In settings, there are two options for this, home only or automatic. It's set to automatic (which is equates to allowing roaming). My area has 100% sprint coverage so no roaming anywhere within at least a hundred miles.
[X Style (Pure) Android Development] dirtyhank:
I'd disable roaming altogether and check the modem log to see whether the messages are still there.
[X Style (Pure) Android Development] gpz1100:
It seems to have fixed the runaway ril. There's still some errors in the modem log, but not nonstop like before. Check your PM for a link.
[X Style (Pure) Android Development] rehpyc:
Any of you use 302 MHz as your min cpu speed? I think I've found that to be a culprit of needing to soft reboot the phone to regain Internet if the phone goes to sleep in an area of bad reception.
[X Style (Pure) Android Development] elite001mm:
I use 302 MHz on both clusters and I've never had such a problem, and I live in rural Tennessee (on Verizon).
[X Style (Pure) Android Development] rehpyc:
Do you by chance use Greenify with aggressive Doze at all? 302 by itself may not be of issue, but it seems another phone tweak of mine coupled with it is problematic. After some testing, I don't have the same issue with 384 as the min speed.
[X Style (Pure) Android Development] elite001mm:
No I don't use greenify because I feel that doze has rendered it useless.. I do however use Naptime with aggressive doze along with the powernap xposed module.

I have used 302 with multiple governors too. I've never had any issues related to that. I have however had a few instances of the screen not wanting to come back on (it does eventually) and there were a few times when the flashlight gestures refused to activate or were delayed. But these occurrences were rare and I'm not sure what the cause was anyways (probably a combo of 1 core at screen off coupled with 302 min freq.)
[X Style (Pure) Android Development] dirtyhank:
This is related to the DT2W/S2W bug that I haven't been able to hunt down yet and the band aid I implemented is not 100% effective. It happens when the "display on" message doesn't get through across the I2C bus. In such a case you have to wait a couple of seconds and then press power twice.

Regarding the 302MHz frequency it works fine on my device. The overclocked frequencies are usually the pickiest, not all devices can handle them flawlessly, especially when CPU is hot.
[X Style (Pure) Android Development] rehpyc:
Should this happen even if dt2w/s2w aren't even used? I don't use either, yet I've sometimes experienced this.

Btw, should have a script for my settings and one for stock settings for you tonight.
[X Style (Pure) Android Development] TGiFallen:
There probably is a very good reason but I don't know it, but would it be possible to have an even lower minimum frequency?
[X Style (Pure) Android Development] screech:
I thought someone said that uninstalling kernel aduitor fixed the problem. Just installed .10 -100 and am still seeing the issue.

From a repro perspective, the image can be deceiving. Take a stock kernel photo at 10ft and then take it with the kernel updated and you will the issue under zoom. Ideally something with a fine pattern like my lampshade shots.

PS: will look at the kernel driver this weekend, to see if there is any stock kernel changes that jump out.

PPS: have never looked that Moto trees before, so if there are ptr's will happily take them :)
[X Style (Pure) Android Development] dirtyhank:
Unfortunately it's not that easy as there are no changes at all in the camera driver, check yourself (that whole source tree is stock).

UPDATE: The think that intrigues me about this issue is that it doesn't happen on all devices. Mine, for example, takes perfectly focused pictures, no matter the kernel version I try. We must be missing something that triggers it.
[X Style (Pure) Android Development] dirtyhank:
The bug is not in the DT2W/S2W code, so even if you have it disabled it can happen anyway, although is less likely since the bus traffic is lower. I'm making some changes in the DT2W/S2W for next version that will hopefully reduce overhead a bit.
[X Style (Pure) Android Development] dirtyhank:
I'm not sure it's possible, will take a look.
[X Style (Pure) Android Development] screech:
sure looks like everything was pulled from the upstream stock tree. The next thing I can think of .. is some user space policy (I noticed the actuator has one such checkin) maybe the culprit, where the user space policy for default photo mode is not right .. so does not work for distance shots .. I know I am reaching :(
[X Style (Pure) Android Development] rehpyc:
I've finally made a script to apply the settings I've tweaked to achieve great battery life, if any of you would like to test it out and provide feedback to myself and [MENTION=2400758]dirtyhank[/MENTION]. It is designed ultimately with battery life in mind, but dirtyhank could agree that it's still rather smooth dependent on your typical usage. This means it's not designed for gaming in mind, but if you do play games, let me know how it is for you. dirtyhank has agreed to help make the kernel even better for you and maybe eventually allow you to choose a profile to use via the Aroma installer (you probably already experienced this type of installation with some custom ROMs).

What can you achieve with these settings? Attached is a screenshot of me getting 7hr 48m of SOT. This isn't a "sprint for the highest SOT possible in less than a day's usage," as you can see in the screenshots it's over a 1d 18h time off the charge and sporadic usage throughout 2 days. There are obvious things that will keep you from achieving as much SOT: signal, camera usage, gaming, streaming music a lot w/o also using the phone. You can also see from the screenshot that my phone was only awake roughly 1hr when not being used.. this is from fully optimizing my phone and won't be discussed in this thread, but hopefully you use something (Greenify, PowerNap, Amplify, Naptime, etc.)

With all that said, let me know how things go for you. As I mentioned already, dirtyhank and I will test out more aggressive profiles to provide soon. The easiest method to execute the script is to download a script executor found HERE. Browse for the downloaded script (most likely in your Download folder), press "Seleziona" as the Ok button, then make sure to checkmark ROOT before hitting Run.
[X Style (Pure) Android Development] ximmox:
Thanks [MENTION=3004396]rehpyc[/MENTION], finally someone starts the work on custom MXP scripts! Is it based on any of the n5x scripts or did you just start with the basic interactive governor as base?

I've been using a slightly modified version of the Eclipse Script for the 5x, which gave me the best results with smoothness while clocking down very rapidly back to my idle freq of 302Mhz.

Your script is smoother than mine, but it stays between 787 and 1536Mhz a lot more according to CoolTool. Will test what impact on battery life that has in the coming day(s).

Thanks again, I hope others try it out and share their findings!
[X Style (Pure) Android Development] note3userr:
Quick question for anyone running the battery profile from op. Are u able to play HD games without lag? For example something like NFS no limit?
[X Style (Pure) Android Development] dirtyhank:
I'd be surprised if you could play games without lag with battery profile, keep in mind the GPU isn't operating at full speed. But you can easily tweak that profile by using the GPU parameters from balanced or performance profiles.

There's no free lunch here, you can't have top gaming performance and stellar battery life at the same time ;)
[X Style (Pure) Android Development] dirtyhank:
Yeah, I've been testing the script for a few days now and I'm very satisfied with the results. I'm not getting same SOT but that's normal because my usage pattern is very light, but I've managed to stay two full days off the charger!!

The only modification I made to the script is the GPU, I found the default a bit jerky for me and increased the max_freq to 600MHz.

Great job, [MENTION=3004396]rehpyc[/MENTION]
[X Style (Pure) Android Development] note3userr:
I'm getting invalid PDF format ?
[X Style (Pure) Android Development] countryfolk07:
Read the last paragraph you quoted. It's underlined even.
[X Style (Pure) Android Development] hbar98:
Did you edit the script or did you set it in Kernel Auditor? I searched the script but couldn't find a gpu line... but I'm still learning the ins and outs so I may have missed it.
[X Style (Pure) Android Development] dirtyhank:
You can find it in line 74:

echo 450000000 > /sys/devices/soc.0/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk

I just changed the 450000000 to 600000000.
[X Style (Pure) Android Development] ac_milan:
why wifi not work ?

I am with the final version Root

*sorry my bad english*
[X Style (Pure) Android Development] note3userr:
Is there any way you can post your settings and I can change through kernel editor. Ive never messed with terminals or anything and I'm a noob
[X Style (Pure) Android Development] kevev:
At the command prompt run the `id` command. I bet you aren't root.
[X Style (Pure) Android Development] hbar98:
Yeah, read my edit and you'll see my mistake. I tried to run "su sh rehpyc.sh" instead of invoking su then running the command. Got it working correctly now.
[X Style (Pure) Android Development] rehpyc:
In terminal emulator, make sure you type "su" for root privileges. A better alternative that I have for you guys is simply downloading a script executor found HERE. You don't have to worry about changing the extension from pdf, but make sure you check the box to run as root in the app. After browsing and selecting the script to run, press "Seleziona".
[X Style (Pure) Android Development] ac_milan:
Someone help please
[X Style (Pure) Android Development] Cowbell_Guy:
It looks like the 300mhz is a little more popular this time around... Thoughts on how it compares to 100mhz performance wise
[X Style (Pure) Android Development] gpz1100:
After a few more days of testing it appears I can't recreate the runaway ril with either lte or 3g. After switching to either, there's a brief spike but then it settles down to 1 or 2 cpu cores (as set in KA).

I *think* it has something to do with the roaming setting being unset initially. Neither automatic nor home only was selected. Once that state was changed, the software was happy. I tried it both ways too, home and automatic, with reboots in between. All working as should. Not sure if the initial unset roaming mode is a function of the rom or just a bug in 6.0.0.
[X Style (Pure) Android Development] hbar98:
To help you, you need to provide more information. Which model? Which carrier? Are you on stock, or a different rom? There is ample help in this thread, so you may search or read the previous pages.
[X Style (Pure) Android Development] note3userr:
Just to make sure I've done everything. I downloaded that app. Checked root, browsed your PDF file and ran it. It says modifying franken settings and then that's it. Is that all? Phone doesn't feel any different
[X Style (Pure) Android Development] countryfolk07:
If you use an app such as kernel adiutor, you can look in there and see the changes in fact were made.

On another note, I tried this profile for a day a got zero deep sleep. Went back to eclipse and it's sleeping again. Not real sure how to troubleshoot this. BBS doesn't show anything abnormal. Just not going into deep sleep.
[X Style (Pure) Android Development] note3userr:
Did that. Seems like nothing changed
[X Style (Pure) Android Development] ximmox:
Weird, sleeps for me as did my modded version of eclipse before.

This runs smoother than eclipse, and that already with some changes to make it clock down faster to 302 MHz instead of staying between 960 and 1440 MHz. Also limited the max frequencies to big 1690 (?) and little 1440. I don't game or do anything really cpu intensive, I only need a smooth multitasking machine.
[X Style (Pure) Android Development] HikingMoose:
I decided that even though I disagree with many of your settings, I'd try it anyway. Lol. I just looked through what KAMod shows and it looks like you could do a lot more to save battery (the way your cores are set up, and your min cores online for example). But I'll give it a day and see if it's smooth enough for me, and how the battery life compares to my settings! Thanks for the script, that's a very easy way to apply them.

I'm not trying to sound like I'm knocking it yet. But from my own kernel experience (which I admit is limited), I think you could save some juice in a few places. I'll let you know my real world experience with your exact settings before I try and modification.
[X Style (Pure) Android Development] harshi1:
Hey, thanks for the script it's looking pretty good. But has anyone tried the zzmove governor on the Mxpure, I heard a lot of good stuff about the yank profile, or something like that. I wanted to try it, and the only kernel that has it, is the vt4k kernel, but wifi won't work when I flash that kernel, does anyone have experience?
[X Style (Pure) Android Development] daniel.1983:
Great settings! I achieved already 5 hrs SOT, after I activated the settings at 70% of the battery. Thanks for sharing this with us. I'm looking forward to further improvements.
[X Style (Pure) Android Development] note3userr:
To all of you getting 5-7 hours of sot must just be staring at your home screen all day or something

Already at 43% and barely used some internet browsing and played a light game like clash royale for a few minutes and the usual texting
[X Style (Pure) Android Development] rehpyc:
A few times when running scripts I'd see the phone get stuck in high freq or not choose to sleep, but then executing the script again would correct that. Of course a reboot would also remedy any issue. I assure you the settings in my script themselves aren't a cause.

I may adjust the min cores online and max cores w/ screen off with the next revision of the script, but setting both of those to 1 doesn't entirely have much difference on battery life. The main reason being, with MM and Doze the phone works its way into deep sleep with the screen off, really mitigating any real difference between a setting of 1 or 2 for cores on with the screen off. However, setting max cores to 1 may be beneficial to those who haven't optimized their phone from quickly initiating an aggressive Doze. When the screen is on, a min of 2 cores helps keep from battery drain due to excessively hotplugging cores (hotplugging cores is taxing). Min cores online is set to 2 since you are most likely to be using at least 2 cores for the tasks performed with your screen on/actively using your phone. 2 cores running at a low freq to perform a task is more battery efficient than 1 core running at a higher freq (thus the reason why phones with more cores are becoming more battery efficient). In testing, I didn't really find a noticeable difference, but let me know if you do and I'll adjust the script.

How does it compare to battery consumption before applying the script's settings? Do you happen to have Better Battery Stats installed? If so, next time you have seem to have excessive drain, please create a log dump to send (share button at the top left).
[X Style (Pure) Android Development] dirtyhank:
Totally agree. This is very important because hotplug is not some kind of magic bullet. Every time a core is unplugged all running tasks and associated IRQs must me migrated to other core, and this is an expensive operation.

Don't get me wrong, hotplug is great, but you need to find the right balance and keep just the right number of cores online while minimizing unplug events. A min_cpus_online=2 works great for me but might not for others with different usage pattern and/or more background tasks.

Bricked hotplug can be fine tuned via a thresholds array, here's the explantation from showp1984 himself:

I modifed the defaults so actual values for this kernel are:

NwNs_Threshold = 10, 0, 17, 5, 25, 10, 40, 15, 50, 30, 0, 35
TwTs_Threshold = 140, 0, 140, 190, 140, 190, 140, 190, 140, 190, 0, 190

For instance, if you wanted to make big cores extremely unlikely to be hotplugged you could use something like:

NwNs_Threshold = 10, 0, 17, 5, 25, 10, 60, 15, 80, 45, 0, 55

You get the drill....