07/11/2009, 12:04 PM
|
|
|
Member
![]() Join Date: Jan 2005
Location: Bay Area, CA
Posts: 950
Likes: 4
Thanks: 89
Thanked 489 Times in 94 Posts
|
I think I may have a stable and effective solution to allow CPU frequency scaling. I am looking for volunteers to test my solution. A zip file with a binary and start script for the Pre is attached to this message.
On Linux, there have been historically two ways to do automatic CPU frequency scaling. One is to use an in-kernel governor like "ondemand" and another is to use a userspace application. Clearly, the ondemand governor is causing stability problems for many people and an alternative solution is needed. Another problem is the issue of video artifacts when CPU scaling is active. My solution is to use a carefully tuned CPU scaling userspace application and to tell it to only scale the CPU when the screen is off. The rationale is that when the screen is on you are actively using the Pre and probably want speed and responsiveness. When the screen is off the Pre is idle and you probably do not care if the Pre is clocked down to a slow speed. Also, because when the screen is on the Pre is not scaling, there are no video artifacts. When the Pre is idle it is clocked down to a slow speed and therefore should theoretically use less power and improve battery life. This program should be safe and bug free. It does not do anything the CPU and chipset were not designed to do. The program has been in use in many Linux systems for several years and there has never been a report of any damage done to a CPU or system because of it. Also, I and many others have been using it on the Pre for some time now and it has proven to be very stable and reliable even when used to run the Pre at faster than standard clock speeds. However, you use this at your own risk. You may only use the program if you agree that I, this forum, and all persons except yourself are not responsible for any problems you may have. Also, be aware that while the CPU and chipset in the Pre may be designed to run at up to 600MHz that does not mean that the thermal design characteristics of the Pre can handle more than the stock 500MHz speed. If you choose to run the Pre at 550MHz or 600MHz by modifying the program's startup script the risk is yours alone. To Use: I'm borrowing quite a bit from as4life's post. Thanks! Steps in monospace bold font are commands that should be typed in at the root shell command prompt:
If you do not understand these directions please do not attempt to install this program at this time. Please wait for an easier to install version. Please do not attempt to use this program with SmartFlex at this time. One thing at a time. Please post back here with your results. Please post any battery life (or other) changes measured and your testing methodology. Some people have reported that WebOS update 1.1 seems to have negatively impacted battery life. If you have upgraded to 1.1 be sure to retest your battery life again without CPUSpeed. When enough time has passed and I am satisfied that it works as properly and as safely as possible for the Palm Pre I will then update the wiki myself. Please do not add this to the wiki for me. Thanks, Carl Last edited by clipcarl; 07/26/2009 at 02:41 AM. |
|
Thanked by
Abyssul, arsenic, caferacer, chrissurra, Elysian893, fr4nk1yn, grandebob, i700plus, imtravis, jerich007, kolba, odontastic, polpo, Runningwarrior08, stashu11, sublimexistence, tangokim, wprater
|
07/11/2009, 12:20 PM
|
|
|
|
Member
![]() Join Date: Jan 2005
Location: Bay Area, CA
Posts: 950
Likes: 4
Thanks: 89
Thanked 489 Times in 94 Posts
|
Quote:
EVERYONE: Please only comment in this thread if you can help test or add useful information! Thank you! |
|
|
|
07/11/2009, 12:29 PM
|
#5 (permalink) |
|
Member
![]() Join Date: Jun 2009
Location: Seattle
Posts: 251
Likes: 0
Thanks: 41
Thanked 16 Times in 14 Posts
|
I've been testing now.. having strange hard resets when closing the lid. It also erases everything in the wallpapers and ringtones folder. Highly doubt its because of your program, but wanted to throw it out there because its happened twice after I've installed it.
|
|
Thanked By:
clipcarl
|
07/11/2009, 12:35 PM
|
#6 (permalink) |
|
Member
![]() Join Date: Mar 2006
Posts: 479
Likes: 0
Thanks: 10
Thanked 14 Times in 12 Posts
|
I'm no wuss... installing now, I'll let you know how it goes
__________________
Just waiting for the day my Pre has contacts grouping, and a "speed dial" for text messaging
|
|
Thanked By:
clipcarl
|
07/11/2009, 12:37 PM
|
|
|
|
Member
![]() Join Date: Jan 2005
Location: Bay Area, CA
Posts: 950
Likes: 4
Thanks: 89
Thanked 489 Times in 94 Posts
|
Quote:
The resets sound a lot like the battery issue that some folks are having. Did you try stabilizing it with some paper? If your Pre is resetting your /media/internal (USB drive) partition may have gotten messed up (happened to me once way back on my first Pre). Try connecting to your computer in USB mode, copying all the files off the drive, reformatting it (make sure to use VFAT) then copy all the files back. That worked for me when I was having trouble with files disappearing. Alternatively, you could use WebOS Doctor but it'd be even more of a pain getting your info back on. |
|
|
|
07/11/2009, 12:44 PM
|
#8 (permalink) | |
|
Member
![]() Join Date: Jun 2009
Location: Seattle
Posts: 251
Likes: 0
Thanks: 41
Thanked 16 Times in 14 Posts
|
Quote:
|
|
|
|
07/11/2009, 12:44 PM
|
|
|
|
Member
![]() Join Date: Jan 2005
Location: Bay Area, CA
Posts: 950
Likes: 4
Thanks: 89
Thanked 489 Times in 94 Posts
|
Quote:
Also are you absolutely sure you completely removed any other scaling hacks you may have installed and especially SmartReflex? |
|
|
Thanked By:
tking1000
|
07/11/2009, 12:45 PM
|
#10 (permalink) |
|
Member
![]() Join Date: Mar 2006
Posts: 479
Likes: 0
Thanks: 10
Thanked 14 Times in 12 Posts
|
Also, for what its worth I bumped the cpu speed up to 600... going for broke on this one
__________________
Just waiting for the day my Pre has contacts grouping, and a "speed dial" for text messaging
|
|
|
07/11/2009, 12:47 PM
|
#11 (permalink) | |
|
Member
![]() Join Date: Jun 2009
Location: Seattle
Posts: 251
Likes: 0
Thanks: 41
Thanked 16 Times in 14 Posts
|
Quote:
|
|
|
|
07/11/2009, 01:02 PM
|
#12 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,977
Likes: 112
Thanks: 418
Thanked 1,251 Times in 710 Posts
|
It seems to be perfectly stable for me, which is more than I can say about any other method. The Music app seems to be working with absolutely no issue either with the screen off, through the speaker, A2DP, or headphones. Pandora works over headphones and speaker, but does stutter occasionally over A2DP with the screen off (and I can confirm it's because of this because as soon as I turn the screen on, it stops.) Otherwise though, it's working great.
Also, not sure if this matters, but this testing was done using a Wifi internet connection. I haven't checked to see how much battery it's conserving though, but I'm sure it'll help a ton. |
|
Thanked By:
clipcarl
|
07/11/2009, 01:35 PM
|
|
|
|
Member
![]() Join Date: Jan 2005
Location: Bay Area, CA
Posts: 950
Likes: 4
Thanks: 89
Thanked 489 Times in 94 Posts
|
Great to hear it's working well for you! Thank you for your help testing.
For Pandora please try adding " -p 50 75" to the end of the the "exec" line in the cet-cpuspeed file and see if it helps. The line should look like this (all on one line): exec /opt/sbin/cpuspeed -i 10 -M 500000 -a /sys/devices/platform/lcd.0/panel_state -A 10 -D -C -r -p 50 75 Yes, the real question on the Pre is how much power CPU scaling will save. It's not necessarily a given that it will save a huge amount. Quote:
Last edited by clipcarl; 07/11/2009 at 01:47 PM. |
|
|
|
07/11/2009, 01:52 PM
|
|
|
Member
![]() Join Date: Jan 2005
Location: Bay Area, CA
Posts: 950
Likes: 4
Thanks: 89
Thanked 489 Times in 94 Posts
|
Can anyone else confirm that Pandora stutters for them occasionally with the screen off streaming over bluetooth? If so please post here to let me know and try adding " -p 50 75" to the end of the the "exec" line in the cet-cpuspeed file and see if it helps. The line should look like this (all on one line):
exec /opt/sbin/cpuspeed -i 10 -M 500000 -a /sys/devices/platform/lcd.0/panel_state -A 10 -D -C -r -p 50 75 |
|
|
07/11/2009, 02:20 PM
|
|
|
Member
![]() Join Date: Jan 2005
Location: Bay Area, CA
Posts: 950
Likes: 4
Thanks: 89
Thanked 489 Times in 94 Posts
|
It is being dynamically scaled exactly the same as desktop processors (in fact this is the same program used to scale desktop and laptop processors in some Linux distributions). However if Pandora has fast swings in processor usage and too small buffers it could outrun the scaling algorithm and cause an audible dropout. I'm asking for feedback on this so that the algorithm can be tuned if necessary to eliminate the problem.
|
|
|
07/11/2009, 02:22 PM
|
#18 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 32
Likes: 0
Thanks: 1
Thanked 8 Times in 4 Posts
|
Been running it since yesterday and haven't had any performance or stability issues. Rarely use pandora but it seemed to work with and without the screen on. Battery doesn't seem much better or worse yet, but I was using the phone pretty heavily yesterday. I'm about to head to work now with a full battery.
So far, everything seems a lot stabler than the other methods talked about on the wiki. |
|
Thanked By:
clipcarl
|
07/11/2009, 02:29 PM
|
#20 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,977
Likes: 112
Thanks: 418
Thanked 1,251 Times in 710 Posts
|
The -p 50 75 change did help the playback issues in Pandora. However, it also seems to have mostly kept the processor from going to the 125mHz clockspeed, even when the Pre has no cards open.
600000 0 550000 771 500000 46648 250000 4207 125000 209 ... When I closed Pandora and therefore had no more cards open, the time for 500mHz was more like 30000 so it definitely is not being quite as aggressive as I'd like for when the Pre is idle. -i 2 modification instead is more aggressive in the scaling again, it spends much more time in 250mHz and 125mHz when idle, but does still seem to have the skip/ stuttering. Honestly, for my personal use anyway, when I'm using A2DP, the Pre is generally on the Touchstone anyway, so the screen is on and therefore wouldn't be an issue for me, so it works fine enough now. For those who might use A2DP headphones though, I could see it being an issue. Last edited by jhoff80; 07/11/2009 at 02:45 PM. |
|
Thanked By:
sorli
|
![]() |
| webOS Nation Forums Stable(?) CPU Frequency Scaling App Here |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|

















Linear Mode









