Question Regarding CPU Scaling - Hero CDMA Q&A, Help & Troubleshooting

So I'm new to phone hacking, but an experienced software developer with a pretty strong Linux background... Anyway, I was rooting around the filesystem and found /sys/devices/system/cpu/cpu0/cpufreq/
I checked the values in scaling_max_freq and scaling_min_freq and they were both set to 528000. After doing some forum searching I see that some people mention using setCPU to let their CPU throttle down to 245 MHz when the screen is off, but when I tried to do echo 245000 > scaling_min_freq it doesn't ever change from 528000
I'm using Fresh 1.1, do I need to install a different kernel if I want my CPU to scale, and why can't I edit this file manually? I assumed that all setCPU was doing was editing /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor and scaling_max_freq and scaling_min_freq

ASULutzy said:
So I'm new to phone hacking, but an experienced software developer with a pretty strong Linux background... Anyway, I was rooting around the filesystem and found /sys/devices/system/cpu/cpu0/cpufreq/
I checked the values in scaling_max_freq and scaling_min_freq and they were both set to 528000. After doing some forum searching I see that some people mention using setCPU to let their CPU throttle down to 245 MHz when the screen is off, but when I tried to do echo 245000 > scaling_min_freq it doesn't ever change from 528000
I'm using Fresh 1.1, do I need to install a different kernel if I want my CPU to scale, and why can't I edit this file manually? I assumed that all setCPU was doing was editing /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor and scaling_max_freq and scaling_min_freq
Click to expand...
Click to collapse
I dont know alot about linux or the kernel stuff but I do know that those of us that have been using SetCPU to adjust freqency have been installing a seperate kernel. Its Gumbo Kernel. Ill get you a link.
Gumbo Kernel
http://forum.xda-developers.com/showpost.php?p=5502421

Looks like there's a script in there that fiddles with the memory freer and sets the scaling_governor to performance instead of ondemand or msm7k.
Changes /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144
to 1536,3072,4096,21000,23000,25000 that's interesting.
edit: I'm not sure how useful that really is. Memory that isn't storing anything isn't doing anything, and so while it might make you feel better to say "Look! I have 90 mb free!" that really isn't as great as you'd think. If you run low on memory (ie the active process is needing more), then it's already going to kill and free up empty apps and content providers with no clients attached, so not really sure how useful that particular part really is.
edit2: So returning to my original question. If I want to change how low my CPU will scale down to, I need to install a new kernel?

ASULutzy said:
Looks like there's a script in there that fiddles with the memory freer and sets the scaling_governor to performance instead of ondemand or msm7k.
Changes /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144
to 1536,3072,4096,21000,23000,25000 that's interesting.
edit: I'm not sure how useful that really is. Memory that isn't storing anything isn't doing anything, and so while it might make you feel better to say "Look! I have 90 mb free!" that really isn't as great as you'd think. If you run low on memory (ie the active process is needing more), then it's already going to kill and free up empty apps and content providers with no clients attached, so not really sure how useful that particular part really is.
edit2: So returning to my original question. If I want to change how low my CPU will scale down to, I need to install a new kernel?
Click to expand...
Click to collapse
Yes. Try the gumbo kernel. try scaling it to 160 just for fun. You'll see how slow it is, and it will prove that the cpu scaling works. try it at 528 also.

Related

Cpu Scaling

How would i go about changing the cpu speed tht the rom has set it at. Like if cyan's rom is at 528 n i want max to be 328...how would i do tht ? wht file to mod ?
Instead of touching mods, better off using either SetCPU or the Open Overclocker widget, both available on the market or here. Just run a search.
The open overclocker widget in the market is fantastic. On cupcake I have mine set to 128-384 and set to 128 constant when the screen is turned off to conserve power.
Not just to hijack the thread, but AdrianK, at those settings do you find wake up too slow? For example when you get a phone call? I used to do the same as you, now I have it as 245 constant when screen is off and 384-528 when on.
Hey guys i appreciate ur replies but i wanted a way to implement it in the rom itself so i dont have to run a widget...thnx though..
SetCPU isn't a widget, its an app that you only need to run once and that's it. However I'm not sure if SetCPU also allows you to set the screen off frequency though which saves you even more battery life.
As for editing the ROM yourself to set the CPU speed, I can't help you there I'm afraid. Not sure if it has been posted on the forum or not too but try a search.
NeoBlade said:
SetCPU isn't a widget, its an app that you only need to run once and that's it. However I'm not sure if SetCPU also allows you to set the screen off frequency though which saves you even more battery life.
As for editing the ROM yourself to set the CPU speed, I can't help you there I'm afraid. Not sure if it has been posted on the forum or not too but try a search.
Click to expand...
Click to collapse
Yes, SetCPU will allow you to have a screen off profile so you can set the speed while the screen is off, and when it is on. It does need to run in the background tho I think...

[Q] Do I Need SetCPU with DamageControl?

Hi all, I'm AWOL from the EVO forum while I get my wife's Hero set up.
I just loaded up DC 2.09 (latest / final release) and I'm working through SetCPU, but I saw one user at least who said DC automatically scales the CPU all by itself. So do I need SetCPU to get some battery benefits? The phone is screen-off a lot, mostly used for just calls, texts, and camera other than that, so if it will kick down to 245 automatically, that should save a lot of watts.
So do I need SetCPU, or will DC underclock out-of-the-box?
(Edit: I guess SetCPU gives me the OVERclock, doesn't it? Still, I'd like to know about DC's background so I know how to set up profiles, or even if I should.)
I haven't used DC in a while, but I'm fairly certain it doesn't come with the ability to underclock by default....I'm pretty sure it comes with a stock or very-similar-to-stock kernel that wouldn't have any different cpu speed settings. I could be wrong but nothing in the main OP of his post (here: http://forum.xda-developers.com/showthread.php?t=656690) suggests otherwise. That ability might be available in the DConfig settings somewhere, but I haven't used/seen it in a couple months to remember. Check there first.
If you don't see anything, you probably will want to use SetCPU or the OC widget to scale down. I'd also recommend using the Screen Off profile in SetCPU, to lower the max speed when the screen is off. Sounds like it would be a useful one for you.
This may not work with the included kernel, so if you don't see any results try a different kernel built specifically for use with OC/setcpu:
This one: http://forum.xda-developers.com/showthread.php?t=750170
or one of these: http://forum.xda-developers.com/showthread.php?t=705074 for DC.
Hope this helps.

[Q] Overclocking and undervolting Milestone

Hello. I'm using MIUI, so the app SetVsel is out of the question (on start it does Force Close).
I'd like to undervolt and overclock my CPU.
This is my current 10overclock file.
#!/system/bin/sh
echo "5 1000000000 60" > /proc/overclock/mpu_opps
echo "4 800000000 59" > /proc/overclock/mpu_opps
echo "3 600000000 52" > /proc/overclock/mpu_opps
echo "2 400000000 40" > /proc/overclock/mpu_opps
echo "1 250000000 32" > /proc/overclock/mpu_opps
Click to expand...
Click to collapse
I have few questions:
- Can I add 6th setting with 125000000 16, or I need to remove one of the lines? I know that I need to sort the numbers.
- How do I find the lowest stable vsel value with trial and error? How do I set manually frequency and vsel values and do a stability test without editing the 10overclock file and rebooting? If I edit 10overclock and the vsel is too low, the phone will go on infinite reboot cycles and I don't want to risk this.
- Is Interactive governor the best one available, or smartass or ondemand are better?
Thank you.
nitrobg said:
Hello. I'm using MIUI, so the app SetVsel is out of the question (on start it does Force Close).
I'd like to undervolt and overclock my CPU.
This is my current 10overclock file.
I have few questions:
- Can I add 6th setting with 125000000 16, or I need to remove one of the lines? I know that I need to sort the numbers.
- How do I find the lowest stable vsel value with trial and error? How do I set manually frequency and vsel values and do a stability test without editing the 10overclock file and rebooting? If I edit 10overclock and the vsel is too low, the phone will go on infinite reboot cycles and I don't want to risk this.
- Is Interactive governor the best one available, or smartass or ondemand are better?
Thank you.
Click to expand...
Click to collapse
I believe you can only do 5 steppings for overclocking. You need to change one of the other lines to 125MHz if that's what you want.
You can use root explorer, or now even try zeppelin's Supercharger V8 preview to overclock.
Go into the FroyoMOD thread and the 2nd or 3rd post, you can find a default 1GHz overclock. If your phone bootloops, then just boot into recovery and flash that stock OC to get back to normal.
I just do trial and error from the top one and see how stable it is, until I find a suitable balance.
Thank you.
How do I force one of the frequencies in overclock file, so I can do a stability test with it?
If I find a stable value, can I replace the file in the backup zip without reediting the META-INF contents?
nitrobg said:
Thank you.
How do I force one of the frequencies in overclock file, so I can do a stability test with it?
If I find a stable value, can I replace the file in the backup zip without reediting the META-INF contents?
Click to expand...
Click to collapse
To test it, change one stepping at a time and make sure they're stable. If it's unstable, then your phone might bootloop/restart. Then you'll know that it isn't a stable overclock.
The steppings and overclocking change so much depending on the usage and load the phone has, so it's very hard to try and force a stepping, on 5 stepping OC's.
skadude66 said:
To test it, change one stepping at a time and make sure they're stable. If it's unstable, then your phone might bootloop/restart. Then you'll know that it isn't a stable overclock.
The steppings and overclocking change so much depending on the usage and load the phone has, so it's very hard to try and force a stepping, on 5 stepping OC's.
Click to expand...
Click to collapse
What if I use only one stepping, delete the rest, and do a stability test on it? Will this work?
The thing is that the phone rarely uses the middle steppings, it only uses 250MHz, 400MHz and 1GHz, where the last 2 are like 15% of the time. Somehow I need to force the phone to work at exactly this stepping, so I can know whether it's stable or not.
nitrobg said:
What if I use only one stepping, delete the rest, and do a stability test on it? Will this work?
The thing is that the phone rarely uses the middle steppings, it only uses 250MHz, 400MHz and 1GHz, where the last 2 are like 15% of the time. Somehow I need to force the phone to work at exactly this stepping, so I can know whether it's stable or not.
Click to expand...
Click to collapse
I have never tried it, so I can't tell you it will work or not. I think there is another file that enables the 5 step overclock, so it might screw up your OC.
skadude66 said:
I have never tried it, so I can't tell you it will work or not. I think there is another file that enables the 5 step overclock, so it might screw up your OC.
Click to expand...
Click to collapse
I see.
What about manually setting min-max to one value with SetCPU?
What would you suggest me to do?
nitrobg said:
I see.
What about manually setting min-max to one value with SetCPU?
What would you suggest me to do?
Click to expand...
Click to collapse
I've never used SetCPU, I just overclocked through the 10overclock file.
skadude66 said:
I've never used SetCPU, I just overclocked through the 10overclock file.
Click to expand...
Click to collapse
Okay. Thanks though. I will try the SetCPU method and force one of the frequencies, hope that it will work.
Thanks for everything!

Speed up your Nook Color running ICS+

Hello all, today I will be showing you how to speed up your Nook Color a bit... these methods should work for CM9/CM10/CM10.1/Paranoid Android/etc., but I personally found these out while running PA ICS. The apps you may need to make your phone faster are Ram Manager (Free OR Pro) and No Frills CPU Control (In the case that your ROM doesn't have overclocking in settings). Basically, using these "tweaks" (minus overclock, as whenever I flash a ROM the first thing I do is overclock it), I went from a painfully slow (as in, I was ready to go back to Gingerbread) device to a somewhat faster device. I've seen huge differences in launching games and apps especially, and opening to app drawer seems to be smoother also.
CPU Overclock
Either using No Frills CPU Control or the built-in overclock, set your max CPU speed to the highest on the list (not exceeding 1200, but it shouldn't show anything above that anyhow). Change your governor to either Ondemand or Performance (I personally use Ondemand and have no problems with it). Most of you are probably already overclocked though, so please don't look at me like I'm stupid.
Swap Space
Open up RAM Manager and there should be an option to change your swap space at the bottom. I changed mine to about 48 and am content with that, although I must add it may make your SD card's life shorter. This will increase your RAM, thus allowing you to have more apps open at once.
Force GPU rendering
Open Developer Options in your settings app and check "Force GPU Rendering"... I'm guessing this is one of the biggest factors to my tablet becoming smoother, as from research it helps lower end devices achieve a better framerate, although it may decrease your battery life. Also, I cannot guarantee every app will run great with this. I tested a game (Dynamite Jack) with this setting enabled and it wasn't too shabby at all! But yes, I can definitely see a difference in the overall speed of my Nook Color.
Please tell me how these work for you
I tried these settings, but unfortunately didn't perceive any performance improvement.
Good call on RAM manager. Hadn't seen that before, its going on my NC and RAZR now
Can anyone tell me a good reason for that RAM Manager app to have the permissions it does? Location, Identity, and full network access?
Does NOT work. All this app " no frills CPU" does is provide a GUI front end for the settings already found for our nook color using CM 10+ in its "performace" settings. Also this app does not provide over clocking above our set 1100 MHz. You will need a custom over clocking kernel for the encore for this. Check over on the CM 10 kernel thread n the development section.

[MOD] Disable Powerdaemon Constraints - Allow custom governor settings to stick

This mod disables the powerdaemon constraints that prevent custom cpu governor settings from sticking. This was developed on my T210R, but should work for others.
Background:
There are 2 files in the /system/etc directory (powerdaemon.xml and powerdaemon_z3.xml) that are used to monitor various states of the system (ie. "booting", "games", "video playback"). Certain constraints are set depending on the system state. Most of these constraints are a variation of the "ondemand" or "performance" governors. These constraints adjust the min/max frequency and set control to a specific governor. This is why you can not get any cpu governor settings to stick.
What I changed:
I changed all system states to be directed to the "normal" constraint. This constraint does NOT change the selected governor and has min/max frequencies of 0/150%. This basically disables any effect the powerdaemon has. The 150% max does not mean your cpu will run at 150%, it simply allows overclocking if your kernel supports it.
In my testing, simply deleting the files or disabling the system states caused higher than normal cpu usage. It seemed to be trying to continually process information that it couldn't find. So, creating a "normal" constraint that did not limit any funtionality seemed to be the best option. The powerdaemon controller still processes everything, but has no real affect.
Installation:
Download and flash the Powerdaemon.disable.zip (with custom recovery). You may want to make a copy of your original files if you are using a different model.
If you want to restore the original xmls, just flash the Powerdaemon.restore.zip. These are from my T210R.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Flash at you own risk. I tried my best to explain what the mod does, so I take no responsibility for what you do with your Tab.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reserved
nice
Nicely done! What settings are you running your tab with now?
Sent from my SAMSUNG-SGH-I747
hkjr said:
Nicely done! What settings are you running your tab with now?
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
To be honest, I actually use the default settings (with powerdaemon still enabled). I don't really use my Tab very much (except when I travel), so I don't worry much about battery life or performance enhancements.
With the powerdaemon still enabled, I find that I get less lag, because some of the constraints were set to change minimum frequency to a higher value than what it would normally be.
I discovered how this works back when trying to build my own kernel (with additional governors). I could never get the new governors to stick, so I started investigating and discovered the powerdaemon files. I have never really been that interested in changing governors, but I know that there are a lot of people who really like to change them. That's why I decided to put this out there. :good:
I have the t217s that doesn't have a working recovery if I copy the two files to my /system/etc and give them the proper permissions it should work right?
Sent from my SM-T217S using Tapatalk
jbyers5355 said:
I have the t217s that doesn't have a working recovery if I copy the two files to my /system/etc and give them the proper permissions it should work right?
Sent from my SM-T217S using Tapatalk
Click to expand...
Click to collapse
Theoretically, yes. Since you have a different model than what I developed it on, you may want to compare your original files to the "restore" files I provided, to make sure that everything is the same. I know the cpu is a little different with the T217. Let us know how it goes.
Well I looked in /system/etc on my t217s and did not find any powerdaemon files but I did find that if I change the governor settings that they do stick
Sent from my SM-T217S using Tapatalk
You can also simply edit the values in the default files to change cpu config without using an app to do it. The disadvantage is you might not know for certain what is and isn't supported, but I upped my minimum frequency across most system states to 624 mhz, and I switched from the default 'ondemand' governor to 'interactive.' As a result my cpu's frequency, when not in deep sleep, is usually at 624 mhz and occasionally at 1.2 Ghz and rarely at 1.012 Ghz.
I had only owned my tab for a couple days before switching the settings, so I can't provide much of a before/after case study. But I am pleased with performance and battery life is okay, on average usage with 20% screen brightness (occasionally higher) it seems I can get at least 6 hrs screen on time over the course of a day.
Does it increase performance? Game?
Sent my SM-T210 Using Tapatalk
gr9nole said:
Does it increase performance? Game?
Sent my SM-T210 Using Tapatalk
Click to expand...
Click to collapse
It only allows you to change governors and keep those settings from bring overwritten by the system.
Sent from my SCH-I605
Great work, works on T210 WiFi model.
Sir I included your Powerdaemon MOD on my SGYTT210xPerformanceUpgradePack, credits were given to you on the MOD. I cannot send private message to you, I think theres restriction.
V003 great working 4.1.2
SM-T210R cihazımdan Tapatalk kullanılarak gönderildi
@gr8nole is there a way to get this working on tab 4
zach61797 said:
@gr8nole is there a way to get this working on tab 4
Click to expand...
Click to collapse
Depends on which version you are referring to. For the Marvel based 7 in Tab, you need to delete /system/bin/phservice. At least that is what is required on 4.4.2 for the Tab 3 7 in (Marvel-based). On 4.4.2, the don't use the powerdaemon.xml's anymore.
gr8nole said:
Depends on which version you are referring to. For the Marvel based 7 in Tab, you need to delete /system/bin/phservice. At least that is what is required on 4.4.2 for the Tab 3 7 in (Marvel-based). On 4.4.2, the don't use the powerdaemon.xml's anymore.
Click to expand...
Click to collapse
I have the tab 4 8.0 t330nu. I have tried to change the speed but it never lets the speed change. I can go from ondemand or preformance bit the speed stays set i cant make it go up or down
zach61797 said:
I have the tab 4 8.0 t330nu. I have tried to change the speed but it never lets the speed change. I can go from ondemand or preformance bit the speed stays set i cant make it go up or down
Click to expand...
Click to collapse
No clue, sorry.
gr8nole said:
This mod disables the powerdaemon constraints that prevent custom cpu governor settings from sticking. This was developed on my T210R, but should work for others.
Background:
There are 2 files in the /system/etc directory (powerdaemon.xml and powerdaemon_z3.xml) that are used to monitor various states of the system (ie. "booting", "games", "video playback"). Certain constraints are set depending on the system state. Most of these constraints are a variation of the "ondemand" or "performance" governors. These constraints adjust the min/max frequency and set control to a specific governor. This is why you can not get any cpu governor settings to stick.
What I changed:
I changed all system states to be directed to the "normal" constraint. This constraint does NOT change the selected governor and has min/max frequencies of 0/150%. This basically disables any effect the powerdaemon has. The 150% max does not mean your cpu will run at 150%, it simply allows overclocking if your kernel supports it.
In my testing, simply deleting the files or disabling the system states caused higher than normal cpu usage. It seemed to be trying to continually process information that it couldn't find. So, creating a "normal" constraint that did not limit any funtionality seemed to be the best option. The powerdaemon controller still processes everything, but has no real affect.
Installation:
Download and flash the Powerdaemon.disable.zip (with custom recovery). You may want to make a copy of your original files if you are using a different model.
If you want to restore the original xmls, just flash the Powerdaemon.restore.zip. These are from my T210R.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Flash at you own risk. I tried my best to explain what the mod does, so I take no responsibility for what you do with your Tab.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Click to expand...
Click to collapse
Hi Gr8nole,
Thank you for your work on this. I have an issue with my T210R (4.4.2) the settings I make they don't stick after reboot. I used kernel adiutor, EX kernel manager, Performance tweaker.
I've flashed Powerdaemon.disable.zip
I have busybox installed, am I missing something?
Edit: I've found your suggestion about deleting /system/bin/phservice. I deleted the file, rebooted, changed to governor to lionheart. It seemed to keep the settings.
Thanks!

Categories

Resources