Maybe everyone already know this but it is possible to turn off any core(bit or little) without installing any custom kernel. But your phone have to be rooted. I tried this on stock nougut but will probably work on marshmallow. /sys/devices/system/cpu/cpu0/core_ctl/
/sys/devices/system/cpu/cpu4/core_ctl/
In those two folder there are files that controls cpu (cpu0 for little cpus and cpu4 for big cpus)
(Try with your own risk ,i wont be responsible for any damages to your phone)
For an example:
echo "0" > /sys/devices/system/cpu/cpu4/core_ctl/max_cpus
If you execute this code in terminal emulator with root permission the big cores of your cpu will shut down.
To turn on big core :
echo "2" > /sys/devices/system/cpu/cpu4/core_ctl/max_cpus
You can control load_theshold to turn off or turn on cpus.
This post maybe won't be much helpful for newbies. But maybe experts can come up with some ideas to use this to control cores for better battery life and performance.
And sorry for my bad english.
Related
Hi all, I know there are threads already created for questions etc but I've an extensive list of them and I don't think its appropriate to spam them in someone else's thread. And I'll update the first post of the answers and replies I've received for the questions I've posted!
My phone's information: will5's MIUI ROM 2.5.25 GB 2.3.7
My list of questions
Android OS
::Hard rebinding hard keys::
Is that possible? My power button recently got damaged and its really tough to press the power button now which is quite a problem, is there any way to rebind the power button to say the camera button? (specifically the 2nd-click of the camera button, not the first click (focus)) MS2Toolbox is able to wake screen with the camera button but thats just soft-sided and I need to hard bind for turning on the phone and using the recovery etc... :crying:
::Allow app to stay active when screen-off and when not in foreground:: http://forum.xda-developers.com/showpost.php?p=29658020&postcount=95
I want to let my app, specifically Opera Mobile, to be constantly active as I run a script (user javascript) on it which repeats its function periodically. Is there a way to keep it active throughout deep-sleep, or when in the background? Currently its working well when I switch the screen off as long the app was in the foreground. The script and Opera Mobile still runs perfectly and I do not experience battery drain (weird). I have been doing so for the past few months and it takes probably only 30% of my battery overnight when I sleep despite the periodic data connection. However, this didn't happen on the MIUIv4 ROM when I tested it. The app is 'frozen' or suspended, it seems, the moment I switch the screen off. Tried apps which disabled deep sleep etc but didn't work. Any ideas?
Overclocking
::What are the default VSELs for the respective frequency for MS2?::
I know there's one here http://forum.xda-developers.com/showpost.php?p=11620994&postcount=1 by santiemanuel, but it gives VSELs WAY above those I'm using or the defaults from MS2Toolbox. Say, for 300MHz, the stock vsel is 33 and 30 is considered unstable. How ever the default in MS2Toolbox for that frequency is 17 if I'm not wrong. I'm using that at the moment and it seems to be running fine (used powersave governor to enforce 300MHz to test it out). Just to confirm, should I really follow that table?
WiFi
::Changing Milestone 2's WiFi MAC address::
Hi guys, I've been trying to look for a way to change my M2's MAC address but have not been able to get it to work.
I've googled up for methods but the common ones do not work.
Tried so far:
- The nvram.txt file
Can't find it in the usual folders stated.
- busybox ifconfig tiwlan0 hw ether <MAC>
- busybox ip link set dev tiwlan0 addr <MAC>
Tried these two commands but didn't work either in terminal emulator. Even did the off-on-immediately spam commands but no luck.
Unsorted
Code:
http://forum.xda-developers.com/showpost.php?p=29675172&postcount=905
::SOLVED::
Overclocking
::How do I check the current VSEL and frequency at any point in time?::
I'm trying to underclock and ultra-undervolt to save as much battery as possible and want to know how's the selected governor working in order to manually optimize the settings to my preferences.
::How do I know its an unstable VSEL?::
Q: Quite vague a question but... as said in the first question, I'm running 300MHz at a VSEL of 17 instead of 33, nearly half of the stock. How would I be able to tell if its unstable? When I'm running in powersave governor, it shows that the 'system' process stopped responding at boot and I've the wait/close option, but after selecting wait the dialog disappears and the phone still works as per usual. However its very sluggish, clearly because of the underclock. Regardless, does the system process being unresponsive at the start shows it is unstable?
A: djlooka via PM
djlooka said:
...My suggestion is: try with that setvsel app for defy (see my answer in the CM9 thread) which comes with a useful mini-stress tester app (you can install it from within the main OC app). It can stress test every single freq step, so you can find its 'sweet-spot-vsel'.
One could also think that there's some advantage in fine tuning the middle steps. IMHO it's wasted time
After some days of tweaking, I realized that our phone will stay in the two the middle steps (combined) for less than 5% of the time. So even if you could save some % of the power by losing 1 or 2 vsel points (let's say 10% of the original vsel), the "on the road" gain would be infinitesimal (10% x 5% = 0.5%).
Anyway it's fine to OCD a bit even about those 2 steps
My final word is: find the lowest possible vsel for both the top and bottom freqs by stress testing. To be extra careful, raise them by one point for rock solid.
E.g.: 300-22 is the best combo for my lowest step -> I put 300-23, and so on.
Click to expand...
Click to collapse
::3 steps shown in the bootloader but 4 shown in MS2Toolbox::
Q: This has been bugging me recently. I've read recently that the M2 has 4 steps for its CPU. So the CPU actually follows the 4 steps shown in MS2Toolbox or the 3 in the bootloader? Note: When I change the values in the bootloader, the values changes respectively in MS2Toolbox for the 2nd,3rd,4th rows (did not tick auto apply in M2T to prevent overlaps with bootloader settings). But the 1st row shows values lower than the one in the 2nd row automatically.
A: djlooka @ http://forum.xda-developers.com/showpost.php?p=29806494&postcount=908
djlooka said:
...Our phone, instead has 4 steps (300, 600, 800, 1000 MHz - the same as the Defy+).
AFAIK, when you set a configuration which allows only 3 steps (in the bootmenu), the hw internally adjusts to have the last 2 steps equal (e.g. 300, 600, 800, 800 MHz).....
Click to expand...
Click to collapse
Applications
MX Player - Does not require codecs. If it requests for ARMv7 NEON codec, get the NEON version of the player instead.
is anybody else having an issue when you underclock? i usually set it to 1.4Ghz but the phone overrides the setting i put up using Atuntu CPU master. i feel that the phone is still fluid when underclocked, so i tend to under clock to save battery life(and stop if from overheating to 105.1 degrees farenheit).i need to get full usage out of my phone as the day starts at 5 AM till 5PM with heavy usage
any luck with this issue?
Kernel on forums if you have compatible phone. Inteli and trickster with thermald disabled. Lock freq. While your at it, look up your soc bin and and start trialling undervolts.
42 8996883
Steamer86 said:
Kernel on forums if you have compatible phone. Inteli and trickster with thermald disabled. Lock freq. While your at it, look up your soc bin and and start trialling undervolts.
Click to expand...
Click to collapse
in English please? o dont get what wou mean by the SOC Bin and the part after that. i did the trickster, but it still overrides it.
You can't make it stick with default kernel. You need a modified one with inteli so thermald doesn't auto override. SOC bin is details on your "CPU" quality for base volt values, better SOC means better overclock, underclock, and undervolting. If you're serious in doing this, search and learn. This isn't simple modification, and you will not be able do this in simple way. Make sure you have set on boot checked in trickster. Well work somewhat better, but still not a permanent solution.
I open this topic for a discussion of the performance and acceptance, famous hotplug ...
What is CPU Hot-plug?
Hot-plug by definition is adding or removing things without switching off the system. Say Add a hard disk to the system and increase it's storage capacity without switching off the system. CPU hot-plug means adding or removing CPU's from the system without switching off the system.
Why CPU Hot-plug?
This feature came in for servers which have so many CPU's and one or more CPU's may become faulty. And switching off the server and physically removing it may be costly for any business. CPU hot-plug helps here by hot-plugging out the CPU from the software so that nothing gets scheduled on the CPU once that is done the power rails of the CPU can be turned off from the software and later if need be, the CPU can be safely removed from the system.
Similarly, Adding CPUs.
Hot-plugging for Saving Power.
But, this feature is increasingly being used for saving power. We have so many mobile phone or tablets with 4-Core, 8-Core CPU's etc... But when the mobile is just idling in your pocket waiting for any call or when the tablet is in standby or playing a song, one really does not need the power of so many cores. So, Mobile/Processor makers nicely use the hot-plug mechanisms to turn off the CPU. When very lightly loaded or in standby the not-need cores are hot-plugged off. And added whenever needed. This way there is a lot of power saving achieved.
A bit of Internals.
Once it is decided that a CPU is going to be hot-plugged basic thing needs to be done. In a multi-processor system there are several processes running, or sleeping in every CPU. Which essentially means there could/will be some processes that are running or sleeping in the CPU that we would like to hot-plug. So, first thing to be done is to "migrate". The migration scheduler thread has to run and transfer all the running or sleeping processes into the other available cores. The isr's. We need to mention the interrupt controller that this core is no longer available for servicing interrupts if the core is capable of handling interrupts. This step is very architecture specific.
After this is done the architecture specific hot-plug code is invoked in arch/xxx/mach-xxx/cpuxxx.c. This will do what is needed in the specific chip to switch off the cpu rails and turn off or reduce to voltages according to the need.
When adding the core the same step is reversed. Once the hardware specific things are done the new CPU is added to schedulers domain and scheduler starts freely migrating threads into the new cpu.
Pitfalls of CPU Hot-plug:
When CPU Hot-plug is used for power saving, the major pitfall is the cpu not being available on time during sudden load conditions. It always take a while to predict the load, and latency in brining a CPU online and latency in moving a process to a new CPU. So, there can be instances in which we have a load and the CPU's are not yet added to the system to digest it. This might lead to some uneasy user experience. Even after paying money for a 4/8 CPU product the user may not have them when needed. But, this is not as bad as I have worded it. It is just a balance.
If there is a running task on a CPU which is going to be hot-plugged it has to be moved to another CPU. There is always a cache penalty associate with every migration as there will be no cache for this process in the per-cpu cache of the new processor where it has moved. Cache penalty is separate subject and it is very very architecture specific.
How and when to Hot-plug?
There is no simple answer or this. It is purely dependent on the SoC. Every SoC vendor have their own implementation of the logic. There are some open source implementations also available. Also, there are some multi-core SoC's which don't use CPU hot-plug for power savings.
I modify my kernel, each with a different version of hotplug, each will have to try it, and based on the experience rate, the hotplug with the most votes, will be the default hotplug my kernel.
FIRST VERSION
FenomenalMOD with MSM_ZEN DECISION
msm: add msm_zen_decision
This adds a simple driver intended to allow the MPDecision service to be disabled.
The driver is easily extendable, but currently it:
- Can be enabled/disabled in /sys/kernel/zen_decision/enabled
- On screen power OFF it removes all cpu cores after suspend_wait_time
- On screen power ON it enables all cpu cores.
- /sys/kernel/zen_decision/suspend_wait_time (ms) refers to how long we wait after screen is off to remove the cores (default 5s). This just to avoid removing cores in excess.
DOWNLOAD: ZEN-Hotplug
SECOND VERSION
FenokenalMOD with msm_hotplug
It will switch on more cores very quickly. In Dorimanx kernel, this hotplug can be heavily tweaked to be battery friendly to pure performance. With the right tweaks it is a very good choice for balanced performance.
DOWNLOAD: MSM Hotplug
THIRD VERSION
FenomenalMOD with Mako Hotplug
Basic Hotplug by francisco franco
DOWNLOAD: Mako Hotplug
FIVE VERSION
FenomenalMOD with AUTOSMP Hotplug (very good!!)
AutoSMP is a simple but effective hot plug governor by mrg666
You can modify this in sys/kernel/autosmp/conf
DOWNLOAD: AUTOSMP
SIX VERSION
FenomenalMOD with Bricked Hotplug(very good!!!)
Conservative hotplug driver by @showp1984
DOWNLOAD: BRICKED HOTPLUG
Please, try each before voting, Czech performance, battery, etc .... ALL DOWNLOAD IS FOR AOSP ROMS (CM, AOSP, PARANOIS, ETC=
Tested bricked Hotplug bestBatery backup with best performance, i accidentally voted mako
not working for stock?
DAVI FELICIANO said:
not working for stock?
Click to expand...
Click to collapse
No, its only for test
Msm & Mako!
Here's a tie, I'll add the 3 most voted hotplugs ...
DELETED
Just confirming that this post from the Z5 forum: here does indeed work on the z3 single sim(probably dual sim as well, can't see why not).
These tweaks are based on the Heimdall governor used in this post
Tweaks reduces heat, optimizes the performance and increase the battery life.
Check them out!
Edit
I think i have to clear something up with these scripts
my intention of using these scripts is to be able to use my phone longer. To have better battery life in general. I also wanted to be able to use my phone without always compromising the performance of the device. why only use 50% of a handsets performance right? so i wanted to increase the amount of time i could use the deice before it got to hot and starts the thermal throttling. the throtteling for this phone is verry agressive and i wanted to change this. Im using a cover for my phone so i dont care if i gets hot, if that means that i have better performance.
so without any thermal configurations this phone gets laggy or starts thermal throttling around 60 degrees. I have increased this limit to around 70 degress where you will start to feel the reduce in performance. Thats 10 degrees where i get extra performance. there are often use scenarios where you just use your phone for 10 minutes at a time right? well, i can do that now without getting the thermal throttling being in the way.
This thermal files are intended to make the device perform better and allow cpu to get warmer. This is optional!
i configures the scripts a bit, since i only use the Heimdal governor, i combined the three scripts, and made some minor improvements.
-Disabled two of the little and big cores.
-Set max speed of big cores to 1248, eg underclock
-Set gpu governor to simple_ondemand
In the thermal config file i have, ive also made some changes. since the thottling is to aggressive for me, the little cores throttling does not go under 960mhz, ever no matter how hot.
This means that scrolling menues and browsing internet does not lagg. Sven if the cpu is 75 degrees.
This does not happen to the big cores, which means that games using big cores, will lagg when exeding 75 degrees. They will be throttled down to 384mhz to not brake the device.
Warning! im not responsible for any melted devices! The thermal config is for people who does not care how hot their phones get. they just want performance.!
Installation
-For battery, thermal improvement, and cpu optimization:
1. Rename the file to: BearPower.sh ,
2. Make a mew folder in /etc/"folderName" and place the script file there.
3. Set it to apply on boot of the device with SManager. Mark the "Boot" "SU" buttons, then "save" and then "run".
-Install the thermal configs:
1. Rename the "init.qcom.post_boot.txt" file to xxx.sh
2. Rename the "thermal-engine.bearpowerv1.0.txt" file to xxx.conf
3. Make /etc folder writable
4. Place both of them in the /etc folder
5. check permission, set it to 644 or -rw -r -r
6. restart your device
Already tried but didn't find any noticeable change.
waseemakhtar said:
Already tried but didn't find any noticeable change.
Click to expand...
Click to collapse
well it increaded my SoT with 1 hour, ill take it
Did you fix the overheating issue ??
nex_t said:
Did you fix the overheating issue ??
Click to expand...
Click to collapse
I tweaked the three scripts in the z5 forum even further, so my my phone does notbget hot when doing light to medium use, but it still gets got when playing games ?
Phone also gets hotter when plugged in charger... My phone is a lot better than what it was as well
I never play games on the mobile phone
As i said, i use it for web browsing and Youtube, most of the time
bjowol, please help me one more time.
Which files do i have to flash ? Do i need another kernel now, for doing this ?
Thank you so much
Setting up Custom Kernels​
*this information is helpful for anyone, everything written here, I have thoroughly tested, this guide is not laid out beautifully,I will rewrite it on my desktop pc soon.
There seems to be allot of confusion about how to set up
"Custom" Kernels for the Moto G 2015 (Osprey) for testing
This is mostly due to the following reasons :
Guides/info are Outdated
info usually Vague/Confusing for Novice
Guides are often for different hardware/software
Information is wrong or unfounded or based on speculation/theory
tunables for "performance" often do the opposite
But the biggest issue that Novices have seems to be
A lack of understanding that almost every tunable has
An equal opposite reaction (side effects)
Therefore balancing each tunable with each other is essential*
Getting Ready to bench
1 ) My First step is, head over to the Android Modders Guide (look in KA to see which Gov's & Scheduler's) and get familiar with the Govs & Sched's featured in the kernel your using
2 ) now that you're familiar with that open up KA and go to
To the hotplugging section, disable any hotplugging
For the reason that you want to be able to accurately test the performance/characteristics of The CPU and Governor in use (in order to properly tune the system.)
(If you want, turn it back on when your *COMPLETELY DONE TUNING*)
3 ) make sure that while testing your phone CPU freq and Gov
That you're IO ReadAhead cache is set to 128, that way it doesn't interfere or confuse you while trying to set the CPU.
4 ) Go to the misc tab, do you see "Dynamic Fsync" ?
If so turn that off, This will switch it back to Standard Fsync
So in the rare case of a system crash your less likely to damage your data.
5 )*(optional) in the IO tab, Disable add random, and then go to entropy tab and set to 64-192 or 128-256 depending on preference.
Now onto the benching itself
1 ) alright, open the CPU tab and check the Max CPU Frequency, if there is OC available make sure you Never Start your testing/tuning using the Highest OC Frequency
(We don't have a baseline yet and most chips will not be able to perform properly or stable at these higher OC freq's eg. Above 1.593 GHz) start testing with your Max CPU set to
1.363 GHz and work your way up testing each one for performance and stability(Geekbench 3 is a good start).
2 ) Do the same thing for Selecting a Governor for benching . (Your phone might get warm while benchmarking, if you feel Like your phone is getting too hot, this could effect performance turn the phone off for a while until it cools down. Also make sure you restart occasionally in between tests to refresh everything.)
3) in GPU Tab, this is going to be just like setting up the CPU with one exception, you'll want to stick with one of
these two GPU govs (simple_ondemand) & (Msm-adreno)
the other ones are experimental.
and another thing, if your overclocking gpu to max550-650
i recommend setting the min freq to 200 for 550 and 310 for 650mhz, to avoid heat due to ramping up and down.
4 ) alright now into the IO tab, this is where you pick the scheduler that you're going to test with, I suggest fiops or tripndroid. *.
5 ) start benchmarking, I suggest you do multiple tests of whatever your using to benchmark.
6 ) Have fun!
*understand that benching will eat battery, therefore make sure when you get settings you like, you do separate battery test on a full charge.
*once you get the tunables that you're comfortable with.
You can enable hotplugging if you want.
I will post my recommended tunables for the 1GB Osprey
Below...
__________________________________________________________
*if you're going to be doing GPU heavy tasks i recommend
disabling Adreno idler.
recommended tunable for Adreno Idler
(battery savings and cool GPU)
24
17
6