FORUMS
Remove All Ads from XDA
Honor 7x
Win an Honor 7X!

[KERNEL][AOSP][7.0] N4-Revival for nougat r02 [2016-10-09]

2,566 posts
Thanks Meter: 5,606
 
By spezi77, Recognized Developer / Contributor on 25th June 2016, 09:47 PM
Post Reply Email Thread
N4-revival

Lean, stable and buttersmooth.

These shall be the characteristics of my REVIVAL kernel for the Nexus 4 (MAKO).

Why should I use this kernel in my Nexus 4?
The "revival" kernel aims at bringing new life into your worn out NEXUS phone and is meant for those who prefer basic tweaking. This kernel will be the more conservative project, as I plan to put only the essential stuff into it like just a few governors and hotplug drivers, gamma control, UV, dt2w and some other basic stuff..

Note: This kernel is made for Android 6.0.1 (Marshmallow) and maybe later versions (who knows).


Features:
  • Linux 3.4.112 based on the latest sources of Semaphore kernel by Stratos Karafotis (Big thanks)
  • Removed lots of useless debugging and logs. Added tweaks/optimizations for increased performance. Some of the tweaks were hand-picked from kernels like Quanta-Mako (thanks zaclimon), TaUrUs_Kernel (thanks txuki2005), Unleashed (thanks ion-storm), kernel-Nexus4 (thanks motley-git), thunderzap (varunchitre15) and Mirage (thanks mgr666)
  • Compiled with the latest Cortex-A15 optimized UberTC 5.4.1 with some kernel based optimizations: graphite, NEON
  • Compatible to all Android 6.x ROMs based on AOSP and CM (incl. BeanStalk of course)
  • MultiROM compatible (Kexec patch)
  • ARM auto_hotplug (thanks thalamus; enhanced by motley) removed in r02
  • Alucard-hotplug (Alucard24)
  • AutoSMP-hotplug (Mgr666)
  • Dyn_hotplug set as default (stratosk)
  • mako_hotplug (franciscofranco)
  • msm-sleeper: upgrade to version 2 (flar2): allows to set a max screen off frequency
  • Linaro power oriented workqueues (thanks mrg666 & franciscofranco)
  • CPU Governors: ondemand (tweaked by stratosk; default), stockdemand (for those who like it stock and battery-friendly), yankdemand (a more battery-friendly derivative of ondemand), conservative, interactive (tweaked by franciscofranco), performance, userspace, powersave, elementalX (flar2), hellsactive (hellsgod), smartmax (maxwen)
  • GPU Governors: conservative, ondemand, performance, interactive (franciscofranco), simple (faux123)
  • GPU Overclocking (up to 487.5MHz) and ultra low IDLE frequency (27MHz)
  • IO schedulers: cfq, deadline, noop, sio, tripndroid
  • Customized in-kernel thermal solution smart scaling, dynamic polling, and configurable throttle temp
  • Gamma control by faux123 (with nougat r02) / gamma control by franciscofranco (marshmallow r03 until r08)
  • Dynamic management of dirty page writebacks (Christopher83)
  • Earlysuspend: speedup late resume (faster wakeup of the device)
  • Relaxed power savings from NVIDIA
  • Motorola MSM mcmcpy enhancements
  • Userspace CPU & GPU Voltage Control
  • Speaker Amp & Sound Control (faux123)
  • USB force fast charging (Chad Froebel/faux123)
  • DT2W/power suspend support and Touch wake (stratosk)
  • Exponential brightness driver (stratosk)
  • USB-OTG Support (ziddey/faux123)
  • Knobs for Arch Power and Gentle Fair Sleepers
  • Knobs for controlling wakeups: bluesleep, bluedroid_timer, wlan, sensor_ind and msm_hsic_host
  • Qualcomm Slimbus driver incl. tweaks
  • Partial-resume framework & quickwakeup driver
  • AIO optimization from Linux 3.8+ (faux123)


Tested on the following ROMs:

* Pure Nexus (AOSP)
* BeanStalk (CM-13 based)


Known issues (marshmallow release):

* Changing CPU governor to yankdemand, stockdemand or hellsactive doesn't work on latest Purity ROM, Resurrection Remix M v5.7.2, CM-13 and possibly on further CM-13 based custom ROMs. Therefore avoid those governors or your phone will freeze-in and then goes into a soft reboot.



Quote:

DISCLAMER

Your warranty is now void.

I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you have any concerns about features included in this Kernel before flashing it! YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you.


Download:

Nougat releases (only AOSP for now):


Latest release for marshmallow:


Installation:

1. Wipe cache/dalvik cache
2. Flash kernel zip over stock kernel of the ROM
3. Wipe cache/dalvik cache again (optional)
4. Reboot system



Change Log:

r01 (2016-06-25)
* Initial release

r02 (2016-06-26)
* Replace auto_hotplug with mako_hotplug
* Added extra franco tweaks: use unbound wq, run the main work only once every second if special cases apply, increase the work schedule time when dual-core or quad-core mode is active, from 1 to 2 seconds
* Added 27MHz GPU idle frequency
* Added sensor_ind wakeup knob

r03 (2016-07-10)
* Revert squashed sound control commits and add back faux123 original sound control v3.6
* Add franciscofranco's gamma control
* [backport] Hotplug thread infrastructure
* softirq: Use hotplug thread infrastructure
* rcu: Yield simpler
* rcu: Use smp_hotplug_thread facility for RCUs per-CPU kthread
* Merge July bulletin fixes (thanks @txuki2005)

r04 test build (2016-07-17)
From Franco's release for Hammerhead:
- WiFi driver: improved battery life, performance & security updates
- cpufreq: interactive: set timer_rate to 60ms on screen off (previously 50ms)
- cfq-iosched: improvements
From Franco's release for Flo (thanks zaclimon):
- Performance improvements
- Faster boot up

r05 (2016-08-01)
* Sound: automatic gain control: increase max gain
* Enabled kernel AIO optimization from Linux 3.8+ (faux123)
* Upstream fixes from flo kernel (31st July)
* Reduce log spam messages
* I/O Boost (dorimanx) and optimizations (binder, futex, mutex, rtmutex)
* Added CPU governor stockdemand (unmodified version; for those who like it stock and battery-friendly)
Changes taken over from r04 test build:
* From Franco's release for Hammerhead:
- cpufreq: interactive: set timer_rate to 60ms on screen off (previously 50ms)
- cfq-iosched: improvements
* From Franco's release for Flo (thanks zaclimon):
- Performance improvements
- Faster boot up

r06 test (2016-08-06)
* Power-efficiency: series of power efficiency patches from NVIDIA
* Many tweaks for stability and to reduce lags/improve battery life
* Enable quickwakeup driver
* AIO: Optimization for SSD-only machines
* Security patches: crypto: arm/aes update NEON AES module to latest OpenSSL version
* RAM optimizations: enable KSM and KSM check page
* Disable OOB interrupt when WLAN is off
* dyn_hotplug: optimize it for decreasing lag and better sound quality (Credits @quentin2260)
* Ramdisk: new defaults: enable KSM; Decrease GPU default frequency to 200MHz to save energy (thanks zaclimon); CPU: Disable by default the 3rd and the 4th core; add script to reduce logcat spam: powerhal and disable mpdecision / thermald.

r07 (2016-08-12)
Addresses all of the r06 test (2016-08-06) changes as well as the following:
* Security update: Fix CVE-2016-5340 (Quadrooter Vulnerability)
* Compiled with -03
* Add CPU governor: yankdemand (a more battery-friendly derivative of ondemand)
* Add GPU governor: simple (faux123)
* Updated the kernel installer script to reduce logcat spam (powerhal) and to disable mpdecision / thermald

r08 (2016-08-14)
Addresses all of the r07 changes as well as the following:
* Rebased the kernel in order to leave faulty stuff behind as quite a few changes were in contradiction to battery-life and fluidness
* Added Improved framebuffer imageblit function
* Add toggle to control software CRC
* Here is a quick overview of what has been left behind: Linaro-power efficient wq, timer upstream updates and smp related updates)

r01 for nougat (2016-10-08)
* Initial AOSP compatible release with focus on Android 7.x (even though previous builds already worked in nougat ROMs)
* Remove toggleable software crc (potential reason for data loss and reboots)
* Set default i/o scheduler to NOOP for smoother boot animation and an increased overall performance
* Set max readahead value to 256KB (Fair enough for a bit more performance without sacrificing latency)
* Reintroduce Linaro-power efficient wq from Kernel 3.10 (directly picked from franciscofranco's hammerhead kernel)
* Add Latest Version of Alucard HotPlug (allows for energy savings)
* mako_hotplug: don't use an unbound wq (reverted a few things to better cope with our mako)
* mako_hotplug: use more accurately fitting defaults for mako (default CPU freq unplug limit: 1242MHz / default load_threshold: 70% for a slightly increased performance boost)
* cpufreq: interactive: remove hispeed_freq init restriction. How dare you to force me not to 'disable' hispeed_freq? (Thanks franciscofranco)
* DT2W: fire a small vibration when device is woken up (Ported from franciscofranco's shamu kernel)

r02 for nougat (2016-10-09)
* Replace franco's gamma control with the one by faux123
* Remove CPU governors being incompatible with this kernel (hellsactive, stockdemand, yankdemand)
* Introduce intelliactive CPU governor by faux123


Credits:
Special thanks to
- AOSP
- stratosk
- hellsgod
- zaclimon
- txuki2005
- yoinx
- Cl3Kener
- franciscofranco
- faux123
- eng.stk
- stratosk
- show-p1984
- mrg666
- Defconoi
- neobuddy89
- flar2
- CallMeAldy
- AK
- DespairFactor
- motley
- thalamus
- yank555-lu
- Tk-Glitch
- Christopher83
- yank555-lu
- and anyone else who is not listed here, but deserves my gratitude!

And thank you very much for your donation
- @r4yN

XDA:DevDB Information
Nexus 4 Revival, Kernel for the Google Nexus 4

Contributors
spezi77
Source Code: https://github.com/spezi77/kernel_msm

Kernel Special Features:

Version Information
Status: Stable
Current Stable Version: r02
Stable Release Date: 2016-10-09
Current Beta Version: r01
Beta Release Date: 2016-10-08

Created 2016-06-25
Last Updated 2016-10-08
The Following 34 Users Say Thank You to spezi77 For This Useful Post: [ View ]
 
 
25th June 2016, 09:47 PM |#2  
spezi77's Avatar
OP Recognized Developer / Contributor
Flag /home/xda
Thanks Meter: 5,606
 
Donate to Me
More
Kernel tweaks illustrated
Click image for larger version

Name:	Screenshot_20160625-203335.png
Views:	3680
Size:	45.8 KB
ID:	3794470

Click image for larger version

Name:	Screenshot_20160625-202911.png
Views:	3668
Size:	71.8 KB
ID:	3794471

Click image for larger version

Name:	Screenshot_20160625-202932.png
Views:	3606
Size:	52.3 KB
ID:	3794472

Click image for larger version

Name:	Screenshot_20160625-202955.png
Views:	3296
Size:	109.4 KB
ID:	3794473

Click image for larger version

Name:	Screenshot_20160625-203011.png
Views:	3078
Size:	74.8 KB
ID:	3794474

Click image for larger version

Name:	Screenshot_20160625-203035.png
Views:	2972
Size:	78.3 KB
ID:	3794475

Click image for larger version

Name:	Screenshot_20160625-203126.png
Views:	2806
Size:	99.8 KB
ID:	3794476

Click image for larger version

Name:	Screenshot_20160625-203313.png
Views:	2694
Size:	80.2 KB
ID:	3794477

Click image for larger version

Name:	Screenshot_20160625-074844.png
Views:	2698
Size:	140.0 KB
ID:	3794478

Click image for larger version

Name:	Screenshot_20160625-074903.png
Views:	2556
Size:	171.3 KB
ID:	3794479

Click image for larger version

Name:	Screenshot_20160625-074912.png
Views:	2478
Size:	164.2 KB
ID:	3794480

Click image for larger version

Name:	Screenshot_20160625-074939.png
Views:	2288
Size:	230.8 KB
ID:	3794481

Click image for larger version

Name:	Screenshot_20160625-074958.png
Views:	2210
Size:	246.1 KB
ID:	3794482

Click image for larger version

Name:	Screenshot_20160625-100840.png
Views:	2232
Size:	172.6 KB
ID:	3794483
Attached Thumbnails
Click image for larger version

Name:	N4-Revival.png
Views:	2826
Size:	129.0 KB
ID:	3794484  
The Following 9 Users Say Thank You to spezi77 For This Useful Post: [ View ]
25th June 2016, 09:47 PM |#3  
spezi77's Avatar
OP Recognized Developer / Contributor
Flag /home/xda
Thanks Meter: 5,606
 
Donate to Me
More
In order to use the tweaks included into this kernel, you can use:
1. KernelAdiutor-Mod (updated 2016/11/20):
--> My personal build which allows to select the semaphore dt2w profiles (exclusive feature not yet supported in the build by David 617)
--> KA-Mod build by David 617 which will provide the latest updates at some point in time
2. or install Synapse.
The Following 9 Users Say Thank You to spezi77 For This Useful Post: [ View ]
25th June 2016, 11:18 PM |#4  
Senior Member
Flag Maceió, Alagoas
Thanks Meter: 90
 
More
@spezi77, can you change min GPU freq to 27MHz and include mako hotplug in next build if it isn't ask much.
Btw, phone is smoother than ever now. Thanks, bro!
The Following User Says Thank You to Cristiano Lira For This Useful Post: [ View ] Gift Cristiano Lira Ad-Free
25th June 2016, 11:42 PM |#5  
spezi77's Avatar
OP Recognized Developer / Contributor
Flag /home/xda
Thanks Meter: 5,606
 
Donate to Me
More
Quote:
Originally Posted by Cristiano Lira

@spezi77, can you change min GPU freq to 27MHz and include mako hotplug in next build if it isn't ask much.
Btw, phone is smoother than ever now. Thanks, bro!

I have expected that you will ask for something like mako hotplug.

I will consider it. Anyway, I have already prepared a few of the cpu governors for being used with it. I have seen quite a few variations of Franco's mako hotplug. Not sure yet, which would be the best choice.

Sent from my mako using XDA Labs
The Following User Says Thank You to spezi77 For This Useful Post: [ View ]
26th June 2016, 12:17 AM |#6  
Senior Member
Flag Maceió, Alagoas
Thanks Meter: 90
 
More
Quote:
Originally Posted by spezi77

I have expected that you will ask for something like mako hotplug.

I will consider it. Anyway, I have already prepared a few of the cpu governors for being used with it. I have seen quite a few variations of Franco's mako hotplug. Not sure yet, which would be the best choice.

Sent from my mako using XDA Labs

You know me. I think the one used in Hellspawn is nice. And one thing I would like to report is that min cpu cores online setting from auto hotplug seems to not be working, at least in ka-mod.
Edit: tryed synapse and with it the situation is worse: there is not even a checkbox to activate auto hotplug.
The Following User Says Thank You to Cristiano Lira For This Useful Post: [ View ] Gift Cristiano Lira Ad-Free
26th June 2016, 08:32 AM |#7  
Member
Thanks Meter: 62
 
More
@ spezi77 May I know the reason for another Kernel by you
26th June 2016, 08:42 AM |#8  
dragos281993's Avatar
Recognized Contributor
Flag IASI
Thanks Meter: 3,784
 
More
Quote:
Originally Posted by knm1574

@ spezi77 May I know the reason for another Kernel by you

1. Hellspawn is for hardcore tweakers cause it's got an insane amount of features and "Revival" has a limited amount for even better stability.
2. "Hellspawn" is based on "hellscore" while "Revival" is based on "semaphore". So they're 2 different kernels.
If you know that you'll tweak every single value of the kernel, or want to have those options there just in case, then Hellspawn is the kernel you want to use. But if you want to do some basic tweaking, "Revival" is the best for you.
Cheers !

Sent from my Nexus 4 using Tapatalk
The Following 7 Users Say Thank You to dragos281993 For This Useful Post: [ View ] Gift dragos281993 Ad-Free
26th June 2016, 02:17 PM |#9  
Junior Member
Thanks Meter: 0
 
More
Does kernel supported F2FS ?
26th June 2016, 02:28 PM |#10  
dragos281993's Avatar
Recognized Contributor
Flag IASI
Thanks Meter: 3,784
 
More
Quote:
Originally Posted by darkmatterx

Does kernel supported F2FS ?

No, it doesn't. But don't worry. There's no improvement using f2fs, in any department. It's placebo. The benchmarks may show slightly better results but in real world use, the phone behaves exactly the same, it gives the exact same performance and battery life. That's the reason both Stratosk and Hellsgod didn't even bother adding f2fs to their kernels.

Sent from my Nexus 4 using Tapatalk
The Following User Says Thank You to dragos281993 For This Useful Post: [ View ] Gift dragos281993 Ad-Free
26th June 2016, 03:06 PM |#11  
spezi77's Avatar
OP Recognized Developer / Contributor
Flag /home/xda
Thanks Meter: 5,606
 
Donate to Me
More
Quote:
Originally Posted by Cristiano Lira

You know me. I think the one used in Hellspawn is nice. And one thing I would like to report is that min cpu cores online setting from auto hotplug seems to not be working, at least in ka-mod.
Edit: tryed synapse and with it the situation is worse: there is not even a checkbox to activate auto hotplug.

Hum, I just had a look into the min/max cpu cores online setting. The problem does not originate from the kernel tweaker app(s). The app just reads and writes values from/into the sysfs path, and I didn't find any logical issues here. So, the min/max online cpus feature seems to be implemented in a slightly hacky way..

As of now, I have no idea how to improve this without getting a big headache..

Simplest solution would be to ditch auto_hotplug and replace it with mako hotplug.

Edit: BTW, I did a fresh build (r02) with mako hotplug and 27MHz idle GPU freq.
The Following 3 Users Say Thank You to spezi77 For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes