[APP][2.1+] CPU Spy v0.4.0 beta - view time in state info [dec-7-2011] - Android Apps and Games

I've created a simple app to display the time the CPU spends in each frequency state and the current kernel build. May be useful to some... especially people running OC'ed kernels.
Also useful to confirm which kernel you're currently running.
** DOWNLOAD **
Android Market Link
Error complaining about states file not found? See this post.
*** Thanks to Rainerd for the patch to help with the negative state percentages.
Change log
v0.4.0 beta
-Display total state time
-Massive code cleanup
-Fix duration overflow bug
-Removed read-as-root attempt when unable to access states file due to instability
-Slightly improved tablet support
v0.3.2 beta
-Pulled in fix from Rainerd to help with percentage mixups after reboot
v0.3.1 beta
-Small fix that may help with freezing issues with some custom ROMS
v0.3.0 beta
-Attempts to read time_in_state file as root in case reading is blocked by a custom ROM
v0.2.2 beta
-States are now sorted from highest to lowest frequency
v0.2.1 beta
-added "Deep Sleep" to states list for time when CPU is off
v0.2.0 beta
-Added "reset timers" option to set all state timers to 0 sec
-Added "restore timers" to show time-in-state since boot
-Small UI adjustments
-Timers now show hours
v0.1.0
-Initial market release
Click to expand...
Click to collapse
source: https://github.com/bvalosek/cpuspy
previous versions (source only): https://github.com/bvalosek/cpuspy/tags

Works great on my rooted stock KB1 with CogKernel 4.
Since I'm running stock KB1, the full kernel name doesn't show up under About Phone and I've been looking for an easy way to confirm which kernel I've got installed at the moment, especially when I'm jumping from kernel to kernel. This works well.
If you made a (transparent) widget that showed the kernel name, I'd be all over it.

This is nice, now you can see what MHz use less of the cpu and you can undervolt more on those specific speeds.

Works on setup in my sig. Useful tool! Thanks!

just out of curiosity this displays total time in state since bootup correct? not like since last unplugged or since last magic trick
*edit
btw bravo, gave ya 5 stars in market

Just installed, I'll try it out through out the day and see how things look.

This is incredibly useful, thanks!

[Request]
Very useful. Thanks mate.
Working on dilligaf's 7.x with dilli pickle kernel, glitterball's kernel and xcaliburinhand's 2.3.5 kernel.
Request:
Could u please add a "reset" feature, if possible, so it would be easier to get the time spent on each state when playing with maximum CPU speeds. Like I might set my max speed to 1000 from 1280 n want to check the time spent at 1000. Right now only a reboot is resetting the data.
Or, like my gut feeling says, is this app reading for this data from anywhere forcing a reboot if the data has to be reset.

diablo009 said:
Very useful. Thanks mate.
Working on dilligaf's 7.x with dilli pickle kernel, glitterball's kernel and xcaliburinhand's 2.3.5 kernel.
Request:
Could u please add a "reset" feature, if possible, so it would be easier to get the time spent on each state when playing with maximum CPU speeds. Like I might set my max speed to 1000 from 1280 n want to check the time spent at 1000. Right now only a reboot is resetting the data.
Or, like my gut feeling says, is this app reading for this data from anywhere forcing a reboot if the data has to be reset.
Click to expand...
Click to collapse
It's reading the data from:
/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
Which only gets set to zero at each reboot.

Great app!
works perfect on the setup in my sig.
Thanks!

rajendra82 said:
It's reading the data from:
/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
Which only gets set to zero at each reboot.
Click to expand...
Click to collapse
what I had expected
thanks for the info !
so it basically does the same for Android & a really nice GUI
like the console-app cpufreq-info on linux
thanks a lot for coding that app, storm717 !
for me it probably will show 100 MHz for most of the time (due to powersave set in screen-off state) - it's however nice to know what frequency the CPU will spend most of its time in while it's on (the 2nd and 3rd most-used frequency) & dedicating some more UV-stability testing towards that frequency
others that don't use the powersave governor will surely find it even more useful

Handy Tool
Definitely a handy tool to have.
Quick, easy info without with command line for those who really want to know what's going on under the hood quickly and easily.
I did a fly by here this morning and it looks as though word is getting out about this.
Good show..
Peace-

LOL at those people saying "Works with setup in my sig!"... like you don't change that setup in your sig 5 times a month... You're gonna confuse all of the people that find this thread next week/month/year/decade/century.
Thanks for the cool app tho. Really do 'preciate it bra, should help UV'ing this sucker.

Awesome, this is exactly what I was looking for. Thanks!

Great job, man.
Working great on the Vibrant CM7 kernel.
Thanks again!

Glad you guys like it!
Updated to v0.2.0 in the Market -- added the reset timers features a few of yall requested. "reset timers" does what you'd think and "restore timers" returns them to show the time in each state since boot.

storm717 said:
Glad you guys like it!
Updated to v0.2.0 in the Market -- added the reset timers features a few of yall requested. "reset timers" does what you'd think and "restore timers" returns them to show the time in each state since boot.
Click to expand...
Click to collapse
Now that is what I call above and beyond.....thank you. Leaving app now and going to web site just to hit your button.

The time readouts in 0.2.0 are getting wrong after I keep the phone running for a long time. Here is the output from the file:
File:
1600 0
1500 0
1400 17001
1300 0
1200 8537
1120 0
1000 27348
900 0
800 434348
600 212601
400 149584
200 152861
100 561535
By the time I took this reading my phone has been up about 13 hours. The sum of all the values is 1563815, which seems to indicate that the values in each state are in terms of 1/33.33 seconds. This appears to be different than when the phone runs for a short time, when the values in the file seem to be in terms of 1/100 of a second. At some point the system must be making a switch to how it records, unless I am interpreting the numbers wrong, and the older times are getting discarded, and the sum has nothing to do with up time. CPU Spy still thinks that the values are in 1/100 of a second, and gives time in 1400 state as 0:2:50, and total of all states as 4:20:38. This can be avoided if the sum of the states values is checked against up time to come up with what the current unit of measurement is.

