[Droid Incredible Android Development] tiny4579:
Frequently Asked Questions

Some key differences between smartass and smartassv2 so users can decide which they prefer and learn a bit more about the differences:

Smartass

1. Screen off profile built in maxed at 384mhz.

2. Wakeup frequency is 998mhz.

3. Min screen on is 245mhz.

4. Improved by Chad to run better on our devices.

5. Purely load based, no ideal value.

Smartassv2

1. This is the same exact governor in Erasmux's Nexus One kernel (github.com/erasmux/n1-kernel)

2. Ideal wake frequency is 768 (also default that can be changed).

3. Screen on min is actually 128mhz).

4. No screen off profile.

5. Ideal sleep frequency 245mhz.

6. Improved upon from erasmux's version, not Chad's.

Basically the smartassv2 ideal wake frequency allows the phone to favor a certain speed to attempt to save battery life. It can still go above ideal wake and below ideal sleep so there's no caps on max and min while awake or sleep.

Some tips/info on various governors:

Smartass/smartassv2/interactive:

Use 128 min so the governor can scale as it needs to. Max speed I'd recommend at least 768Mhz.

Ondemand:

Try 128 min and if it lags use 245 min. Max speed I'd recommend at least 768Mhz.

Performance:

Only recommended for benchmarks but speed will always run at max.

InteractiveX:

Same as interactive except it has an auto screen off set to the min. Ideal with 245 min in setcpu but try 128 for battery life but it you have wake lag then set to 245.

Intellidemand:

Based on ondemand with a built in screen off. Any speed settings should be fine.

Interactive:

Some new features with this one. Starting with 9/21/12 release I am using the interactive kernel from Google which features a new kernel option called input_boost.

It is off by default but can be enabled by writing a 1 to /sys/devices/system/cpu/cpufreq/interactive/input_boost. Also there is another parameter for interactive called hispeed_freq in the same location. The hispeed_freq is where the governor jumps to first. Hispeed_freq by default in 10/3/12 is 614400 to help save battery. In the older interactive governor there was a maxspeed freq which meant the governor was a bit jumpier to the max speed. This should be a good blend of performance and battery.

Lagfree:

Based on ondemand but with a softer CPU scaling which should help with battery life. It also seems to be very responsive (starting with 2/26)

Lazy:

Based on ondemand as well (Ezekeel is the developer of this governor). I cannot explain this too well but its apparent behavior seems to be to switch between low and high frequencies pretty evenly.

A note from Ezekeel on this governor:

"Thus I took the ondemand governor and implemented an additional parameter 'min_timeinstate' defining a minimum time the CPU will stay in a certain frequency state before it will be allowed to switch frequencies again. This way one can have a fine grained polling by setting the sampling_rate to a low value without running into problems with these fast frequency changes.

I did some extensive testing with a sampling_rate of 10000, min_timeinstate of 40000 and up_threshold of 90 and FLAC, mp3 and video playback all seem to work flawlessly. So it seems the root of the problem was indeed that the CPU does not handle fast frequency changes well.

I tested several apps and games and so far I have not found anything that this governor cannot handle. Thus I dare to say that it seems to be the superior choice over ondemand."

ZRAM, what is it and how to I add it? (starting officially with 12/31/11)

If you are familiar with swap space in linux or virtual memory in Windows it is a similar concept. Except instead of using the hard drive as swap space it compresses swap space in RAM for faster access times than conventional swap. This will also wear out our storage memory less than typical swapping.

Enable ZRAM is simple thanks to a script built by imoseyon which is provided in the kernel zip file. To enable, use adb shell or download a terminal app and run zram enable. This will persist across reboots (if init.d is setup in your ROM) so if you don't want it anymore run zram disable and it will remove the bootscript and deactivate it.

You need to have root privileges to enable/disable zram. Run the su command in terminal emulator to request root.