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

Search This thread

niphoet

Senior Member
Jul 14, 2007
447
130
Amazon Fire TV
OnePlus 6
New test builds are going up for anyone that flashes the newest CM nightly (and other nightlies as the CM commits eventually propagate to other ROMs). There aren't any major changes on my part, and ROM support is needed, so don't upgrade unless your ROM won't boot with the 4/17 test builds.

I'm confused. I'm on 4/17 CM10.1 and I couldn't boot work the newest experimental kernel. Did I do something wrong?

Sent from my SGH-T999 using xda premium
 

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
I'm confused. I'm on 4/17 CM10.1 and I couldn't boot work the newest experimental kernel. Did I do something wrong?

Sent from my SGH-T999 using xda premium

Derp. I posted the announcement literally 10 minutes after waking up, and failed to specify that it's only for the 4/19 nightly, which has some driver changes that will break existing kernels. Sorry for the confusion.

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

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
So in other words, it won't be usable until the next nightly is released?

Sent from my SGH-T999 using xda premium

Derp again. I really need to stop posting before I've had my coffee. It looks like only d2att got a build with the changes and everyone else is still on 4/17.

Correct, the newest kernel won't boot until the next CM nightly.

Sent from my SPH-L710 using xda app-developers app
 
Last edited:

niphoet

Senior Member
Jul 14, 2007
447
130
Amazon Fire TV
OnePlus 6
Derp again. I really need to stop posting before I've had my coffee. I'd looks like only d2att got a build with the changes and everyone else is still on 4/17.

Correct, the newest kernel won't boot until the next CM nightly.

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

I updated via CyanDelta (just found out about it), then I was able to boot with the new kernel.
 
  • Like
Reactions: decimalman

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
I updated via CyanDelta (just found out about it), then I was able to boot with the new kernel.

Interesting. I didn't expect CyanDelta to be more updated than the get.cm builds. Good to know. :good:

A d2att user reported that the first round of builds has broken USB: the phone won't boot when plugged in, and data transfer won't work. I fixed it and uploaded new builds, so you should grab one if you get a chance.
 
  • Like
Reactions: niphoet

niphoet

Senior Member
Jul 14, 2007
447
130
Amazon Fire TV
OnePlus 6
Interesting. I didn't expect CyanDelta to be more updated than the get.cm builds. Good to know. :good:

A d2att user reported that the first round of builds has broken USB: the phone won't boot when plugged in, and data transfer won't work. I fixed it and uploaded new builds, so you should grab one if you get a chance.

I can confirm no boot when plugged in. I'll download the new one shortly and report back.
 

ckisgen

Inactive Recognized Developer
Sep 7, 2007
868
922
raleigh, NC
mine boots fine plugged in with newest dkp kernel and latest 4-18/4-19 CM nightly

I am however getting a fair amount of screen flickering for the first time since the Jan/Feb nightlies ... wondering if its the kernel.

haven't had a chance to look at kmsg or logs. been on the road all day.

Sent from my SGH-T999 using xda premium
 

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
mine boots fine plugged in with newest dkp kernel and latest 4-18/4-19 CM nightly

I am however getting a fair amount of screen flickering for the first time since the Jan/Feb nightlies ... wondering if its the kernel.

haven't had a chance to look at kmsg or logs. been on the road all day.

Sent from my SGH-T999 using xda premium