rajendra82 said:
The time readouts in 0.2.0 are getting wrong after I keep the phone running for a long time. Here is the output from the file:
File:
1600 0
1500 0
1400 17001
1300 0
1200 8537
1120 0
1000 27348
900 0
800 434348
600 212601
400 149584
200 152861
100 561535
By the time I took this reading my phone has been up about 13 hours. The sum of all the values is 1563815, which seems to indicate that the values in each state are in terms of 1/33.33 seconds. This appears to be different than when the phone runs for a short time, when the values in the file seem to be in terms of 1/100 of a second. At some point the system must be making a switch to how it records, unless I am interpreting the numbers wrong, and the older times are getting discarded, and the sum has nothing to do with up time. CPU Spy still thinks that the values are in 1/100 of a second, and gives time in 1400 state as 0:2:50, and total of all states as 4:20:38. This can be avoided if the sum of the states values is checked against up time to come up with what the current unit of measurement is.
Click to expand...
Click to collapse
I'll look into this tonight, but I think this is the correct behavior. The CPU goes into a deep sleep mode after a while and effectively shuts off waiting for external input or something interesting to happen. If this is the case I may add a "deep sleep" row to clarify.

app works as its states. i'm running phoenix ultimate, speedMod K13D, great job man

Related

SETCPU wont stick!

everytime i try to set the cpu to 528 max and min it keeps reverting back to 528 max 480 min
The cpu speed controls are locked in the compiled kernel, without the source-code we cannnot unlock it. Remind HTC of their obligations via the GPL license...
bobdude5 said:
everytime i try to set the cpu to 528 max and min it keeps reverting back to 528 max 480 min
Click to expand...
Click to collapse
Ive tried this as well with the same result, my conclusion is that setcpu simply doesn't work on the hero. I know it has that menu where you can choose the phone you have(no hero in it).
obelisk79 said:
The cpu speed controls are locked in the compiled kernel, without the source-code we cannnot unlock it. Remind HTC of their obligations via the GPL license...
Click to expand...
Click to collapse
Not sure how we could press this issue, but it is becoming a nuicasance and violates the sheer meaning of the phone.
Free speech, not free beer. :-/
"...users have the four essential freedoms:
The freedom to run the program, for any purpose (freedom 0).
The freedom to study how the program works, and change it to make it do what you wish (freedom 1). Access to the source code is a precondition for this.
The freedom to redistribute copies so you can help your neighbor (freedom 2).
The freedom to improve the program, and release your improvements (and modified versions in general) to the public, so that the whole community benefits (freedom 3). Access to the source code is a precondition for this.... " www.gnu.org
If anyone who has not read or studied GNU/GPL http://www.gnu.org/licenses/gpl.html read it and research it. We are being screwed here.
The new SetCPU 1.4.2 works fine on my hero, I've tested it by setting both to 528mhz refreshing it, checking set on boot, rebooting it and it's still 528 min/max
There's a new Hero profile in 1.4.2
So complete curisoity here, does this thing really help? anyone done a time trial of sorts?
Still isnt sticking for me. I am running a stript down ROM, would that affect it?
nelson8403 said:
The new SetCPU 1.4.2 works fine on my hero, I've tested it by setting both to 528mhz refreshing it, checking set on boot, rebooting it and it's still 528 min/max
There's a new Hero profile in 1.4.2
Click to expand...
Click to collapse
I have personally spoken to the dev about getting it going and this application will not work on our phones until we can modify the kernel and remove it's ability to control the cpu. The gsm hero is capable of using it because they have their kernel, not the cdma hero.
flipzmode said:
I have personally spoken to the dev about getting it going and this application will not work on our phones until we can modify the kernel and remove it's ability to control the cpu. The gsm hero is capable of using it because they have their kernel, not the cdma hero.
Click to expand...
Click to collapse
I guess we can say the numbers will show up, but it won't actually do anything???

[MOD] IncrediControl - Easy GUI Undervolting

