yashsingh1/xdaforums huggingface dataset:
[Galaxy S 5 Android Development (Exynos)] duki994:
I know about PE switch. I mady typo in ramdisk. Will be fixed :)

I use BOL2 ramdisk and BOG4 (latest kernel sources given by Samsung).

It should also work on BPC4. But use BPC8 if it doesn't.

GPU voltage is bug or made intentionally by ARM/Samsung. I lowered it to 25mv higher than 177mhz voltage and it works.

Also new charging driver made by me will be included in next release for testing :)

Probably SELinux enforcing.

I will leave it on by default due to Stock ROM apps need, but I'll add checkbox/switch in Synapse to switch it enforcing/permissive. It should fix those problems with dolby sound.

Why install Dolby sound? WM5110 is awesome and as good as my ASUS Xonar Essence One DAC. And I'm audiophile. That's why I bought this phone :D

I will also disable PE workqueues by default. They drain battery more in heavier usage and make sound stutter.
[Galaxy S 5 Android Development (Exynos)] ponkz:
Installed.. And using it as it is.. But having more battery drain than stock kernel..

Where did i go wrong?

Thanks mate
[Galaxy S 5 Android Development (Exynos)] duki994:
Type this in terminal:

su

echo "N" > /sys/module/workqueue/parameters/power_efficient

It will disable PE workqueues. In some workloads I noticed that they drain battery more. I'll fix this in next build today and non-working PE workq. switch
[Galaxy S 5 Android Development (Exynos)] nafyy:
Good Job B|
[Galaxy S 5 Android Development (Exynos)] duki994:
Version 1.1

Changelog:

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

* Disabled PE workqueues by default

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

* charge_control: new charge control made by [MENTION=3441913]duki994[/MENTION] (me) (based on [MENTION=947981]Lord Boeffla[/MENTION]'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

Downloads:

Same link as in OP

Don't forget to give feedback, report bugs or request features :)
[Galaxy S 5 Android Development (Exynos)] jawzf:
Hi [MENTION=3441913]duki994[/MENTION], would you be able to include doubletap2wake or swipe2wake in your kernel in the next release or future releases? It will be really cool if the phone wakes up on double tapping the screen!!! THanks :)
[Galaxy S 5 Android Development (Exynos)] duki994:
Version 1.2

Changelog:

* 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

Downloads:

Same link as in OP

[MENTION=6506495]jawzf[/MENTION]

Yeah. That would be cool. I have exams next week, so I don't know if I can merge those changes for sweep/tap functions until then, but I want those features too. I come from G2.

Double tap is natural to me. Maybe only sweep functions can be implemented. I know LG's double tap drivers. It's coupled with custom synaptics touch chip firmware which has HW level support for double tap,

Note that sweep/double tap funcs may drain much more battery. And our driver is different from G900F.

But I'll merge and adapt 'em when time allows :D

EDIT: Charge current control driver is working as it should :)
[Galaxy S 5 Android Development (Exynos)] Asura24:
Well looks like is time to test your kernel :)
[Galaxy S 5 Android Development (Exynos)] Ariyan.n:
Tnx@duki994, we need more custom (rom/kernel/tweak....) for G900H ..keep work❤
[Galaxy S 5 Android Development (Exynos)] Erfan S5:
download link not exist !!!

plz reply download link my post !
[Galaxy S 5 Android Development (Exynos)] duki994:
Please read OP better. I won't respond to questions like these in future.

Download link:

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

It's written in OP. Read better.
[Galaxy S 5 Android Development (Exynos)] duki994:
Well. In 1.2 I have also updated Wolfson audio code. It fixed 3db HP EQ gain on my device.

Test this and see if any HP Eq gain on 3dB makes unpleasant noise
[Galaxy S 5 Android Development (Exynos)] ponkz:
[MENTION=3441913]duki994[/MENTION] maybe he cannot click the download link in the OP.. Because its just a text.. Not link ?
[Galaxy S 5 Android Development (Exynos)] duki994:
Well you might need to because you DIDN'T check your model. GoogyMax is for G900F and probably other Qualcomm versions.

This is for G900H Exynos5422 octa-core. Sometimes you can brick phone by doing this.

All S5 models are quite versatile and unlocked. It's very hard to brick this device.

Try flashing kernel for your model and booting up. Also try wiping cache and ART/Dalvik cache if phone doesn't boot. Else full flash it.

Be careful next time :)
[Galaxy S 5 Android Development (Exynos)] duki994:
Info for all :)

Samsung just gave us MM source :D
[Galaxy S 5 Android Development (Exynos)] ponkz:
Hoorraaayyy lets see duki on MM, u are the reason i still pending my update to MM
[Galaxy S 5 Android Development (Exynos)] duki994:
Well, until July 8th I have exam month.

When it passes I'll make MM version.

MM source is better with more good patches. I already compiled stock modified sources with my build system and my compiler flags. It works better.

I'll just have to integrate SuperSU patched sepolicy and ramdisk patch stuff.
[Galaxy S 5 Android Development (Exynos)] Dlbreen:
My brother

when ready Marshmallow system kernel rate
[Galaxy S 5 Android Development (Exynos)] FreakyBalooshi:
please bro

bro please make the latest mm kernel our phones are useless without your kernel even if u have a semi functional one please post it
[Galaxy S 5 Android Development (Exynos)] duki994:
Until July 8th everything is uncertain.

Then I'll probably be able to work on kernel.
[Galaxy S 5 Android Development (Exynos)] kubussz:
whether it is worth to change galaxy s5 exynos on galaxy s5 snapdragon?
[Galaxy S 5 Android Development (Exynos)] hrishi420:
WHat?? Do you mean to install it on G900F tgen answer is NO. Both have different SOC. BTW G900F has many kernels option.
[Galaxy S 5 Android Development (Exynos)] kubussz:
but what is better? snapdragon or exynos version?
[Galaxy S 5 Android Development (Exynos)] sonisamanvaya:
If u r into trying custom ROMs n stuff obviously snapdragon is better cos it has more developers... but otherwise both devices r similar in terms of performance
[Galaxy S 5 Android Development (Exynos)] leboreiro:
[MENTION=756074]DuKk[/MENTION]i994 bro I installed this kernel on ladesar 4.5 rom and I got bootloop I flashed bootloader but still bootloop what can I do

Enviado desde mi SM-G900H mediante Tapatalk
[Galaxy S 5 Android Development (Exynos)] ashishgaur:
[MENTION=756074]DuKk[/MENTION]i994 please make kernal for MM roms
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
any update dude :D
[Galaxy S 5 Android Development (Exynos)] duki994:
Well. My faculty/studies schedule is busy. Busyiest schedule in last 4 years.

I'm out of country from 11th of July to 24th or 25th of July. This came unexpected.

I can't promise anything for MM for entire July. Plus my Xubuntu VMware distro is now a little corrupted so I'll need to reinstall and re-setup it :S

I have working buildable MM sources in my git. I plan on integrating SuperSU patched ramdisk for easy root and easy SuperSU install on every version.

If anyone wants to make it sooner, I'll give him my sources :)

Cheers [emoji481]
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
Good luck bro :) till u back
[Galaxy S 5 Android Development (Exynos)] tycoon78[stoner]:
i tried compiling in kali distro with Sabermod n Stock linaro 4..6.2

i tried compiling ur source code plus mine too with some New governor n Selinux disabled but i get compiling error.

can u help me with the errors???
[Galaxy S 5 Android Development (Exynos)] duki994:
I can.

But don't add new governors.

They are made for dual/quad core, and octa core ones are made on Qualcomm's cpufreq and many other QC frameworks in kernel.

Unless you can rewrite code from scratch and have much free time to tune governors, forget about new governors.

Check ones for Exynos Octa, but I can't help you if you run into errors with governor compiling.

Post errors here (attachment or in post) and I'll see to help you :)
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
duki need some help here bro look i wanna comlie kernel but giving this error and if there any guide that i can use :D
[Galaxy S 5 Android Development (Exynos)] duki994:
Use my build script

https://github.com/duki994/G900H_MM_Kernel/blob/master/kernel/build_kernel.sh

Just clone repo, follow the instructions and you'll be ok :)

Then add whatever changes you want.

