[KERNEL][AOSP4.4/5.1/6.0/7.1] dkp - d2att - 2/4/18 - AT&T, Rogers, Bell, Telus Samsung Galaxy S III

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:
Reboot to recovery. I recommend that one recovery...you know, the one that flashes zips? I forget what it's called.
Flash dkp. Optionally, rename and flash dkp-vmin-XXX.zip (see below).
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.

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
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.

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:
Create a folder on your internal storage named "dkp"
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.
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

Just loaded it on pa 3.15
Sent from my SAMSUNG-SGH-I747 using xda premium

It doesn't say that it has morfic colors, but looks like it does. Gonna give it a whirl
Sent from my SGH-I747 using xda app-developers app

rmead01 said:
It doesn't say that it has morfic colors, but looks like it does. Gonna give it a whirl
Sent from my SGH-I747 using xda app-developers app
Click to expand...
Click to collapse
It doesn't, but I'll merge it and put out a test build.

decimalman said:
It doesn't, but I'll merge it and put out a test build.
Click to expand...
Click to collapse
Is it possible they are left over from a previous kernel? Because I can def tell the difference usually and seems like it does.
Either way, advise when its updated. This governor seems solid so far.
Sent from my SGH-I747 using xda app-developers app

rmead01 said:
Is it possible they are left over from a previous kernel? Because I can def tell the difference usually and seems like it does.
Either way, advise when its updated. This governor seems solid so far.
Sent from my SGH-I747 using xda app-developers app
Click to expand...
Click to collapse
dkp is based off clean CM source, so it shouldn't have been merged already.
I've got test builds compiling now, and the 3.4 builds will be up shortly. Flashing the trinity-colors test build and this zip will enable trinity colors. You can toggle it with
Code:
su
echo X >/sys/class/mdnie/mdnie/trinity_colors
where X is 0 to disable or 1 to enable.
Edit: and sorry for taking so long to respond.
Edit 2: 3.4 builds are up. http://d-h.st/7Ae

Thnx for this kernel

decimalman said:
dkp is based off clean CM source, so it shouldn't have been merged already.
I've got test builds compiling now, and the 3.4 builds will be up shortly. Flashing the trinity-colors test build and this zip will enable trinity colors. You can toggle it with
Code:
su
echo X >/sys/class/mdnie/mdnie/trinity_colors
where X is 0 to disable or 1 to enable.
Edit: and sorry for taking so long to respond.
Edit 2: 3.4 builds are up. http://d-h.st/7Ae
Click to expand...
Click to collapse
Maybe I was just seeing things, had just watched jurassic park in 3d.
New "test" build flashed as well as the file to enable it. Thanks for the addition. It's very hard to go back to normal once you've been smurfed depending on your display.
Only issue i'm having ATM is the ability to change the voltage table. My phone doesn't handle undervolting as well and i run a minimum of 950 baseline, if not 975. One of my normal apps wasn't able to set the voltage at all. I'm trying to use performance control which I don't like. It crashes trying to set the voltage on boot but at least I can go in and manually set the values on boot and they stick.
One last question, since this is your kernel, what scheduler do you recommend pairs well to freelunch? What would you use for performance and what would you use for batt?

rmead01 said:
One last question, since this is your kernel, what scheduler do you recommend pairs well to freelunch? What would you use for performance and what would you use for batt?
Click to expand...
Click to collapse
+1 on these questions
Sent from my AT&T Samsung Galaxy S III

rmead01 said:
Only issue i'm having ATM is the ability to change the voltage table. My phone doesn't handle undervolting as well and i run a minimum of 950 baseline, if not 975. One of my normal apps wasn't able to set the voltage at all. I'm trying to use performance control which I don't like. It crashes trying to set the voltage on boot but at least I can go in and manually set the values on boot and they stick.
Click to expand...
Click to collapse
Answered my own problem. I installed trickster as mentioned in OP and all voltage settings stick no problem with no issues.