Please read this post through thoroughly before downloading.
This app allows you to control your CPU voltages with an easy to use interface. You can increase or decrease voltages (undervolt or overvolt) for all frequencies or fine tune voltages for each individual frequency.
! HTC DEVICES, currently only single core devices are supported !
! ROOT is Required !
! Kernel that supports HAVS or SVS voltage adjustment REQUIRED !
Get it over at http://www.incredikernel.com
IncrediControl is now also available in the market:
IncrediControl
IncrediControl - Ad Free
Additionally, all donators are eligible to receive the Ad Free version. It doesn't matter how much or how little you donate or have donated. If you don't want to purchase the app from the market, you may donate using the button on this page. Please register on the site first and include your username in the comments box.
All previous donators, please register on the site if you have not done so and contact me with your username!
NOTE: The settings in the general tab are only functional in kernels that have implemented the simple sysfs interfaces for usb fast charging and audio boost. If you toggle them, its not going to break anything, but they won't work and the app may crash. If you would like your kernel dev to implement the interfaces, please direct them to these two commits:
https://github.com/Chad0989/android_kernel_common/commit/a7c21fa0391c225900f93960362535179c0cecc9
https://github.com/Chad0989/android_kernel_common/commit/41dc138bae23dc7582de72a4d9895aaa8e1f8b2d
NOTE2: It is a requirement of the HAVS adjustment that the kernel you are using has the HAVS sysfs interface implemented. If it does not, it will not work.
NOTE3: Before using, please delete any boot scripts you may have in /etc/init.d that toggle any of the settings this app controls.
Get it at http://www.incredikernel.com
Restore script - use this if you went too low and find yourself in a boot loop. Flash through recovery:
http://www.incredikernel.com/?p=229
Hi,
Good job, just one thing, i use Eviollet kernel (svs) and there's a step at 128 mhz.
The apps doesn't show these step.
It Would be great if you can implement it.
Otherwise i found no bug.
Thx in advance.
sffmandrake said:
Hi,
Good job, just one thing, i use Eviollet kernel (svs) and there's a step at 128 mhz.
The apps doesn't show these step.
It Would be great if you can implement it.
Otherwise i found no bug.
Thx in advance.
Click to expand...
Click to collapse
The app skips the first frequency because on a lot of phones its a.useless frequency like 19mhz. Thanks for letting me know though. I will add an exception and upload a new version later.
Sent from my ADR6300 using XDA App
7/31/11 - Preview 5-4
Minor change to no longer skip the first frequency. On many phones the first frequency is a useless frequency like 19mhz so the app was set up to skip that frequency. This is only a temporary fix until I change it to display only the available frequencies instead of all of them.
Sounds interesting, will have a go
Hi,
Thx chad0989, now it works at 128 mhz
sffmandrake said:
Hi,
Thx chad0989, now it works at 128 mhz
Click to expand...
Click to collapse
Great. I just sent you a PM.
Works great thanks!
IncrediControl v1.0!
This app allows you to control your CPU voltages with an easy to use interface. You can increase or decrease voltages (undervolt or overvolt) for all frequencies or fine tune voltages for each individual frequency.
! HTC DEVICES, currently only single core devices are supported !
! ROOT is Required !
! Kernel that supports HAVS or SVS voltage adjustment REQUIRED !
Get it over at http://www.incredikernel.com
IncrediControl is now also available in the market:
IncrediControl
IncrediControl - Ad Free
Additionally, all donators are eligible to receive the Ad Free version. It doesn't matter how much or how little you donate or have donated. If you don't want to purchase the app from the market, you may donate using the button on this page. Please register on the site first and include your username in the comments box.
All previous donators, please register on the site if you have not done so and contact me with your username!
Good job. Works on cm7 nightly with manU kernel 2.1.1.
chad0989 said:
The app skips the first frequency because on a lot of phones its a.useless frequency like 19mhz.
Click to expand...
Click to collapse
The eviollet Kernel implements AXI @ 128Mhz, which drops the bus down to 19Mhz which potentially could save more battery
rootSU said:
The eviollet Kernel implements AXI @ 128Mhz, which drops the bus down to 19Mhz which potentially could save more battery
Click to expand...
Click to collapse
But the actual cpu speed still never drops below 128mhz if I'm not mistaken (at least thats how it is on the inc, its possible to enable the use 19mhz cpu speed, but the phone is unusable). So the cpu voltage for 19mhz would never be used. I have changed the app now though to show all cpu frequencies available for use, so if you did enable the use of 19mhz cpu speed (you have to comment out a line in the acpuclock file), it would show up.
Hopefully that clears up confusion.
IncrediControl v1.3
Major changes include:
Ad Free has now been turned into a key that removes the ads from the free version. This allows donors who have downloaded the ad free version from the site to update through the market.
HAVS voltage checking. Minimum voltages can no longer be set higher than maximum voltages.
Boot voltages are now stored in the application’s data directory. Boot settings will now persist if you update your ROM or restore the application and data from a backup.
IncrediControl v1.4:
This is mostly a bug fix release but I have also added:
Automatic detection of the minimum and maximum voltages supported by your kernel
Unless any more bugs arise, the next release will have some new goodies to play with...
http://www.incredikernel.com or from the market.
I'm making an enquiry for a friend who uses his HTC desire with RCMix S v2.0 Evolutionary Sense using SNQ v05 kernel. Does this Rom / kernel meet the InvrediControl system requirements?
One other question, in other utils I've used in the past they also supply a "reset" zip which can be used to revert the settings back to default in the event if instability/freeze (requires flash from recovery). Do you see value in creating a similar zip for over agressive UV?
Thanks again for a wonderful utility. Can't wait to try it.
Sent from my Desire HD using XDA App
fidoedidoe said:
I'm making an enquiry for a friend who uses his HTC desire with RCMix S v2.0 Evolutionary Sense using SNQ v05 kernel. Does this Rom / kernel meet the InvrediControl system requirements?
One other question, in other utils I've used in the past they also supply a "reset" zip which can be used to revert the settings back to default in the event if instability/freeze (requires flash from recovery). Do you see value in creating a similar zip for over agressive UV?
Thanks again for a wonderful utility. Can't wait to try it.
Sent from my Desire HD using XDA App
Click to expand...
Click to collapse
I don't believe that kernel has the sysfs interface for adjusting voltages. You can still give it a shot though. The app will let you know if the kernel doesn't have the correct interface.
I also have a reset zip. It's on the site and there is a link in the OP.
SNQ anyone?
Ahhhw...no love for the wildly popular SNQ Kernal?!
SilverHawk2 said:
Ahhhw...no love for the wildly popular SNQ Kernal?!
Click to expand...
Click to collapse
The kernel dev has to implement the interface in order to use the app. Since I don't believe that the source for the GB kernel has been released yet for the desire, the dev won't be able to implement the interface until it is.
chad0989 said:
The kernel dev has to implement the interface in order to use the app. Since I don't believe that the source for the GB kernel has been released yet for the desire, the dev won't be able to implement the interface until it is.
Click to expand...
Click to collapse
Thanks for the heads up. Next time I have access to the phone I will install and see what unfolds. But from what you said I'm not expecting much with SNQ.
Maybe time to suggest to my friend a new Rom

