[KERNEL][4.4.2][GPE/CM11][V500] dyn.Kernel r4 (03/21) | discontinued

Search This thread

aventu

Senior Member
Apr 17, 2011
413
786
dyn.Kernel

*Discontinued*

I want to share with you my own kernel builds. My focus is on performance improvements and energy efficiency.

Things I want to achieve:

- more battery life
- same more performance as stock
- smooth ui / games
- less heat


Highlights:

GPU idle detection:
We don't need high performance if there is nothing moving on the screen. Therefore the kernel will detect when the gpu is offline or at very low load (for litte moving objects, like battery charging animations). This feature is used for nearly all my other modifications.

Advanced Dynamic Scaling:
I have added additional values for idle (nothing moving), busy (action on the screen) and (touch)boost. Everything is explained below.

Dynamic Touchboost:
The touch boost is only active if something is rendered on the screen, that means the boost will pause as long as there is no movement, but it will resume when it is actually necessary. The boost is configured in boost_target_loads.

New Hotplug Solution:
I wrote a new hotplug driver which is completely configurable. You can change the behavior for every cpu core and gpu_idle state.

https://github.com/aventu90/android_kernel_lge_v500/blob/dyn/arch/arm/kernel/hotplug.c


All interactive and hotplug values explained (build r4+):

Many values are grouped into boost, busy and idle.

boost: A short period of time while or after touching the screen.
busy: The gpu has work to do, nearly always active when something is moving on the screen.
idle: The opposite from busy. A good time to save energy with conservative values.


Interactive governor:

I have added boost, busy and idle values to get the best performance / battery life in every situation.

Read this to understand what the new interactive governor values do: https://android.googlesource.com/kernel/common/+/android-3.4^/Documentation/cpu-freq/governors.txt


Hotplug driver:

You have different values for every gpu_idle and online-cpus state. So your phone will scale differently when playing games, doing nothing or just swiping on the screen. Here is an example:

pm_busy_up_threshold -> 55 60 65 100

1 CPU cores online: 55% up threshold
2 CPU cores online: 60% up threshold
3 CPU cores online: 65% up threshold
4 CPU cores online: 100% up threshold, because we can't get more

All values explained:

up_threshold: If the cpu load gets higher than x%, the hotplug driver will start counting up to max_up_counter
down_threshold: If the cpu load gets lower than x%, the hotplug driver will start counting up to max_down_counter
max_up_counter/max_down_counter: Every sample_time_ms the hotplug driver can count +1, -1 or nothing, when the max_ value is reached, 1 core can go on- or offline. Both counters will be reset when a core goes on- or offline.
sample_time_ms: It will take this long until the driver will check again all the things, mentioned above.

So the minimum time until a cpu core goes on or offline is: sample_time_ms * max_counter. For example:

busy_max_down_counter[3 cores online] * busy_sample_time_ms => 100 * 30ms = 3000ms = 3 seconds
You must set 4 values or 1 for sample_time_ms.


Configure the kernel (optional, build r4+):

If you want to use custom values, this is the best way for now:

1. Download the kernel_config.zip and extract it
2. Put the file somewhere on your sdcard
3. Install and open Script Manager
4. Click the file and select "Su" and "boot" (values will be automatically set at boot)
5. Click "start" and all values will be set

You can use an app like Kernel Tuner for undervolting.


Installation:
- make a nandroid backup first (boot)
- flash .zip via custom recovery (CWM/TRWP)
- flash SuperSU

Button combo for recovery:
http://www.youtube.com/watch?v=uo3YfszOPsQ


Github:
https://github.com/aventu90/android_kernel_lge_v500/commits/dyn


MD5

4cbae4bf1f6d39db020a131284d1c7a3 dyn.Kernel-r1-0110.zip
f63e212848f018a4d5615c997bed3757 dyn.Kernel-r2-0118.zip
a32828474a31dc2ae3f7885bae7caae3 dyn.Kernel-r2-0120-CM.zip
588af2b55f05f71d84ccb9bd845fd29d dyn.Kernel-r3-0204.zip
0ba565860bad16bb8ecfb94f28dad902 dyn.Kernel-r3-0204-CM.zip
511e888d74d24caa2328685c287c4738 dyn.Kernel-r4-0318.zip
247f49ef0e7d9474f500670cb9daa859 dyn.Kernel-r4-0321-CM.zip


Big thx to:
rmcc
djrbliss
Mahdi786
FranciscoFranco
Faux123


Hit thanks if you like it. ;)
You can also buy me a coffee. :)

