SetCPU on Sapphire

pdroid

Silver Member
Joined
Mar 4, 2010
Messages
2,252
Reaction score
7
Location
Philly
Thanks for the response--it is good to know! Do many people find an app like SetCPU helpful for Sapphire? Or does the rom manage power use better on its own?

Elwood

SetCPU is helpful for more fined-grained control of your phone through the use of profiles - you can set what frequencies to use while charging, while the screen is off, and when temperature and/or battery level thresholds are exceeded. It also can provide temperature information (it reads the OMAP and battery temp sensors if kernel supports) and some benchmarks on performance.

That said, if you don't particularly need any of those features, you don't need the app (and some people don't want to fork over a couple bucks).
 

droib

New Member
Joined
Jul 26, 2010
Messages
18
Reaction score
0
Location
Oakland
Changing default clock rates, no SetCPU needed

Just an FYI, if you don't want the 1000/125 default clock rates and you don't want SetCPU, you can change the file that controls the rates at boot time.

Step by step:
1. Enter whatever terminal editor you want
2. type: cd /sdcard
3. type: cp /system/etc/init.d/01_cpufreq /sdcard (copies the file to sdcard)
4. type: ls (make sure you have it)

5. Now open the file 01_cpufreq in your favorite text editor (on your phone or on your computer in Wordpad or whatever Mac uses).

6. For this example I'm going to change the max to be 600MHz and the min to be 400MHz. Make sure you specify rates corresponding to available slots for the kernel you're using. This text window appears to cause line wrapping, but the following "lines" should each be on one line. Change the lines:

busybox cat "${CPUFREQ}/cpuinfo_max_freq" > "${CPUFREQ}/scaling_max_freq"

and

busybox cat "${CPUFREQ}/cpuinfo_min_freq" > "${CPUFREQ}/scaling_min_freq"

to

busybox echo "600000" > "${CPUFREQ}/scaling_max_freq"

and

busybox echo "400000" > "${CPUFREQ}/scaling_min_freq"

7. Save the file and put it back on your sdcard.
8. Open that terminal editor again.
9. type: su
10. type: sysrw
11. type: cd /system/etc/init.d
12. type: ls -l (that's l like larry, note the permissions)
13. type: cp 01_cpufreq 01_cpufreq.bak (in case you screw it up)
14. type: cp /sdcard/01_cpufreq . (meaning copy it here)
15. type: chmod 555 01_cpufreq (sets the proper permissions)
16. type: ls -l (make sure your permissions are correct)
The line displaying the file should now start with -r-xr-xr-x.

17. type: sync
18. type: sysro
19. type: exit
20. Reboot your phone and have fun.
 

velocity92c

Member
Joined
Mar 9, 2010
Messages
322
Reaction score
0
To anyone who doesn't want to spend a couple bucks on setcpu, the dev offers it free over at xdadevelopers. Just google it. The profiles are a life saver for me. As my battery drains I slowly clock the cpu speed lower, and clock it very low while the screen is off also. Saves a TON of battery.
 

droib

New Member
Joined
Jul 26, 2010
Messages
18
Reaction score
0
Location
Oakland
To anyone who doesn't want to spend a couple bucks on setcpu, the dev offers it free over at xdadevelopers. Just google it. The profiles are a life saver for me. As my battery drains I slowly clock the cpu speed lower, and clock it very low while the screen is off also. Saves a TON of battery.

I posted the above guide because there have to be some people like me who don't need to fine-tune the rates so much. Don't get me wrong I download the donate versions of every app I actually use, I just believe that if something can be controlled by the OS then that is better than running an app. I don't overclock (stability and phone lifespan are paramount to me and 600MHz kernels are hard to come by these days) so I don't need complicated profiles. I've never found that running a very low clock speed while sleeping saves all that much battery, and actually using it at anything below 600MHz can be annoying. I love these roms because of great features and because speedups make overclocking less tempting.
 

pdroid

Silver Member
Joined
Mar 4, 2010
Messages
2,252
Reaction score
7
Location
Philly
To anyone who doesn't want to spend a couple bucks on setcpu, the dev offers it free over at xdadevelopers. Just google it. The profiles are a life saver for me. As my battery drains I slowly clock the cpu speed lower, and clock it very low while the screen is off also. Saves a TON of battery.

I posted the above guide because there have to be some people like me who don't need to fine-tune the rates so much. Don't get me wrong I download the donate versions of every app I actually use, I just believe that if something can be controlled by the OS then that is better than running an app. I don't overclock (stability and phone lifespan are paramount to me and 600MHz kernels are hard to come by these days) so I don't need complicated profiles. I've never found that running a very low clock speed while sleeping saves all that much battery, and actually using it at anything below 600MHz can be annoying. I love these roms because of great features and because speedups make overclocking less tempting.

In the next release (and the current test build that's out), cvpcs has basically incorporated this functionality into settings (setting min/max clock freqs and governor).
 

droib

New Member
Joined
Jul 26, 2010
Messages
18
Reaction score
0
Location
Oakland
To anyone who doesn't want to spend a couple bucks on setcpu, the dev offers it free over at xdadevelopers. Just google it. The profiles are a life saver for me. As my battery drains I slowly clock the cpu speed lower, and clock it very low while the screen is off also. Saves a TON of battery.

I posted the above guide because there have to be some people like me who don't need to fine-tune the rates so much. Don't get me wrong I download the donate versions of every app I actually use, I just believe that if something can be controlled by the OS then that is better than running an app. I don't overclock (stability and phone lifespan are paramount to me and 600MHz kernels are hard to come by these days) so I don't need complicated profiles. I've never found that running a very low clock speed while sleeping saves all that much battery, and actually using it at anything below 600MHz can be annoying. I love these roms because of great features and because speedups make overclocking less tempting.

In the next release (and the current test build that's out), cvpcs has basically incorporated this functionality into settings (setting min/max clock freqs and governor).

Thanks, that is great news! I recently switched from BB (also a fine ROM but obviously not as adjustable) and I've got to say I like this one more every day. It just took me a while to find that 01_cpufreq file, until I took the time to think how a logical linux installation would go about it.
 
Top