rmead01 said:
New "test" build flashed as well as the file to enable it. Thanks for the addition. It's very hard to go back to normal once you've been smurfed depending on your display.
Only issue i'm having ATM is the ability to change the voltage table. My phone doesn't handle undervolting as well and i run a minimum of 950 baseline, if not 975. One of my normal apps wasn't able to set the voltage at all. I'm trying to use performance control which I don't like. It crashes trying to set the voltage on boot but at least I can go in and manually set the values on boot and they stick.
One last question, since this is your kernel, what scheduler do you recommend pairs well to freelunch? What would you use for performance and what would you use for batt?
Click to expand...
Click to collapse
Personally, I don't like trinity colors, but I definitely understand the appeal. I merged this into 3.0 and 3.4, so it'll be standard from here on. I'll add a link to the enabler zip in the OP as well.
What app would you normally use? I'll try to support it, since I already provide several voltage interfaces. I didn't realize performance control was crashing (I'm not a fan either, so I only lightly tested). I recently installed Trickster and liked it, so I've been going out of my way to support it. It's also really easy to write support for, so that's a bonus for me.
As for schedulers, I'm not fussy. I've never exhaustively tested performance and battery life, so I don't have a preference and usually run noop or deadline. However, I've had nothing but bad results with ROW (phone never deep sleeps, and I haven't looked into why).

decimalman said:
Personally, I don't like trinity colors, but I definitely understand the appeal. I merged this in, so it'll be standard from here on. I'll add a link to the enabler zip in the OP as well.
What app would you normally use? I'll try to support it, since I already provide several voltage interfaces. I didn't realize performance control was crashing (I'm not a fan either, so I only lightly tested). I recently installed Trickster and liked it, so I've been going out of my way to support it. It's also really easy to write support for, so that's a bonus for me.
As for schedulers, I'm not fussy. I've never exhaustively tested performance and battery life, so I don't have a preference and usually run noop or deadline. However, I've had nothing but bad results with ROW (phone never deep sleeps, and I haven't looked into why).
Click to expand...
Click to collapse
good to know. Trickster mod works fine and you mention it in the OP and it's at no cost in the play store. I wouldn't worry.
I was using an app called kernel tuner because some others would only set 1 core to the governor and not both. I checked that trickster does indeed set both cores to freelunch so once that figured out I removed kernel tuner. Kernel Tuner also has the options for profiles which can be toggled in tasker for varies states. freelunch so far hasn't needed any changing so not worried about it at this point. just as an example, some governors would be better for screen on/off and tasker could switch these to edge out battery life.
The voltage app i was using is simply called voltage control. Kernel tuner doesn't do a nice job of voltage changes. But since trickster does both governor and voltage adjustments well. i'm using that with no problems now.
Thanks for the morfic, having a way to toggle it works well for people. it's as simple as a script so there's that.

rmead01 said:
good to know. Trickster mod works fine and you mention it in the OP and it's at no cost in the play store. I wouldn't worry.
I was using an app called kernel tuner because some others would only set 1 core to the governor and not both. I checked that trickster does indeed set both cores to freelunch so once that was made it was no problem. Kernel Tuner also has the options for profiles which can be toggled in tasker for varies states. freelunch so far hasn't needed any changing so not worried about it at this point.
The voltage app i was using is simply called voltage control. Kernel tuner doesn't do a nice job of voltage changes. But since trickster does both well, i'm using that with no problems now.
Thanks for the morfic, having a way to toggle it works well for people. it's as simple as a script so there's that.
Click to expand...
Click to collapse
I meant to test Voltage Control but Google wasn't letting me download anything. It's a common app, so I'll try to get it working regardless. Kernel Tuner doesn't currently work well with freelunch, and tends to hang when it's trying to read settings in the CPU screen. Otherwise, it's a nice app. I didn't realize it had Tasker support (I use Llama).
I've added a few extra bits to the cpufreq core, so governors that need to be set on both cores (like freelunch) will automatically apply to both cores regardless of what app is used. cpufreq will even enable and disable mpdecision depending on whether a hotplugging governor is running (though Trickster won't show that it's disabled).
I owe ktoonsez for the toggleable trinity colors. I slightly rewrote his patch, but it's still largely his code. It's my policy that anything that not all users will want should be optional and easily configurable.
Edit: I think I've got Voltage Control fixed. I should be able to get Kernel Tuner working without too much work. I haven't even looked into Performance Control yet.

decimalman said:
I meant to test Voltage Control but Google wasn't letting me download anything. It's a common app, so I'll try to get it working regardless. Kernel Tuner doesn't currently work well with freelunch, and tends to hang when it's trying to read settings in the CPU screen. Otherwise, it's a nice app. I didn't realize it had Tasker support (I use Llama).
I've added a few extra bits to the cpufreq core, so governors that need to be set on both cores (like freelunch) will automatically apply to both cores regardless of what app is used. cpufreq will even enable and disable mpdecision depending on whether a hotplugging governor is running (though Trickster won't show that it's disabled).
I owe ktoonsez for the toggleable trinity colors. I slightly rewrote his patch, but it's still largely his code. It's my policy that anything that not all users will want should be optional and easily configurable.
Click to expand...
Click to collapse
well good job so far. batt life has been top notch. minimal drain in use and my over night idle drain was only a few %. I have things setup to disable wifi when sleep and also turn off mobile data when wifi is connected. A bit over the top but every bit helps.
:good::highfive:

I know I've been grilling you today but...
Kind of curious what the new tunables do. I haven't touched anything since it's working so well but there is always that part of me that wonders what adjust parameters will do. Is there any kind of reference for this governor that could indicate that type of info?

Does your kernel support faux sound app?

stevehkim said:
Does your kernel support faux sound app?
Click to expand...
Click to collapse
Yes. 3.0 and 3.4 both have support.
As for tuneables, I've been meaning to post a writeup but haven't gotten around to it. You're not the first to ask about it.
Sent from my SPH-L710 using xda app-developers app

This is a fantastic Kernel! The battery life has been outstanding so far. Thank you for your amazing work!

Related

Leankernel: ( JB4.2 - 7.1, JB4.3 - 8.3 - , KK 9.0 beta 11/25)

Ok guys i have got permission to bring over lean kernel and offer support for it on xda. I will keep this post up todate with all the most recent kernel updates and news. All credit goes to imoseyon as the original op and rootzwiki for original posting. I am posting this with full permission and support from imoseyon
Mod Type:: Kernel
Difficulty:: Very Easy
Mod Status:: Stable
Apply In:: CWM Recovery
Requires Root:: Yes
Exp builds are also up and includes a bunch of Android/OMAP updates not in stable.
SOURCE:
ICS
JB
This is a minimalistic Galaxy Nexus kernel. My philosophy is to keep the kernel as lean and stable as possible, at the same time to keep the kernel as modern and close to latest mainstream linux as possible. You will see that my kernels will lack some of the bells and whistles from other kernels.
sorry host4droid is still down. Mirrors:
kk4.4 LK 9.0 beta (use at ur own risk)
JB4.3 [ stable builds | exp builds ] [ change log | exp changes ]
JB4.2:Stable
Stock JRN84D kernel
Terminal Emulator not finding scripts? Read this post.
CHANGE LOG JB 4.2
FEATURES
Patched to latest in Linux 3.0.x branch.
All unnecessary kernel components removed to make kernel lean and fast!
OC to 1.65ghz. Boot speed is maxed at 1.2ghz within kernel (in addition to ramdisk) for stability.
User voltage control
InteractiveX V2 (screen-off hotplug of cpu1) added. Select it using setcpu if you want to use it.
Ramdisk tweaks (sysctl, vm, filesystem speed, etc.)
SWAP & zram (next generation compcache) support. Run "zram enable" in terminal.
init.d support in ramdisk.
lk.conf for basic kernel configuration.
HotplugX governor (Hotplug optimized and modified for screen-off suspend).
wakelock tweaks for wlan and lte modem
lkflash - script to flash latest versions of leanKernel from Terminal (type "su" without quotes, hit enter, then type "lkflash" without quotes and then hit enter)
checkv - voltage checking script (for custom undervolting) - detailed at bottom of this post.
checkt - script that displays 1) your current temp, 2) # of times you were throttled due to temp "recently", 3) CPU trim type, and 4) CPU silicon type, etc.
Fast USB charge (by chad0982) and "ffc" toggle script by me. (Open terminal, and type "ffc" without quotes then enter)
ColorControl from both CM9 and Ezekeel (compatible with all ROMs). Helpful posts: 1and 2.
TempControl - sysfs interface to control the CPU temp threshold. Read these two posts: 1 and 2.
Variable GPU OC - sysfs interface to select GPU max speed between 307MHz (stock), 384MHz and 512Mhz. The changes take effect immediately. Check FAQ for more info and how to use it.
Custom SR Tuning - override kernel default minimum voltage for SR calibration.
SoundControl
Gamma Control
ROW scheduler v4
DIRECTIONS
Uh.... flash the zip in clockworkmod.
Thanks to forum member maddler for providing file hosting
FAQ
How do i change voltage? - Use the latest version of setcpu, leantweaks, cputuner, or your ROM's built-in tools.
Do i need to wipe dalvik/cache? - in general there's no need, but it doesn't hurt so if you have time go ahead. Posted Image I don't wipe.
​Can we OC higher or add more frequency slots? - You can find the extra slots in my experimental versions.
​Will this work on GSM gnexus as well? - It should. I don't have a GSM phone to test so let me know if it stops working.
What is interactiveX V2? Read this post and thttp://rootzwiki.com/topic/13092-kernel-leankernel-minimalistic-kernel-120-123111/page__view__findpost__p__342571
Are you getting Screen-Off/Sleep-Of Death (SOD), general instability, or unusual battery drain?
Before you post here (especially if you're running the experimental version), try the following steps in order:
0) dude, disable screen-off profiles if you're running interactiveX.
1) If you're running the experimental version, do you have 180mhz/230mhz and/or 1.42ghz slots enabled? If so disable them both!
2) If the above doesn't help, do you have custom undervolting enabled? If so disable it! (keep in mind that the kernel is already undervolted by default).
3) If the above doesn't help, are you using interactiveX or hotplug governors? If so change to interactive.
4) If the above doesn't help then you should not be running the experimental version. Install the stable version and try both interactiveX and interactive without custom undervolting.
If you're still getting SOD with stable/interactive, report it here.
What about call-recording? - First the app needs to support Galaxy Nexus. Find out if it does and then find out from the author of the app what kernel changes are required and let me know.
Should i set up screen-off profile? - ICS kernels have built-in screen-off profile for all governors at 700mhz. So you don't need it unless you want to set it lower than 700mhz. In general there isn't a whole lot to gain by setting it lower.
Hotplug vs interactiveX? - Read this post. HotplugX vs interactiveX
What is zram and why do i need it?
zram basically takes a portion of your RAM (10% using my script) and turns it into a compressed swap device. So in layman's terms you're extending the size of your memory (potentially from ~700mb to close to 1000mb depending on the compression ratio).
To answer the 2nd question, no you don't really need it but if used properly (using custom LK zram script) it could help you in two different ways:
1) Android OS is based on Linux OS and the OS will try to use a growing portion of your RAM for file and inode caches and if you keep your phone up without rebooting after a while you may notice things getting a little sluggish. That's because the OS is not doing a good job in dropping the caches and freeing up memory for the apps.
2) more RAM and tweaked minfree (also handled by custom LK script) could potentially allow your apps to stay in memory longer (this may or may not be desirable based on your preference of course).
In conclusion, I'd say if you're curious it doesn't hurt to try. To revert, just type "zram disable".
What's the low-down on the GPU OC?
My kernel's GPU is now set to stock 307Mhz by default. You can adjust that by using Variable GPU OC (see a separate FAQ entry below).
When you go from say 307 to 512Mhz, you will not experience near double performance increase. Due to the factors outside the GPU module (ie. memory bandwidth limitation), you can't truly OC the GPU. In fact, most people can't tell the difference between 307, 384 and 512. Nenamark2 will roughly give you the following scores: 307/25fps, 384/28fps, and 512/31fps.
Some of you have seen the note from Colin, the Google kernel engineer, not to OC the GPU because using the OV_UV voltage slot will drain the battery. My kernel uses the same voltage for both OV and OV_UV slots. So there's no danger of battery drain there.
Why are the IO benchmark test scores lower than another kernel?
Some of the kernels out there have fsync disabled to increase benchmark scores. I believe that is unsafe and could cause data corruption. I do have hooks in my kernel to disable it but I don't use it.
In real world there will not be any user perceivable difference whether you have fsync enabled or disabled.
Is there a way to tune hotplug via sysfs?
yes. Advanced users only!
My phone doesn't seem to be deep-sleeping, what gives?
(assuming you checked in the right place like cpuspy) In terms of deep-sleep, there's not a whole lot going on in the kernel. It works or it doesn't - and I can assure you that I test every release (well almost every release) for deep-sleep before I release.
19 out of 20 times it's either 1) some sort of background process that's preventing your phone from going into deepsleep, or 2) something's misconfigured in your ROM, or both. Also connecting to USB will prevent phone from going into deepsleep.
I'm having unusual battery drain - help!
First of all, our gnex has very poor battery life while in active use. It's downright horrible while screen is on - screen is definitely the main culprit and there's not a whole lot I can do about that.
Custom undervolting can help or can hurt. This is mainly due to SmartReflex (class1.5) which auto-calibrates the ideal voltages for you. In fact, with SR you don't really need to use the custom undervolting feature for frequencies other than the 2 lowest. It does a great job calibrating higher frequencies. I personally don't touch it.
The "notrim" versions are an exception because I had to disable SR1.5 for the trim override to work. There's no auto-calibration going on there. Feel free to mess with custom undervolting on the notrim versions.
Now, if you've already accepted the horrible battery life while screen is on, but have questions about battery drain while idle - read the next question.
I'm having unusual battery drain while screen is off, or phone is sleeping - help!
First, let's find out if you're phone is going into deep-sleep. Install CPUSpy, unplug phone, turn off screen, and leave the phone alone for 5-10min. Turn the screen back on, launch CPUSpy, and see if you see an active entry for Deep Sleep. If so congratulations - read on.
If you've determined that your phone is not entering deepsleep by using the above method, read my entry above that says "My phone doesn't seem to be deep-sleeping". I've heard that removing SDM.apk helps as well as rebooting the phone. Also try turning your bluetooth on and off, and launching camera app and closing it.
If you've determined that your phone is entering deepsleep fine but still feel like battery drains, read the next question.
I'm having unusual battery drain while phone is in deep-sleep - help!
First make sure you are absolutely positive that deep sleep is working (read the previous question).
While on my kernel *and* connected to Wifi, you shouldn't drain more than 1% battery per hour *average* while in deep sleep (based on 5-8 hour continuous deep sleep). With wifi turned-off, my guess is probably no more than 1-3% per hour, depending on signal strength.
tip 1: If above is not happening for you, first charge the phone all the way and reboot. Let things settle a bit - give it a day or so. If you're using Battery Monitor Widget (which is not accurate for gnex), things should eventually settle between -2mA and -60mA per sample.
tip 2: Install BetterBatteryStats and look at which wakelocks dominate. Google search for names of the wakelocks to see how you can fix them.
tip 3: http://checkthis.com/d87t
If nothing seems to help, you can try the "notrim" version, but stick to speeds between 350 and 1350 (don't use OC slots). The notrim version has SR1.5 disabled which could help for those of you with drain issues on my other kernels.
What is tempcontrol and how do I use it?
First, read these two posts: 1 and 2.
Although tempcontrol was designed to be used with the experimental notrim builds because the cpu gets hotter in notrim frequencies, you can actually use tempcontrol to throttle lower frequencies. I haven't tried myself, but theoretically you can set your top speed at say 1.2Ghz and use tempcontrol to throttle at say 60C (instead of the stock value of 63C) resulting in slightly cooler phone. Theoretically.
What is SmartReflex?
SmartReflex performs continuous dynamic voltage scaling around the nominal operating point voltage according to silicon characteristics and operating conditions.
My stable and experimental builds will have SR Class 1.5 enabled by default.
You can disable SR via sysfs
How do I use Variable GPU OC?
You can use Lean Tweaks by Jake, or use the built-in "oc" script. Both leantweaks and my oc script will create an init.d script so the setting sticks at boot. My "checkt" script will also show the current GPU max speed. Note that 512MHz will probably not work for everyone.
307Mhz (stock) is set default by the kernel.
Open Terminal, and type for stock speed of 307Mhz: oc gpu 0
for 384MHz: oc gpu 1
for 512Mhz: oc gpu 2
What are the available sysfs options?
Check this post (thx byrong)
Which governor should I use on JB?
As usual I'd recommend trying all the governors and see which one works best for you. Stock JB, however, is optimized for interactive. The OS will automatically modify various interactive governor parameters on the fly while you're using the phone as part of "project butter". Namely, the following parameters are constantly adjusted by the OS: boostpulse, timer_rate, min_sample_time, hispeed_freq, go_hispeed_load, and above_hispeed_delay.
I hope this helps people if there is any other information you might want added just ask and i will do my best to come up with a comprehensive guide.
Donate to your favorite charity, or donate to imoseyon.
Did you ask Imoseyon before you posted this?
Thanks for bringing the thread over to XDA. Hopefully you got the necessary permissions, for the sake a peaceful thread. Its good to have most developments of the GNEX here and I finger tip away.
Sent from my Galaxy Nexus using xda premium
I've heard a lot about this kernel!
yes this is with his permisson
ajf64 said:
No i didn't ask him but i did put all due credits in it and it is in every other gnex forum but the sprint one all brought over by other people so if he has a problem with this he can feel free to pm me and i will get it removed i just figured it give us some easier access to his great kernel. In no way am i claiming this to be my work all support should be directed at the original thread op. I was just trying to make access to his kernel a bit easier for all xda users
Click to expand...
Click to collapse
That's all hunky dory but just doing things without asking the developer is just not right. Regardless if he has an issue or not. Its like you make something you work diligently on and then somebody just posts it somewhere else.
I dunno maybe its just me but its just common courtesy.
Sent From My Toro+ via SkyBlue Tapatalk
Thanks op.
#inb4close
#ReOpened
Sent from my Galaxy Nexus using Tapatalk 2
all fixed
ajf64 said:
well then sorry for posting it will a mod please delete this thread before it becomes a flame pit
Click to expand...
Click to collapse
Doesnt need to be deleted.. if just ask him if its alright.. thats fine enough
ÜBER™ said:
Doesnt need to be deleted.. if just ask him if its alright.. thats fine enough
Click to expand...
Click to collapse
Why do you always ruin the flaming? With your...good nature...and your rap music.
Thanks for linking. You can still ask dev for permission but I get what you're trying to do. I prefer xda since this is where I have gotten help with every phone since my nexus 1.
Sent from my Galaxy Nexus using XDA Premium HD app
Well i have gotten permission to post this from imoseyon and to keep this thread updated on xda sprint forums for him so it looks like we are all set he got back to me alot faster then i thought he would so every thing should be all good guys
and yes jayare313 i am so used to finding every thing i need on xda some times it s a pain having to check 3 or 4 sites to see if any of your mods for your rom are updated
Sorry. 3 issues here:
1) I need to verify permission from the developer and he needs to verify that he is going to support it here. If someone downloads it, flashes it, and somethings wrong.......who is going to give answers and support it? We have an active community who can help, sure, but the developer has to actively support it here. If he were ready to give support here, he would have posted it here already. And even then it would have to go in general unless he started the thread.
2) There is no source provided in the OP. Kernels must be GPL compliant and listed in the OP.
3) If you did not create it, do not post it in the development section.
Alrighty. Everything should be good now. I'll be keeping an eye out.
OP will be updated soon, with source and I've spoken to the developer.
Thank you guys.
---Jay--- From the GNex
Well, I will say I like having this thread here. So thanks to the op.
Sent from my Galaxy Nexus using Tapatalk 2
I will be updating the thread when i get home today and be offering any support you guys may need for this kernel
MichaelMcEntire said:
Well, I will say I like having this thread here. So thanks to the op.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
I totally agree. Thanks to OP for the thread and imoseyon for the kernel
Sent from my Galaxy Nexus using xda premium
Np guys any time and if there is any thing i can help with just ask i plan to provide full support for this kernel. Also if there are things you wish to have added feel free to post them as well i have permission to compile my own versions of lean kernel with cherry picked features from his repository and to add features to it. I look forward to your feedback.
is 4.2 jb cm10 compatible
twoeleven99 said:
is 4.2 jb cm10 compatible
Click to expand...
Click to collapse
Yes
Sent from my Galaxy Nexus using xda app-developers app

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

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:
Reboot to recovery. I recommend that one recovery...you know, the one that flashes zips? I forget what it's called.
Flash dkp. Optionally, rename and flash dkp-vmin-XXX.zip (see below).
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.
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
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.
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:
Create a folder on your internal storage named "dkp"
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.
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
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)
flashback7 said:
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)
Click to expand...
Click to collapse
That was fast. 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.
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!
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13
das_webos_transformer said:
Seems to be running good on the latest cm10.1 nightly. Nice job
There's more than corn in Indiana!
Click to expand...
Click to collapse
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)
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!
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13
das_webos_transformer said:
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!
Click to expand...
Click to collapse
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
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!
No issues, has been stable with good battery. Heavy use last night.
Trying an experimental build today. I like screwing a good thing up.
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13
+1
There's more than corn in Indiana!
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13
I'm about to try this bad boy
sent from the galaxy via tapping and talking
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!
This kernel has been the best thing to happen my phone. Thanks!
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
Re: [KERNEL][Very WIP][4.2.x] dkp - d2spr (& friends) - 3/3/13
decimalman said:
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:
Reboot to recovery. I recommend that one recovery...you know, the one that flashes zips? I forget what it's called.
Flash dkp. If needed, flash dkp-enable-vmin.zip.
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
Source: it's a horrible mess--if you need a feature patch, PM me and I'll cook one up from a topic branch
Click to expand...
Click to collapse
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!
das_webos_transformer said:
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!
Click to expand...
Click to collapse
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.
Re: [KERNEL][WIP][4.2.x] dkp - d2spr & friends - 3/3/13
Awesome thanks!
There's more than corn in Indiana!
kris54241 said:
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
Click to expand...
Click to collapse
No way that's with the stock battery right?
Might give this kernel a try soon

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

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:
Reboot to recovery. I recommend that one recovery...you know, the one that flashes zips? I forget what it's called.
Flash dkp. Optionally, rename and flash dkp-vmin-XXX.zip (see below).
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.
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
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.
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:
Create a folder on your internal storage named "dkp"
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.
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
Look promising
kruse1944 said:
Look promising
Click to expand...
Click to collapse
Wow you're quick!
Let me know how it works for you. Happy flashing!
Thanks for your work:good:
Is it just me or is the voltage table backwards, higher voltages for lower cpu speeds?
Sent from my SGH-T999 using xda app-developers app
Am I missing something? Where do I dl d2tmo?
Sent from my Wicked fast SGS3!
akapaul26 said:
Am I missing something? Where do I dl d2tmo?
Sent from my Wicked fast SGS3!
Click to expand...
Click to collapse
You download the att one. Works for tmo.
Sent from my SGH-T999 using Tapatalk 2
robertd0619 said:
You download the att one. Works for tmo.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
Thanks for helping out. :good: I'll change the file name to be more obvious shortly.
darjama said:
Is it just me or is the voltage table backwards, higher voltages for lower cpu speeds?
Sent from my SGH-T999 using xda app-developers app
Click to expand...
Click to collapse
Bizarre. The tables are all correct and should display correctly, but your app is probably expecting a slightly different format. What app are you using? I'll try to figure out what's going on.
This kernel works great thanks I'm on pac rom. Thanks
aaaaaaaaahhhhhhhhhhhhhhh help me
decimalman said:
Thanks for helping out. :good: I'll change the file name to be more obvious shortly.
Bizarre. The tables are all correct and should display correctly, but your app is probably expecting a slightly different format. What app are you using? I'll try to figure out what's going on.
Click to expand...
Click to collapse
just took a look at your acpuclock tables, the first table uv to 1400000 but others don't match. nomal and fast should match up with one another from my experience. The multipliers seem good tho
ayysir said:
just took a look at your acpuclock tables, the first table uv to 1400000 but others don't match. nomal and fast should match up with one another from my experience. The multipliers seem good tho
Click to expand...
Click to collapse
The tables I'm using are the stock tables from CM & Samsung (obviously with extra frequencies added as well). I've deliberately kept the standard voltage setup (minimum voltage, different voltage tables for each PVS bin, etc.), although by default I disable the minimum voltage during boot.
On the other hand, at 2106 MHz, the PVS bin probably doesn't matter, and all three bins probably need the full 1.4 V. My processor undervolts nicely, so I don't have a good sense for what voltage is required when overclocking. If anyone provides me tables that work for them, I'll update the higher voltages.
LOL the multipliers should be fine except the ridiculous 2.5 GHz typo that should never have been committed.
decimalman said:
The tables I'm using are the stock tables from CM & Samsung (obviously with extra frequencies added as well). I've deliberately kept the standard voltage setup (minimum voltage, different voltage tables for each PVS bin, etc.), although by default I disable the minimum voltage during boot.
On the other hand, at 2106 MHz, the PVS bin probably doesn't matter, and all three bins probably need the full 1.4 V. My processor undervolts nicely, so I don't have a good sense for what voltage is required when overclocking. If anyone provides me tables that work for them, I'll update the higher voltages.
LOL the multipliers should be fine except the ridiculous 2.5 GHz typo that should never have been committed.
Click to expand...
Click to collapse
hmm your correct just took a quick gander at cm's tables. I say try increase the voltages accordingly and see if it makes a difference in readings
decimalman said:
Bizarre. The tables are all correct and should display correctly, but your app is probably expecting a slightly different format. What app are you using? I'll try to figure out what's going on.
Click to expand...
Click to collapse
I'm using set cpu. Thanks for looking into it.
Sent from my SGH-T999 using xda app-developers app
darjama said:
I'm using set cpu. Thanks for looking into it.
Sent from my SGH-T999 using xda app-developers app
Click to expand...
Click to collapse
I'm guessing this was an oversight on my part. I don't actually have the app, but I'm testing a bunch of fixes for a handful of different apps now. I'll push a test build (hopefully) later today that should get Voltage Control, Kernel Tuner, and maybe even SetCPU all working properly.
darjama said:
I'm using set cpu. Thanks for looking into it.
Sent from my SGH-T999 using xda app-developers app
Click to expand...
Click to collapse
New test build should get SetCPU working properly. If you get a chance, will you try flashing this test build and letting me know if it works for you?
decimalman said:
New test build should get SetCPU working properly. If you get a chance, will you try flashing this test build and letting me know if it works for you?
Click to expand...
Click to collapse
That seemed to fix it, thanks!
Sent from my SGH-T999 using xda app-developers app
darjama said:
That seemed to fix it, thanks!
Sent from my SGH-T999 using xda app-developers app
Click to expand...
Click to collapse
Great! If I don't run into any problems with the changes I made, I'll merge everything and it'll be in the next release.
robertd0619 said:
You download the att one. Works for tmo.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
I figured as much. But was not 100% thanks
Sent from my Wicked fast SGS3!

