[KERNEL][AOSP4.4/5.1/6.0/7.1] dkp - d2spr - 2/4/18

Search This thread

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
Welcome to decimalman's kernel playground!

As the name suggests, dkp is a hodgepodge of features and tweaks that I wanted to play with. It should get excellent battery life without feeling sluggish. It doesn't come with its own tuner app, so pick your favorite. Personally, I like Trickster MOD and Kernel Adiutor, so I go out of my way to make things work in them. Most other apps should work, too.

Features:
  • Overclocking up to 2.1 GHz, but you'll need to increase your voltages to get there (if you can get there at all)
  • Underclocking down to 54 MHz, with stability improvements
  • Undervolting compatible with most apps
  • Fast charge without unplugging first
  • Glorious animations for the notification and softkey LEDs
  • Well-integrated erandom means you don't need CrossBreeder or Seeder (recent AOSP builds use ISAAC instead)
  • freelunch and tierservative governors for optimal battery life without sacrificing responsiveness
  • Automatic mpdecision and auto-hotplug are only enabled when needed
  • Adjustable minimum voltage for stability on finicky processors
  • Optimized UKSM to free up some extra memory
  • Code optimizations for size and speed
  • Compiler optimizations (-O3, LTO, and more) because faster is better

Donors: Thanks, everyone! Your generosity is much appreciated. :good:
drpenguino, 0xScott, vmancini3 (twice! :good:), Ch4m3l30n, rompnit, Mystique, ryandubbz, techdog, ElwOOd_CbGp, ScOULaris, ZipAddict

Remember:
  • Nandroid!
  • last_kmsg and/or logcat or it didn't happen.
  • Other kernels have their own threads or forums. Discuss them there.
  • Image dumps (settings, battery life, whatever) belong inside [HIDE][/HIDE] (that's HIDE, if you're on the mobile app) tags.
  • Be silly. We're here to have fun.

Installation:
  1. Reboot to recovery. I recommend that one recovery...you know, the one that flashes zips? I forget what it's called. :p
  2. Flash dkp. Optionally, rename and flash dkp-vmin-XXX.zip (see below).
  3. Reboot.

Undervolting:
Undervolting on dkp is more complex than other kernels. Some processors get unstable at lower voltages, so (like the stock kernel) dkp keeps the processor voltage above 1150 mV by default. I refer to this limit as the minimum voltage. In order to undervolt, you'll need to lower the minimum voltage: if you use Trickster MOD or Kernel Adiutor, just disable "Override Minimum Voltage", otherwise rename dkp-vmin-XXX.zip to e.g. dkp-vmin-600.zip (which would apply a 600 mV minimum voltage) and flash it. If this causes instability (crashes, audio/video glitches, etc.), try using dkp-vmin-XXX.zip to apply a higher minimum voltage (somewhere between 950 and 1050 mV seems to work well for most people).

Downloads:
MediaFire:
All Downloads

dkp-vmin-XXX.zip

Solidfiles (Make sure you have an adblocker!):
All Downloads

dkp-vmin-XXX.zip


Source: I'm always happy to see my code used, so cherry-pick away. I'll even put together feature patches if you ask nicely.
 
Last edited:

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
Bugs:
Let me know.

Stable changelog:
3/3/13: Initial release for d2spr. Didn't get around to making threads for other carriers.
4/8/13 (3.0):
  • FauxSound support
  • Strip more useless stuff
  • A few bonus optimizations
4/8/13 (3.4):
  • Port everything except erandom from 3.0
  • Enhance cpufreq for easier configuration
4/24/13 (3.4):
  • Bugfixes: better support for tuner apps, fixed potential SOD bugs, automatic mpdecision fixups, etc.
  • Lots of CM/CAF/Linux updates
  • Working AssWax governor
  • Trinity colors support
  • sio, zen I/O schedulers
  • erandom is back!
  • Built with a super-fancy Linaro GCC 4.8.1-dev compiler toolchain for maximum -O3 goodness :p
  • Probably lots more, but there's hundreds of commits to sort through...
