[HTC EVO 3D] mikeyxda:
Well guys, another 8-10 hours in the bowels of the CPU control code and I think I have the most reliable, best tweak yet including efficient dual core operation when the screen is on, and underclocked single core when the screen is off! For those following my work, this would have been "mikey4" but I decided to give it a proper name.

So this post is to introduce "awakenings" tweaks v0.1. Instead of gory details, I'll just post what this set of tweaks does in a nutshell:

Boot

On boot, both cores are activated for fast booting. Even after the main boot processes have completed and your screen shuts off, both cores remain active for 2 minutes. This helps latent Android (and installed app) processes to finish what they are doing quickly and efficiently. After a 2 minute grace period, if the screen is off, the system switches to "screen off" below.

Screen on

When the screen is on, both cores run with parameters that allow efficient operation at 384 MHZ for both cores until demand is places on the system, at which point both cores are available to clock all the way up to 1.5Ghz. With the screen on, benchmarks run as fast as all my prior tweaks: very fast because both cores are at the ready. It's also as good or better than other tweaks in the efficiency department because the CPU speed doesn't jump all over the place: it's very stable at 384Mhz for both cores yet lag free when throttle is needed and the cores are free to run up to 1.5Ghz.

Screen off

When the screen turns off, the second core is switched off and the first core runs at a 384Mhz min/756Mhz max. Obviously with only a single core running at an underclocked speed, this results in amazing battery life while the screen is off. In this screen-off state, the thresholds for up/down clocking are also "loosened" so that the single CPU that is running won't increase clock frequency as quickly.

Epilogue

In building this set of tweaks, I found a LOT of errors in other/similar tweaks! I won't point fingers as to which ones have which errors, but some of them were doing commands in the wrong order, trying to change parameters (for example, how the second core behaves) when the system has those values physically locked out, trying to run two phase governors when they are not compatible, setting values out of range, etc. I'm not saying my tweaks are perfect but they are optimized and tested to be compatible with other features in this ROM in particular! I think part of the problem with <insert-random-tweaks-here> is that there are a lot that conflict with one another.

In any case, please feel free to give awakenings v0.1 a try. Just flash from recovery as usual. If you installed other tweaks (other than mikey1, mikey2, or mikey3), you'll need to reflash the ROM first, then flash these tweaks because the others may have left (conflicting) stuff behind. Let me know what you find but for me, I've got unbelievable battery life and it runs like a beast when in use!

Edit: Oh, almost forgot. These tweaks are pretty easily customizable. If you don't like 756Mhz as the top clock speed when the screen is off, just open 99awakenings in init.d and change the value for SLEEP_FREQ at the top and you can put in whatever you like for the screen-off max frequency (or screen on for that matter). Just be sure to use a value that is valid for the Evo 3D, i.e. one of these:

384000

432000

486000

540000

594000

648000

702000

756000

810000

864000

918000

972000

1026000

1080000

1134000

1188000

1512000

Mike