I'm testing all my builds and use them daily, but I am not responsible for any kind of damage on your device.


Which kernel should I choose?

There are V500 KitKat roms which work with G Pad 8.3 Google Play Edition stock code (GPE) or with code from Code Aurora Forum (CAF).

"CM" build for:
- CM11
- Mahdi-Rom 01/17 or later
- other CM/CAF based roms

build without suffix:
- Mahdi-Rom before 01/17
- AOKP
- PA
- SlimKat
- CMB
- other stock GPE based KitKat roms

This list could change quickly, please let me know.


Not made for V510 (GPE)!

(build r4+) clear your kernel app settings, compare them with the values from the 02kernel_config script
 

Attachments

  • dyn.Kernel-r3-0204.zip
    7.4 MB · Views: 238
  • dyn.Kernel-r3-0204-CM.zip
    7.4 MB · Views: 871
  • dyn.Kernel-r4-0318.zip
    7.4 MB · Views: 207
  • dyn.Kernel-r4-0321-CM.zip
    7.5 MB · Views: 551
  • v500-r4-kernel_config-0324.zip
    706 bytes · Views: 243
Last edited:

aventu

Senior Member
Apr 17, 2011
413
786
Changelog:

Code:
r4:
- hotplug driver: another big update, all values are now configurable
- smartcover support
- updates for CAF build
- (03/21) Cyanogenmod ramdisk update

r3:
- major cpu interactive governor update
- - newest version from CAF
- - added a lot of dynamic values
- hotplug updates
- touchboost updates
- rewritten gpu interactive governor

r2:
- cherry-picks from Cyanogenmod/Code Aurora
- - 100% cpu idle bug should be fixed
- - great improvements in idle/sleep time
- - faster charging through bugfix
- hotplug: lower threshold for 4th core
- touchboost: gpu_idle stays false now for at least 100ms

r1:
- undervolting added
- new hotplug solution
- modified interactive governor is default
- franco's interactive gpu governor
- gpu idle detection
- franco's generic touchboost driver
- set readahead to 512kb
- other things (github)
 
Last edited:

zahir32

Senior Member
Jan 17, 2011
152
34
Thank You

I could, yes. But there must be enough demand. I personally don't like manufacturer roms, they are often antiquated and overloaded, so it's up to the community.

Thank you for branching out in this direction. I'm keen to try it but am currently on Malladus 4.2.2 because it's the only custom rom that works with XBMC.

Would your kernel on Mahdi change that?
 

Canadoc

Senior Member
Nov 29, 2010
1,828
133
Samsung Galaxy S23 Ultra
Exciting to see new kernel. Does this have the possibility of modifying the gamma or color? Also is this for only K it kat rooms or stock too

Sent from my SM-N900W8 using Tapatalk
 
dyn.Kernel

I want to share with you my own kernel builds. My focus is on performance improvements and energy efficiency.

Things I want to achieve:

- more battery life
- same more performance as stock
- smooth ui / games
- less heat


Highlights:

GPU idle detection:
We don't need high performance if there is nothing moving on the screen. Therefore the kernel will detect when the gpu is offline or at very low load (for litte moving objects, like battery charging animations). This feature is used for nearly all my other modifications.

Advanced Dynamic Scaling:
The interactive governor will now use different values for up_threshold, timer_rate and min_sample_time for every cpu_core and gpu_idle state. If the gpu is busy, the governor will use values for more performance and if it is idle, it will use conservative settings.

The current values, feel free to suggest other.
Code:
/* up_threshold, timer_rate, min_sample_time */
static unsigned int interactive_val[GPU_STATE][ACTIVE_CORES][TUNABLES] =
{{
/* gpu idle */
{100, 40000, 10000},
{100, 40000, 20000},
{100, 40000, 30000},
{100, 40000, 40000} 
},{
/* gpu busy */
{90, 20000, 40000},
{90, 20000, 40000},
{95, 20000, 60000},
{95, 20000, 80000} 
}};

Dynamic Touchboost:
The touch boost is only active if something is rendered on the screen, that means the boost will pause as long as there is no movement, but it will resume when it is actually necessary. It will double the actual cpu load and calculate the frequency, the maximum is input_boost_freq. This aggressive calculation offers a smooth ui, but it can also save battery, because you will often don't need input_boost_freq when the screen is touched.