5/29/13 (3.4):
  • Bugfixes: better overclocking support, better hwrng support, etc.
  • Updates: new CM updates, Linux 3.4.47, updated FauxSound driver, added invisiblek's new panel colors interface
  • Automatic auto-hotplug
  • New optimizations, including link-time optimization and an updated GNU+Linaro GCC 4.8.1-dev toolchain
6/14/13 (3.4):
  • Bugfixes: fix several critical bugs in the 5/29 release.
9/7/13 (3.4):
  • Fixes for OC, UV, auto-hotplug.
  • A few new optimizations.
  • Synced up with CM.
9/20/13 (TW):
  • Ported everything from AOSP to TW.
9/20/13 (4.3):
  • Merged 4.3 from CM into the existing 4.2 code.

Current experimental branches:
  • Nothing interesting at the moment.
 
Last edited:

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
Goodies:
dkp doesn't come with its own splash screen. However, the dkp installer (i.e. the install zip) is smarter than you think, and can apply a custom splash screen for you. Here's how:
  1. Create a folder on your internal storage named "dkp"
  2. Copy a PNG image into the directory, and rename it "splash.png". Alternatively, copy an RLE image (i.e. from a flashable custom splash screen zip) and rename it "splash.rle". Ideally, the image should be roughly 1280x720 to begin with, since it won't be resized.
  3. The image will be used as your splash screen whenever you flash dkp. Reflash to apply initially.

mikedavis120 has put together a how-to video that covers tweaking dkp for optimal battery life. If you're new to dkp, take a look! He also put together a zipped collection of apps that will come in handy while tuning dkp. It also includes a flashable zip, "dkp-debug_v1.zip". After flashing it, running
Code:
su
dkp
from a terminal emulator will collect lots of useful debug information that will make it much easier for me to track down the issue you're having. :good: mikedavis120 recommends installing SuperSU (included in the zip) instead of what's included in you ROM.


sysfs:

It's possible to adjust all the settings available in dkp without using apps. Because they show up as files, settings can be adjusted with file managers, terminal emulators, adb and initscripts. Here's the most interesting files inside sysfs:
  • /sys/devices/platform/mipi_samsung_oled.513/lcd/panel/panel_colors (not available on newer AOSP builds): display tint (0 = very red, 2 = default, 4 = trinity colors)
  • /sys/class/misc/gammacontrol (only available on newer AOSP builds): various color controls. See this post for details on enabling Trinity colors on builds that use these controls.
  • /sys/devices/system/cpu/cpu<N>/cpufreq/UV_mV_table: voltage table
  • /sys/devices/system/cpu/cpu<N>/cpufreq/scaling_...: scaling_governor is the governor, scaling_min_freq and scaling_max_freq are the minimum and maximum frequencies, scaling_available_governors and scaling_available_frequencies show the available governors and frequencies
  • /sys/kernel/dkp/force_fast_charge: fast charge
  • /sys/kernel/dkp/link_core_settings: when linked (the default), frequency settings and some governors are automatically copied to the other core
  • /sys/kernel/dkp/vmin: minimum processor voltage in mV
  • /sys/kernel/mm/uksm/run: activate UKSM


auto-hotplug tuners:

These show up in the governor settings for any governor that doesn't do its own hotplugging. They only take effect when using auto-hotplug, so you'll probably need to disable mpdecision in Trickster.
  • hotplug_intpulse: when set to 1, automatically turns core 2 on whenever the screen/buttons/whatever is pressed. Default is 0.
  • hotplug_sampling_periods: number of samples to use for average number of running tasks. Default is 15.
  • hotplug_sampling_rate: number of 'jiffies' (currently 1 jiffy = 10 ms) between each sample of running tasks. Default is 20 (0.2 sec).
  • hotplug_enable_one_threshold: the average number of running tasks required to turn core 2 on, multiplied by 100. Default is 125 (1.25 tasks on average).
  • hotplug_disable_one_threshold: the average number of running tasks required to keep core 2 on, multiplied by 100. Default is 250 (2.5 tasks on average).


freelunch/nanolunch tuners:

freelunch and nanolunch aren't materially based on other governors, so their configuration is quite different than other governors. There's lots of tuners, since I haven't really decided on an ideal tuning. I encourage experimentation! I'll explain a bit of how these governors work before actually listing the tuners.