[GUIDE] Custom Kernels: A Guide on What you Need to Know

I was searching for info about MPDecision and stumbled upon this..it's a very good read specially for beginner and those that want to know more about kernel specifics and how they work..this was written back in 2012:
---What IS a kernel?---
The ELI5 answer: "An analogy: the Kernel is like the Engine, Electrical system and the Transmission to a car. The Library, Framework and the Apps [AKA ROM] are the body frame and the rest of the Car." - faux123
In other words, the kernel is the software that controls the hardware at a very low level.
---The Stock Kernel---
The "stock" kernel is the kernel that comes with your Nexus 4 out of the box. It's compiled directly from Google's kernel source code and shipped on your device with zero modifications. A custom kernel, on the other hand, compiles the stock kernel source and adds various modifications to that code.
What are those modifications that kernel devs employ?
To understand what they mean, you need to understand the features of the stock kernel first!
What are the stock kernel parameters?
CPU min frequency: 384 MHz
CPU max frequency: 1512 MHz
Governor: Ondemand
I/O Scheduler: CFQ
What does each parameter represent?
CPU frequency: you can simply think of this as the "speed" the CPU is running at
Governor: regulates the CPU frequency based on many different parameters such as load and time-in-state. Here is an excellent list of many of the most common CPU governors and how each works. Note that you will only see a couple of the CPU governors on this list in whatever kernel you use. Ondemand and Interactive are by far the most widely used, and are the ones you should look at.
I/O Scheduler: handles how the system makes disk access; Please refer to the previous linked thread and scroll down to the 4th post for a detailed list.
What else do you need to know?
--PowerHAL--
PowerHAL is what makes Project Butter. The powerHAL is a ROM component that tells the kernel to BOOST the CPU frequency to higher values in response to UI inputs. The higher CPU frequencies can better respond to UI demands so the overall experience is smoother than without. - faux123
--mpdecision--
All Qualcomm based phones have Qualcomm prorprietary userspace binary called "mpdecision" aka m(ake)p(oor)decision. Instead of letting the kernel itself to decide what frequencies and how many cores to run, this "mpdecsion" binary polls the kernel run queue statistics and decides for the whole system the "optimal" frequency and the "optimal" number of cores to use. The concept is fine, except the decision making is done in userspace and it's 100% closed source so there's no way to tweak it and there's a latency (because all userspace binaries needs to "poll" the kernel for the latest information which is slightly delayed). - faux123
ELI5: mpdecision is a proprietary Qualcomm daemon that makes calls to the SoC (the entire chip your phone uses) to manage the cores. The OS (PowerHAL) makes a request to mpdecision and then mpdecision makes a request to the first two cores to ramp them up. - _motley
Why do kernel devs mess with these?
In practice, the PowerHAL ramping up trick successfully got rid of a lot of the UI lag since Android 4.1. However, this comes at the cost of battery life (and heat generation!) The reason for this is because the system ramps up its CPU on every touch input, rather than waiting for the kernel to calculate the load and ramp up accordingly. On the Nexus 4, when the PowerHAL makes a call to mpdecision it locks the minimum CPU to 1026 MHz upon touch input for the first two cores. While this DOES give you the buttery-smoothness you would expect, it's a bit overly aggressive. This is part of the reason why stock kernel tends to heat up your phone when you play around with it a lot.
---Custom Kernels---
What changes should I look out for?
--mpdecision--
Many kernel devs don't like Qualcomm's implementation, so they work around or get rid of it. Franco, Faux, Bricked, Matr1x, Motley, and Trinity have gotten rid of it/used their own implementations. Harsh and IntersectRaven's leave it intact. Every kernel dev implements things in their own way, and the only way to tell which is better for you is to try each one. This is by far the biggest change any kernel dev can make, as it completely alters how the system handles hotplugging and CPU scaling. In general, you'll find kernels without mpdecision running cooler, with greater battery life, but with a little more lag (made up for by other tweaks).
--thermald--
A binary that controls how to throttle your CPU based on CPU and battery temperatures. You can find the config file in /system/etc/thermald.conf. Stock configs lead to aggressive thermal throttling (battery temp. at 36 degrees C for example, which is easily achieved). You can look into the file and see the various thresholds and actions that the system takes to lower the temperature of the CPU and battery, but it isn't really necessary. Just know that some kernel devs may have changed this in order to allow your phone to run at higher frequencies for an extended period of time, or to further make your phone run cooler.
--Underclocking--
Quite straightforward, by limiting the max frequency your CPU can use, you use less power (higher frequency results in more power dissipated by the CPU).
P = C(V^2)f where C is capacitance, V is the voltage, and f is the current frequency
..gives you an idea of how underclocking (and undervolting) uses less power.
--Undervolting--
This is all the rage today, with many users trying to get as low as possible stable voltage. It's arguable how much undervolting saves battery life, but there's no doubt it reduces heat dissipated from the CPU (see: the above formula). Your CPU is located on the top half of your phone, which is likely where you've felt the heat before. How much your chip can successfully undervolt depends on what type of binned CPU you have. If you want to undervolt, I recommend checking if the voltages you set are stable by running the StabilityTest app and doing the Scaling Stability Test. The frequencies' voltages definitely don't scale linearly, so don't assume that doing global undervolts will be the best you can do. You'll have to apply voltages one by one if you truly want the lowest your chip can possible handle.
--Overclocking/overvolting--
Bricked, Trinity, and Motley's kernel implement this, because it CAN be dangerous. Overclocking usually requires overvolting the processor (so the overclock is stable) but overvolting carries with it the risk of bricking your phone by frying the CPU. Know that doing this has some risks before you try it. Some kernels like Matr1x and Faux's also allow for the GPU to be overclocked if games run a little slowly for you.
--Hotplugging--
Hotplugging is where the individual cores on your phone switch on/off depending on the load on the CPU. The advantage of hotplugging is a reduction in power used because the cores will only turn on when needed. Kernels that use the auto_hotplug binary by Thalamus (that would be Matr1x, Motley, Trinity, Bricked at the moment) allow you to fine tune the enabling and disabling thresholds. These parameters are generally for advanced users only as they require you to write scripts to control them.
--Color Control--
Gives you the ability to change color multipliers and gamma settings to calibrate your display. If you feel your display is too yellow, or you miss the previous feel of your previous phone, then you can mess around with this to get better color reproduction. You can find some user examples here to give you a good idea of what can be done. Gamma control currently requires either Faux's control app or for certain kernels you can use scripts to control them.
--Wakelock reduction--
Some kernels have reduced the msm_hsic_host wakelock duration so your phone enters deep sleep more often. How much improvement this makes is debatable, and whether or not this wakelock is even an issue is also debatable.
--Kernel modules--
Some kernels make modifications to the low-level drivers that interact with the components of your phone. An explanation of what is commonly touched can be found here. You don't really have to worry about this, just know that something is being improved when a kernel dev mentions it.
---Installing a Custom Kernel---
Just flash the zip in your recovery of choice. No need for wiping cache or anything. However, one thing to note that might save you some headache in the future is: what exactly are you flashing? When you flash a kernel, you are not just flashing the kernel, you are writing to the entire boot partition. The boot partition is made up of the kernel AND the ramdisk (the ramdisk is an image that the kernel mounts read-only at boot, it is basically used by the kernel to mount the rest of the system images). Some kernel devs pack their own ramdisk into their boot.img that you are flashing, so when you try to flash a DIFFERENT kernel, you end up in a bootloop. (An example: flash Franco kernel --> flash Faux kernel on top = bootloop.) To solve this you need to reset the ramdisk by flashing a stock reset kernel with the stock ramdisk.
Click to expand...
Click to collapse
all content taken from [URL="http://www.reddit.com/r/nexus4/related/158t1i/custom_kernels_a_guide_on_what_you_need_to_know/"]a reddit post i found which was originally written [/URL]by reddit user IAmAN00bie

