webOS Nation Forums >  webOS smartphones (Pre, Pixi, Veer) >  Palm Pre and Pre Plus > WebOS 1.4 Fixed CPU scaling (500-->600mhz working great)
WebOS 1.4 Fixed CPU scaling (500-->600mhz working great)

  Reply
 
LinkBack Thread Tools Display Modes
Old 03/03/2010, 03:51 PM   #1 (permalink)
Developer
 
Join Date: Jul 2009
Location: Katy, Texas
Posts: 584
Likes Received: 7
Thanks: 52
Thanked 287 Times in 93 Posts
Default WebOS 1.4 Fixed CPU scaling (500-->600mhz working great)

I started a thread a long time ago about using the kernels ondemand governor for cpu scaling. Back then the kernel and the OS had problems with it. Now after extensive testing, i can confirm that it is working great in WebOS 1.4 for my particular phone.

-no more camera app jitters
-no more video flickers
-no more inappropriate scaling to 125-250mhz******(edit:after further testing it still wants to inappropriately scale lower than your set min freq)
-no more random reboots or shutdowns on wake up

Here are the settings that the phone really seems to like:

min scaling freq = 500000
max scaling freq = 600000
scaling governer = ondemand
sampling rate = 1000000
powersave bias = 0
cpu up threshold = 20% utilization


here is the code for all you linux people. Im sure someone is willing to write a patch for you.

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 20 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias


Simply type the above code in novaterm and if things dont work out reboot your phone and everything is reset to default. Have fun and let me know how it works for you.

UPDATE: this code was created into an app so that you can turn it on and off. When off the phone is running at Palm default settings. Here is the link to the thread about the new app:
http://forums.precentral.net/webos-a...u-scaling.html

Last edited by number1pete; 03/18/2010 at 01:32 AM.
number1pete is offline   Reply With Quote
Old 03/03/2010, 03:55 PM   #2 (permalink)
Member
 
Join Date: Aug 2009
Location: Katy, TX
Posts: 933
Likes Received: 27
Thanks: 152
Thanked 88 Times in 70 Posts
Default

Still safe to assume this doesn't work with Smartreflex?
angiest is offline   Reply With Quote
Old 03/03/2010, 04:05 PM   #3 (permalink)
Developer
 
Join Date: Jul 2009
Location: Katy, Texas
Posts: 584
Likes Received: 7
Thanks: 52
Thanked 287 Times in 93 Posts
Default

actually that's a really good question. I cant answer that atm. I need to test it out. All i can say is that the kernel and OS are behaving much better now (actually doing what i tell it to). Will look into it. But my goal was to get more performance, i am not interested in saving battery life via cpu. I think undervoting the evdo radio will help much much more.
number1pete is offline   Reply With Quote
Old 03/03/2010, 04:11 PM   #4 (permalink)
Member
 
netwrkr9's Avatar
 
Join Date: Nov 2009
Posts: 3,132
Likes Received: 154
Thanks: 453
Thanked 495 Times in 364 Posts
Default

Does this do anything to help battery life when the Pre is idle?
netwrkr9 is online now   Reply With Quote
Old 03/03/2010, 04:17 PM   #5 (permalink)
Member
 
Join Date: Jun 2009
Posts: 158
Likes Received: 0
Thanks: 3
Thanked 20 Times in 12 Posts
Default

@netwrkr9 - No

A similar patch to this is already in the git repo. How to access and apply this is left as an exercise for the reader.
__________________
Mobile photoblog http://post.jauderho.com/
jauderho is offline   Reply With Quote
Thanked By: netwrkr9
Old 03/03/2010, 04:17 PM   #6 (permalink)
Member
 
Join Date: Aug 2009
Location: Katy, TX
Posts: 933
Likes Received: 27
Thanks: 152
Thanked 88 Times in 70 Posts
Default

undervoting?
angiest is offline   Reply With Quote
Old 03/03/2010, 04:18 PM   #7 (permalink)
Member
 