New Hotplug Solution:
The load is calculated with the average of all active cores to get the performance we actually need. Most of the time two cpu cores are online to guarantee enough performance for ui interactions. After some time and not touching the screen, only 1 core will stay online to save a bit more battery.
It will use different up and down thresholds for each gpu_idle and cpu core state.
Code:
/* down threshold, up threshold */
static unsigned int hotplug_val[GPU_STATE][ACTIVE_CORES][TUNABLES] =
{{	
	/* gpu idle */
	{0, 70},
	{40, 80},
	{50, 90},
	{60, 100} 
	},{
	/* gpu busy */
	{0, 60},
	{30, 60},
	{30, 70},
	{40, 100} 
}};

https://github.com/reborn90/android_kernel_lge_v500/blob/dyn/arch/arm/kernel/hotplug.c


Recommended settings (default):

Interactive governor:
dynamic_scaling: true (strongly recommended)
input_boost_freq: 1350MHz
input_boost_freq_duration: 1500ms

Interactive gpu governor:
up_threshold: 60
down_threshold: 25
sample_time_ms: 60

You can use an app like Kernel Tuner for undervolting.


Installation:
- make a nandroid backup first (boot)
- flash .zip via custom recovery (CWM/TRWP)


Github:
https://github.com/reborn90/android_kernel_lge_v500/commits/dyn


MD5

4cbae4bf1f6d39db020a131284d1c7a3 dyn.Kernel-r1-0110.zip

Big thx to:
FranciscoFranco
Faux123
djrbliss
Mahdi786


Hit thanks if you like it. ;)
You can also buy me a coffee. :)

I'm testing all my builds and use them daily, but I am not responsible for any kind of damage on your device.


The Kernel should work with (need confirmation):
- AOKP
- PA
- SlimKat
- CMB
- other stock based KitKat roms

It does not work with:
- CM11

Not made for V510 (GPE)!

Recommended ROM: Mahdi-Rom