Red Magic 5G MOD Kernel GPUOC 900/940mhz +battery 1.4 STABLE!

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
*** NOTE THAT 3.16 NA OR 4.13 Red Magic 5G SPECIFIC ROMS SHOULD BE USED WITH THIS KERNEL! THE COMBINED ROM (WITH RM5S) HAS UPDATED KERNEL CODE THAT IS NOT FULLY COMPATIBLE AND NUBIA HAS NOT UPDATED THEIR SOURCE CODE ***
*** Please click Thanks (Thumbs up icon) on my post here if you like my kernel and rate the thread 5 stars, then just use it and enjoy - if you want to send me a beer or two feel free - you don't have to use PayPal - Revolut and Amazon.com (USA) gift cards avoid fees. I like to hear from happy users I hope you are glad that you have the fastest phone in the world currently. The active cooling in this device is utilized to the extreme with MOD kernel, meanwhile your battery usage will be much improved at the same time. How? Well, that's all in the source code, free for all to fork it on GitHub and modify to your liking. Just don't forget to credit me and the many great devs that made the improvements possible... without them, there would be no MOD kernel. This is just a hobby of mine and I like to produce a nice product that all can enjoy. I'm also quite friendly and although I may tell you no I won't add that feature (such as network hacking tools), I won't hold anything against you for asking. I have not been compensated other than by some generous folks on my Telegram channel, so this whole project is basically self funded. Red Magic will not support it, unfortunately, but you can if you feel the improvements are worth it. I believe they are, but I come from a biased point of view as the sole developer for RM5G ***
********************************************************************************************************************************************************************************************************************************
NOTICE: YOU ASSUME FULL LIABILITY FOR ANYTHING THAT MAY HAPPEN TO YOUR PHONE USING THIS KERNEL. ALTHOUGH IT WORKS 100% ON MY PHONE, IT MAY NOT WORK THE SAME ON YOURS. THE PROCESS OF ROOTING A PHONE AND INSTALLING A CUSTOM KERNEL ALWAYS HAS RISKS, SO IF YOU ARE NOT COMFORTABLE ASSUMING THOSE RISKS, DON'T INSTALL THE KERNEL! THIS IS A TYPICAL DISCLAIMER FOR CUSTOM KERNELS I HAVE FOUND NO BUGS WITH IT AT ALL. USERS ON CN, GLOBAL, AND NA ALSO HAVE NOT FOUND ANY PERFORMANCE ISSUES OR BUGS (DO NOT USE V7.14 or V8.11) IF YOU DON'T KNOW WHAT YOU ARE DOING, IT'S BEST TO REMAIN STOCK. OR JOIN THE TELEGRAM GROUP, AND GET SOME REAL HELP.
********************************************************************************************************************************************************************************************************************************
Easy root method: https://forum.xda-developers.com/nu...nner-tutorial-unlock-bootloader-t4131585/amp/ although I suggest still using Magisk 20.4 for root.
Note: if you've already rooted and want to upgrade, people have had success saving the kernel as boot.img and TWRP as recovery.img in SmartPack, vbmeta skip as vbmeta.img and placing into the ROM update.zip using MT Manager (a root browser) and saving the updated file. Then do a Settings / System Update / click the 3 dots / local update and select your modified file. In fact I upgraded from 3.13 to 3.16 NA ROM without losing anything this way. Now for normal installation:
Custom kernels require root and Magisk to be installed. This is due to the signature not being signed by Red Magic (the company) itself. Following the above method you will still pass SafetyNet and most apps will work without trouble. If you have a specific app that detects root, well, Magisk Hide the app from Magisk Manager and see if that fixes it. You should also Hide Magisk Manager from various forms of detection (under Settings). Last case is to move the installation of Magisk under a random directory (which I have not had to do and all my banking apps still work), only if the root detection methods used by your app providers are more picky.
MOD KERNEL 1.4 STABLE:
RELEASE NOTES:
Block mode I/O has been changed to Multi-Queue from Single-Queue so your default scheduler is now MQ-deadline (credits to PappaSmurf, excellent kernel dev). You can choose between mq-deadline, kyber, and none in a kernel manager under I/O scheduler. From my benching with Androbench, it doesn't make much difference which one you use. Some have parameters you can tweak. None literally means no scheduler which is fine on an SSD, and has no overhead if you want to select it in a kernel manager. I always recommend SmartPack. To get settings to stick you Toggle "Apply on Boot" and it will go to what you've selected after 5-10 seconds on the next boot.
All debugging has been turned off completely on BBRv2 - thanks to PappaSmurf (I missed a few spots), and debug can't be turned back on from the userspace now. BBRv2 is selected as the default TCP algorithm which users have explained as a "no-lag" algorithm while gaming. It's just generally a fast algorithm all around. For me it works great, but you can still choose from many different algorithms in a kernel manager if you want to.
In SmartPack / Misc / TCP Congestion Algorithm, you have many choices: reno / bbr / bbr2 / bic / cdg / cubic / dctcp / westwood / highspeed / hybla / htcp / vegas / veno / scalable / lp / yeah / illinois. A SmartPack script is included below you can add in SmartPack to show the true TCP algorithm as it will always show Reno (a bug also shared by FK kernel manager). Below it's called Check_TCP.sh just go to SmartPack / Script Manager / Import / Check_TCP.sh. Afterwards, click Execute to see the active algorithm. If you set it on boot, this is the algorithm that will run, despite what the field says in Misc.
Battery is running very well on normal usage I'm getting around 7.5% active screen on drain over 7 hours and <0.7% screen off drain over 13 hours at 90hz screen setting. This is with actively using the phone for multiple "normal" purposes, reading emails, browsing websites with Chrome, reading news, streaming videos, etc. various shopping (Amazon/eBay) and tracking, Reddit feeds and live video, and other random "daily" tasks, up to 10 apps open at a time. Gaming of course will drain more, as will 144hz. I also have dark mode enabled in Settings. To get idle drain down I disabled 3 additional wakelocks that were causing high screen off drain, and so far I haven't seen an issue with blocking them. I also removed wakelocks that no longer exist since the Boeffla WL Blocker default list was created (it was quite old) so it now should be relevant for this device, with no interaction on the users part to disable anything via a kernel manager. Still, in SmartPack you will see a Wakelocks menu in case you install an app that causes idle drain to rise, this can be used to find and block wakelocks causing the problems. It can sort by wakeups and also by time. As it states though, you should be very careful what you disable. There can be unintended consequences and most wakelocks are not well documented as to what they actually control.
Dynamic Stune Boost is entirely removed from the kernel code now, as I didn't see any benefit from using it with this kernel.
Don't forget Dynamic Fsync is hidden under Misc in SmartPack which if you turn on will speed up your SQLite speeds. AnTuTu will penalize you for this, ignore it, your phone will be faster - but I leave it off by default. Androbench will show the true memory benefit. It is significant if an app does a lot of operations on databases. Journaling for the database is held in memory until the screen is off, then it is written. Although there is a chance of a data loss or corruption with this on if the device were to crash, it is safer than just turning off fsync. If you have any unstable apps, just leave it off - better to be safe. On a solid system though, you may notice better performance.
Also remember under SmartPack / GPU there is AdrenoBoost - it is set to low. You can alter to medium or high to get faster transfer between GPU frequencies, although it has worked great for me the way I use the phone. For you another setting may suit you better. Recall RedMagic OS only allows several frequencies which I spaced out as well as possible at 305mhz, 400mhz, 525mhz, 670mhz, 800mhz, and either 900 or 940mhz depending on the version you installed.
Overall I'm very satisfied with this kernel build and don't plan on adding or subtracting anything from it for the time being. It does what it should do, gives solid performance, and good battery life. My last score on AnTuTu setup with defaults 12GB/256GB was 682K which currently is still the top performing phone out there - running at 940mhz GPU. Not all phones can handle 940mhz so use 900mhz if yours cannot. If there are enough requests for an intermediate build (say 925mhz) I can add one later off the same code base. Also note in releases there are "gaming" builds that don't keep track of CPU times at each frequency, which was a request by users to remove any potential lag while gaming. I run the non gaming version, useful if you want to tweak battery usage, but nonetheless, both versions are there for you to use.
I'm on Telegram t.me/NubiaRedMagic5G_Mods as long as I have the phone. Which will be quite a while if Red Magic / Nubia decides to fix N41 5G in the USA.
Also note that all the features of this kernel (besides ones specifically added by me) are the creation of other developers whose contributions are all notated in the kernel source code. Some of the developers that have contributions here or helped me in some fashion: Resurrect88, DD3Boh, PappaSmurf, kdrag0n, Ayrton990, Flar2, Lord Boeffla, plus many more across the globe. Without them, I wouldn't be making any kernels! And I'm sure there are many other devs I've forgotten to mention, I thank all you guys for your help and support.
MOD 1.4 Download Link:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.4
PRIOR RELEASES BELOW:
8th Release:
MOD KERNEL 1.35-BBRv2 STABLE:
RELEASE NOTES:
This is an intermediate release - I realized that the prior release was draining far more battery than it should, and I found the source was debug related code in BBRv2 from Google. So this is the updated kernel that gives you battery life like before this TCP algorithm was added.
CONFIG_CPU_FREQ_TIMES=y has also been added so you can see in a kernel manager how much time is spent in each mhz block for each set of processors. This can be useful if you set in a kernel manager (like SmartPack) a minimum CPU mhz to see how much time is actually spent at each level.
The code base also has Dynamic Stune Boost, but I haven't had time to optimize it for the device, so it's just on default settings. So there are 2 versions of this 1.35-bbr2 release. At some point it will be enabled as part of a regular release (some 17 commits squashed together into 1, Stune Assist was causing issues so I turned it off). The main idea of that set of code additions is to run the device at lower frequencies, saving battery, while still achieving the same performance level to the user of the phone. If you want to try different options for it in SmartPack or FK Kernel Manager you can.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.35-bbr2
7th Release:
MOD KERNEL 1.3-BBRv2 STABLE:
RELEASE NOTES:
Added the 31+ commits for BBRv2 from Google. Squashed the commits down to 6 by author from Google (for easy code maintenance). It's said to be the best TCP (internet congestion) algorithm so this sets it by default. You can still select from the others added in 1.3, as mentioned only EX Kernel manager properly shows them. But SmartPack if you choose the one you want under Misc, then click Apply on Boot, it actually will load the TCP algo you selected. It's just a visual defect. I also made a script for SmartPack uploaded to show you the TCP algo that's selected in my repo you can install so you can verify for yourself. Give it 10 seconds (default on boot setting) before you check.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.3-bbr2
6th Release:
MOD KERNEL 1.3 STABLE
RELEASE NOTES:
All this release adds is TCP congestion algorithms. The only kernel manager which correctly shows the algo set correctly is EX Kernel Manager. Using SmartPack or FK Kernel Manager will tell you that you're always on Reno, when in fact, you aren't. I'm not quite sure if this is bug related to 865 kernels as a fellow dev had the same experience (on an Op8 Pro). Now the default is set to BBR. Why? No reason specifically, although it is one of the better algorithms for internet usage. You can easily change in any kernel manager and set on boot which one you'd like to use (see above RELEASE NOTES if using SmartPack). But this gives you plenty of options:
BBR, BIC, CDG, CUBIC, DCTCP, WESTWOOD, HSTCP, HYBLA, HTCP, VEGAS, RENO, VENO, SCALABLE, LP, YEAH, ILLINOIS
You can Google the benefits of each and pick what you like. Or just leave it alone. The prime idea of MOD kernel is that you don't need to adjust anything it just works optimally without any intervention. Read the release notes for prior features that have been added. There are many just not summarized in a single place at the moment. All the optimization has been done for Red Magic OS.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.3
5th Release:
MOD KERNEL 1.25BETA
RELEASE NOTES:
This release is mostly about battery savings. I'm averaging around 6.5% active drain on normal tasks with this version (90hz setting), and around 0.5% screen off drain. A big improvement over the stock kernel. So I ended up with about 13 hours SOT + 24 hours screen off on 1 charge! See the picture, I stopped at 11% left. Now I didn't say anything about gaming. If you want to game and have power saving benefits, don't enable any of the built in boosting modes in the game launcher - the Red Magic OS will override everything. Let the kernel do the work for you. And if you're seeing any graphics lag, go into SmartPack kernel manager (free) and go under GPU, Adreno Boost is enabled on low, you can set it to medium or high. That will increase the speed at which the GPU throttles up and down.
1) Switch to the Energy Model for CPUs: Several subsystems (thermal and/or the task scheduler for example) can leverage information about the energy consumed by CPUs to make smarter decisions. This config option enables the framework from which subsystems can access the energy models.
2) Added CPUMASKS for the Little, Big, and Prime cores from Sultan Alsawaf Sultan: SultanXDA, prime added by Danny Lin: kdrag0n.
3) Added kernel control of the minimum frequencies for the little and big clusters by Danny Lin kdrag0n. They are set to run at their minimum running frequencies when idle 691mhz (little) and 710mhz (big) which results in nice power savings when web browsing or just under low load in general. Prime cluster min is not set as it makes the CPU scheduler function poorly.
4) Added AdrenoBoost by Aaron Segaert: Flar2, with all its changes squashed into 1 commit. Defaults to low setting. As mentioned before, you can change in SmartPack, and set on boot if you need a higher value than low: https://github.com/SmartPack/SmartPack-Kernel-Manager/releases
5) Uploaded the various GPU OC files to the repo, It still will just build off the default one, but they are here to be complete. 940mhz version again is posted, Building direct from the repo will give you 900mhz max GPU.
Downloads:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.25BETA
4th Release:
MOD KERNEL 1.2 BETA
RELEASE NOTES: (Note a 940mhz GPU clock edition is available, if you want to try it, a few of us have had good results on it. Likely the max an 865 GPU can run. You'll sacrifice the power savings, however):
1) Enable Power-efficient workqueues by default, add a toggle that can turn this off via a kernel manager (under CPU in SmartPack). Enabling this makes the per-cpu workqueues which were observed to contribute significantly to power consumption unbound, leading to measurably lower power usage at the cost of small performance overhead. Have also added many other power saving features to the defconfig. The phone is a beast, power savings is a good thing to implement.
2) Update the LZ4 decompressor algorithm with a much faster variant for the ZRAM swap, now version 1.8.3-9 credits Gao Xiang [email protected] and many others (check commits). Speed improvement below (should help on 8GB devices):
Compressor name Compress. Decompress. Compr. size Ratio Filename
lz4hc 1.7.3 -9 12 MB/s 653 MB/s 42203253 42.20 enwik8
lz4hc 1.8.3 -9 11 MB/s 965 MB/s 42203094 42.20 enwik8
3) Default scheduler is set to SQ deadline. Should see minimal improvements in speed until I get a MQ variant working. On the task list ahead.
Download Link:
1.2BETA: https://github.com/mrslezak/NX659J_Q_kernel/releases/download/1.2BETA/MOD-RM5G-GPUOC-Beta1.2.zip
940mhz GPU release here, it's still 1.2BETA, just with the max clock a few of us have been able to use. That doesn't mean your device can for sure handle it, but give it a try if you'd like! Note the power savings will likely not be there vs the other release at 900mhz:
https://github.com/mrslezak/NX659J_...oad/1.2BETA/MOD-RM5G-GPUOC-940mhz-Beta1.2.zip
3rd Release:
1.15BETA: https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.15BETA
This is a HEAVILY updated release of the MOD kernel 1.10BETA - I realized the phone's software will allow 6 frequency clocks, although 1 did not have a regulator defined (now patched). NOW I VERY HIGHLY suggest installing SmartPack Kernel manager. It will give you insights into the kernel and how it's performing and it's free. It also will let you adjust added options now in the kernel. Just root your phone and flash from TWRP. If you haven't already installed Magisk, then install that too. There's a guide I posted on XDA about that. Use the experimental method there is no reason to unlock your bootloader. https://forum.xda-developers.com/nu...how-to-unlock-bootloader-redmagic-5g-t4081743
RELEASE NOTES:
1) Bugfix: there was 1 missing 800mhz GPU frequency regulator clock on the prior version. This has been set to TURBO, 1 level under the 900mhz regulator of TURBO_L1.
2) Boeffla WakeLock blocker (v1.10 + tweaks) has been added to reduce battery drain when the phone is not being used, using the latest version and all patches. A default block list is included. You can access in SmartPack Kernel Manager under the new menu that will appear "Wakelocks" - especially investigate if your phone has high idle drain, you can experiment with blocking other wakelocks (which don't allow your phone to sleep). Or you can leave as is. I get just under 1% drain (screen off) and the phone sleeps quite often with this version. Take a look at the screen shot! That's just normal phone usage, not gaming.
3) All debug entries (except those required) have been stripped completely out of the kernel. This results in less wasteful debug information being generated.
4) The default algorithm for ZRAM has been changed from LZO (high compression, but slow) to LZ4 (slightly less compression, but fast). LZ4 algo was added. It still defaults to 4GB.
5) Dynamic Fsync has been added to the kernel as well. This patch allows journal entries to be written only when the screen is off. I.e. they are cached and written afterwards. This increases database performance. It is disabled by default so in SmartPack Kernel manager, if you'd like to turn it on, go under Misc, select Dynamic Fysnc, and select apply on boot. There is always a risk of data loss when delaying writes, although I've personally never have had issues - it only happens if the phone crashes, and mine has never crashed on this kernel. This won't normally increase your benchmark scores (except AndroBench), it increases SQLite database access speed. Up to you to use or not, works fine on my device.
6) Here are the updated frequencies (note there is 1 more). Will have to wait for AOSP before I can add back more. Note the 670MHz is likely the 865+ max frequency per the release notes today on the device (which I assumed by the source code anyhow pre-announcement): 900MHz / 800MHz / 670MHz / 525MHz / 400MHz / 305MHz
AS ALWAYS, USE AT YOUR OWN RISK!!!
Github Source:
https://github.com/mrslezak/NX659J_Q_kernel
Initial Release:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.0.BETA
Second release - gets over the "reset to 490mhz" bug caused by the system software, at the expense of reducing frequencies to 6 total:
https://github.com/mrslezak/NX659J_Q_kernel/releases/tag/1.10BETA
Newest release -> will be posted on the top from now on.
Telegram:
https://t.me/NubiaRedMagic5G_Mods
And note the AnTuTu benchmark is just a first run after installing. 670K is likely a record on any 865 phone. The last bench turning off 4GB ZRAM (12gb/256gb device) I got 673K. AnTuTu doesn't equal performance, but if you've benched you'll see this is an insane improvement over the stock kernel. Only when the demand is there will it scale up to 900mhz. I've been using for a while now and notice no difference in battery life. The Adreno driver is very good at handling extra clock frequencies efficiently without modification (despite an "Adreno Boost" that is often added to kernels). The gamers using the kernel are making statements that they couldn't imagine the game play any better than it already was, but now it's even smoother.
Unfortunately the way the Nubia software behaves, it auto-resets to power level 5 (which was 490mhz) on the 1.0BETA on boot and also after boosting the frequencies up. I tried every possible way to bypass this but eventually just gave in and removed frequencies. So the BETA1.10 and above have less frequencies but will always revert to 305mhz, the base minimum frequency of the device. Hopefully once we have AOSP ready I can add more.
MattoftheDead
I.e. M.O.D. Kernel Developer
The first Red Magic 5G OC kernel.
Xiaomi Mi9 / Mi9T Pro Pie V2 and Q V1.5 Kernel Dev
Nice work. Do you notice any benefits to OCing the GPU like that? I don't think there are many games that would benefit atm.
This is amazing !!! :laugh:
Is this going to work on all roms like CN, NA or EU Roms? Im currently running NA 3.11 flash from CN rom with root and twrp
We have people using it on CN Global and NA versions no problem at all. Works fine on every model.
Kernel is fully functional no issues at all.
CN Rom to NA Rom v3.11
305mhz min to 900mhz max confirmed and using smart pack to control the frequency
Thank you for this hopefully there is more development i really appreciate ur effort
Kernel building is just a hobby of mine, I was posting a minimal kernel to get some more kernel developers on board to hopefully add more features. I usually add Boeffla Wakelock Blocker and Dynamic Fsync and call it a basic kernel. The last super kernel I made took way too long, and I don't have that kind of time anymore - boost functions and underclocking to balance out the battery life and such. Development work doesn't pay anything, I didn't get the phone free, all my donations go to other developers. And I have a full time job and family. But if anyone wants to port over my MOD Kernel Q 1.5 Mi9 features, well that would be a super kernel. It's just really, really time consuming, time I don't have at the moment. And the merging of source has to be EXACT or you end up with a really slow phone rather one that balances underclocking, boost, and overclocking.
MishaalRahman said:
Nice work. Do you notice any benefits to OCing the GPU like that? I don't think there are many games that would benefit atm.
Click to expand...
Click to collapse
All the gamers using the kernel are reporting that the games run smoother than before, which no one thought was possible. It is already a flagship device. But the GPU OC with the Adreno driver scales when needed up to the frequencies that it has in the table and has no issue on 670, 800, and 900mhz reported so far. There are gamers on NA, Global, and CN ROMs, with no bugs reported. No issues and everything works properly. I have tested myself and although I'm not a gamer, all the functions work as they should. It still connects via Bluetooth, it still takes photos and videos, etc. There is no lag whatsoever. Overall I think the frequencies are ideal for this device with it's advanced active cooling system. Other devices however, with passive cooling, are unlikely to handle the increased GPU clocks.
I found an unusual bug where the GPU Minimum Frequency will reset on its own to 490mhz even if i set the minimum frequency to 305mhz im using smart pack kernel manager that you provided and cool tool btw to monitor the gpu frequency.
I also set the battery optimization to off on smart pack so it wont turn off itself.
This also happens when i played games that actually boost to 800 to 900mhz then after i close the game it sets back the minimum frequency to 490mhz so i have to set it again to 305mhz on the kernel manager to save more battery and lower the temps.
I also notice it sets back to 490mhz minimum frequency by just watching youtube videos so i have to set it back to 305mhz again. I tried different kernel manager too like Franco Kernel Manager and Kernel Audiator and still doesnt fix the issue
I think this was a minor bug for sure
I never touch the GPU governor btw
Performance was super nice thou i scored 645k on antutu on my first run but for now im going back to stock and gonna wait for your next update
What to do to root the phone without breaking the fingerprint please. I read the article publish nothing understood someone can explain to me step by step. I am an amateur I never root a phone. I have cn 2.55 16gb.
I don't have the same issue - I just tried to recreate it by watching a YouTube video and I went back to SmartPack and it still shows 305MHz GPU frequency. Although I'm using the debloated / optimized ROM I created Black Magic 5G which has everything setup properly, Nubia apps frozen, everything moved to 3rd party apps. NETFLIX patched to 4K HDR10, YouTube Vanced, a ton of root utilities, AdAway ad blocker, etc. You can find it on the Telegram channel (I'm using the NA/Global version of Black Magic 5G). Then I watched Netflix, still at 305mhz. As I have no idea how you've setup your phone, I just can't recreate it.
shaifabra5 said:
I found an unusual bug where the GPU Minimum Frequency will reset on its own to 490mhz even if i set the minimum frequency to 305mhz im using smart pack kernel manager that you provided and cool tool btw to monitor the gpu frequency.
I also set the battery optimization to off on smart pack so it wont turn off itself.
This also happens when i played games that actually boost to 800 to 900mhz then after i close the game it sets back the minimum frequency to 490mhz so i have to set it again to 305mhz on the kernel manager to save more battery and lower the temps.
I also notice it sets back to 490mhz minimum frequency by just watching youtube videos so i have to set it back to 305mhz again. I tried different kernel manager too like Franco Kernel Manager and Kernel Audiator and still doesnt fix the issue
I think this was a minor bug for sure
I never touch the GPU governor btw
Performance was super nice thou i scored 645k on antutu on my first run but for now im going back to stock and gonna wait for your next update
Click to expand...
Click to collapse
Yeah maybe because you modified the rom.
Im currently running Flash Global V3.11 when i tested your kernel no modification made im just rooted with TWRP Installed and i posted this kernel on red magic 5g group on facebook and 3 of us having the same issues as well.
Im gonna try it again on V3.13
UPDATE:
still returning to 490mhz as minimum frequency after gaming and after watching one youtube clip
kinda sad hopefully you can fix this bug on the global rom that nubia provided if you have the time, great kernel for gaming because of the 900mhz boost and the phone can sustain this boost because of the active fan
Why don't I have a roughly similar score?
Is it possible to overclock the CPU as well? They officially release the specs sheet of ROG Phone 3 it has overclocked CPU (3.091ghz) and an overclocked GPU. I know this phone can keep up with those clocks because of the cooling system but the problem is the battery life. But still, its worth it.
Blink003 said:
Is it possible to overclock the CPU as well? They officially release the specs sheet of ROG Phone 3 it has overclocked CPU (3.091ghz) and an overclocked GPU. I know this phone can keep up with those clocks because of the cooling system but the problem is the battery life. But still, its worth it.
Click to expand...
Click to collapse
I believe Qualcomm blocked overclocking of CPUs quite a while ago from SD845. Only GPUs can be overclocked.
Though I don't know if devs have gotten tools to get around it.
The 490 bug looks like it's related to the gaming mode APK resetting the min frequency. I can't decompile or recompile APKs so I don't have a way to get around the system reverting to 490 without removing 3 other frequencies. It seems hard-coded in the app that it only expects to see 5 frequencies so to have all working properly, 3 need to be removed. This is in contrast to what my buddy dev on the Op8 Pro can do, but this device is designed differently in how it boots and custom apps that increase frequency clocks. If any devs are good with APKs it's a very simple function call that sets the minimum GPU frequency. The only odd thing I see is that the minimum power level stays at 8 (minimum) which corresponds to the lowest clock speed. That number doesn't change in a kernel manager when the min GPU clock reverts to 490.
I'm off on vacation not near a PC but will try to come up with a stock # of clock frequencies that still scrolls smoothly between them and the Adreno GPU driver. May take a few tries but it's quite easy to modify. I already think 180mhz is too low from using it, it's more of a sleep frequency some suggested going this low but I think the phone design is for 300+. I prefer to use more clocks for better throttling but have to work with what we are given and do the best inside those boundaries.
No you can't raise CPU clocks on 865 devices that ROG device is supposedly using the 865+ or whatever the mid device is named between the 865 and 875. They have blocked CPU OC hardware wise for some time now.
mslezak said:
No you can't raise CPU clocks on 865 devices that ROG device is supposedly using the 865+ or whatever the mid device is named between the 865 and 875. They have blocked CPU OC hardware wise for some time now.
Click to expand...
Click to collapse
Qualcomm's Meizu’s CMO Wan Zhiqiang recently commented on Weibo saying that there won’t be a Snapdragon 865 Plus this year.
We will see!
No 865+ this year..
Trust me whatever they call it it's already defined in the source code as a second GPU bin clock for another device ID. So maybe it won't be called an 865+ but there is some device between the 865 and 875 coming out. I have OEM confirmation as well this device exists the name isn't important. I can tell you the top GPU frequency is 670mhz that's it, vs. the 587mhz default on the 865. Still the 865 handles 900mhz GPU no problem the only benefit would be higher CPU clocks. And an extra GPU clock. Which I'll attempt to spoof next time I get near a PC.
mslezak said:
Trust me whatever they call it it's already defined in the source code as a second GPU bin clock for another device ID. So maybe it won't be called an 865+ but there is some device between the 865 and 875 coming out. I have OEM confirmation as well this device exists the name isn't important. I can tell you the top GPU frequency is 670mhz that's it, vs. the 587mhz default on the 865. Still the 865 handles 900mhz GPU no problem the only benefit would be higher CPU clocks. And an extra GPU clock. Which I'll attempt to spoof next time I get near a PC.
Click to expand...
Click to collapse
Is it possible to overclock the memory clock too? I assumed that 900mhz is the core clock.
mslezak said:
Trust me whatever they call it it's already defined in the source code as a second GPU bin clock for another device ID. So maybe it won't be called an 865+ but there is some device between the 865 and 875 coming out. I have OEM confirmation as well this device exists the name isn't important. I can tell you the top GPU frequency is 670mhz that's it, vs. the 587mhz default on the 865. Still the 865 handles 900mhz GPU no problem the only benefit would be higher CPU clocks. And an extra GPU clock. Which I'll attempt to spoof next time I get near a PC.
Click to expand...
Click to collapse
You're right, that makes sense.
I'm glad they are making a refreshed chip.
On another note, do you think we will see an overclocking tool in the future?
Possibly with a custom ROM?

Categories

Resources