[Galaxy S 5 Android Development (Exynos)] duki994:
duki994 Kernel for Stock TouchWiz LP ROMs​

Development stopped for Lollipop. Please update to MM and go to my MM thread​

This is for LP only!!! For MM go to duki994 MM kernel thread:

MM kernel thread

It's based on official Samsung sources for Lollipop firmware.

Important note:

This kernel should work on any custom ROM that is stock lollipop based and is based on stock BOL2 source

Features:

* Wolfson Audio control adapted to G900H implementation (thanks to [MENTION=4167023]AndreiLux[/MENTION])

* Battery charging current control

* CPU voltage control for both A7 and A15 cluster (thanks to [MENTION=4167023]AndreiLux[/MENTION])

* Exposed all OPP voltage controls (thanks to [MENTION=4167023]AndreiLux[/MENTION])

* Powersuspend v1.7 by [MENTION=3332811]faux123[/MENTION] and [MENTION=2033478]Yank555[/MENTION]

* MM and FS powersuspend mods ported from [MENTION=2376110]dorimanx[/MENTION]'s LG G2 kernel

* SCHED code fixes

* SCHED: HMP thresholds changed and new patches implemented

* OF code updated --> better/faster reading of DTS and faster operation

* Many changes related to ARM instruction code and lowlevel ARM core management

* Enabled NEON mode in kernel with full VFPV4 support

* Added new SHA256 , SHA512, SHA1, ASH2 and AES NEON accelerated algortihms - now blazing fast

* WiFi standby wakelocks (PNO wakelock) reduced

* WiFi userspace power mode/DTIM change (for advanced users ONLY)

* WiFi driver switched from deprecated earlysuspend to use newer powersuspend driver (this is to fix some of bugs that could lead device kernel crash)

* WiFi: fixed enormous battery drain during standby/suspend

* NET updates

* LMK updated and added new feature: Adaptive LMK --> better multitasking

* Enabled all TCP congestion protocols and set Westwood as default (best wireless performance)

* Disabled KNOX

* Wakelock disabler: You can disable some common Samsung wakelocks in Synapse "Misc" tab if some of them are draining your battery

* Fully configurable in Synapse (download from Google Play)

/* Important note to other devs */

You cannot include this kernel in your ROMs. I can't be responsible if anything goes wrong, I can't help with any issues without knowing kernel version and users should be routed to this thread if they want this kernel, or if you recommend it. I think that it's best to separately view custom ROM and custom Kernel, so each dev (ROM or Kernel one) can work on bugs/features and make it as compatible as it can.

However, you can add this thread link and mention me in your thread, as so people would know where to ask if kernel problem arises. I would do the same for you :)

Warranty void

By flashing this kernel you will void your warranty. I'm not responsible if you brick your device, or if someone starts nuclear war.

Note:

Don't change voltages on "Busses" tab if you don't know what you are doing. It can reboot your phone if your memory controllers, ISP or MMC controllers that can't handle low voltage.

If someone happens to have bug with WiFi saved password being lost every reboot, here is fix:

WiFi pasword resetting fix:

1. open your build.prop file
2. find line ro.securestorage.support
3. change it from true to false (if not already false)

This line being on true CAN make your WiFi forget password each reboot. This is due to Samsung's rooting restriction and other Samsung specific workarounds to stop rooting and flashing. Any custom ROM probably has this line changed to false.

Changelogs:

Version 1.8

*Added LED fading control made by @AndreiLux

Version 1.7

* Fixed interactive governor logic. I forgot logic code for CPUFREQ_RELATION_C. Now interactive is 50% more responsive.

* Backport some ASLR changes

* Added ZEN IO scheduler and set it as default (beware that Synapse will auto reapply YOUR settings after boot, so ZEN won't be set. If you want it set it in Synapse I/O tab)

* updated GPU ION memory allocation code

* Exposed HMP up/down threshold tuning in Synapse ---> "HMP tuning" tab

* Fixed false adaptive LMK triggers --> less RAM clearing when not needed

Version 1.6.1

* GPU control code revamped

* GPU frequency scaling logic revamped. Fixed various bugs introduced in stock and in min/max control code + optimizations

* Synapse: added monitoring current values for DVFS Interactive governor (for GPU).

* DVFS Interactive governor is now working very good.

* Sensorhub wakelocks reduced (sensorhub and ssp wakelocks)

Version 1.6

* Disabled TIMA and some other Exynos specific non needed stuff

* New GPU Governor - Interactive

* GPU governor Interactive tunables exposed in Synapse

* Many GPU control code optimizations

* Reverted to stock DVFS OC table

* Fixed DVFS table for our SoC

* Set SELinux permissive on boot --> But after 20sec some ROM binary sets it back to enforcing.

Who wants SELinux permissive, he can set it in Synapse. But ROM boots permissive

* Better min/max GPU freq guards

* Updated touchscreen with powersuspend driver to see if it's possible to use wakeup gestures.

Version 1.5

* Disabled GPU tracing to squeeze out 3-6FPS more in games. Also should run smoother now.

* Framebuffer cmap buffer overflow check

* GPU OC --> 600MHz and 677MHz steps

---> use very carefully

* GPU min/max clock control

Version 1.4

* LMK fix

* Beefed up ASLR to give hackers more headache now if they try hacking the phone

* Upstream commits for lowlevel ARM optimization from ARM themselves

* New compiler flags. Should run about 40% faster

Version 1.3

* IRQ code updated --> critical code updated

* updated NET code that works with internet

* ALSA and Arizona (WM5110 audio chip in our phone) fixes

* SCHED, TIMER, RCU code updated

* REGMAP updates

* MM: new shrinker API --> many drivers use this (such as LMK)

Version 1.2

* Fixed critical bugs in ADJ RBTREE code, used by LMK driver

I recommend you to critical update kernel now.

* Disabled adaptive LMK by default and added userspace switch to turn on/off adaptive LMK in Synapse (in Misc tab)

* Tuned LMK minfree values.

* Updated BINDER and FS critical code

Version 1.1

* Fixed Synapse power efficient workqueues checkbox --> now works good

* Disabled PE workqueues by default

* Added SELinux enforcing/permissive switch in Synape (it's last checkbox in Misc tab)

* charge_control: new charge control made by @duki994 (me) (based on @Lord Boeffla's code, but refactored and reworked from scratch)

-->It's harcoded in max77804 charging chip. Now charge control should work and obey set values.

* Fixed miscellaneous things

Sources:

Kernel:

https://github.com/duki994/G900H_LP_Kernel

Ramdisk:

https://github.com/duki994/G900H_LP_ramdisk

Downloads:

Here they are :)

https://app.box.com/s/2e6tl98jpyat8cf77jjqspvrj2u3ix1a

Known bugs:

* Turning headphone EQ on will lower headphone output volume.

* If you set any of Headphone EQ bands to 3dB, Wolfson audio chip will produce very unpleasant noise and stop playing.

It seems that it's inner HW components don't like that gain.

Every other setting will work, just don't set any band to 3dB :D Works after audio updates

* Charger controls for AC current are not reacting to change.. New charge control driver is good now.

Special thanks:

[MENTION=4167023]AndreiLux[/MENTION] for his awesome Synapse app, audio control, charging control, sources and many features/updates and upgrades to Exynos kernel code

[MENTION=3511708]UpInTheAir[/MENTION] for his source that I looked when I had bugs, and for his fixes/workarounds

[MENTION=4305965]halaszk88[/MENTION] for his source that I looked when I had bugs, and for his fixes/workarounds

[MENTION=2376110]dorimanx[/MENTION] for inspiring me to start developing and his mods

[MENTION=5658634]apb_axel[/MENTION] for UKM and his scripts that helped me a lot in making custom Synapse config

XDA:DevDB Information

G900H LP Kernel, Kernel for the Samsung Galaxy S 5

Contributors

duki994

Source Code: https://github.com/duki994/G900H_LP_Kernel

Kernel Special Features:

Version Information

Status: Stable

Current Stable Version: 1.8

Stable Release Date: 2016-05-01

Created 2016-04-04

Last Updated 2016-08-05