Prime95 (OC stability tool) - can someone port this to Android?

Basically this tool will either run forever in search for Prime number OR it will stop and notify when CPU voltage is too low. Having this ported to Android would be huge help with Undervolting our phones.
Source is here: http://www.mersenne.org/freesoft/
"On an absolutely stable system, Prime95 would run indefinitely. If an error occurs, at which point the stress test would terminate, this would indicate that the system may be unstable. There is an ongoing debate about terms "stable" and "Prime-stable", as Prime95 often fails before the system becomes unstable or crashes in any other application. This is because Prime95 is designed to subject the CPU to an incredibly intense workload, and to halt when it encounters even one minor error, whereas most normal applications do not stress the CPU anywhere near as much, and will continue to operate unless they encounter a fatal error"
EDIT: There is a tool for this here
I bet this wont be good since it will most likely explode the device, or won't even run.
But if anyone can port it for ARM architecture, that'd be great since I'd love to see how far it can run on this X10.
Hzu said:
I bet this wont be good since it will most likely explode the device, or won't even run.
Click to expand...
Click to collapse
No reason for this, it works just like any simple CPU benchmark, but at least calculates something useful.
schriss said:
No reason for this, it works just like any simple CPU benchmark, but at least calculates something useful.
Click to expand...
Click to collapse
Yeah, I know. But I tried on my PC and it don't run, my PC had a hard hang. Haha, I'm scared of this tool.
Hzu said:
Yeah, I know. But I tried on my PC and it don't run, my PC had a hard hang. Haha, I'm scared of this tool.
Click to expand...
Click to collapse
That's exactly why it is useful. PC or phone might be stable when idling but when loaded you might get problems.
Strange that your PC locked up, its some serious issue there, more like hardware related, possibly a bios setting.
I could run Prime95 for a day long and all I get is high CPU temp, but system should be able to handle constant load (just like playing a game for hours)
schriss said:
That's exactly why it is useful. PC or phone might be stable when idling but when loaded you might get problems.
Strange that your PC locked up, its some serious issue there, more like hardware related, possibly a bios setting.
I could run Prime95 for a day long and all I get is high CPU temp, but system should be able to handle constant load (just like playing a game for hours)
Click to expand...
Click to collapse
Well, I haven't tried after changing my hardwares yet. I wonder how much battery it will use.
schriss said:
Basically this tool will either run forever in search for Prime number OR it will stop and notify when CPU voltage is too low. Having this ported to Android would be huge help with Undervolting our phones.
Source is here: http://www.mersenne.org/freesoft/
"On an absolutely stable system, Prime95 would run indefinitely. If an error occurs, at which point the stress test would terminate, this would indicate that the system may be unstable. There is an ongoing debate about terms "stable" and "Prime-stable", as Prime95 often fails before the system becomes unstable or crashes in any other application. This is because Prime95 is designed to subject the CPU to an incredibly intense workload, and to halt when it encounters even one minor error, whereas most normal applications do not stress the CPU anywhere near as much, and will continue to operate unless they encounter a fatal error"
Click to expand...
Click to collapse
if u really see a use for it i can make a quick version but unless its done in native code i doubt it would be a good metric to compare phones and its only single threaded, it also wouldnt be able to notify u if your voltage was to low ur phone would just hard lock
aaronpoweruser said:
if u really see a use for it i can make a quick version but unless its done in native code i doubt it would be a good metric to compare phones and its only single threaded, it also wouldnt be able to notify u if your voltage was to low ur phone would just hard lock
Click to expand...
Click to collapse
Wouldn't it know that returned number is wrong thus voltage to low? This should happen if you do not push it too much, people report that when lowering voltage slowly, the phone slows downs as CPU is handling errors. The app would detect this stage. Only when lowering voltage too much you get lockup. 1 thread would be useful because cores need to be tested independently, if you could specify core to run on, it would be ultimate stability test tool.
i think
just need to set governor to performance
This has been implemented, here: https://play.google.com/store/apps/details?id=com.into.stability&feature=search_result
The cpu worker performs mathematical calculations ("prime crunching") in native code and verifies the results, while the ram worker does heavy c memcpy operations in native code in a different thread.
Click to expand...
Click to collapse

[KERNEL][A510/A700][07/30] Z-Kernel Beta

Welcome to Z-Kernel's thread!​
Features
- Base kernel fully updated to linux-tegra-nv-3.1 (bug fixes & performance improvements)
- Simplified board codes
- Cleaned up Acer specific code
Click to expand...
Click to collapse
Changelog
r2:
- Restarted kernel development (r1's features not implemented yet)
- Base kernel fully updated to linux-tegra-nv-3.1 (bug fixes & performance improvements)
- Simplified board codes
r1:
- CPU OC to 1.6 ghz by default (should be stable)
- GPU OC support up to 700MHz (default is 520 mhz)
- Overclocked LP core from 500 to 620 mhz
- Custom user voltage control for CPU and Core components such as EMC, GPU, and LP (faux123)
- Dynamic FSYNC
- Optimized KSM
- Optimized ZRAM
- Compiled using latest Linaro toolchain with optimized compiler flags
- Optimized SLUB and use SLUB by default instead of SLAB
- Glibc memcpy and memmove
- Deadline improvements for solid state drives
- Proportional Rate Reduction for TCP
- Tegra 3 variant display (faux123)
- Optimized swahb32 byteswap helper
- Asynchronous I/O latency improved through removal of plug in do_io_submit()
- allow use of an I/O controller's native max block size
- Optimized ARM RWSEM algorithm
- timer: optimize apply_slack()
- Optimized crypto algorithms
- Optimized AES and SHA1 routines
- LowMemoryKiller fixes and improvements
- Lock performance governor to all 4 cores
- Many scheduler improvements and optimizations
- updated bcmdhd driver (wifi)
- over 450 changes committed, so the above list isn't complete
Click to expand...
Click to collapse
Complete list of changes can be found in the commit log: https://github.com/Ziyann/android_kernel_acer_t30
I'm not responsible if anything bad happens with your device!
This build has been tested on CM11 only, so if you run into something with other ROMs, report it and I will see what I need to change to cooperate with it.
XDA:DevDB Information
Z-Kernel, Kernel for the Acer Iconia A700 and A510
Contributors
Ziyan
Kernel Special Features:
Version Information
Status: Stable
Current Stable Version: R2
Stable Release Date: 2014-07-30
Created 2014-09-23
Last Updated 2014-09-23
Nice, if it's working fine, I hope you will also support the A510/A511
Shreps said:
Nice, if it's working fine, I hope you will also support the A510/A511
Click to expand...
Click to collapse
Of course, I'll see what can I do when I get everything (OC, UV, ...) working here waiting for a tester...
it is indeed slow. even when completely debloated plus stripped of "essential" system components that I personally do not use. I will try this right away. will report back within an hour in this post.
@Ziyan
it boots, runs, everything seems standard. not seeing any performance increases though. same ol' 10 to 15 fps is there anything more you wish for me to test with it? I replaced this tab a while ago with galaxy note pro 12.2 so I can't really use it enough to check for random reboots
Sterist said:
@Ziyan
it boots, runs, everything seems standard. not seeing any performance increases though. same ol' 10 to 15 fps is there anything more you wish for me to test with it? I replaced this tab a while ago with galaxy note pro 12.2 so I can't really use it enough to check for random reboots
Click to expand...
Click to collapse
Thanks, that's good, it means I can continue improving it. I need to check the kernel periodically after a big bunch of commits, because if something gets broken, it can be hard to find what causes it if from a thousand things I'll push a new version and changelog later today or tomorrow.
sounds good. quote this post when it's uploaded, it'll send me am email notification and I can get right on it.
Sterist said:
sounds good. quote this post when it's uploaded, it'll send me am email notification and I can get right on it.
Click to expand...
Click to collapse
Here's a new version. Before testing it, please make some benchmarks with the previous version (mainly 3D), because - if everything works as it should -, the GPU is now working at 520 mhz instead of 416. It should also have CPU overclocking and voltage control support, so please install Trickster Mod, or something like that from Play Store to see if it works (screenshots are welcome). If it works (i'd be a bit surprised lol it was too easy), please run some benchmarks again to see if there's a noticeable difference. I've got 12 pages of commits waiting to be merged, so yeah, if something got broken, I better fix it now :silly:
Ziyan said:
Here's a new version. Before testing it, please make some benchmarks with the previous version (mainly 3D), because - if everything works as it should -, the GPU is now working at 520 mhz instead of 416. It should also have CPU overclocking and voltage control support, so please install Trickster Mod, or something like that from Play Store to see if it works (screenshots are welcome). If it works (i'd be a bit surprised lol it was too easy), please run some benchmarks again to see if there's a noticeable difference. I've got 12 pages of commits waiting to be merged, so yeah, if something got broken, I better fix it now :silly:
Click to expand...
Click to collapse
just woke up and leaving for work in 20 minutes. when I get there and settle in (about an hour and 20min from this post) I'll test it
which benchmark though, antutu?
Sterist said:
just woke up and leaving for work in 20 minutes. when I get there and settle in (about an hour and 20min from this post) I'll test it
which benchmark though, antutu?
Click to expand...
Click to collapse
Yeah, antutu will do, just note the invidual points
Ziyan said:
Yeah, antutu will do, just note the invidual points
Click to expand...
Click to collapse
woah woah... I just went to download the second version and the tab was dead from 77% last night, still warm.
there's a wake problem, screen will turn on one time after booting up but only that one time
and a sleep problem, after manually turning the screen off it will not turn back on (and kills battery very quickly!)
Sterist said:
woah woah... I just went to download the second version and the tab was dead from 77% last night, still warm.
there's a wake problem, screen will turn on one time after booting up but only that one time
and a sleep problem, after manually turning the screen off it will not turn back on (and kills battery very quickly!)
Click to expand...
Click to collapse
Thanks for the report, I'll investigate the problem tomorrow (it's 01:30 AM here :silly. If you could take a dmesg (while turning the screen off, then trying to turn it back on), or last_kmsg, that would be great help! If you don't know how, refer to section 2 and 3: http://forum.xda-developers.com/showthread.php?t=1520508
Ziyan said:
Thanks for the report, I'll investigate the problem tomorrow (it's 01:30 AM here :silly. If you could take a dmesg (while turning the screen off, then trying to turn it back on), or last_kmsg, that would be great help! If you don't know how, refer to section 2 and 3: http://forum.xda-developers.com/showthread.php?t=1520508
Click to expand...
Click to collapse
higher score / lower 3D performance is v1
lower score / higher 3D is v0
recent apps cleared and CPU set to 1400 performance and ROW
no app gives OC/UV options with v1
I don't have access to a pc at work so can't run dmesg properly for this, and I'm having trouble reproducing the sleep crash now
this is probably all exactly what you did not want me to say lol
edit: so, I got it to crash again (yay!) but can't get klast to work (read only fs) I tried mounting various directories as RW but honestly I have no idea which to do... and here's dmesg which may or may not contain what you need.
I know it might be a little early to ask but any chance you could implement Frandom?
Sterist said:
(cut)
edit: so, I got it to crash again (yay!) but can't get klast to work (read only fs) I tried mounting various directories as RW but honestly I have no idea which to do... and here's dmesg which may or may not contain what you need.
I know it might be a little early to ask but any chance you could implement Frandom?
Click to expand...
Click to collapse
Thanks for the detailed report, I think I revert Franco's hotplugging driver for now, seems like it's on a rampage. May try again in the future.
As for the last_kmsg, your first command was correct, it's just that it doesn't always get created.
We'll see about Frandom when we get things working nice
Here's a build with the stock hotplugging driver, report back if it still crashes.
Ziyan said:
Thanks for the detailed report, I think I revert Franco's hotplugging driver for now, seems like it's on a rampage. May try again in the future.
As for the last_kmsg, your first command was correct, it's just that it doesn't always get created.
We'll see about Frandom when we get things working nice
Here's a build with the stock hotplugging driver, report back if it still crashes.
Click to expand...
Click to collapse
ok I let it idle for about 30 minutes (that was enough to crash every time I left it alone at work) and so good so far.
still no OC/UV though
edit... idle 2 more hours and no problems
Sterist said:
ok I let it idle for about 30 minutes (that was enough to crash every time I left it alone at work) and so good so far.
still no OC/UV though
edit... idle 2 more hours and no problems
Click to expand...
Click to collapse
Great, let's see if CPU OC/UV works with this one. If it does, don't forget to run a benchmark, as GPU OC didn't work till now
Ziyan said:
Great, let's see if CPU OC/UV works with this one. If it does, don't forget to run a benchmark, as GPU OC didn't work till now
Click to expand...
Click to collapse
still no CPU OC/UV. also, that 52mhz step has never worked on any ROM or kernel I've tried, that may extend battery life
Sterist said:
still no CPU OC/UV. also, that 52mhz step has never worked on any ROM or kernel I've tried, that may extend battery life
Click to expand...
Click to collapse
Ok, it must work now.
About 52 mhz, it's so low that any small background work would ramp up the CPU to hispeed_freq, so in the end, it would shorten battery life. The same thing happens with Galaxy Nexus if we go down to 180 mhz, which is a lot, compared to 52 mhz
I've added about 200 commits since your last try (this is a great daily activity :silly, the kernel is getting to be on pair with a Nexus 7 kernel soon if we get OC/UV and some more extra things working :highfive:
Ziyan said:
Ok, it must work now.
About 52 mhz, it's so low that any small background work would ramp up the CPU to hispeed_freq, so in the end, it would shorten battery life. The same thing happens with Galaxy Nexus if we go down to 180 mhz, which is a lot, compared to 52 mhz
I've added about 200 commits since your last try (this is a great daily activity :silly, the kernel is getting to be on pair with a Nexus 7 kernel soon if we get OC/UV and some more extra things working :highfive:
Click to expand...
Click to collapse
ok so UV menu now loads but doesn't look to work quite right - not usable. this is the menu I was looking for that did not load before
OC still does not work though
about 52 (51 actually) every time it is selected, after I leave the screen and come back 102 becomes the selected minimum automatically, even if lock frequency at 51
need benchmark? and ty ty your time!
Sterist said:
ok so UV menu now loads but doesn't look to work quite right - not usable. this is the menu I was looking for that did not load before
OC still does not work though
about 52 (51 actually) every time it is selected, after I leave the screen and come back 102 becomes the selected minimum automatically, even if lock frequency at 51
need benchmark? and ty ty your time!
Click to expand...
Click to collapse
At least we're making progress :good: try this one, and also try trickster mod (specific and general menu).
Benchmarks are welcome, those 200 commits should improve performance a bit, though I think most of them can only be seen in real usage (low memory killer, zram, ...)
Ziyan said:
At least we're making progress :good: try this one, and also try trickster mod (specific and general menu).
Benchmarks are welcome, those 200 commits should improve performance a bit, though I think most of them can only be seen in real usage (low memory killer, zram, ...)
Click to expand...
Click to collapse
bootloop, won't get past Acer logo
benchmark is from the last kernel

