[KERNEL][E5823/E5803] Zach's Kernel Playground for Z5C, WIP (work in progress)

Search This thread

Macko mia

Senior Member
Dec 5, 2012
142
10
Okay, I take it as a "yes" as request for CarbonROM custom kernel refresh (due to interest),

updating the ramdisk probably will fix the not booting issue ...

What specific lineageOS build do you want a custom kernel for ? Berni's ? Official ?

so r u still working on carbon ROM custom kernel ?

I can be your tester :fingers-crossed:
 

zacharias.maladroit

Recognized Developer
ugh - let's hope this one is working fine
...

Kernel for 32.4.A.1.54 (Android Nougat 7.1.1) ROMs


Sauce:
https://github.com/zachariasmaladro...i_r2/commits/32.4.A.1.54_Sun-Kernel_Logos_I.1


Battery life under investigation to match stock kernel,

There should be a detailed instruction on how to build a binary matching kernel to Sony's stock kernel so that we get at least similar battery runtime & smoothness
and get to know how to achieve a most stable kernel, also that's usually the assumed way to comply with GPL :rolleyes:

works fine with M-ROM and similar ROMs on Z5 (no UI crashes) :)


LOL - zip size is just barely below 20 MB :p


NOT boot-tested on Z5 compact ... yet


Features

  • SunKernel Logos I.1_2_5 base changes:
  • uses updated kernel base (thanks to @GreyLeshy )
  • built with 4.9 Linaro Toolchain (newer GCC versions are still tricky to get working with Nougat kernel base and Sony's original kernel sauce)
  • enhanced compiler flags [stability & speed]
  • using Adreno-Idler to cut down GPU power consumption
  • disabled MirrorLink, disabled MobiCore drivers
  • lots of hardening (improved security): mm-subsystem, slub, ... more to come
  • security: improve security against use-after-free (via slub)
  • security, data/system integrity: slub: disable slub_merging to increase stability and avoid memory/data corruption in case of faulty drivers, etc.
  • fixed & improved lz4 driver
  • mm (memory) subsystem improvements
  • enhanced camera driver (speed & reliability)
  • disabled KSM (better battery)
  • most external drivers are rebuilt externally as modules (compatibility & stability & reliability)
  • make a backup of your system (drivers on /system/modules !) before flashing
  • readhead enhancements
  • writeback enhancements
  • swap driver fixes & enhancements
  • OOM driver fixes & enhancments
  • i2c fixes & enhancements
  • irq fixes & improvements
  • spi driver fixes & improvements
  • kthread fixes & enhancements
  • bcmdhd (wlan driver): security updates & improvements
  • BCL driver: fixes & improvements
  • net/bluetooth: fixes & improvements
  • load average (battery & system load): use interruptible wait in various instances
  • exfat: use an opensource in-built kernel driver (better performance, reliability & stability with custom kernel)
  • touchpad driver fixes & improvements
  • fingerprint driver fixes & improvements
  • several others
  • .
  • changes up to SunKernel Logos I.1_5_2 :
  • {fixme}
  • take a look at github for now
 

Attachments

  • Z5Comp_SK_ENF_v32.4.A.1.54_Logos_I.1_5_2_suzuran.zip
    16.6 MB · Views: 17

trax7

Senior Member
May 15, 2012
944
344
ugh - let's hope this one is working fine
...

Kernel for 32.4.A.1.54 (Android Nougat 7.1.1) ROMs


Sauce:
https://github.com/zachariasmaladro...i_r2/commits/32.4.A.1.54_Sun-Kernel_Logos_I.1


Battery life under investigation to match stock kernel,

There should be a detailed instruction on how to build a binary matching kernel to Sony's stock kernel so that we get at least similar battery runtime & smoothness
and get to know how to achieve a most stable kernel, also that's usually the assumed way to comply with GPL :rolleyes:

works fine with M-ROM and similar ROMs on Z5 (no UI crashes) :)


LOL - zip size is just barely below 20 MB :p


NOT boot-tested on Z5 compact ... yet


Features
Heeyy, you are back :D:D nice!! Im gonna test it today :d

Btw... Have we tried actually *disabling* swap..? It uses up some CPU cycles and with moderate use ZRAM = 0 has given me good results in the past day with regards to smoothness and consistent performance.
 
Last edited:
  • Like
Reactions: zacharias.maladroit

Scalpos