can u make a kernel for stock rom? thanks for this btw :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 40
    dyn.Kernel

    *Discontinued*

    I want to share with you my own kernel builds. My focus is on performance improvements and energy efficiency.

    Things I want to achieve:

    - more battery life
    - same more performance as stock
    - smooth ui / games
    - less heat


    Highlights:

    GPU idle detection:
    We don't need high performance if there is nothing moving on the screen. Therefore the kernel will detect when the gpu is offline or at very low load (for litte moving objects, like battery charging animations). This feature is used for nearly all my other modifications.

    Advanced Dynamic Scaling:
    I have added additional values for idle (nothing moving), busy (action on the screen) and (touch)boost. Everything is explained below.

    Dynamic Touchboost:
    The touch boost is only active if something is rendered on the screen, that means the boost will pause as long as there is no movement, but it will resume when it is actually necessary. The boost is configured in boost_target_loads.

    New Hotplug Solution:
    I wrote a new hotplug driver which is completely configurable. You can change the behavior for every cpu core and gpu_idle state.

    https://github.com/aventu90/android_kernel_lge_v500/blob/dyn/arch/arm/kernel/hotplug.c


    All interactive and hotplug values explained (build r4+):

    Many values are grouped into boost, busy and idle.

    boost: A short period of time while or after touching the screen.
    busy: The gpu has work to do, nearly always active when something is moving on the screen.
    idle: The opposite from busy. A good time to save energy with conservative values.


    Interactive governor:

    I have added boost, busy and idle values to get the best performance / battery life in every situation.

    Read this to understand what the new interactive governor values do: https://android.googlesource.com/kernel/common/+/android-3.4^/Documentation/cpu-freq/governors.txt


    Hotplug driver:

    You have different values for every gpu_idle and online-cpus state. So your phone will scale differently when playing games, doing nothing or just swiping on the screen. Here is an example:

    pm_busy_up_threshold -> 55 60 65 100

    1 CPU cores online: 55% up threshold
    2 CPU cores online: 60% up threshold
    3 CPU cores online: 65% up threshold
    4 CPU cores online: 100% up threshold, because we can't get more

    All values explained:

    up_threshold: If the cpu load gets higher than x%, the hotplug driver will start counting up to max_up_counter
    down_threshold: If the cpu load gets lower than x%, the hotplug driver will start counting up to max_down_counter
    max_up_counter/max_down_counter: Every sample_time_ms the hotplug driver can count +1, -1 or nothing, when the max_ value is reached, 1 core can go on- or offline. Both counters will be reset when a core goes on- or offline.
    sample_time_ms: It will take this long until the driver will check again all the things, mentioned above.

    So the minimum time until a cpu core goes on or offline is: sample_time_ms * max_counter. For example:

    busy_max_down_counter[3 cores online] * busy_sample_time_ms => 100 * 30ms = 3000ms = 3 seconds
    You must set 4 values or 1 for sample_time_ms.


    Configure the kernel (optional, build r4+):

    If you want to use custom values, this is the best way for now:

    1. Download the kernel_config.zip and extract it
    2. Put the file somewhere on your sdcard
    3. Install and open Script Manager
    4. Click the file and select "Su" and "boot" (values will be automatically set at boot)
    5. Click "start" and all values will be set

    You can use an app like Kernel Tuner for undervolting.


    Installation:
    - make a nandroid backup first (boot)
    - flash .zip via custom recovery (CWM/TRWP)
    - flash SuperSU

    Button combo for recovery:
    http://www.youtube.com/watch?v=uo3YfszOPsQ


    Github:
    https://github.com/aventu90/android_kernel_lge_v500/commits/dyn


    MD5

    4cbae4bf1f6d39db020a131284d1c7a3 dyn.Kernel-r1-0110.zip
    f63e212848f018a4d5615c997bed3757 dyn.Kernel-r2-0118.zip
    a32828474a31dc2ae3f7885bae7caae3 dyn.Kernel-r2-0120-CM.zip
    588af2b55f05f71d84ccb9bd845fd29d dyn.Kernel-r3-0204.zip
    0ba565860bad16bb8ecfb94f28dad902 dyn.Kernel-r3-0204-CM.zip
    511e888d74d24caa2328685c287c4738 dyn.Kernel-r4-0318.zip
    247f49ef0e7d9474f500670cb9daa859 dyn.Kernel-r4-0321-CM.zip


    Big thx to:
    rmcc
    djrbliss
    Mahdi786
    FranciscoFranco
    Faux123


    Hit thanks if you like it. ;)
    You can also buy me a coffee. :)

    I'm testing all my builds and use them daily, but I am not responsible for any kind of damage on your device.


    Which kernel should I choose?

    There are V500 KitKat roms which work with G Pad 8.3 Google Play Edition stock code (GPE) or with code from Code Aurora Forum (CAF).

    "CM" build for:
    - CM11
    - Mahdi-Rom 01/17 or later
    - other CM/CAF based roms

    build without suffix:
    - Mahdi-Rom before 01/17
    - AOKP
    - PA
    - SlimKat
    - CMB
    - other stock GPE based KitKat roms

    This list could change quickly, please let me know.


    Not made for V510 (GPE)!

    (build r4+) clear your kernel app settings, compare them with the values from the 02kernel_config script
    13
    Here we go:

    r4:
    - hotplug driver: another big update, all values are now configurable
    - smartcover support
    - updates for CAF build

    xda uploads are not working atm, stay tuned

    edit: alternative download added
    12
    So the thing is..

    I have a very abrupt announcement for you. I will discontinue publishing my kernels on xda because of a simple reason: I don't have enough time any more. :(
    The constant forum participation, making (kinda) stable builds and testing became too much extra work for me. In addition to that I am starting my first bigger Java/Android project. So I must make this decision to have enough time for my hobbys and college.

    I have a feeling that I will come back with something different from userland :)

    Thank you!
    12
    This is how the battery life should be, now CM compatibility. The idle/sleep bugfixes are from Cyanogenmod and Code Aurora, so it's only fair if I make my kernel compatible. :)

    KuFeGyz.png




    5IrBb3v.png




    R5dOW3z.png



    edit: Mahdi-Rom 01/17+ and Cyanogenmod 11 are now compatible. But now I have to learn for my exams..
    11
    Changelog:

    Code:
    r4:
    - hotplug driver: another big update, all values are now configurable
    - smartcover support
    - updates for CAF build
    - (03/21) Cyanogenmod ramdisk update
    
    r3:
    - major cpu interactive governor update
    - - newest version from CAF
    - - added a lot of dynamic values
    - hotplug updates
    - touchboost updates
    - rewritten gpu interactive governor
    
    r2:
    - cherry-picks from Cyanogenmod/Code Aurora
    - - 100% cpu idle bug should be fixed
    - - great improvements in idle/sleep time
    - - faster charging through bugfix
    - hotplug: lower threshold for 4th core
    - touchboost: gpu_idle stays false now for at least 100ms
    
    r1:
    - undervolting added
    - new hotplug solution
    - modified interactive governor is default
    - franco's interactive gpu governor
    - gpu idle detection
    - franco's generic touchboost driver
    - set readahead to 512kb
    - other things (github)