Ramdisk doesn't include patched sepolicy and root, so you'll need to add that unless you want to root your phone with every flashing :D
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
dude i think im going wrong :( i am nooby but i really wanna learn :( :o
[Galaxy S 5 Android Development (Exynos)] duki994:
Don't retype in terminal xD

Just execute bash script from terminal:

sudo bash build_kernel.sh
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
bash: build_kernel.sh: No such file or directory O.o
[Galaxy S 5 Android Development (Exynos)] duki994:
Just clone my MM repo somewhere. Put you toolchain in kernel/android-toolchain folder and execute my build kernel script.

I'm going on :D voyagé :D now. And I probably won't have internet for a week or 10 days :D
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
10days :( long time ok tc bro :D
[Galaxy S 5 Android Development (Exynos)] duki994:
A small script tuning for ROMs while I'm on vacation. My phone flies now :)

#!/system/bin/sh

# IPA relax thermal

echo "70" > /sys/power/ipa/control_temp;

# iosched tuning

for f in /sys/block/mmcblk*/queue;

do

echo "deadline" > "$f"/scheduler;

TUNABLES="$f"/iosched;

echo "$TUNABLES";

echo "0" > "$f"/nomerges;

echo "512" > "$f"/nr_requests;

echo "512" > "$f"/read_ahead_kb;

# deadline tunng

echo 2 > "$TUNABLES"/fifo_batch;

echo 0 > "$TUNABLES"/front_merges;

echo 350 > "$TUNABLES"/read_expire;

echo 3500 > "$TUNABLES"/write_expire;

echo 4 > "$TUNABLES"/writes_starved;

done;

exit 1;

Easiest way:

Just copy paste and save it on sdcard/external storage and run as SU via Script Manager app.

I suggest using [MENTION=3562083]wanam[/MENTION] Samsung Xposed for LP/MM and his XTouchWiz module. Disable Touchwiz DVFS from XTouchWiz module and disable TIMA/KAP. You'll see this phone flying :)

I'll disable userspace DVFS control from kernel when I make it :)

But be sure to disable it from XTouchWiz since DVFS is mostly ROM userspace framework.
[Galaxy S 5 Android Development (Exynos)] mrjoy:
Happy to see great features & implementation. Any chance for MM? I'm serious about my device's low speaker sound.
[Galaxy S 5 Android Development (Exynos)] mrjoy:
Im getting black screen issue while wake on, why its occuring, only im facing this issue or have someone this issue?
[Galaxy S 5 Android Development (Exynos)] ponkz:
what rom are u using.. because i have been using this kernel and never had issues
[Galaxy S 5 Android Development (Exynos)] mrjoy:
http://xdaforums.com/galaxy-s5/development/rom-yash92duster-mm-6-0-1-stock-t3411527

Im using this rom
[Galaxy S 5 Android Development (Exynos)] TheDarkSithLord:
don't flash this kernel on mm roms it won't boot at all

P.S because this kernel made on lollipop 5.0 source not marshmallow 6.0.1 source , dev promised to make version for mm soon
[Galaxy S 5 Android Development (Exynos)] ponkz:
LOL dude this kernel is for LP only, dont flash it on other version of android :)
[Galaxy S 5 Android Development (Exynos)] mrjoy:
Dude im not talking about kernel, i know this kernel is only for LP but i mentioned my blank screen issue on this thread because of kernel expert dev can tell me exact solution for this. Thats why.......
[Galaxy S 5 Android Development (Exynos)] duki994:
MM version available

MM version released :cowboy::cowboy::cowboy:

Link to MM thread:

http://xdaforums.com/galaxy-s5/development/kernel-duki994-kernel-t3427167

Please read carefully MM OP before installing kernel so you won't encounter bugs :cool:
[Galaxy S 5 Android Development (Exynos)] egopatagonico:
I flash v1.2 but i've a bootloop :(

i needed go back to stock kernel ...
[Galaxy S 5 Android Development (Exynos)] duki994:
Change your ROM base. Either BOL2 or BPC8 (confirmed on thread).

I can support only those ROM bases for which Samsung gave opensource. I use BOG4 sources (latest) + BOL2 ramdisk.
[Galaxy S 5 Android Development (Exynos)] Erfan S5:
i tasted in kian rom v2 (bol2) but not boot my phone
[Galaxy S 5 Android Development (Exynos)] duki994:
This kernel has SELinux set to Enforcing on boot. You need to clear dalvik cache if you had it on permissive. Some ROMs need that.

I've added switch to make it permissive/enforcing after boot in Synapse. But on boot will be enforcing.

This way I get compatibility with both stock and custom ROMs. If I set it to permissive then I'd force stock users to clear dalvik cache and some apps (like S Health) will lose data and not work with permissive. I don't want anyone to lose their data.

With this switch anyone can set SELinux as they want. If app doesn't work on permissive, switch to enforcing and voila :D
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
keep rebooting :/
[Galaxy S 5 Android Development (Exynos)] Zamik99:
Stop private service

I stopped working private mode
[Galaxy S 5 Android Development (Exynos)] duki994:
Yes. I deleted and disabled KNOX permanently from ROM and kernel.

Clear Dalvik/ART cache and check your ROM base version.

I use XtreStoLite LP ROM and everything's fine.
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
i have same rom i have wiped both cache but when is om samsung galaxy s5 it will reboot again and again:confused:
[Galaxy S 5 Android Development (Exynos)] ponkz:
Anyone having battery drain issue with v1.2 ?? Or ist just me ??
[Galaxy S 5 Android Development (Exynos)] coto39:
I was having that issue too. Had to go back to stock for a while as I don't know if it's a problem of the stock rom I'm using (G900HXXS1BPC9 from Uruguay, the lastest in we can find here) or because of the rom. Now I'm using the stock kernel and just an hour ago my battery dropped 20% in 30 minutes just listening an online radio through 3g and the drop was never that high, so I don't know.... I'm starting to hate stock firmwares :P
[Galaxy S 5 Android Development (Exynos)] duki994:
Install Better Battery Stats and monitor Kernel wakelocks.

I've added disabling wakelocks in Synapse in misc tab. If one of given wakelocks in Synapse is giving you a problem, just check chekbox and voila :)

Have in mind that wakelock disabling may have some unwanted side effects :)

Soon I'll be uploading 1.3 with much better battery life :)
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
i will waiting but why mine won't boot with this kernel :confused:
[Galaxy S 5 Android Development (Exynos)] duki994:
Version 1.3

Changelog:

* 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)

Test and see how it works :)

I have much better battery life now.

NOTE:

Report battery life after at least 1 charge cycle. 1st charge cycle is usually worst when ROM adapts to kernel and makes new cache.

Downloads:

Same link as in OP
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
will test hope phone boot with this one :D
[Galaxy S 5 Android Development (Exynos)] duki994:
Change your ROM if it doesn't boot.

It's ROM problem. Mismatch of baseband/ROM and kernel.

I can't support any newer than BOL2 (latest Samsung sources are BOG4, but I made 'em work up to BOL2).
[Galaxy S 5 Android Development (Exynos)] duki994:
A question for all:

Would you like me to expose sched HMP thresholds in Synapse?

Those thresholds are CPU load limits for switching tasks between A15 power hungry performance cluster and A7 power saving cluster.

hmp_up_threshold --> defines max load before tasks (android apps/services) are switched from A7 to A15 cluster

hmp_down_threshold --> defines minimum load before tasks working on A15 are switched to A7 for power saving
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
sorry was my mistake

i changed bootloader before :D:D now it's working
[Galaxy S 5 Android Development (Exynos)] Ariyan.n:
bootloop

Why not boot ??:(
[Galaxy S 5 Android Development (Exynos)] duki994:
Please share which bootloader and basevand you use so [MENTION=7341577]Ariyan.n[/MENTION] could flash it.

I've never had boot problems.

And my baseband version is BOK8

EDIT: Try BOG4 bootloader. That's kernel source base (latest by Samsung OSRC) I use. It should work on any ROM after flashing that BL.
[Galaxy S 5 Android Development (Exynos)] TheDarkSithLord:
Need some instructions ) I want to flash this kernel my rom is scorpion r v2 but after flashing kelrnel my phone stucks on sm-g900h logo even not boot to samsung logo ,I think problem in bootloader , I didn't flashed bol2 modem and bootloader ,afeter installing scorpion rom , because I haven't computer now , so can anyone provide instruction to flash bootloader without computer .

P.S I tried flashify and flashfire both of them can't flash bootloader .
[Galaxy S 5 Android Development (Exynos)] rais.asif786:
Same with me. My rom is scorpion v2 and i also do not have the access of my computer ..
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
i used bol2 boot loader :D :D

---------- Post added at 12:54 PM ---------- Previous post was at 12:51 PM ----------

It's wonderful kernel For Battery life :fingers-crossed::fingers-crossed::fingers-crossed:
[Galaxy S 5 Android Development (Exynos)] duki994:
I worked through code to enable dt2w or any other wake funcs. Problem is that touch sensor goes silent when screen off. I overrided power on/off function and forced voltage regulator to always on in synaptics driver and overrided some IRQ's. But synaptics touch always goes silent at strange point in driver when screen off.

It doesn't even call suspend functions. Just stops working.

This leads me to believe that power supply line that powers touch is connected to board with lcd panel and touch keys. Panel (screen) shuts down (main power line cut off) == touch shuts down + touch keys shut down. If that's the case, no wake funcs will work ever.

Only if i enable main panel power and somehow fool lcd not to power on, but that would drain battery waaaay too much and break all other code.

So, no wake funcs for now. Sleep funcs will work good.
[Galaxy S 5 Android Development (Exynos)] Erfan S5:
plz change your kernel to permessive

i test your kernrl in kian rom and xterostolite rom and bootloop and restart boot and again bootloop and again ....

kian v2

xterostolite 2.4

bootloader BOL2
[Galaxy S 5 Android Development (Exynos)] duki994:
Actually I set v1.2 to permissive boot but I said it's enforcing :)

And I reverted to enforcing boot on 1.3 later :)

One thing to learn for users. Setting SELinux permissive/enforcing on boot won't bootloop your device :)

So your argument is not good. SELinux is NOT the issue. It won't force reboot your device. Modified modules/blobs will.

So check your baseband. I use BOK8. I have no idea what Samsung did. I based my kernel on LATEST BOG4 sources.

And I use XtreStoLite v2.4 as you can see in picture attached.

Since you have BOL2 bootloader, flash BOK8 baseband then.
[Galaxy S 5 Android Development (Exynos)] rais.asif786:
Basebans version is BOAD and phone is not boooting after flashing this kernel so i revert back to kian kernel now. Can you make twrp flashable bootloader and modem if it is required . I am not able to use my computer now to flash bl and modem .
[Galaxy S 5 Android Development (Exynos)] shahram Ali:
Fix

To who have problem like stuck at samsung logo or another thing flash this bol2 bootloader

http://dl-1.va.us.xda-developers.co....zip?key=q16JakwWOP9x-stcMSRBxQ&ts=1460316978
[Galaxy S 5 Android Development (Exynos)] ryan42680:
hi new to s5, is everything working ? like S5 features
[Galaxy S 5 Android Development (Exynos)] Erfan S5:
1. your kernel is enforcing and this issue have for me bcuz i dont like it !

2.upload your baseband vrsion for me !

i have kian kernel now and all things verygood but i love kernel rom and tweak .... and i give you this chance for show your work...

i wil test your kernel if not good , back to kian kernel !

my idea is profomance + low battery used !

Thanks your Work !
[Galaxy S 5 Android Development (Exynos)] duki994:
You have GitHub sources. If you don't believe about enforcing/permissive just look here:

https://github.com/duki994/G900H_LP_ramdisk/blob/master/sbin/exynosboot/postboot.sh

I have SELinux disabled at (most of) boot, but when ROM boots it's back to enforcing to make sure that S Health and similar apps don't stop working and more importantly not lose data.

If you want SELinux disabled for good, go to Synapse->Misc tab and disable it there. Easy :D

performance + low battery use == never. But you can tune everything to your needs. That's why we have apps like Synapse :)

I can't make flashable zip of my baseband for now, but I'll try to dump modem image from my phone
[Galaxy S 5 Android Development (Exynos)] duki994:
Version 1.4

Changelog:

* 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
[Galaxy S 5 Android Development (Exynos)] duki994:
I don't know. I use XtreStoLite ROM.

For me fingerprint, gestures, wifi, bt, hdmi, AllShare works. Other I don't know and don't need.
[Galaxy S 5 Android Development (Exynos)] gelarman:
1.3 ver i got 4-5 hours of SOT,and the free ram in huge with adaptive LMK enable,but i dont know if it just me or the stuttering in music is still there with PE workqueue disabled.

i mean with 1.2 the stuttering is gone if the workqueue disable,i use init.d to force disable workqueue in 1.2

PS:can u please make so we can set the gpu min max freq,and lower the cpu min freq
[Galaxy S 5 Android Development (Exynos)] rais.asif786:
Link is not working
[Galaxy S 5 Android Development (Exynos)] duki994:
For GPU not really needed since it won't max out in 95% of workloads. But i could add them.

Lowering it more than 177MHz may lead to UI stutters and really no battery save.

Plus GPU and devfreq are on highprio workqueue now. That makes GPU even less demanding work :)

CPU min freq lowering is out of question. I may add it, but I don't recommend. Phone WILL drain more battery if you lower cpu min freq.

It would take me an hour to explain why and entire math behind it (I studied that a year ago :D ), but in simple words here it is:

Lower CPU freq == lower calculating speed (lower core capacity). When higher workload comes governor will ramp up close to max due to load being high, but will overestimate freq needed (due to unnecessary previous low core capacity on low min freq) and boost it much more needlessly.

Power consumption rises with f*V^2.

So even small periods of higher freqs will burn out all those saved mAh. And those small periods are much more common when CPU min freq is lower.

Especially on big.LITTLE SoC's.

Even Intel sets min speed to 500MHz.

But if you want to hurt your battery life, I won't stop you :)

If I add that option, try and see. And don't report to me that battery life is worse when you lower min freq.

I know this is counterintuitive, but technology involed here is much, much different.
[Galaxy S 5 Android Development (Exynos)] coto39:
Cool!!! An update... I'm testing right now and I'll see how it behaves in terms of battery life. In terms of performances it seems that the phone is faster now :)