You probably downloaded the second build that had the USB bug fixed. As for the flickering, I haven't seen any all day. I'm not running the full driver update (I had to revert a commit to be able to use it with my current ROM), so it's possible there's an issue there. I'll grab my ROM's next nightly and look into it tomorrow. Until then, you might want to go back to an older CM with a more stable kernel. :(
 

ayysir

Senior Member
Aug 30, 2011
4,552
5,980
Bronx, NY
You probably downloaded the second build that had the USB bug fixed. As for the flickering, I haven't seen any all day. I'm not running the full driver update (I had to revert a commit to be able to use it with my current ROM), so it's possible there's an issue there. I'll grab my ROM's next nightly and look into it tomorrow. Until then, you might want to go back to an older CM with a more stable kernel. :(

Its because display drivers has been updated by cm. New ROMs based on latest nightly will be ok

Sent from my SGH-T999 using Tapatalk 2
 

nicksmizzle

Senior Member
Sep 5, 2010
302
81
any suggestions to tweak freelunch? i'm mainly looking for battery life (i know every phone is different, just looking for a jumping off point)
 

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
any suggestions to tweak freelunch? i'm mainly looking for battery life (i know every phone is different, just looking for a jumping off point)

I've been meaning to write up how freelunch works, but I keep getting distracted. Decreasing interaction_hispeed and interaction_overestimate_khz, as well as increasing hispeed_decrease should all increase battery life at the expense of some performance. You could also try tuning all the hotplug settings, since I don't think they're perfect.
 

nicksmizzle

Senior Member
Sep 5, 2010
302
81
I've been meaning to write up how freelunch works, but I keep getting distracted. Decreasing interaction_hispeed and interaction_overestimate_khz, as well as increasing hispeed_decrease should all increase battery life at the expense of some performance. You could also try tuning all the hotplug settings, since I don't think they're perfect.

thanks dude!:good:
 

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
New 3.4 stable builds are going up! I'm planning to backport a few changes and do a new stable 3.0 release soon, since I know there are still some users that don't like 3.4.

Major features since the last stable release: lots of stuff. If your ROM hasn't merged in the CM video driver changes yet, your should ask the dev merge them so you can upgrade. :)

Notable changes since the last test builds:
  • Newest CM commits integrated. They've been hard at work causing merge conflicts. :p
  • At user request, the AssWax governor has been added (and works!). It has an extra interaction mode to support dkp's interaction hints.
  • Kernel-wide erandom finally works on 3.4
  • New CPU load interface with much higher precision than the existing one, plus two new governor variations to take advantage of it
  • Trinity colors setting takes effect instantly. Now I just need to get apps to show a setting for it. :( Want to try it temporarily? Enter 'trinity' in a terminal emulator.
  • Cleaned up some touchscreen code
 

LuigiBull23

Senior Member
Jan 22, 2013
6,666
6,307
33
Holyoke
New 3.4 stable builds are going up! I'm planning to backport a few changes and do a new stable 3.0 release soon, since I know there are still some users that don't like 3.4.

Major features since the last stable release: lots of stuff. If your ROM hasn't merged in the CM video driver changes yet, your should ask the dev merge them so you can upgrade. :)

Notable changes since the last test builds:
  • Newest CM commits integrated. They've been hard at work causing merge conflicts. :p
  • At user request, the AssWax governor has been added (and works!). It has an extra interaction mode to support dkp's interaction hints.
  • Kernel-wide erandom finally works on 3.4
  • New CPU load interface with much higher precision than the existing one, plus two new governor variations to take advantage of it
  • Trinity colors setting takes effect instantly. Now I just need to get apps to show a setting for it. :( Want to try it temporarily? Enter 'trinity' in a terminal emulator.
  • Cleaned up some touchscreen code

appreciate the hard work!

Sent from my Nexus 4 using xda premium
 
  • Like
Reactions: decimalman

ayysir

Senior Member
Aug 30, 2011
4,552
5,980
Bronx, NY
New 3.4 stable builds are going up! I'm planning to backport a few changes and do a new stable 3.0 release soon, since I know there are still some users that don't like 3.4.

Major features since the last stable release: lots of stuff. If your ROM hasn't merged in the CM video driver changes yet, your should ask the dev merge them so you can upgrade. :)

Notable changes since the last test builds:
  • Newest CM commits integrated. They've been hard at work causing merge conflicts. :p
  • At user request, the AssWax governor has been added (and works!). It has an extra interaction mode to support dkp's interaction hints.
  • Kernel-wide erandom finally works on 3.4
  • New CPU load interface with much higher precision than the existing one, plus two new governor variations to take advantage of it
  • Trinity colors setting takes effect instantly. Now I just need to get apps to show a setting for it. :( Want to try it temporarily? Enter 'trinity' in a terminal emulator.
  • Cleaned up some touchscreen code
dammit beat me to the asswax implement. good work man. don't mind if i cherry pick a few of your changes?
 

decimalman

Senior Member
Nov 3, 2012
1,259
3,614
gotcha, ive been mostly working on my own governor just need more choices

Choices are always good. I just pushed the fix, so help yourself to the source. :good:

New fixed stable builds are up!

Issues fixed:
  • If the ROM doesn't start mpdecision correctly, interaction and asswax will leave core 2 online forever. dkp will now start mpdecision if needed.
  • mpdecision is fussy and I hate it. I think I managed to get it to stop whining.
  • Trinity colors now defaults to on. I'll get a zip up shortly to disable it.
  • AssWax causes reboots. Fixed.
 
Last edited:

nicksmizzle

Senior Member
Sep 5, 2010
302
81
Choices are always good. I just pushed the fix, so help yourself to the source. :good:

New fixed stable builds are up!

Issues fixed:
  • If the ROM doesn't start mpdecision correctly, interaction and asswax will leave core 2 online forever. dkp will now start mpdecision if needed.
  • mpdecision is fussy and I hate it. I think I managed to get it to stop whining.
  • Trinity colors now defaults to on. I'll get a zip up shortly to disable it.
  • AssWax causes reboots. Fixed.

sweet!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 45
    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.
    10
    It's time for another TW 4.3 test build. There aren't many dramatic changes, but I did fix a few bugs. Probably the biggest change is a fix for the disappearing apps phenomenon, which means that it's safe to turn SELinux back on.

    Changelog:
    • Fixed the disappearing apps bug
    • Enabled SELinux again
    • Added several TCP congestion control algorithms
    • Fixed a silly mistake that broke several motions
    • Cleaned some code up, removed a few useless drivers
    • Compiled with a shiny new toolchain
    9
    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.
    9
    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
    9
    Four new test builds are going up (AOSP 4.3 & 4.4, TW 4.1 & 4.3). Clearly, I've lost my mind. :p The new builds should fix the sleep of death bug and the strange softkey behavior. The notification LED and softkey backlights are a bit wonky on TW, but they shouldn't be severely broken. If there's still any major bugs, let me know.

    Changelogs:

    AOSP 4.4:
    • Synced up with CM
    • Fixed a few bugs in the suspend/resume code
    • Adjusted the softkey animation a little bit
    AOSP 4.3:
    • Added notification LED and softkey backlight animation
    • Reduced UKSM's default aggressiveness
    • Optimized and stripped a few drivers
    • New toolchain, cleaned up compiler optimizations
    TW 4.3:
    • Fixed a few bugs in the suspend/resume code
    • By request, brightened the notification LED (makes the animation smoother too!)
    • Adjusted the softkey animation a little bit
    TW 4.1:
    • Added notification LED and softkey backlight animation
    • Fixed up the frequency control interface and fixed a bunch of bugs
    • Enabled a few extra TCP congestion control algorithms
    • Reduced UKSM's default aggressiveness
    • Optimized and stripped a few drivers
    • Patched in and switched to XZ compression
    • Removed a ton of bogus stuff
    • Fixed a zillion compiler warnings and a few obvious bugs
    • New toolchain, cleaned up compiler optimizations