Senior Member
Feb 6, 2008
67
13
ASUS ZenFone 8
Yeah ! That's indeed great to see you back :good:

Why disabling MirrorLink and MobiCore drivers ? Is there any way to enable them, on demand, for test purpose ? According to my understanding, MobiCore is required for MirrorLink, and I'm desperately trying to take advantage of this feature in my vehicule.

Cheers mate and thank you ! Will definitively upgrade my dear Z5C still running on 6.0.1 :D
 
  • Like
Reactions: zacharias.maladroit

trax7

Senior Member
May 15, 2012
944
344
@zacharias.maladroit this is what I was talking about in my previous post - Messenger and Chrome are running in the background, as are Magisk, KA and some more - still I would consider this a light/moderate use and would recommend just for testing purposes

Afaik, with good VM and LMK settings we can achieve greater efficiency without ZRAM, KSM might be needed tho.
What has a higher CPU cost out of those two, afaik its ZRAM..? :p
 

Attachments

  • Screenshot_20180418-111937.png
    Screenshot_20180418-111937.png
    96.5 KB · Views: 80
  • Like
Reactions: zacharias.maladroit

zacharias.maladroit

Recognized Developer
Heeyy, you are back :D:D nice!! Im gonna test it today :d

Btw... Have we tried actually *disabling* swap..? It uses up some CPU cycles and with moderate use ZRAM = 0 has given me good results in the past day with regards to smoothness and consistent performance.

yep, been using it on LineageOS, etc. - it's default there,

I prefer having a swap though - running without swap has issues sometimes - VM will work much differently without it and there's lag & increased latency problems when LMK, OOM, VM, etc. isn't patched up & set up properly

Also: zram is Sony's default - so I'm going with that - not sure if any of the apps not depend on that underneath that (improbable but who knows)

@zacharias.maladroit this is what I was talking about in my previous post - Messenger and Chrome are running in the background, as are Magisk, KA and some more - still I would consider this a light/moderate use and would recommend just for testing purposes

Afaik, with good VM and LMK settings we can achieve greater efficiency without ZRAM, KSM might be needed tho.
What has a higher CPU cost out of those two, afaik its ZRAM..? :p

KSM is really a battery drainer and it only saves a few pages, perhaps we could try something else ... let's see if I get something else working, in the past there were issues but perhaps now it'll work (needs investigation though).

How did you set that all up (what apps ? what scripts ?),

can you share your settings ?

Interesting suggestion, saving CPU cycles from overhead is certainly great with the (somewhat) inefficient SoC (Snapdragon 810) but with the current ROM I'm on M-ROM it's not that bad actually

Yeah ! That's indeed great to see you back :good:

Why disabling MirrorLink and MobiCore drivers ? Is there any way to enable them, on demand, for test purpose ? According to my understanding, MobiCore is required for MirrorLink, and I'm desperately trying to take advantage of this feature in my vehicule.

Cheers mate and thank you ! Will definitively upgrade my dear Z5C still running on 6.0.1 :D

On demand doesn't really work - it has to be in the kernel.

I've read on the background on MobiCore & MirrorLink and saw that it was really buggy but if it'll work for you (hopefully ?)

why not ? Let's give it a try :)

It'll be in again the next kernel.

From the looks of it MobiCore is outdated and there's an updated replacement for it (?) but since Sony's Stock relies on it - we'll have to go that route.

qseecom might also need some updating ... later though
 
  • Like
Reactions: Scalpos

zacharias.maladroit

Recognized Developer
Logos_I.1_5_3 is up !

Kernel for 32.4.A.1.54 (Android Nougat 7.1.1) ROMs


Sauce:
https://github.com/zachariasmaladro...i_r2/commits/32.4.A.1.54_Sun-Kernel_Logos_I.1


Battery life under investigation to match stock kernel,

There should be a detailed instruction on how to build a binary matching kernel to Sony's stock kernel so that we get at least similar battery runtime & smoothness
and get to know how to achieve a most stable kernel, also that's usually the assumed way to comply with GPL :rolleyes:

works fine with M-ROM and similar ROMs on Z5 (no UI crashes) :)


LOL - zip size is just barely below 20 MB :p