Essential Tweaks

Hey everyone! Hope you're all doing fine. I just updated to Android 10, coming from AICP Pie, and I noticed that battery life took a serious hit compared to AICP. Now I know that AICP (and probably many other custom ROMs) use EAS by default, which could be credited for the great performance and battery life you get with these setups. This didn't stop me from conducting some tests and experimenting with some changes in order to try and improve the battery life I am getting on Android 10 (and possibly all previous versions of the stock ROM). Anyway, without further ado, here is a script that tweaks the phone a little, which should improve your phone's battery life on STOCK ROMs, mainly Android 10 but it is also applicable to Android 9, though I have mainly tested it on Android 10 and the deprecated developer previews and beta builds of Android 10. A link to download the script is provided down below, right below the prerequisites and instructions.
Prerequisites
1- An Essential PH-1 (of course!)
2- Magisk (make sure to have the latest version installed)
3- A terminal emulator app -- I use this one here:
https://play.google.com/store/apps/details?id=jackpal.androidterm
4- Any file manager app.
Instructions
1- Download the script from the link below.
2- For more convenience, move the script you just downloaded to the root of your internal storage (/sdcard) using any file manager if your choice.
3- Open the terminal emulator app.
4- Type "su" (without the quotes) and hit the enter/return key on your keyboard to grant it root access (Magisk could display a pop-up window asking whether you want to grant this app root access. Make sure to tap in Grant. This usually happens once).
5- Afterwards, type "sh /sdcard/essential-tweaks" (without quotes) and hit the enter/return key on your keyboard to execute the script.
6- Voila! You're done!
--> In case you think the script has caused any regressions your are dissatisfied with, simply reboot your phone since this script doesn't automatically get applied on boot.
--> In case you rebooted your phone and wish to re-apply the script, simply follow the same instructions again.
Download
G Drive: https://drive.google.com/file/d/101Z_Co7uVU_h2blanJ88MV8x9PpRcOvg/view?usp=drivesdk
Let me know your thoughts down below. Cheers!
Reserved
Reserved 2
Sounds interesting and I'd like to try it. I don't know if you know this though, but the file on Google Drive is set to "ask permission" to download it.
Tanner1294 said:
Sounds interesting and I'd like to try it. I don't know if you know this though, but the file on Google Drive is set to "ask permission" to download it.
Click to expand...
Click to collapse
Fixed. Sorry for inconvenience. Thanks for letting me know!
#justgoogledrivethings
Mostafa Wael said:
Hey everyone! Hope you're all doing fine. I just updated to Android 10, coming from AICP Pie, and I noticed that battery life took a serious hit compared to AICP. Now I know that AICP (and probably many other custom ROMs) use EAS by default, which could be credited for the great performance and battery life you get with these setups. This didn't stop me from conducting some tests and experimenting with some changes in order to try and improve the battery life I am getting on Android 10 (and possibly all previous versions of the stock ROM). Anyway, without further ado, here is a script that tweaks the phone a little, which should improve your phone's battery life on STOCK ROMs, mainly Android 10 but it is also applicable to Android 9, though I have mainly tested it on Android 10 and the deprecated developer previews and beta builds of Android 10. A link to download the script is provided down below, right below the prerequisites and instructions.
Prerequisites
1- An Essential PH-1 (of course!)
2- Magisk (make sure to have the latest version installed)
3- A terminal emulator app -- I use this one here:
https://play.google.com/store/apps/details?id=jackpal.androidterm
4- Any file manager app.
Instructions
1- Download the script from the link below.
2- For more convenience, move the script you just downloaded to the root of your internal storage (/sdcard) using any file manager if your choice.
3- Open the terminal emulator app.
4- Type "su" (without the quotes) and hit the enter/return key on your keyboard to grant it root access (Magisk could display a pop-up window asking whether you want to grant this app root access. Make sure to tap in Grant. This usually happens once).
5- Afterwards, type "sh /sdcard/essential-tweaks" (without quotes) and hit the enter/return key on your keyboard to execute the script.
6- Voila! You're done!
--> In case you think the script has caused any regressions your are dissatisfied with, simply reboot your phone since this script doesn't automatically get applied on boot.
--> In case you rebooted your phone and wish to re-apply the script, simply follow the same instructions again.
Download
G Drive: https://drive.google.com/file/d/101Z_Co7uVU_h2blanJ88MV8x9PpRcOvg/view?usp=drivesdk
Let me know your thoughts down below. Cheers!
Click to expand...
Click to collapse
Neat...
A kranel tweaker...
In my opinion:
The damn powerhint is probably the worst offender to battery...
Currently, with magisk, I just remove /vendor/etc/powerhint.xml
I am also using kernel touchboost so I can idle down to 300...
If your battery doesn't suck... You can switch back to 518 and 806 for minimum frequencies, disable msm touchboost, and kill the powerhint... And get MUCH closer to where you were with AICP on Pie
rignfool said:
Neat...
A kranel tweaker...
In my opinion:
The damn powerhint is probably the worst offender to battery...
Currently, with magisk, I just remove /vendor/etc/powerhint.xml
I am also using kernel touchboost so I can idle down to 300...
If your battery doesn't suck... You can switch back to 518 and 806 for minimum frequencies, disable msm touchboost, and kill the powerhint... And get MUCH closer to where you were with AICP on Pie
Click to expand...
Click to collapse
Is that similar to disabling perfd?
Because that is what I did (and incidentally what my script does).
Thanks a lot for your suggestion!
Mostafa Wael said:
Is that similar to disabling perfd?
Because that is what I did (and incidentally what my script does).
Thanks a lot for your suggestion!
Click to expand...
Click to collapse
No sir...
The powerhint has something to do with the PowerHals directly...
You'll notice if you watch any frequency monitor that when you touch the screen... It jumps to 1.1Ghz on both big and little ... That's NUTS...
It also will run the processor at 1.9 and 2.5 for 5 seconds on app launch... Also CRAZY and unnecessary
Perfd controls the profiles in /vendor/etc/... I think there's 8 of em...
And like mpdecision before it... It sucks...
On a side:
I've been on Q since beta 2... And have put together a magisk module that cuts frequencies down... 1.8 Max for little and 2.0 for big... Kills perfd... Kills the powerhint by replacing with a 0 byte file... Ups zram to 1 GB... And puts touchboost to 825 and 499...
I just incorporated your scheduler changes and I'll let you know what I come up with...
If you're interested in the module ... I'll share it .. just let me know
Edit: @KuranKaname approves the frequency choices BTW
rignfool said:
No sir...
The powerhint has something to do with the PowerHals directly...
You'll notice if you watch any frequency monitor that when you touch the screen... It jumps to 1.1Ghz on both big and little ... That's NUTS...
It also will run the processor at 1.9 and 2.5 for 5 seconds on app launch... Also CRAZY and unnecessary
Perfd controls the profiles in /vendor/etc/... I think there's 8 of em...
And like mpdecision before it... It sucks...
On a side:
I've been on Q since beta 2... And have put together a magisk module that cuts frequencies down... 1.8 Max for little and 2.0 for big... Kills perfd... Kills the powerhint by replacing with a 0 byte file... Ups zram to 1 GB... And puts touchboost to 825 and 499...
I just incorporated your scheduler changes and I'll let you know what I come up with...
If you're interested in the module ... I'll share it .. just let me know
Edit: @KuranKaname approves the frequency choices BTW
Click to expand...
Click to collapse
Yes I know about the max frequency values. These used to be the default in Kuran's AICP too
Interesting, so you mean to say that this is completely different from perfd? Well, I only disabled perfd and I am not seeing the phone jumping back to 1.1GHz while interacting with the screen or locking on max frequencies while launching apps.
Also, what command are you using to disable perfd on Q? I just found out that the usual "stop perfd" command is not working anymore like it used to on Pie :/
I used EXKM to disable it and it works just fine :good:
Let me know if my sched tweaks bring any further improvements to you. Cheers!
EDIT: these input boost frequency values used to be the ones Sultanxda go for too iirc right?
Mostafa Wael said:
Yes I know about the max frequency values. These used to be the default in Kuran's AICP too
Interesting, so you mean to say that this is completely different from perfd? Well, I only disabled perfd and I am not seeing the phone jumping back to 1.1GHz while interacting with the screen or locking on max frequencies while launching apps.
Also, what command are you using to disable perfd on Q? I just found out that the usual "stop perfd" command is not working anymore like it used to on Pie :/
I used EXKM to disable it and it works just fine :+1:
Let me know if my sched tweaks bring any further improvements to you. Cheers!
Click to expand...
Click to collapse
Interesting ..
stop perfd
getprop|grep perfd yields the service has stopped for me
rignfool said:
Interesting ..
stop perfd
getprop|grep perfd yields the service has stopped for me
Click to expand...
Click to collapse
Weird. I will check again when I am home.
Thanks for chiming in! :highfive:
Mostafa Wael said:
Weird. I will check again when I am home.
Thanks for chiming in! :highfive:
Click to expand...
Click to collapse
Interesting... I just put back the powerhint... While stopping perfd and now it's listening ... I wonder if I came up with that when I had the typo in my script...
Thanks for forcing me to debug...
---------- Post added at 02:30 PM ---------- Previous post was at 02:18 PM ----------
Mostafa Wael said:
Weird. I will check again when I am home.
Thanks for chiming in! :highfive:
Click to expand...
Click to collapse
OHHHH...
Are you using service.d to run your script?
If so... You need
while [ "$(getprop sys.boot_completed)" != 1 ];
do sleep 1;
done
sleep 5
Before... Otherwise init gonna reset your stuff...
And post-fs-data.d is WAAY too early
So I have been doing a lot of tracing and testing some new changes and, well, I think it is very difficult to squeeze any more battery life on stock ROMs. Which means that it is highly unlikely that this script is going to be updated with new additions as this is practically the best we could reach at the moment. However, I will keep digging deep and see if I can come up with any updates.
To put things into perspective, here is a quick comparison with the default stock ROM tunings.
By default, I would get an average active drain of 14%/h per charge cycle, peaking at 16%/h
After applying this script the average active drain rate would drop to around 12-13%/h, peaking at 15%/h.
In other words, there is around 1-2%/h improvement in active drain rate as per my usage.
Idle drain rate is fairly similar though.
Mostafa Wael said:
So I have been doing a lot of tracing and testing some new changes and, well, I think it is very difficult to squeeze any more battery life on stock ROMs. Which means that it is highly unlikely that this script is going to be updated with new additions as this is practically the best we could reach at the moment. However, I will keep digging deep and see if I can come up with any updates.
To put things into perspective, here is a quick comparison with the default stock ROM tunings.
By default, I would get an average active drain of 14%/h per charge cycle, peaking at 16%/h
After applying this script the average active drain rate would drop to around 12-13%/h, peaking at 15%/h.
In other words, there is around 1-2%/h improvement in active drain rate as per my usage.
Idle drain rate is fairly similar though.
Click to expand...
Click to collapse
hello. Thanks for your work. It's nice and works very well.
How I can add this script to autorun?
P.S. Here is screenshots of my battery life after tweaks
@Mostafa Wael Hey mate, do you remember what the experiment was that you wanted to do recently ?
Was meant to help with smoothness and battery on Android 10?
St.Noigel said:
hello. Thanks for your work. It's nice and works very well.
How I can add this script to autorun?
P.S. Here is screenshots of my battery life after tweaks
Click to expand...
Click to collapse
I really don't have any idea, I just run then every time after boot via terminal emulator ?
CamoGeko said:
@Mostafa Wael Hey mate, do you remember what the experiment was that you wanted to do recently ?
Was meant to help with smoothness and battery on Android 10?
Click to expand...
Click to collapse
Well, it was a desperate attempt by me to try and squeeze more juice on Android 10 custom ROMs, not sure it will work out on stock ROM. Basically, I am experimenting with different values for the cpusets and stune settings of each cgroup.
I'm still evaluating whether it has a significant impact or not. So far, it is almost the same...
Mostafa Wael said:
Well, it was a desperate attempt by me to try and squeeze more juice on Android 10 custom ROMs, not sure it will work out on stock ROM. Basically, I am experimenting with different values for the cpusets and stune settings of each cgroup.
I'm still evaluating whether it has a significant impact or not. So far, it is almost the same...
Click to expand...
Click to collapse
If you're running Artemis... You're wasting you're time...
Military Dictator @KuranKaname does not allow for the powerhal to accept adjustments from stune other than what HE deems required ...
You MIGHT be able to adjust scheduler values and have them mean something ...
rignfool said:
If you're running Artemis... You're wasting you're time...
Military Dictator @KuranKaname does not allow for the powerhal to accept adjustments from stune other than what HE deems required ...
You MIGHT be able to adjust scheduler values and have them mean something ...
Click to expand...
Click to collapse
Cpuset and stune values are open (besides the top-app stune boost)
I'm using elementalx kernel on android 10 nov update, and my battery drain in deep sleep is unusually high at 2 - 2.5% per hour.
I'm wondering if this script conflicts with anything with the kernel.
I took a look at the script and it looks like some of the settings I can apply in the kernel manager.

Categories

Resources