[Xperia Z5 Premium Android Development] zacharias.maladroit:
New Nougat Kernel 2.33 [preview], ready for testing !

[New "clean", "untainted" Kernel base solely based on Sony's source (no merging of other branches - so far)]

https://drive.google.com/open?id=0BykGGWB96CBQWnN6MTRZVTNJZ00 Z5Prem_SK_Enf_vN_2.33_Nova_I.2_sats.zip

https://drive.google.com/open?id=0BykGGWB96CBQem14NXM5Ull6akU Z5Prem-DSDS_SK_Enf_vN_2.33_Nova_I.2_sats_dual.zip

Characteristics:

NO compromises - thus some things might NOT be added, some things might be broken (!)

booting into TWRP via button combo is currently BROKEN (TWRP crashes / kernel panics)

use an older kernel, keep the USB-cable attached,

fastboot boot boot.img

, push VOL UP once the LED changes color, do stuff in TWRP, then reboot

*

NO - MHL is NOT built into the kernel - NOT possible with Sony's Stock ROM (works fine on Lineage, RR, etc. though)

NO - RCU-boosting [memory leak, priority inversion fix] is NOT possible due to kernel NOT booting (detto on Lineage, RR)

NO FauxSound [caused way too much trouble with sound so far]

NO KCAL [base stability testing]

NO powerefficient workqueues [yet, base stability & functionality testing]

NO relaxed power consumption changes [is there even improvement with it ? - later]

*

Uses 6.2 Linaro toolchain

conservative & code correctness related optimizations

WiFi is built INTO the kernel for sumire (and will be for: satsuki, ivy), suzuran [Z5 compact needs a different driver]

2.33 uses an improved WiFi driver

ion fixes

toned down logging (for dmesg) significantly

disabled quite a few logging sources - should be faster & less cluttering

pushed down idle load, less power consumption compared to "stock"

TONS of sound-related improvements (add ALAC/APE/VORBIS support, cut latency, fixed 24bit playback [may need a few more additional changes], ...) - quality should be MUCH better as well

lz4 compression fixes

enabled lz4 compression for zram

Fixed issue with "Unhandled level 2 translation fault"

writeback optimizations

TONS of mmc related fixes and speed improvements (when disabling CRC/checksumming - up to 70+% performance improvement, base should be around 40+% compared to "stock")

wakelock blocker

ZZMoove, elementalX v2, alucard governors

GPU underclocked to 27 MHz in idle, ~ 180-190MHz in most cases - cooler & less power consumption [downclock to ~ 300 or 390 MHz for more savings under load if needed]

several GPU governor related fixes

MAIN GPU governor is (msm_)adreno_tz - so if you change it - YOU ARE ON YOUR OWN

WiFi driver: attempts to cut down power consumption [evaluation]

camera: QUICKER , should be faster ready & more pictures can be taken in the same time compared to "stock"

quicker resume time (rushed wakeup from sleep of the device)

KSM is OFF by default, enable it if needed - this will save ~ 10-50 MB of RAM (or more) and cut down fragmentation a bit at the cost of battery

NOP / NULL cpuidle driver - use lpm cpuidle provided functionality

CPUIDLE: a few fixes

ANT/BT/FM: built INTO the kernel

adb reboot recovery works, so you could boot into TWRP via Script-Manager, etc.

other stuff I forgot

Characteristics (since 1.5.2):

somewhat reworked cpufreq governor handling

improved interactive governor (thanks [MENTION=4798704]RyTekk[/MENTION] )

elementalX (v2), ZZMoove, alucard, conservative governors are now enabled

add BFQ v7r8 i/o scheduler for 3.10+ kernel - set as default: massively less lag & waiting while the phone is updating, busy, etc. : https://www.youtube.com/watch?v=ANfqNiJVoVE&feature=youtu.be

random/entropy: fix entropy depletion (really Sony ? still not fixed ?)

reverted: asynchronous PM [might be source for instability]

reverted: keep CPU 0 & 4 always on [source for lags, higher battery consumption, potentially instability & other erratic scheduling (etc.) behavior]

KSM: default to "off" (is this actually working ?)

KSM: enabled deferred timer by default [lower battery consumption]

KSM: 60% savings in workload

KSM: now should be disabled while the screen is off - so no idle drain

KSM: several reliability & scheduling fixes

mm: memory subsystem & page_alloc big rework (as much as Sony's ROM allows)

mm: compaction: memory is now being compacted ("defragmented") while the screen is off

mm: compaction: allow compaction of unevictable pages (should make GPU, camera, etc. driver operation more reliable + stable) [needs testing]

slub: cache-shrinking & other stuff: make it more efficient & aggressive

mm: lower swappiness to 15% so that it only swap out to zram if it's really actually needed, this will save us battery juice & unnecessary CPU load

other fixes & improvements I forgot

.

Z5 Premium + Premium Dual are now supported

Z4/Z3+ + Z4/Z3+ Dual are now supported

Characteristics (since 1.7):

switch to 4.9 Toolchain if anything breaks, we're leaving 4.9 for good !

Sony Music app with enabled effects causing instability should be resolved (DSEE HX, Equalizer, ClearAudio+)

qseecom fixes

reverted a pstore change which was supposed to reduce latency & raise stability - pstore might actually work now (if there's still a access permission problem - dunno)

vidc: stability & reliability fixes

msm_performance (hotplugging): make touchboost optional, turn it OFF by default (fix unnecessarily high battery consumption)

msm_performance: prevent userspace & perfd from messing with hotplugging (little or [mostly] big cores) or changing frequency) [(fix unnecessarily high battery consumption)]

msm_performance/perfd: prevent perfd from influencing workload [(fix unnecessarily high battery consumption)]

timer: optimize slack

drivers: soc: qcom: a few reliability improvements

drivers: slimbus: optimize and reduce context switches, better stability

net/bluetooth: lots of fixes

drivers/bluetooth: lots of fixes

delete __cpuinit usage: prevent bit corruption after resume & other instability causing situations

rcu: efficiency, stability, performance improvements (probably less power consumption)

msm: thermal: stability & reliability improvements

sched: avoid loadavg Moire

and some more changes ...

Characteristics (since 1.9):

remove logspam, it only spams our logs: 'IRQ%u no longer affine to CPU%'

add support for the relaxed calls to cut down power consumption

unbreak video recording [works now again]

add support for power-efficient workqueues (also: cutting down power consumption)

add a few scheduler + hotplug fixes

add workqueue fixes

kthread_create: make the uninterruptible call actually killable on OOM situations

splice & sendfile fixes

mm: cma: conversion size fix

tcp: fixes for cubic

tcp: enable FASTOPEN by default

fingerprint: boosting of apps and tasks that are related so that smoothness & performance is increased

memcpy, memmove: speed up by ~ 15%

wcd9xxx: add missing regulator call

disable random (entropy) for SSDs

HOTPLUG: switch from msm_performance + core_ctl(helper) to lazyplug + msm_performance (sans hotplug functionality)

Due to Sony's Stock ROM's nature - NOT ALL and the latest security changes are possible,

Reasons:

breaks sound quality

breaks Stock Music app [reboots]

breaks stability in general

breaks other functionality

breaks booting in general

Note:

booting into TWRP via button combo is currently BROKEN (TWRP crashes / kernel panics) [at least one Z5]

use an older kernel, keep the USB-cable attached,

fastboot boot boot.img

, push VOL UP once the LED changes color, do stuff in TWRP, then reboot

adb reboot recovery is possible, so you could boot into TWRP via Script-Manager, etc. - otherwise use the functionality of Nougat bootloader to boot directly into recovery

https://xdaforums.com/showpost.php?p=71848722&postcount=388

Lazyplug

is a hotplug driver/manager based on intelliplug with heavy rework by [MENTION=4898097]arter97[/MENTION] - it keeps all cores plugged all the time, thus cutting down latency, CPU cycles

Background:

Other hotplugging methods including mpdecision and intelli_plug focuses

on how should we turn off CPU cores. They hotplugs the individual CPU

cores based on the current load divided by thread capacity.

Lazyplug takes a whole new approach on how we should do hotplugging

based on the foundation of the other side of the coin;

“Linux’s hotplugging is very inefficient.”

Current hotplugging code on Linux is a total waste of CPU cycles and

delays, so rather than hotplugging and hurt performance & battery life,

just leaving the CPU cores on might be a better choice. This kind of

approach is spreading out more and more.

Samsung has been using this method for a very long time with big.LITTLE

devices and recent Nexus 6 firmware also does the similar thing.

Lazyplug just leaves them on, most of the time. It also tries to solve

some problems with the “Always on” approach. On situations such as video

playback, turning on all CPU cores is not battery friendly. So Lazyplug

*does* actually turns off CPU cores, but only when idle state is long

enough(to reduce the number of CPU core switchings) and when the device

has its screen off(determination is done via earlysuspend or

powersuspend because framebuffer API causes troubles on hotplugging CPU

cores).

Basic methodology :

Lazyplug uses majority of the codes from intelli_plug by faux123 to

determine when to turn off CPU cores. If the system has been idle for

(DEF_SAMPLING_MS * DEF_IDLE_COUNT)ms, it turns off the CPU cores. And if

the next poll determines 1 core isn’t enough, it fires up all CPU cores

(instead of selective CPU cores; which is the traditional intelli_plug’s

method).

Lazyplug also takes touch-screen input events to fire up CPU cores to

minimize noticeable performance degradation.

There’s also a “lazy mode” for *not* aggressively turning on CPU cores

on scenario such as video playback. For example, if you hook up

lazyplug_enter_lazy() to the video session open function, Lazyplug won’t

aggressively turn on CPU cores and tries to handle it with 1 CPU core.

* TODO :

* Dual-core mode : YouTube video playback is mostly single-threaded.

* It usually hovers around 10% ~ 30% of total CPU usage on quad-core

* device. That means 1 CPU core might not be enough to handle it, but

* also turning on all CPU cores is unnecessarily wasting power.

RULES:

NO ETAs

NO comparisons with other stuff disguised under the theme of "feedback", etc. [aka "fanboy-ism" and similar]

NO wishing for exotic governors, schedulers, etc. - been there - done that, it doesn't work well

NO compromises

NO repeated requests, questions, etc. TO ME

NO direct PMs related to things that you could find via Google Searches, Forum searches or questions posted HERE or in the Q&A Subforum

*

NO other weird stuff - this will prolong release, changes, etc. by +1-2 weeks for each demand

You have been warned !

Known issues:

[*]Sony Music app playback partially appears broken:

[*]Sony Music app + ClearAudio+ is unstable (phone reboot)

[*]Sony Music app + DSEE HX is unstable (phone reboot)

[*]Sony Music app + Sound effects (Equalizer, etc.) might be unstable (phone reboot)

[*]Automatic automisation (for headphones) might be unstable (phone reboot)

Video-Recording is broken

might be unstable when Audio Focus is changed (e.g. listening to music + call is coming in, or similar)

Booting to recovery via VOL UP (while the device is normally turned on) is currently broken, the bundled TWRP is broken & doesn't fully boot

flash AndroPlus' TWRP (the non-AOSP one) to the recovery partition and try to boot up directly recovery via OFF device: VOL UP + Power Button