Features

  • SunKernel Logos I.1_2_5 base changes:
  • uses updated kernel base (thanks to @GreyLeshy )
  • built with 4.9 Linaro Toolchain (newer GCC versions are still tricky to get working with Nougat kernel base and Sony's original kernel sauce)
  • enhanced compiler flags [stability & speed]
  • using Adreno-Idler to cut down GPU power consumption
  • disabled MirrorLink, disabled MobiCore drivers
  • lots of hardening (improved security): mm-subsystem, slub, ... more to come
  • security: improve security against use-after-free (via slub)
  • security, data/system integrity: slub: disable slub_merging to increase stability and avoid memory/data corruption in case of faulty drivers, etc.
  • fixed & improved lz4 driver
  • mm (memory) subsystem improvements
  • enhanced camera driver (speed & reliability)
  • disabled KSM (better battery)
  • most external drivers are rebuilt externally as modules (compatibility & stability & reliability)
  • make a backup of your system (drivers on /system/modules !) before flashing
  • readhead enhancements
  • writeback enhancements
  • swap driver fixes & enhancements
  • OOM driver fixes & enhancments
  • i2c fixes & enhancements
  • irq fixes & improvements
  • spi driver fixes & improvements
  • kthread fixes & enhancements
  • bcmdhd (wlan driver): security updates & improvements
  • BCL driver: fixes & improvements
  • net/bluetooth: fixes & improvements
  • load average (battery & system load): use interruptible wait in various instances
  • exfat: use an opensource in-built kernel driver (better performance, reliability & stability with custom kernel)
  • touchpad driver fixes & improvements
  • fingerprint driver fixes & improvements
  • several others
  • .
  • changes up to SunKernel Logos I.1_5_2 :
  • {fixme}
  • take a look at github for now
  • .
  • changes up to SunKernel Logos I.1_5_3 :
  • re-add MobiCore & MirrorLink upon demand
  • [sumire only] (potentially) fix higher battery drain/consumption, boot failure, stability issues
 

Attachments

  • Z5Comp_SK_ENF_v32.4.A.1.54_Logos_I.1_5_3_suzuran.zip
    17.2 MB · Views: 280

trax7

Senior Member
May 15, 2012
944
344
yep, been using it on LineageOS, etc. - it's default there,

I prefer having a swap though - running without swap has issues sometimes - VM will work much differently without it and there's lag & increased latency problems when LMK, OOM, VM, etc. isn't patched up & set up properly

Also: zram is Sony's default - so I'm going with that - not sure if any of the apps not depend on that underneath that (improbable but who knows)



KSM is really a battery drainer and it only saves a few pages, perhaps we could try something else ... let's see if I get something else working, in the past there were issues but perhaps now it'll work (needs investigation though).

How did you set that all up (what apps ? what scripts ?),

can you share your settings ?

Interesting suggestion, saving CPU cycles from overhead is certainly great with the (somewhat) inefficient SoC (Snapdragon 810) but with the current ROM I'm on M-ROM it's not that bad actually
I've always been after the best optimisation, good enough is only acceptable if I hit a huge read block :p

About ZRAM: Ive been running all day without any issues from it, actually this is the best sustained performance ive had in a while... Random tiny lags while using the keyboard? Gone! I am on stock .54 with Magisk and custom kernel'd.

Settings are as follows: in KA - aggressive preset for LMK, Adaptive LMK off, voltage table adjustments, VM settings from that thread I sent u long ago and thats it! My phone for the first time feels as smooth and responsive as my flatmate's new Razer Phone... And that one has a 120Hz display and SD835... :D:D

What do you have in mind as alternatives to KSM..?

Edit: Note that is on GreyLeshy's kernel, I havent tested yours yet..

Edit 2: Sometimes I think like this - how to make it with less levels of complexity? ZRAM is adding a new level of complexity between the RAM and Storage, with the added drawback of CPU time but the benefit of more 'virtual' space. That's one drawback, one benefit 1-1=0, the only thing we are left with is we have so much running code that has unquantifiable benefit but takes up CPU. (I'm taking the race to idle paradigm do the extreme here lol)

Anyway, swap to storage is fine, it was designed like this in the first place and we'd have the LMK and VM as systems that control data going in and out of memory... ZRAM does the same - it's a system that essentially helps with control of data going in and out of memory (I know those systems are totally different but bear with me). We have several systems trying to achieve the same final goal => there is bound to be interference! :laugh:

We have to cut out one of them with the biggest complexity. The VM and LMK can't be just "turned off" or "removed" but ZRAM can...

Another thing, it is arguably easier to play with a finite number of tuneables in the VM and LMK, than to look for and implement better compression algorithms, fix edge cases and lags, race conditions, etc.

If ZRAM causes issues when removed we can just make it very small too...
 
Last edited:
  • Like
Reactions: zacharias.maladroit

zacharias.maladroit

Recognized Developer
Yeah ! That's indeed great to see you back :good:

Why disabling MirrorLink and MobiCore drivers ? Is there any way to enable them, on demand, for test purpose ? According to my understanding, MobiCore is required for MirrorLink, and I'm desperately trying to take advantage of this feature in my vehicule.

Cheers mate and thank you ! Will definitively upgrade my dear Z5C still running on 6.0.1 :D

@Scalpos

FYI:

looks like I forgot to remove the module block from the kernel

so it won't be able to load the module right now

already unblocked in source, will compile a new kernel once I've worked out the regressions.


That's why I usually avoid releasing a kernel too early:

it doesn't leave me in peace :(
 

zacharias.maladroit

Recognized Developer

Attachments

  • Z5Comp_SK_ENF_v32.4.A.1.54_Logos_I.2_8_7_suzuran.zip
    13.6 MB · Views: 76
Last edited:
  • Like
Reactions: trax7

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    September 2021 update:

    Since I've been getting requests lately due to Google's updated Google Drive policy - here's the updated share link for the Z5 Compact kernels


    Final notice: Since my Z5 died (it's broken into pieces, glass shattered) - development is effectively halted - NO more updates - sorry

    This is a Stock (Sony) ROM Kernel and WILL NOT work on AOSP, CM, etc.

    aka SunKernel for Z5 Compact - Stock ROM (for now only stock)


    This is an extension of the Xperia Z5/Z5 Dual "sumire" main thread over at: https://forum.xda-developers.com/xp...und-z5-wip-t3340725/post65936553#post65936553


    Okay,

    so the kernel is also available for the Z5 compact series


    I can't test if it works due to lack of that very device - Enjoy !

    Keep in mind that building for the Z5 "Stock" ROMs and "Stock" Kernels, you're constantly facing the following tradeoff:

    • compatibility with pre-built "core" kernel modules (e.g. texfat [proprietary exfat microSD fs driver])
    • compatibility with pre-built "goodies" kernel modules (e.g. video and other acceleration, hwcodecs, ...)
    • losing features that can NOT be replaced by similar ones (e.g. ecryptfs, wlan, exfat, etc.)
    • when going too far the device doesn't boot or simply hangs on bootanimation

    this resulted in a couple branches (at least several dozen) that are partially or totally broken :silly:

    [snip]
    ...
    [snip]





    More info on the Latest Kernel can be usually found at:

    AT the end of the thread

    ( I KNOW - I should have reserved a few posts for better overview :( )

    ---------------------------------------------------------------------------------

    [Download] How to get the current ("corona", 5.11) Kernel(s) - Step by Step:


    1)
    Choose your device from one of the 4 folders

    Z5 + Z5 Dual: https://drive.google.com/open?id=0BykGGWB96CBQQy05VURLbzJTZlU
    Z5 Compact: https://drive.google.com/open?id=0BykGGWB96CBQVE0tb2dieTZMXzg
    Z5 Prem + Z5 Prem Dual: https://drive.google.com/open?id=0BykGGWB96CBQaVZTdnF5QnVTMU0
    Z4/Z3+ + Z4/Z3+ Dual: https://drive.google.com/open?id=0BykGGWB96CBQa2xBdHR5TzlrNUE

    2)
    At the upper right, click on "List View"

    3)
    At the top of the table, there are 3 labels (name, owner, [last] modified, File size)

    click on "Last modified", the newest Kernels should be shown either at the top, or at the bottom

    4)
    Download the latest Kernel

    5)
    ???

    6)
    Profit !





    Before starting to test/use keep in mind that this is WIP (work in progress),

    that means - NO guarantees,

    backups before flashing are a MUST (especially your microSD card content !)

    stability, speed, improved battery and satisfaction are a great side-effect to have.

    You have been WARNED !


    Enjoy ! :)


    Obligatory Source:
    (according to the rules in single commits no giant blobs, authorship kept)

    https://github.com/zachariasmaladroit/android_kernel_sony_msm8994_kitakami_r2/branches
    8
    New Nougat Kernel 2.33 [Z5 compact in-built WiFi preview]

    [New "clean", "untainted" Kernel base solely based on Sony's source]

    https://drive.google.com/open?id=0BykGGWB96CBQaVNmbzRjaktMZTQ Z5Comp_SK_Enf_vN_2.33_Nova_I.1_5_2_suzuran_pre.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,
      Code:
      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
    • other stuff I forgot


    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)
    • use an older kernel, keep the USB-cable attached,
      Code:
      fastboot boot boot.img
      , push VOL UP once the LED changes color, do stuff in TWRP, then reboot


    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 !


    Feedback needed : [for Z5 compact]

    • does it boot ?
    • does WiFi work ?
    • how is the WiFi idle drain/power consumption during idle or usage - compared to Stock Kernel ?
    6
    Please test:


    Source is at:

    Sun-Kernel_32.1.A.1.xxx_185_vI.1_2_4_new


    For best measure - combine it with
    Wakelock Detector, Greenify, (+/- Amplify), AppOpsXposed (XPosed; or other that e.g. also allows control of system apps), Disable Service/My Android Tools (by WangQi)


    with Wakelock Detector it's rather easy to greenify Google Play Store which is one major culprit of wakelocks,


    with AppOpsXposed (or other App Ops via root) you can control what apps or services keep awake (wakelock) the phone and thus occasionally or more often drains the battery (Wifi Scan, "Location" is one possible drainer; note that there are 2 Location options)

    with Disable Service/My Android Tools you get pretty powerful tools that allow you to disable service on a fine-grained basis, and e.g. specifically turn off Google's Analytics; which as a side-effect also might save battery

    with Amplify you can disable wakelocks, alarms and services in a general sense and helps quite to some degree to cut down battery consumption (but you CAN NOT greenify Google Play Store, otherwise you'll miss out on features, which kind of defeats the purpose; luckily you can disable the "Keep Awake" functionality via App Ops Xposed :D )

    Power Nap for XPosed is similar to Greenify, but can serve as an additional safety net to catch wakelocks that you forgot (add Greenify and Amplify to the apps, that are allowed; otherwise you'll miss out on their function)


    Features:
    (will add more later if I forgot anything)

    Features said:
    • @AndroPlus for build-scripts, kernel patches
    • @Tommy-Geenexus for kernel patches, fixes
    • pstore
    • LPM (low power mode, battery efficiency)
    • fix high load average (lower battery consumption)
    • microSD, internal SD reliability improvements
    • cpuidle improvements (battery efficiency)
    • fix page thrashing in case of low memory situation (when you disable zram)
    • vmalloc improvements (less memory fragmentation, better reliability of camera, wifi, etc. drivers with long runtime)
    • FauxSound
    • KCAL
    • WLAN: disable memdesc and ramdumps (thanks to @Tommy-Geenexus )
    • notification LED changes to green+blue (cyan), when battery is really full (thanks to @Tommy-Geenexus )
    • Powersuspend, QuickWakeup, Power Efficient Workqueues,
    • improved vibrator, faster/more reliable interactivity
    • bluetooth hidp, fix disconnect on idle timeout
    • a few general stability fixes & reliability improvements
    • added wakelock switches (only use, if you observe high drain with specific functions; might cause instabilities or higher battery drain !)
    • big.LITTLE optimization flags; aggressive compiler optimization flags
    • disabled KSM, it's a battery drainer and magically gets enabled by Sony's ROM so remove it
    • added BFQ i/o scheduler (now YOU show me where it's smoother ! :) )
    • improved noop i/o scheduler - now it's more bare, previously it was similar to simple i/o scheduler - now it should be optimum for bare metal SSD/microSD access
    • GPU default set to 180 MHz
    • cpu governors: added ZZMoove, elementalX
    • added vibrator intensity switch support
    • added a bunch touchpad (screen) and fingerprint scanner fixes & improvements
    • support for Sumire DSDS (dual sim) (testing, used single SIM ramdisk)
    • kudos to all devs working on android, whether at Linux Foundation (Linux Kernel), Android (Google), Codeaurora, XDA or elsewhere - YOU ROCK !
    • this one looks to be more battery friendly
    • WIP branch

    Changelog:

    Changelog said:
    185_I.1_2_4 has an totally new kernel base.
    This is an entirely new base an compatible to 32.1.A.1.185+ only,
    lots of experience with AOSP and CM-based kernels meanwhile has been collected and was applied to the creation of this release.
    For this kernel the mottos are:
    • less is more
    • never change a running system
    • fixing bugs causes new bugs

    So you'll get an idea where the direction is going ...

    Download:

    Z5Comp_Sunkernel_Permissive_v185_I.1_2_4.zip

    or attached here in the thread


    Enjoy :)
    5
    Introducing SunKernel , codename Corona

    Download, AndroidFileHost :

    253 Kernel

    SunKernel_for_Z5Compact 253_corona_III.1_9_4_6

    [leads to Nirvana, AFH is currently too slow]


    Changes: said:
    - new upstream (Sony) kernel base, should be more reliable and less error-prone
    - slim Kernel base (thanks to @AndroPlus for letting us know that it's possible :) )
    - frandom + frandom fixes + DoS TCP protection
    - graphics page allocator (kgsl: page cache allocator) for more smoother UI experience and more FPS
    - CAF merge of latest updates (beginning of August)
    - tons of sound improvements (make sure to enable Headset High Performance mode in Kernel Adiutor Mod)
    - LPM (low power mode improvements),
    - nvidia power efficiency ("blob") commit
    - microSD improvements
    - reduced load average (less battery consumption)
    - LED (backlight) value close to powersave during booting (less heat, less battery consumption, NO blinding in darkness);
    - KCAL support
    - cpufreq governors: zzmoove, elementalX, darkness, smartmax, alucard (and all the other "default" ones: conservative, ondemand, interactive, performance, etc.)
    - wakelock toggles, less power consumption for modem usage
    - GENTLE_FAIR_SLEEPS, ARCH_POWER toggles
    - reduced RAM power usage
    - powerefficient workqueues (up to 25% less battery consumption for the SoC)
    - GPU clocks down to 27 MHz when idle
    - some more workqueue improvements, kthread improvements
    - faux sound control
    - BCL <-- --> KTM (thermal) interface [less issues with throttling and less stability issues with hotplug; port from AOSP/1.3.3 kernel]
    - powersuspend driver (smartmax has support for it, so needed to be added to make it work efficiently),
    - 2 bluetooth fixes
    - touchpad + fingerprint stability fixes & improvements
    - 2 additional audio commits I missed out during first collection (probably even better quality during calling or with headphones that have a mic),
    - quickwakeup driver
    - some other stuff I forgot
    - ...
    - Changes since 253_corona_III.1_9_4_6
    - optional input boosting reverted (didn't restore the control to enable/disable input boost frequency control) :confused:
    - reverted IPA wakelock "fix", this might improve the occasional battery drain and stability problems
    - compiled in FM Radio driver - causes mute (silent) FM Radio driver, under investigation [goal was to improve reliability for FM]
    - restored Sony's prebuilt MHL driver (using the kernel module of the ROM), causes kernel to panic during bootup, under investigation
    - improved LZ4 algorithm
    - GPU governor fixes (thanks to @AndroPlus and the upstream authors)
    - added State_Notifier driver + Adreno Idler (thanks for the changes (?) to @RyTekk )
    - removed Sony RIC for good (doesn't play well with custom kernels)
    - Overclock by default 1.7 GHz for Little cores, 2.0 GHz for Big cores
    - potentially improved sound quality of the DAC (disabled Dolby DAP [HeadphoneX], DTS Eagle, Dolby DS2), there's no ROM and/or userspace support thus the effect might be better and/or worse [feedback needed]



    Notes

    • - ALL functions (well, most) have been tested and should work reliably (including FM Radio app, which still acts up from time to time)
    • - the Kernel (GUI) might be laggy, under investigation how to mitigate this, please consider that this might save A LOT of battery (lower clocked GPU)
    • - YOU HAVE THE CONTROL: if the GUI is too laggy, disable Adreno-Idler, State_Notifier (Adreno_Idler is the only user) and disable GENTLE_FAIR_SLEEPERS, this should improve it A LOT
    • - The Kernel is built on the following premise of having a slim Base with which only the relevant (needed & desired) areas are updated, others are deliberately left alone
    • - [e.g. not ALL Hotplug mechanisms are merged which cannot be used or NOT needed to avoid cluttering the source or even binary from any unwanted effects]


    Power efficiency Tests
    • - Downclock the max GPU frequency to 390 MHz [this should be NO Problem for e.g. MX Player Pro with HW and HW+ acceleration for even 1080p videos (tested)]
    • - default idle frequency for the GPU is at 27 MHz which might cause trouble with STAMINA MODE, might cause lagginess (currently under investigation), this might be a bit mitigated by using Adreno Idler (currently included)
    • - testing Downclock the max CPU frequencies for BIG to 1.5 GHz, little 1.3 GHz (depending on your usage case it might improve battery time or make it worse and take longer for things to complete)
    • - More aggressive Task packing for HMP Scheduling (this needs in-depth knowledge and LOTS of tests)
    • - ...



    Attention

    • - This kernel is in TESTING state since power efficient WQ, quickwakeup, LPM improvements, NVIDIA relax improvements, KTM/BCL interface, CAF changes and some more got merged
    • - The goal is to IMPROVE STABILITY and RELIABILITY but it needs more TESTING to confirm this intention
    • - issues CANNOT be ruled out - caveat emptor !
    • - This is reason enough to Backup your data, have another Kernel release on your phone's Internal or External storage ready in case of (potential) trouble

    Kudos

    to all devs who are working on Xperia devices and of course all of the other devs on XDA, 4pda, etc. etc.


    Sauce

    https://github.com/zachariasmaladro...-Kernel_Eclipse_32.2.A.0.253_corona_III.1_9_4
    5
    "Facula" (Sun-)kernel Release [2_11]

    Explanation of the name:

    https://en.wikipedia.org/wiki/Facula
    http://www.isf.astro.su.se/highlights/faculae-explained/

    (lol - everytime I read the name I think "Dracula" :silly: )


    Link:


    Facula Kernel for LineageOS 14.1 for Suzuran (Xperia Z5 Compact):


    https://drive.google.com/open?id=0BykGGWB96CBQYnc1UkQ1Q29mMGs Z5Comp_SK_ENF_vN_RR_Facula_I.2_11_suzuran.zip



    changes include

    • based on the new patched up LineageOS Kernel base ( kudos to @Olivier )
    • bleeding edge Linaro 7.2.1 Toolchain
    • enhanced optimizations
    • bleeding edge binder 4.9
    • bleeding edge F2FS (currently NOT built into the kernel, WIP - so do NOT attempt to convert any partitions to it :p )
    • vibration enhancements to make it work more reliably
    • BCL (battery current limit) rework
    • msm-core fixes & improvements
    • several charger fixes,
    • fix for overflow during charging fully
    • ARP spoofing protection (thanks to @jollaman999 )
    • zram fixes & improvements
    • lz4 fixes
    • camera speedups & enhancements
    • ASoC: CPE enhancements & reliability improvements, stability improvements
    • stability & reliability improvements
    • writeback: speedups
    • Fauxsound
    • exfat in-built kernel driver + fixes & speed-ups
    • load average reductions to keep CPU load low
    • a few scheduler power consumption reductions
    • fixed/improved battery state calculation (the old one could overflow once the battery was full)
    • other things I forgot to mention

    Additional changes (for 1_2_4)
    • F2FS enabled
    • mm: per-thread vma caching added (reduction of the needed cycles for expensive rbtree walk of find_vma() by up to 250%, hit-rate improvement of 25-9431% [ebizzy] [cached] )
    • re-enabled msm-core polling, decreased the polling rate

    More changes (for 1_2_16)
    • added dynamic wakelock blocker from @PDesire (kudos !)
    • added a few serial fixes
    • do hotplug with SCHED_FIFO priority to make hotplugging more reliable under heavy load (re-added, seemed to have worked well in NovaCore)
    • revamped alarm driver to make setting an alarm time (even when the device is OFF (?) (sic!)) work as expected, so that it boots up 2 minutes before [needs testing]
    • add several timer fixes
    • several WiFi driver tweaks to (potentially) reduce power consumption
    • stability fixes against WiFi driver to avoid crashes / panics
    • add state_notifier
    • add PowerSuspend [seemed to be "at fault" for better power savings (?!) :cowboy: ]
    • add Adreno Idler to cut down power consumption of GPU
    • a few fixes to the adreno_tz driver
    • rework of the net/bluetooth subsystem with several reliability and stability fixes
    • rework of the drivers/bluetooth subsystem with latest bluetooth driver, power savings and stability fixes [FM/GPS/BT/ANT]
    • rework of the dwc3 ( "SuperSpeed (SS) USB 3.0 Dual-Role-Device (DRD) from Synopsys" ), to increase stability, reliability and cut down CPU load during e.g. charging, potentially also increasing performance
    • fingerprint driver stability / reliability improvement
    • touchscreen stability / reliability improvement
    • clk: add fixes to allow devices with broken cluster to boot (similar to Nexus 5X, Nexus 6P)
    • raise performance of mmc a bit
    • power button: increase the debounce delay a bit to make sure that Power Button work reliably (potentially fixed an screen stay black issue on Z5 compact)
    • raised mitigation frequency to 960 MHz, disabling hotplugging of BIG cluster upon BCL event [would lead to massive lagging] [eval]
    • enhanced optimized compiler flags
    • revert to 6.3.1 Linaro Toolchain (7.2.1 would throw internal compiler error), yep, I tend to stress things to the max and track down errors :D
    • other changes I forgot

    More changes (for 2_11)
    • back to 7.2.1 toolchain with flags to proved to work fine on M4 Aqua
    • vidc fixes & improvements
    • more fixes against power button ghost presses / not reacting
    • mm (memory management) subsystem rework, raise alloc (vmalloc) success rate,
    • mm: slub tweaks, never let shrink fail
    • mm: tmpfs fixes
    • mm: migration: improve heuristic
    • mm: other improvements & changes
    • readahead: tweaks
    • zpool, zbug fixes & improvements (important deadlock fix) [currently not used since the kernels utilizes z3fold]
    • cpuidle / lpm: rework & overhaul
    • fix & add "freeze" state
    • cpuidle: enable it in suspend to allow lowest power saving mode
    • cpuboost: rework and enhancement, run it with SCHED_FIFO priority to reduce lags
    • kgsl, mdss: use kthreads, run at higher priority to ensure smoothness of UI
    • msm_serial: rework and overhaul of the serial driver to fix (potential) suspend issues, etc. [lots of ports]
    • tty: fixes & improvements
    • CFS/HMP: scheduler: switched from Sony's "custom" solution to full-blown angler (Nexus 6P) with cluster scheduling, deadline scheduling, topology support and tons of improvements [impossible on Sony Stock ROMs]
    • KCAL: add support
    • arm64: toolchain: ensure sanity while compiling the kernel in several corner cases
    • sqrt: enhanced variant for 3x faster operation
    • qpnp-charger: raise final charging duration from 30s to 100s towards 100%
    • relax call: raise power efficiency [eval]
    • ptrace: rework, several improvements & fixes
    • lib: vsprintf: fixes & improvements
    • lib: idr: fixes & improvements
    • lib: bitmap: fixes & improvements
    • lib/string, lib/memcopy: use glibc (faster) variants
    • lib/sort: tweak a bit to use 64bit variant
    • rtmutex: several fixes & improvements [impossible on Sony Stock ROMs]
    • add zen-tune & super-charge it [extreme low latency scheduling with much smaller granular period]
    • fix frequency mitigation to avoid hotness on cores & other additional changes
    • core_ctl: use an improved hotplug driver to allow for a bit more conservative un-plugging to keep the device cooler and make more sense
    • mdss: enable powercollapse on idle [might interfere with KCAL, saves lots of energy though, videoplayback is fine]
    • wcd9330: fix audio mute after several use of SSR
    • disabled various audio subsystem drivers & automatic headset detection [NOT used in non-stock ROMs]
    • added support for various HID (input) devices [mice, keyboard, etc.]
    • disable panic on watchdog bark
    • prefer to panic upon detection of data corruption
    • disable Mirrorlink [NOT useable on non-Stock ROMs]
    • remove caching on big clusters [fixes random high frequency stay on big clusters] [fixme: also for small clusters needed without breaking hotplug, booting, etc.]
    • introduce CPU voltage control
    • add overclocking support, booting up is done in stock frequencies
    • genirq, irq_work: lots of fixes & improvements [stability, reliability]
    • softirq: reduce latencies for network (+ general ?) & other cases
    • raise HZ to 1000
    • lots of fixes to drivers, kernel to make operation with 1000 Hz reliable
    • rcu: rework, fixes, improvements [fixme: add more !]
    • BFQ: add BFQ i/o scheduler
    • CFQ: add several fixes & improvements
    • ROW i/o scheduler: is default, we favor read over write in most situations
    • msm-core / thermal-core: rework and fix the un-interruptible wait issue
    • msm-core / thermal-core: reduce polling & raise hysteresis to reduce number of wakeups
    • initial support for suzuran (Z5 Compact)
    • other changes I forgot