[MOD][Updated 6.2.12]Dual Core Mod v2.1 - Screen Profiles, Auto Tweak, and more!
Hello everybody, I was asked to bring this mod over from the EVO 4G LTE section and since the One X and One S use the same file I am modifying, both devices will get it This is also untested on the One X and One S, so please let me know if you encounter any issues, but it should work! This will ONLY work on phones with the Qualcomm S4 chipset, not the Tegra chipset!
This is a mod that should give you better performance by forcing cpu1 (second core) to run more, depending on the zip you flash below. The system will handle how it scales and the dcmhelper script will modify some parameters if you choose that zip. Some people on the EVO 3D felt that it gave them better battery life, some didn't. Some thought the performance was much better, some didn't. This is just something else for you guys to play with and see what works best for you Here are the details:
Quote:
=============== How was this done? ===============
It was pretty easy, instead of modifying the kernel itself, I just modified /system/etc/init.qcom.post_boot.sh. It already sets extra parameters for the CPU and system shortly after boot. Here are the lines that I added:
What this does is it tells cpu1 to come online and then changes the permissions so user read-only so that it can't be overridden. This will be applied on every boot.
You can also verify this is working by any number of apps, but I find SystemPanel to be the best. They have a free lite version. Just download and tap on the top right where the CPU info is. You will the the CPUs changing, when it goes grey it's offline (which you won't see when using the Dual Core Mod).
aLogcat will also show you everything DCM is doing. Just apply a filter in aLogcat called DCM and it will tell you in detail what is going on.
If you want a little bit less info or want to use adb, just type su and then dcmlog and you will see what the 2nd core is doing exactly. This is updated every 1/4 second for extremely accurate results.
Quote:
=============== Requirements ===============
Custom recovery
Root access (to write to /system)
Quote:
=============== How to Flash ===============
Download the mod below and place on your internal_sdcard or sdcard (doesn't matter, just remember where you put it!)
Go into Settings > Power > Fast Boot and uncheck that.
Turn the phone off. Once off, press and hold the Volume Down + Power Button until you reach the white bootloader screen
Choose "RECOVERY" (volume down and up to move, power to select)
Choose "Install" and locate the mod wherever you put it. NOTE: If you don't see it, make sure that either internal_sdcard or sdcard is mounted. This can be done via the "Mount" button at the main menu of TWRP. Be sure that either internal_sdcard or sdcard is checked!
Wait until the install is finished and then tap "Reboot to System"
Quote:
=============== Dual Core Mod v2.1 (flash over any existing version) ===============
Updated dcmhelper
Fixed issues with cpu1 turning off when screen on
Fixed issues with cpu1 turning on when screen off
Added double check for cpu1 off when screen off
Added logging to logcat
Updated init.qcomm.post_boot.sh
Set perms of 444 on hotplug file, regardless of dcmhelper present or not
Other
Added /system/bin/dcmlog (type su then dcmlog from terminal or adb) - Tells you current cpu1 status [0 = off, 1 = on]
=============== Dual Core Mod v2 (flash over v1) ===============
MANY new options!
Added "Screen Profiles" and "Auto Tweak" script option (all located in one configurable file - /system/bin/dcmhelper) - see 2nd post for more info
Added "Memory Optimization" option - see 2nd post for more info
Support AT&T HTC One X
Support T-Mobile One S
"All-in-One" .zips - all devices supported via 1 .zip file (thanks to a very smart updater-script I wrote )
=============== Dual Core Mod v1 ===============
Initial release
Quote:
=============== Explanation of Mods=============== All DCMs have memory optimizations!
Dual Core Mod - Full time cpu1 on
Dual Core Mod Plus - cpu1 on when screen on, cpu1 off when screen off
Dual Core Mod Ultimate - Same as Plus but governor is tweaked for more performance when screen on, more battery life when screen off.
=============== How are all supported phones in 1 zip per file? ===============
I wrote a custom updater-script that will identify your device and automatically give you the right file needed. Just like magic
Quote:
=============== How can I monitor the 2nd core? ===============
You can also verify this is working by any number of apps, but I find SystemPanel to be the best. They have a free lite version. Just download and tap on the top right where the CPU info is. You will the the CPUs changing, when it goes grey it's offline (which you won't see when using the Dual Core Mod).
aLogcat will also show you everything DCM is doing. Just apply a filter in aLogcat called DCM and it will tell you in detail what is going on.
If you want a little bit less info or want to use adb, just type su and then dcmlog and you will see what the 2nd core is doing exactly. This is updated every 1/4 second for extremely accurate results.
Quote:
=============== What are the "Memory Optimizations?" ===============
The optimizations I made are the same that I have made in viperROM. They are as follows:
This will allow better multitasking and should eliminate any issues with apps being killed off very easily.
Quote:
=============== What are the "Screen Profiles?" ===============
The screen profiles are part of a custom script, located in /system/bin/dcmhelper. Once flashed, this .zip runs in the background to monitor screen state (uses hardly any power). When you choose a .zip with this in it, the phone won't just leave the second core always running - it will turn it off when the screen is off and on when the screen is on. This is done via this code here:
Quote:
while : ; do
awake=`cat /sys/power/wait_for_fb_wake`
if [ $awake = "awake" ]; then
echo 1 > /sys/devices/system/cpu/cpu1/online
awake=
fi
sleep=`cat /sys/power/wait_for_fb_wake`
if [ $sleep= "sleeping" ]; then
echo 0 > /sys/devices/system/cpu/cpu1/online
sleep=
fi
Pretty simple and straightforward
Quote:
=============== What is the "Auto Tweaking Script?" ===============
The auto tweaking script is the second part of a /system/bin/dcmhelper. This part of the script will set certain governor settings based on the screen being off or on. In the viperROM version, the screen on settings are the same as in the ROM. In the other versions, the screen on settings are more set for performance. I intentionally kept the same settings in the viperROM version to make sure you get as close to the same battery life as unmodified viperROM. Here is a code snipit (from the non-viperROM version) that shows what the settings are:
Long story short, when awake, it will check if the CPU needs to increase speed faster and in bigger steps. When asleep, it will wait longer before polling the CPU to scale up and it will take a more gradual approach to scaling up. However, you shouldn't experience any lockscreen lag.
Quote:
=============== Long Term Goals for Dual Core Mod ===============
Config file and script for users to set their own settings
Profiles for battery
Set max freq when screen off (will affect virtuous_oc daemon in viperROM, still working on that)
I just downloaded the full set of mod for the device and just flashed it. Will see what happens!
If you're just looking for a "set it and forget it", I would download Dual Core Mod v2 w/ Screen Profiles AND Auto Tweaking Script AND Memory Optimizations, personally. This should give you the best performance, battery life, and smoothness - especially since it handles the memory issue!
Great, thanks! You can use SystemPanel to check for the second core running when screen on. If you want to manually check if the core is on or off via adb (since you can manipulate the screen and still get the info you need), do this:
Code:
adb shell
cat /sys/devices/system/cpu/cpu1/online
This will read 0 if the 2nd core is off, 1 if it is on
Will check this out soon, thanks for this. Anyone who already is toying with it, does it effect the multitasking at all. By this I mainly mean does Pandora, slacker, 8tracks etc skill skip tracks.
Maybe this doesn't even do this but that's what I thought memory management might help when I read it. Tia .
Recovering iPad users may still remember the multitasking function where you can swipe left or right to … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?