Generally speaking, there are two modes: in "normal" mode, sampling is done occasionally and frequency is generally increased slowly; in "interactive" mode, sampling is done much more quickly, and frequency increases much more quickly. "Interactive" mode ends after several samples of very low usage. The idea of a "hispeed" frequency is used in lots of governors, and it refers to the frequency that the CPU will jump to when more CPU usage is needed; generally, it's a generous estimate of how much CPU will be needed. Here, the hispeed frequency is adjusted on-the-fly, increasing when more CPU is needed and gradually decreasing when the CPU is idle. In "interactive" mode, the hispeed frequency is kept fairly high so that everything will feel snappy.

Hotplugging is taken care of in the least complicated (and in my opinion, most reasonable) way possible: if core 1 is using lots of CPU, and there are several tasks running (in other words, if it's likely that core 2 will have something to do), core 2 is turned on; if either core isn't doing much except using power, core 2 is turned off.
  • sampling_rate: the usual
  • hotplug_up_cycles: number of consecutive heavily-loaded samples before core 2 is turned on
  • hotplug_down_cycles: number of consecutive lightly-loaded samples before core 2 is turned off
  • hotplug_up_load: number of running tasks required to bring core 2 online
  • hotplug_up_usage: number of used CPU cycles (in thousands per second) required to bring core 2 online
  • hotplug_down_usage: number of used CPU cycles (in thousands per second) required on both cores to keep core 2 online
  • overestimate_khz: number of CPU cycles to overshoot usage by in "normal" mode
  • hispeed_thresh: if CPU usage is within this many cycles (in thousands per second) of the maximum frequency, frequency will be increased to the hispeed frequency. Generally, hispeed is pretty low in "normal" mode, and fairly high in "interactive" mode.
  • hispeed_decrease: when the CPU is sitting idle, the hispeed frequency is decreased by this amount each sample (this isn't ideal, but it works)
  • interaction_hispeed: the initial hispeed frequency when switching to "interactive" mode
  • interaction_return_cycles: number of consecutive lightly-loaded samples before returning to "normal" mode
  • interaction_return_usage: number of used CPU cycles (in thousands per second) required to stay in "interactive" mode
  • interaction_panic (nanolunch only): when set to 1, allows aggressively jumping past the current hispeed frequency under some circumstances
  • interaction_sampling_rate/overestimate_khz: equivalent to the "normal" versions of the tuners, these take effect in "interactive" mode
 
Last edited:
G

GuestD0701

Guest
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13

Awesome to see you doing this!!! Will get on it asap. New Liquid should be available today from what I've read.... Going w your kernel on it for sure. Tks!!!

Sent from my SPH-L710 (Slim + Lean)
 

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
Awesome to see you doing this!!! Will get on it asap. New Liquid should be available today from what I've read.... Going w your kernel on it for sure. Tks!!!

Sent from my SPH-L710 (Slim + Lean)

That was fast. :D I didn't think anyone was checking XDA this early on the weekend.

I'm running source-built Carbon (with OpenPDroid) ATM and loving it. Liquid should run great too.
 

das_webos_transformer

Senior Member
Feb 3, 2012
1,150
317
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13

Seems to be running good on the latest cm10.1 nightly. Nice job

There's more than corn in Indiana!
 
  • Like
Reactions: decimalman
G

GuestD0701

Guest
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13

Seems to be running good on the latest cm10.1 nightly. Nice job

There's more than corn in Indiana!

Was just fixing to say same thing. Lol. I'm on 3-3 nightly on a super clean install and running fine. Will chime in later and report. :thumbup:

@op Sat & Sun I'm on here 24-7. :what:


Sent from my SPH-L710 (CM10.1 +dkp kernel)
 
Last edited:

das_webos_transformer

Senior Member
Feb 3, 2012
1,150
317
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13

Running excellent. Decent battery, had data on a lot today. School just rapes my battery with data on NO signal like at all.

There's more than corn in Indiana!
 
Last edited:

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13

Running excellent. Decent battery, had data on a lot today. School just rapes my battery with data on NO signal like at all.

There's more than corn in Indiana!

I feel your pain. This morning at work I forgot airplane mode and lost like 10% by break time without even taking my phone out of my pocket. Not much to be done about crappy signal, sadly.

Glad to hear it's running well otherwise. 36 hours and nobody has reported any bugs yet! :)

Sent from my SPH-L710 using xda app-developers app
 

das_webos_transformer

Senior Member
Feb 3, 2012
1,150
317
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13

Usually in up in the 60's with data on most of the day. If that says anything.

There's more than corn in Indiana!
 

Attachments

  • uploadfromtaptalk1362451800296.jpg
    uploadfromtaptalk1362451800296.jpg
    38.2 KB · Views: 6,538
  • uploadfromtaptalk1362451811221.jpg
    uploadfromtaptalk1362451811221.jpg
    56.8 KB · Views: 6,430

das_webos_transformer

Senior Member
Feb 3, 2012
1,150
317
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13

I've been running it great battery life. I forgot to plug my phone in 2 nights in a row, didn't die.

There's more than corn in Indiana!
 
  • Like
Reactions: shekinahsmoke

k0lega

Senior Member
Jun 4, 2011
177
136
Ohio
This kernel has been the best thing to happen my phone. Thanks!
 
Last edited:

kris54241

Senior Member
Oct 19, 2008
259
8
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13

This kernel is incredible, 7 hours screen on time first run through, with auto brightness

Sent from my SPH-L710 using xda app-developers app
 

das_webos_transformer

Senior Member
Feb 3, 2012
1,150
317
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13

Welcome to decimalman's kernel playground!

As the name suggests, dkp is a hodgepodge of features and tweaks that I wanted to play with. It should get excellent battery life without feeling sluggish. It doesn't come with its own tuner app (because learning to write Android apps is no fun :)), so pick your favorite--the (free) apps I've tested all work perfectly.

Features:
  • Overclocking: frequency steps are available through 2.1 GHz. I don't test that high since I don't see the point, so the voltages are probably a bit too low. The code is all new, but ktoonsez's code was an excellent reference.
  • Undervolting: should be compatible with most tuner apps. Voltage tables are the stock tables for your specific processor, and are probably lower than other kernels. If you're not afraid of sysfs, vdd_levels and UV_mV_table understand "Xmhz: Ymv", "X: Y", "+Y"/"-Y", and "Y Y Y...", and will automatically guess mV or uV. Again, the code is all new, with ktoonsez's code as a reference.
  • Adjustable minimum voltage: the poor souls that can't boot other kernels should have better luck here. If you have a rev 0 processor, it may need to run with a 1150 mV minimum voltage. Like other kernels, dkp removes this minimum voltage restriction, but unlike other kernels dkp can be configured to leave it enabled. If your device won't boot other kernels, flashing dkp-enable-vmin.zip will keep the minimum voltage enabled and should allow you to boot.
  • freelunch governor: freelunch "knows" when you're interacting with your phone, and reacts accordingly: when your phone is sitting idle, frequency will stay low; when it's in use, an adaptive hispeed frequency is used to stay responsive. freelunch hotplugs in a way that's similar to pegasusq, but much simpler (and is much less prone to locking core 2 online indefinitely).
  • mpdecision and touch booster disabled: freelunch does both, but with less suck.
  • Fast charge: no need to unplug before toggling (I have wimpy USB ports, so it's hard for me to test this :(). 'ffc' is included, and most apps should work too. Imoseyon's code was a great reference.
  • erandom: /dev/urandom and all insecure kernel functions have been replaced with erandom (frandom's lightweight cousin). erandom is seeded directly from the S3's hardware RNG. /dev/random is the only function that will touch the entropy pool.
  • Linaro nightlies: I don't know WTF "fully Linaro optimized" means (probably nothing), but I compile with the latest Linaro nightlies with -Ofast (even though it's equivalent to -O3 for kernels), plus some optimizations I borrowed from ktoonsez. If you absolutely must benchmark, 'benchmode' is a handy script to toggle between performance (with core 2 forced online) and freelunch governors.
  • Crap removed: among other cleanups, lots of useless debug stuff has been removed. When was the last time you looked at your modem logs in debugfs? That's right: never. The important debug information (enough to track down bugs) is still included. boot.img is less than 4.5 MiB, and the whole zip is less than 5 MiB.
  • I snuck a few extra toys in, but they're either quick hacks or will be removed someday, so I'm not listing them. There's breadcrumbs leading to a few of them.

It goes without saying that I'm hugely thankful to ktoonsez for his work. :good: Also, thanks to whoever has been downloading every okay-I'm-ready-to-release-oh-wait-there's-one-last-bug build that I uploaded but never even linked to--it's been a great motivator. :highfive: Who the heck are you, anyway?

Remember:
  • Nandroid!
  • last_kmsg and/or logcat or it didn't happen.
  • Other kernels have their own threads or forums. Discuss them there.
  • Image dumps (settings, battery life, whatever) belong inside [HIDE][/HIDE] (that's HIDE, if you're on the mobile app) tags.

Installation:
  1. Reboot to recovery. I recommend that one recovery...you know, the one that flashes zips? I forget what it's called. :p
  2. Flash dkp. If needed, flash dkp-enable-vmin.zip.
  3. Reboot.

Downloads (AOSP 4.2.x ONLY!):
  • "Stable" downloads: d2spr has been tested, but the rest are blind builds
  • Here be dragons: new features (and new bugs) happen here first
  • dkp-enable-vmin.zip: only needed if you need it :p
  • Source: it's a horrible mess--if you need a feature patch, PM me and I'll cook one up from a topic branch

Hi I have been wanting to make a kernel for a long while now and the free lunch given in your kernel is just awesome, and since I'd make the kernel for TW, aosp seems to bee taken care of :winky:, do you have any plans towards making a TW kernel? If so I'll try to be more original but if not I might fill that void. I'm also newer to kernel development, so no promises but before I work toward something I'd rather not take an idea from someone else's product that might migrate.

There's more than corn in Indiana!
 

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
Hi I have been wanting to make a kernel for a long while now and the free lunch given in your kernel is just awesome, and since I'd make the kernel for TW, aosp seems to bee taken care of :winky:, do you have any plans towards making a TW kernel? If so I'll try to be more original but if not I might fill that void. I'm also newer to kernel development, so no promises but before I work toward something I'd rather not take an idea from someone else's product that might migrate.

There's more than corn in Indiana!

I don't run TW, so I don't have any plans to release a TW kernel. You're welcome to use my code if you'd like. If you already know C, kernel programming is pretty easy to learn, so go for it! PM me if you need anything.

Thanks for the positive feedback everyone! I'm glad everyone is liking the kernel. I have a few ideas I want to work on, so there may be new test builds happening later this week.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 129
    Welcome to decimalman's kernel playground!

    As the name suggests, dkp is a hodgepodge of features and tweaks that I wanted to play with. It should get excellent battery life without feeling sluggish. It doesn't come with its own tuner app, so pick your favorite. Personally, I like Trickster MOD and Kernel Adiutor, so I go out of my way to make things work in them. Most other apps should work, too.

    Features:
    • Overclocking up to 2.1 GHz, but you'll need to increase your voltages to get there (if you can get there at all)
    • Underclocking down to 54 MHz, with stability improvements
    • Undervolting compatible with most apps
    • Fast charge without unplugging first
    • Glorious animations for the notification and softkey LEDs
    • Well-integrated erandom means you don't need CrossBreeder or Seeder (recent AOSP builds use ISAAC instead)
    • freelunch and tierservative governors for optimal battery life without sacrificing responsiveness
    • Automatic mpdecision and auto-hotplug are only enabled when needed
    • Adjustable minimum voltage for stability on finicky processors
    • Optimized UKSM to free up some extra memory
    • Code optimizations for size and speed
    • Compiler optimizations (-O3, LTO, and more) because faster is better

    Donors: Thanks, everyone! Your generosity is much appreciated. :good:
    drpenguino, 0xScott, vmancini3 (twice! :good:), Ch4m3l30n, rompnit, Mystique, ryandubbz, techdog, ElwOOd_CbGp, ScOULaris, ZipAddict

    Remember:
    • Nandroid!
    • last_kmsg and/or logcat or it didn't happen.
    • Other kernels have their own threads or forums. Discuss them there.
    • Image dumps (settings, battery life, whatever) belong inside [HIDE][/HIDE] (that's HIDE, if you're on the mobile app) tags.
    • Be silly. We're here to have fun.

    Installation:
    1. Reboot to recovery. I recommend that one recovery...you know, the one that flashes zips? I forget what it's called. :p
    2. Flash dkp. Optionally, rename and flash dkp-vmin-XXX.zip (see below).
    3. Reboot.

    Undervolting:
    Undervolting on dkp is more complex than other kernels. Some processors get unstable at lower voltages, so (like the stock kernel) dkp keeps the processor voltage above 1150 mV by default. I refer to this limit as the minimum voltage. In order to undervolt, you'll need to lower the minimum voltage: if you use Trickster MOD or Kernel Adiutor, just disable "Override Minimum Voltage", otherwise rename dkp-vmin-XXX.zip to e.g. dkp-vmin-600.zip (which would apply a 600 mV minimum voltage) and flash it. If this causes instability (crashes, audio/video glitches, etc.), try using dkp-vmin-XXX.zip to apply a higher minimum voltage (somewhere between 950 and 1050 mV seems to work well for most people).

    Downloads:
    MediaFire:
    All Downloads

    dkp-vmin-XXX.zip

    Solidfiles (Make sure you have an adblocker!):
    All Downloads

    dkp-vmin-XXX.zip


    Source: I'm always happy to see my code used, so cherry-pick away. I'll even put together feature patches if you ask nicely.
    21
    Bugs:
    Let me know.

    Stable changelog:
    3/3/13: Initial release for d2spr. Didn't get around to making threads for other carriers.
    4/8/13 (3.0):
    • FauxSound support
    • Strip more useless stuff
    • A few bonus optimizations
    4/8/13 (3.4):
    • Port everything except erandom from 3.0
    • Enhance cpufreq for easier configuration
    4/24/13 (3.4):
    • Bugfixes: better support for tuner apps, fixed potential SOD bugs, automatic mpdecision fixups, etc.
    • Lots of CM/CAF/Linux updates
    • Working AssWax governor
    • Trinity colors support
    • sio, zen I/O schedulers
    • erandom is back!
    • Built with a super-fancy Linaro GCC 4.8.1-dev compiler toolchain for maximum -O3 goodness :p
    • Probably lots more, but there's hundreds of commits to sort through...
    5/29/13 (3.4):
    • Bugfixes: better overclocking support, better hwrng support, etc.
    • Updates: new CM updates, Linux 3.4.47, updated FauxSound driver, added invisiblek's new panel colors interface
    • Automatic auto-hotplug
    • New optimizations, including link-time optimization and an updated GNU+Linaro GCC 4.8.1-dev toolchain
    6/14/13 (3.4):
    • Bugfixes: fix several critical bugs in the 5/29 release.
    9/7/13 (3.4):
    • Fixes for OC, UV, auto-hotplug.
    • A few new optimizations.
    • Synced up with CM.
    9/20/13 (TW):
    • Ported everything from AOSP to TW.
    9/20/13 (4.3):
    • Merged 4.3 from CM into the existing 4.2 code.

    Current experimental branches:
    • Nothing interesting at the moment.
    20
    Goodies:
    dkp doesn't come with its own splash screen. However, the dkp installer (i.e. the install zip) is smarter than you think, and can apply a custom splash screen for you. Here's how:
    1. Create a folder on your internal storage named "dkp"
    2. Copy a PNG image into the directory, and rename it "splash.png". Alternatively, copy an RLE image (i.e. from a flashable custom splash screen zip) and rename it "splash.rle". Ideally, the image should be roughly 1280x720 to begin with, since it won't be resized.
    3. The image will be used as your splash screen whenever you flash dkp. Reflash to apply initially.

    mikedavis120 has put together a how-to video that covers tweaking dkp for optimal battery life. If you're new to dkp, take a look! He also put together a zipped collection of apps that will come in handy while tuning dkp. It also includes a flashable zip, "dkp-debug_v1.zip". After flashing it, running
    Code:
    su
    dkp
    from a terminal emulator will collect lots of useful debug information that will make it much easier for me to track down the issue you're having. :good: mikedavis120 recommends installing SuperSU (included in the zip) instead of what's included in you ROM.


    sysfs:

    It's possible to adjust all the settings available in dkp without using apps. Because they show up as files, settings can be adjusted with file managers, terminal emulators, adb and initscripts. Here's the most interesting files inside sysfs:
    • /sys/devices/platform/mipi_samsung_oled.513/lcd/panel/panel_colors (not available on newer AOSP builds): display tint (0 = very red, 2 = default, 4 = trinity colors)
    • /sys/class/misc/gammacontrol (only available on newer AOSP builds): various color controls. See this post for details on enabling Trinity colors on builds that use these controls.
    • /sys/devices/system/cpu/cpu<N>/cpufreq/UV_mV_table: voltage table
    • /sys/devices/system/cpu/cpu<N>/cpufreq/scaling_...: scaling_governor is the governor, scaling_min_freq and scaling_max_freq are the minimum and maximum frequencies, scaling_available_governors and scaling_available_frequencies show the available governors and frequencies
    • /sys/kernel/dkp/force_fast_charge: fast charge
    • /sys/kernel/dkp/link_core_settings: when linked (the default), frequency settings and some governors are automatically copied to the other core
    • /sys/kernel/dkp/vmin: minimum processor voltage in mV
    • /sys/kernel/mm/uksm/run: activate UKSM


    auto-hotplug tuners:

    These show up in the governor settings for any governor that doesn't do its own hotplugging. They only take effect when using auto-hotplug, so you'll probably need to disable mpdecision in Trickster.
    • hotplug_intpulse: when set to 1, automatically turns core 2 on whenever the screen/buttons/whatever is pressed. Default is 0.
    • hotplug_sampling_periods: number of samples to use for average number of running tasks. Default is 15.
    • hotplug_sampling_rate: number of 'jiffies' (currently 1 jiffy = 10 ms) between each sample of running tasks. Default is 20 (0.2 sec).
    • hotplug_enable_one_threshold: the average number of running tasks required to turn core 2 on, multiplied by 100. Default is 125 (1.25 tasks on average).
    • hotplug_disable_one_threshold: the average number of running tasks required to keep core 2 on, multiplied by 100. Default is 250 (2.5 tasks on average).


    freelunch/nanolunch tuners:

    freelunch and nanolunch aren't materially based on other governors, so their configuration is quite different than other governors. There's lots of tuners, since I haven't really decided on an ideal tuning. I encourage experimentation! I'll explain a bit of how these governors work before actually listing the tuners.

    Generally speaking, there are two modes: in "normal" mode, sampling is done occasionally and frequency is generally increased slowly; in "interactive" mode, sampling is done much more quickly, and frequency increases much more quickly. "Interactive" mode ends after several samples of very low usage. The idea of a "hispeed" frequency is used in lots of governors, and it refers to the frequency that the CPU will jump to when more CPU usage is needed; generally, it's a generous estimate of how much CPU will be needed. Here, the hispeed frequency is adjusted on-the-fly, increasing when more CPU is needed and gradually decreasing when the CPU is idle. In "interactive" mode, the hispeed frequency is kept fairly high so that everything will feel snappy.

    Hotplugging is taken care of in the least complicated (and in my opinion, most reasonable) way possible: if core 1 is using lots of CPU, and there are several tasks running (in other words, if it's likely that core 2 will have something to do), core 2 is turned on; if either core isn't doing much except using power, core 2 is turned off.
    • sampling_rate: the usual
    • hotplug_up_cycles: number of consecutive heavily-loaded samples before core 2 is turned on
    • hotplug_down_cycles: number of consecutive lightly-loaded samples before core 2 is turned off
    • hotplug_up_load: number of running tasks required to bring core 2 online
    • hotplug_up_usage: number of used CPU cycles (in thousands per second) required to bring core 2 online
    • hotplug_down_usage: number of used CPU cycles (in thousands per second) required on both cores to keep core 2 online
    • overestimate_khz: number of CPU cycles to overshoot usage by in "normal" mode
    • hispeed_thresh: if CPU usage is within this many cycles (in thousands per second) of the maximum frequency, frequency will be increased to the hispeed frequency. Generally, hispeed is pretty low in "normal" mode, and fairly high in "interactive" mode.
    • hispeed_decrease: when the CPU is sitting idle, the hispeed frequency is decreased by this amount each sample (this isn't ideal, but it works)
    • interaction_hispeed: the initial hispeed frequency when switching to "interactive" mode
    • interaction_return_cycles: number of consecutive lightly-loaded samples before returning to "normal" mode
    • interaction_return_usage: number of used CPU cycles (in thousands per second) required to stay in "interactive" mode
    • interaction_panic (nanolunch only): when set to 1, allows aggressively jumping past the current hispeed frequency under some circumstances
    • interaction_sampling_rate/overestimate_khz: equivalent to the "normal" versions of the tuners, these take effect in "interactive" mode
    17
    It's been a while, so let's do some new builds for both AOSP 4.4 and TW 4.3. Still no love for TW 4.1 (are enough people using 4.1 to justify continuing support?), and I still haven't fixed up the bluesleep driver that's been causing bogus wakelocks on AOSP (it really needs to be rewritten).

    EDIT: Wifi isn't working on the AOSP build.
    EDIT 2: Fixed builds are up!

    TW Changelog:
    • Major overhaul to erandom, msm_rng, and all things entropy:
      • A new entropy daemon, plus a new touchscreen entropy source
      • Major speedup for erandom
      • Bugfixes and a major speedup for the hardware random number generator driver
      • Cleaned up (among other things) erandom initialization
    • Enabled network block devices
    • Swapped in a new splash screen

    AOSP Changelog:
    • Synced up with CM, Linux 3.4.82
    • Major overhaul to erandom, msm_rng, and all things entropy (everything from the TW changelog is included)
    • Added code to save some entropy across reboots
    • Enabled network block devices
    • Swapped in a new splash screen

    If you're not sure what network block devices are or why you'd want them, you probably don't have much use for them. I enabled them at the request of Phil_Suz, who's been working on an interesting multiboot system (there should be a thread in the General subforum for your device). NBD support opens up some very interesting possibilities, especially when paired with multiboot.
    16
    It's finally time for the new AOSP test build I've been teasing! I'm pretty excited about the new installer: it allows on-the-fly splash screen generation, ramdisk tweaks, and it's multi-threaded so it doesn't take forever to cook the new ramdisk.

    There have been a lot of splash screens posted in the last couple days, and I can't pick just one. I rolled eight into this build, and the installer will pick one at random every flash. I'm thinking about changing the lineup every couple builds, so keep the splash screens coming. :good:

    Downloads aren't going to the usual location! Dev-Host has been pretty unreliable, and when I heard that they're sneaking bogus APKs in with legitimate downloads, I decided I'm done with them. Downloads are up on Mediafire. I haven't been able to find an ideal file host, but Mediafire seems less awful than most. EDIT: Mediafire is acting up already. :( Direct link is here.

    Changelog:
    • Ermahgerd splersh screrns*!
    • Updated to a toolchain based on GCC trunk (i.e. GCC 4.9 development)
    • Linux 3.4.79 and oodles of CM updates
    • Stripped a few useless bits from the board file
    • Fixed the power key not rebooting
    • By request, added simple GPU governor
    • Changed the default minimum voltage back to stock**
    • Lowered absolute minimum voltage limit to 600 mV for the few phones that can undervolt below 700 mV

    * I included eight splash screens, one of which will be randomly picked at each flash. If you'd prefer, you can switch to a custom splash screen: extract the initlogo.rle from a splash screen zip to dkp/splash.rle in your internal storage, and it'll be applied automatically whenever you flash. Copying a PNG to dkp/splash.png also works, and I'll add support for JPEGs soon.

    ** The stock defaults are back. Too many of the issues being reported are (probably) caused by the lowered default voltages. There's a new (fixed) custom vmin zip here to lower the limit, Trickster's "Override Minimum Voltage" still works, and the old (lowered) default will carry over until you flash a new ROM. I'm considering adding an addon.d script so that a custom minimum voltage setting will carry over after ROM updates, but I haven't gotten to it yet.