[LG Optimus G (International)] hasan4791:
[UPDATE]-[SHELL_CMD] MOD Stock Kernel<4.1.2>CM Stock kernel<4.4.4><ROOT Required>

We've ECO MODE option in CM StocK kernel too...But need to use script for enabling

Hi all...:):):) After long time again with some useful stuffs...:good::good:

LG has made some good features in our Stock kernel and the Most useful one is ECO Mode.

ECO Mode is a option to manage cores (dual core/Quad core mode) but we need to enable/disable it manually which is a drawback.

So I wanted to share some Useful Shell commands,using that You can actually MOD your kernel thro shell commands and can automate the Eco mode options too...:good::good:

I recommend you guyss to install AutomateIT app

and SHELL plugin too to automate some features

Before that I wanted to explain WHY we are doing this :confused::confused:

we all know LG Optimus G is a powerful mobile but we all are lagging with Battery backup..Right??:good:

After Screenoff or in idle mode GPU should down to 128mhz which is not happening. Checked with adb shell

Ondemand governor for CPU is not optimizing the core properly so we need manual intervention

SHELL CMDs: (ROOT REQUIRED)

1. Change CPU max frequency

echo "freq_value" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

eg: echo "1512000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

2. Change CPU min frequency

echo "freq_value" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

eg: echo "328000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

3. Change CPU Governor

echo "governor" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

eg: echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

4. Display Current CPU freq

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

5. Change GPU max frequency

echo "gpu_freq" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk

eg: echo "128000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk

6. Display GPU Clock frequency

cat /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk

4. Core Management (single/Dual/Quad core mode)

echo "core_count" > /sys/devices/platform/lge_kernel_driver/eco_cpu

eg: echo "2" > /sys/devices/platform/lge_kernel_driver/eco_cpu

Here you can use values of 1,2 and 4 and when changing values, I would recommend Ecomode should be enabled always by default.​

CORE Management:

Here I want to show, How to manage the core based on individual app automatically using those above commands.

I'm currently using AutomateIT Pro app with Shell plugin addon to automate some of these features.

Use this simple example and explore the app and above commands to customize the core by yourself.

High Perf apps config:

App start config:

1. Select the Trigger "Application status trigger"(Enable checkbox to trigger when app starts) and select the app here

2. Select the Action "Shell Command Action" and paste the following codes (Enable Root checkbox)

echo "1512000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo "4" > /sys/devices/platform/lge_kernel_driver/eco_cpu

echo "400000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk

3. Give it some name and save​

App close config:

1. Select the Trigger "Application status trigger"(Disable checkbox to trigger when app closes) and select the app here

2. Select the Action "Shell Command Action" and paste the following codes (Enable Root checkbox)

echo "1242000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo "2" > /sys/devices/platform/lge_kernel_driver/eco_cpu

echo "128000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk

3. Give it some name and save​

Similarly When screen off you can enable single core mode and min GPU which saves some battery juice.

Hope this one is quite helpful and will be updated when required.

Like this thread get me Thanks and 5 stars..:good::good::D:D