[Nexus 4 Android Development] spezi77:
[IMG="N4-revival"]http://xdaforums.com/attachment.php?attachmentid=3794484&d=1466884548[/IMG]

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.

Download:

Nougat releases (only AOSP for now):

N4-revival-nougat-r01.zip

N4-revival-nougat-r02.zip

Latest release for marshmallow:

N4-revival-marshmallow-r08-AOSP-UBERTC-5.4.zip

N4-revival-marshmallow-r08-CM-UBERTC-5.4.zip

Older releases:

>HERE<

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 :good:

- [MENTION=56621104]r4yN[/MENTION]

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