Join Date: Jun 2009
Location: Arizona
Posts: 451
Likes Received: 35
Thanks: 104
Thanked 78 Times in 42 Posts
Default

Interesting. I just tried this and it works fine. CPU Scaling never worked on my phone prior to 1.4. My phone would always freeze as soon as I set the scaling governor to ondemand. Now it's working just fine and scaling up properly. I have my threshold set to 80%. I tried min_freq to 250000 but it never scaled down to that when idle.
Tikerz is offline   Reply With Quote
Old 03/03/2010, 04:21 PM   #8 (permalink)
Member
 
Join Date: Aug 2009
Location: Katy, TX
Posts: 933
Likes Received: 27
Thanks: 152
Thanked 88 Times in 70 Posts
Default

I set my min to 125mHz. we'll see what happens.

I wish I knew what Palm were doing in LunaSysMgr to hardcode the cpu speed. It shouldn't be hard to put this in startup, but I don't know if it will get undone when Luna starts.
angiest is offline   Reply With Quote
Old 03/03/2010, 04:30 PM   #9 (permalink)
Member
 
Join Date: Aug 2009
Location: Katy, TX
Posts: 933
Likes Received: 27
Thanks: 152
Thanked 88 Times in 70 Posts
Default

There must be some placebo effect going on here as it feels smoother than running at 600 all the time (modded LunaSysMgr).
angiest is offline   Reply With Quote
Old 03/03/2010, 04:34 PM   #10 (permalink)
Member
 
BdotR's Avatar
 
Join Date: Nov 2009
Location: NJ
Posts: 208
Likes Received: 0
Thanks: 34
Thanked 15 Times in 13 Posts
Default

Would this mess with the 600 "over"clocking patch? Because I have it installed and I don't want to mess anything up.
BdotR is offline   Reply With Quote
Old 03/03/2010, 04:35 PM   #11 (permalink)
Member
 
Join Date: Aug 2009
Location: Katy, TX
Posts: 933
Likes Received: 27
Thanks: 152
Thanked 88 Times in 70 Posts
Default

Quote:
Originally Posted by anus1220 View Post
Would this mess with the 600 "over"clocking patch? Because I have it installed and I don't want to mess anything up.
I backed it out and rebooted before doing this, although I doubt they conflict.
angiest is offline   Reply With Quote
Old 03/03/2010, 04:39 PM   #12 (permalink)
Member
 
Join Date: Jul 2009
Posts: 12
Likes Received: 0
Thanks: 8
Thanked 18 Times in 10 Posts
Default

can this burn out your processor?
jverity is offline   Reply With Quote
Old 03/03/2010, 04:49 PM   #13 (permalink)
Member
 
KJBlauw's Avatar
 
Join Date: Nov 2009
Location: Florida
Posts: 260
Likes Received: 4
Thanks: 54
Thanked 44 Times in 31 Posts
Default

chances are very slim that you'll do any damage to your processor unless if you have a faulty one to begin with
KJBlauw is offline   Reply With Quote
Old 03/03/2010, 05:04 PM   #14 (permalink)
Developer
 
Join Date: Jul 2009
Location: Katy, Texas
Posts: 584
Likes Received: 7
Thanks: 52
Thanked 287 Times in 93 Posts
Default

on my pre so I'll keep it short.

I meant to say undervolting...

yeah WebOS 1.4 does not let me go down to 125mhz or 250mhz. I think they realized how much problems those frequencies are causing.

these are kernel lvl setting so there is a good chance that when your phone scales to 600mhz here it will be faster than some of the scripts out there.

this will not break your pre. If you have an early batch cpu then your phone won't like 600mhz and will reboot.
number1pete is offline   Reply With Quote
Old 03/03/2010, 05:17 PM   #15 (permalink)
Member
 
fortes89's Avatar
 
Join Date: Dec 2009
Posts: 81
Likes Received: 0
Thanks: 11
Thanked 2 Times in 2 Posts
Default

noob here!... i've been reading about this and im interested in installing them, i installed smartflex from preware, but that doesnt do anything, only change ive notice is that it saves a little more battery when idle.

can anyone guide me through the steps of installing this...or which ever works best. performance and battery, both matter to me.
fortes89 is offline   Reply With Quote
Old 03/03/2010, 05:18 PM   #16 (permalink)
Member
 
Join Date: Apr 2008
Posts: 467
Likes Received: 2
Thanks: 14
Thanked 64 Times in 48 Posts
Default

I just ried this and is seems to work.....but the max scaling_max_feq is set to 600000 and I cant seem to change it... I seem to be getting a range of frequencies and it works faster an no stutter..

600000 53890
550000 3407
500000 2494600
250000 5101
125000 20494

The only command that seemed to modify anything for me was
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
navinag is offline   Reply With Quote
Old 03/03/2010, 05:58 PM   #17 (permalink)
Developer
 
Join Date: Jul 2009
Location: Katy, Texas
Posts: 584
Likes Received: 7
Thanks: 52
Thanked 287 Times in 93 Posts
Default

Quote:
Originally Posted by fortes89 View Post
noob here!... i've been reading about this and im interested in installing them, i installed smartflex from preware, but that doesnt do anything, only change ive notice is that it saves a little more battery when idle.

can anyone guide me through the steps of installing this...or which ever works best. performance and battery, both matter to me.
smartflex is a feature of thed procesor to scale its voltage depending on utilization. It does not scale the cpu frequency. You may see battery improvements with it. Last i heard, that was a buggy feature. I have not tried it since WebOS 1.2. I will test it in WebOS 1.4.

Also i remeber that smartflex did not work with the ondemand governor at the same time (crashes). But i will see if they play nice now.
number1pete is offline   Reply With Quote
Old 03/03/2010, 06:01 PM   #18 (permalink)
Developer
 
Join Date: Jul 2009
Location: Katy, Texas
Posts: 584
Likes Received: 7
Thanks: 52
Thanked 287 Times in 93 Posts
Default

Quote:
Originally Posted by navinag View Post
I just ried this and is seems to work.....but the max scaling_max_feq is set to 600000 and I cant seem to change it... I seem to be getting a range of frequencies and it works faster an no stutter..

600000 53890
550000 3407
500000 2494600
250000 5101
125000 20494

The only command that seemed to modify anything for me was
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

im a little confused with your post. What are you attempting to do? What would you like your max and min frequencies to be? Are you running WebOS 1.4?

if you dont feel like a command you type "stuck"...... simply type
Quote:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
.....and it will report what governor you selected. Same thing for the other features.
number1pete is offline   Reply With Quote
Old 03/03/2010, 06:19 PM   #19 (permalink)
Member
 
Join Date: Sep 2009
Location: Oahu
Posts: 58
Likes Received: 0
Thanks: 9
Thanked 3 Times in 3 Posts
Default

is this doable using WOSQI?
bvinci1 is offline   Reply With Quote
Old 03/03/2010, 06:44 PM   #20 (permalink)
Developer
 
Join Date: Jul 2009
Location: Katy, Texas
Posts: 584
Likes Received: 7
Thanks: 52
Thanked 287 Times in 93 Posts
Default

Quote:
Originally Posted by fortes89 View Post
noob here!... i've been reading about this and im interested in installing them, i installed smartflex from preware, but that doesnt do anything, only change ive notice is that it saves a little more battery when idle.

can anyone guide me through the steps of installing this...or which ever works best. performance and battery, both matter to me.
the short answer to your question is that smartflex and the ondemand scaling governor still seem to not get along. After a little testing i noticed that they run together and are fine 80% of the time but as soon as you load up multiple videos, and the camera and other junk it will freeze.

apparently there is a module needed to connect smartflex and ondemand that isnt present in the existing kernel.
number1pete is offline   Reply With Quote
Thanked By: Jerenyq
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0