[ZenFone 2 Android Development] xgneilx:
Hi everyone,

I have experimented on some commands that i then integrated to my tasker that might help me conserve battery life.

btw, my inspiration to doing this is http://xdaforums.com/showpost.php?p=61994046&postcount=350

In the link above, a user named aziz07 (btw, thanks) was suggesting an app that will put some cores of our ZF2 to offline when screen is OFF. however, the app isn't free, well, at least the updated version of the app. So I've decided to emulate this using tasker, see below...

PROFILE:

Name: CPU Sleep

Trigger: STATE > Display State Off

Task: named CPU OFF

1. Run shell command echo 0 > /sys/devices/system/cpu/cpu3/online

2. Run shell command echo 0 > /sys/devices/system/cpu/cpu2/online

3. Run shell command echo 0 > /sys/devices/system/cpu/cpu1/online

Exit Task: named CPU ON

1. Run shell command echo 1 > /sys/devices/system/cpu/cpu3/online

2. Run shell command echo 1 > /sys/devices/system/cpu/cpu2/online

3. Run shell command echo 1 > /sys/devices/system/cpu/cpu1/online

You need ROOT to achieve this.

Anyway, i've been on this config for the past 3 hours and so far it is working, as seen in 3C toolbox

UPDATE:

1. Observations

1.1. Shutting the 3 cores causes lag during the first few seconds on screen on, so launching apps in gestures sure is laggy. i.e. camera.

1.2. Downloading while screen off(3 cores offline) actually slows down the download process by more than five times the usual speed when all cores are online.

1.3.Once I've turned on the cores again, the cores speed are no longer underclocked(that is if you set it to boot in underclocked mode), hence i needed to issue more commands to revert it to my underclocked mode.

2. Current setup

1.1. This doesn't cause any lag

1.2. download speed while screen on or screen off are the same

1.3. it will reset all cores to my desired underclocked setup.

NOTE: I am using 2.3Ghz with 64GB model.

PROFILE:

Name: On Boot ****(This will set max speed for all cores to 1.5Ghz)

Trigger: EVENT > Device Boot

Task: named Cpu Scalling

1. echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

2. echo 1500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

3. echo interactive > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

4. echo 1500000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

5. echo interactive > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

6. echo 1500000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq

7. echo interactive > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

8. echo 1500000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq

Name: CPU Sleep

Trigger: STATE > Display State Off

Task: named CPU OFF ****(This will set max speed of remaining cores to 833MHz)

1. Run shell command echo 0 > /sys/devices/system/cpu/cpu3/online

2. Run shell command echo 0 > /sys/devices/system/cpu/cpu2/online

3. echo 833000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

4. echo 833000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

Exit Task: named CPU ON ****(This will set max speed for all cores to 1.5Ghz)

1. Run shell command echo 1 > /sys/devices/system/cpu/cpu3/online

2. Run shell command echo 1 > /sys/devices/system/cpu/cpu2/online

3. echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

4. echo 1500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

5. echo interactive > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

6. echo 1500000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

7. echo interactive > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

8. echo 1500000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq

9. echo interactive > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

10. echo 1500000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq