yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S 5 Unified Development] sunilpaulmathew:
Compare LineageOS 16 & 15.1 repo's, and cherry-pick the additional commits from 16 branch, then you will be good to go :p

It is a requirement of the Boeffla-Config app to work. Search and go to "Battery optimization" in the settings, select "Optimized", scroll & open Boeffla-Config, and then set"Do not optimize"
[Samsung Galaxy S 5 Unified Development] fbs:
Thanks, I'll look into it. Right now I'm thinking in redoing everything because something in my kernel is making aospextended (los16) crash ~ 2m after booting..

Do they use these defconfigs while compiling klte for los16?

build_kernel.sh

make -C $(pwd) O=output msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974pro_sec_klte_eur_defconfig SELINUX_DEFCONFIG=selinux_defconfig

I was trying to use this same "method" of one global defconfig and one variant_defconfig but it doesn't seem to work
[Samsung Galaxy S 5 Unified Development] sunilpaulmathew:
No. You don't have to use the variant and other stuff anymore. Just use the new full defconfig, for example "lineage_klte_pn547_defconfig" for building klte, or your own modified version of the same. In my case, "Boeffla_@klte@_defconfig", which is basically "lineage_klte_pn547_defconfig" + Boeffla goodies.

Good luck anyway, since your kernel is probably the only remaining one for klte* after discontinuing SmartPack and my Boeffla variants.
[Samsung Galaxy S 5 Unified Development] fbs:
thanks for clarifying that. I've compiled it using the original lineage_klte_pn547_defconfig you mentioned, thinking the problem was some options of my defconfig but... it turns out the crashes I was having here was due to the overclocked msm8974pro-sec.dtsi.dtsi file!! using the original LOS16 everything is okay

I had to remove and put again every part of the kernel to find that.. lol.. what a trouble.. but I still don't understand why it's happening.. looks like the kernel is trying to use the highest clock available (2841600) even though CONFIG_MSM_CPU_FREQ_MAX is set to 2611200.. I don't know, the msm8974pro-sec.dtsi is the same as yours.. hummm..

Found a fix, had to disable some stuff on msm_thermal.c
[Samsung Galaxy S 5 Unified Development] ariel5zal:
Thanks for making this kernel for s5..as we know all the dev have left eol for this device ..I hope you will continued making for this legend device.. Tq again
[Samsung Galaxy S 5 Unified Development] flyinmama:
thanks for maintaining the kernels for the S5, its still a great phone. i'm on the LOS15 kernel version and was wondering if the double tap to wake the phone can be enabled for oreo?
[Samsung Galaxy S 5 Unified Development] pocepoke:
hello im using your kernel and have some a problem like suddleny freeze and reboots

first i tought becouse undervoting (govenor intractuned got -60mv and ondemand got -20mv stabill)

after i dont undervot it still does freeze and reboot after that

and i use kernel auditor to change settings, before that i use boeflla apk and mpdecision i enabled

is there chance that mpdecision enabeld ( im forget i thing i chose mpdecision on some settings) that make the freeze and reboots?

i cant connect to pc using cable anymore to look any debug or using odin, my wife trow the phone to floor but the only thing that broke is data connection

im using lineage 14.1

im very appriciate the kernel it fast and light
[Samsung Galaxy S 5 Unified Development] fbs:
I doubt anything apart from undervolting would result in freezes and reboots... and you won't gain much with it anyways... so, stop undervolting now ;)

you know you can download any rom and gapps to your phone and install it, right? 14.1 is ancient...
[Samsung Galaxy S 5 Unified Development] FettyWap:
Is there any interest in keeping this project alive for LOS14, as currently it appears to be one of the most stable builds (currently) AOKP? What are the potential security draw backs of flashing the most recently posted 14.1 kernel, I've used this Kernel in the past and I've got to say you made a world of a difference to this old flagship device
[Samsung Galaxy S 5 Unified Development] fitittome:
I reinstalled this kernel today (klte 16.0) and my long dead compass, noticed by screen rotation, magically started working again. Why? Are there any sensor fixes applied or maybe dropped intentionally? Confused.
[Samsung Galaxy S 5 Unified Development] J-Lindo:
While you're at it, you might try out the new version which has a new thread (which I didn't know about myself until about a week ago :silly: )

https://xdaforums.com/galaxy-s5/unified-development/tuned-los-kernel-s5-performance-battery-t3893954
[Samsung Galaxy S 5 Unified Development] legasy:
Brilliant kernel.

Its tuned very well and great control from kernel aduator.

Clock speeds are perfect.

Fast take up on navigation and app opening.

Well recommended, And thank you very much to the creator of this kernel.
[Samsung Galaxy S 5 Unified Development] fbs:
it's up.. but I think you didn't need to wait..
[Samsung Galaxy S 5 Unified Development] fipsy:
Thanks a lot! I wait for it because I always do the LOS and kernel updates together. Then I only have to start TWRP and to reboot once.
[Samsung Galaxy S 5 Unified Development] fbs:
I'm still annoyed because CPU1 is offline most of the time. It looks like mpdecision is "broken" again, and it runs on "userland", outside the kernel...
[Samsung Galaxy S 5 Unified Development] fipsy:
Really? Well, things are running great for me. CPU1 runs almost constantly. And if there is nothing to do, at 300 MHz. But I have also set "Optimized" as the Hotplug Profile for the CPU in the Boeffla-Config and Multicore Powersaving to on. Otherwise, the CPU is not running quite so well.

By the way: Don't you want to leave a PayPal donation address on this website? I think some of us would certainly like to donate a few bucks for your efforts and as a motivation. :victory:
[Samsung Galaxy S 5 Unified Development] airidosas252:
That's been a problem since the day one. If only mpdecision was a part of the kernel, it would have been so much better.

Anyway, your kernel seems to be the best one for LOS14.1. Nothing could touch yours in terms of responsiveness.
[Samsung Galaxy S 5 Unified Development] vd69:
How about battery life?
[Samsung Galaxy S 5 Unified Development] fipsy:
I could not detect any obvious differences between the battery consumption of the different kernels.
[Samsung Galaxy S 5 Unified Development] airidosas252:
Actually, there is a slight bit of difference between all of the custom kernels built. Stock LOS is ridiculous, Boeffla is... Meh, at best. This one is everything of the best combined into one package.
[Samsung Galaxy S 5 Unified Development] fbs:
I'm compiling "intelli-plug" within the Kernel, but somehow it loads but it's not working...

[MENTION=4326892]The~Skater~187[/MENTION] Did you manage to disable/inactivate mpdecision without deleting the /system/bin/mpdecision ??!
[Samsung Galaxy S 5 Unified Development] The~Skater~187:
Get what working?

Nope, haven't messed around with mpdecision yet.
[Samsung Galaxy S 5 Unified Development] javelinanddart:
You can remove the service in the ramdisk (something like so https://github.com/javelinanddart/a...mmit/cff7be416edf05c173ea27431d9663f43d2bf910).

If the service is not present, nothing will load the binary.
[Samsung Galaxy S 5 Unified Development] fbs:
New kernel with new hotplugger is up.. please test..
[Samsung Galaxy S 5 Unified Development] fbs:
Thanks, but I think this is while working with the whole system, not just with the kernel, right.. ? I managed to get rid of it the same way Andi did to use zzmoove's hotplugger
[Samsung Galaxy S 5 Unified Development] javelinanddart:
Well, if you're distributing a boot.img, you're also distributing a ramdisk, so no, you don't have to mess with anything outside of boot.img. If you're distributing the zImage only, then yes, that is outside of the scope of what you can change.
[Samsung Galaxy S 5 Unified Development] fipsy:
With tuned hotplugger the CPUs switch between

"300 - off - off - off" and

"300 - 0 - 0 - off"

every 2 seconds. Whereas the optimized hotplugger stays on

"300 - off - off - off"

permanently.
[Samsung Galaxy S 5 Unified Development] fbs:
how's that? there's no 0mhz..

"tuned" won't enable any cpu if the right before it isn't on the max clock. ie: cpu1 won't be enabled until cpu0 reaches 2457 mhz
[Samsung Galaxy S 5 Unified Development] fipsy:
Don't ask me, I didn't program Boeffla Config. But that's what the app is showing...
[Samsung Galaxy S 5 Unified Development] fbs:
Must be a bug then. 0 might mean "off".. Use KTMonitor from the OP if you really wanna monitor cpus
[Samsung Galaxy S 5 Unified Development] fipsy:
I just wondered what's the difference between 0 and off. Because the CPU seems to change between these two states. I think only Andi can answer this. But he's now in Florida. :)

By the way: If I use the tuned hotplugger, ktmonitor is constantly showing that CPU1-3 are always off. Independently from what I'm doing.
[Samsung Galaxy S 5 Unified Development] fbs:
Can anyone test my "Donate to Me" button by donating like $50 USD ?? lol, It's my birthday today.. :D :D
[Samsung Galaxy S 5 Unified Development] fipsy:
So have a happy birthday and all the best! Was it supposed to mean that donations below $50 are not accepted? :p
[Samsung Galaxy S 5 Unified Development] fbs:
huahuahua of course they are :D thank you :good: :good:
[Samsung Galaxy S 5 Unified Development] irtrin:
Can you add new cpu frequency - 100 mhz?

I miss this feature from elite kernel for s3. "- CPU: 100MHz step added to save power".
[Samsung Galaxy S 5 Unified Development] japin:
Wow. This kernel gives this aging but still amazing phone a whole new life. Even though it doesn't have all the fancy bells and whistles of other kernels I have used but it is none the less amazing. I haven't found the need to tweak it once to squeeze a little more performance out of it, it just seems to work how a good kernel should right out of the box. I appreciate the fact that you didn't focus on features and got right to the core of what everyone looks for, a faster phone. And for that you truly succeeded my friend and thank you.
[Samsung Galaxy S 5 Unified Development] imarsh72:
So does this kernel have all the optimal values set as default so I don't have to install an app to tinker with settings, as I was hoping to run this phone without root which I can't do at the moment with Los kernel and aduitor app
[Samsung Galaxy S 5 Unified Development] fipsy:
I only changed one setting of this kernel and that is swappiness. It is set to 100 (default value) and I have found that the device runs much more smoothly with a value of 30. But I guess that's an individual thing. All other values are in my opinion optimally adjusted and do not need to be changed.
[Samsung Galaxy S 5 Unified Development] fbs:
I don't know what everybody think as "optimal values", but I've set by default what I *think* it's optimal in terms of governor,ioscheduler,hotplugger,readahead,etc. The only thing I didn't change was the default charging values, as higher ones - specially for USB - could burn other ppl devices (old notebooks, car players..)
[Samsung Galaxy S 5 Unified Development] fbs:
sorry to say your swappiness value is being ignored :P

you can avoid swapping (but it isn't a real swapping because it's not to the SD card, it's an in-RAM swap) by raising the LMK values. Less ram will be used for apps, then the kernel won't think it's running out of memory..
[Samsung Galaxy S 5 Unified Development] KazuDante:
Heres a few questions regarding the statement you wrote , is it the kernel that makes the assumption that its running low on mem or is it the rom ?

2nd- if its the kernel , isint there somewhere in the code that list the limit where when the ram reaches that point that its starts killing background apps , can that limit be increase/decreased even further to avoid such problem ( not that your version does that , its great i can leave my fav game in mem and it wont restart it )

also could a proper swap using sd be included within the kernel , and what would be the possible drawback of such a tweak ?
[Samsung Galaxy S 5 Unified Development] fbs:
the rom doesn't "care" about memory, afaik. almost literally. it uses too much. java sucks!

the kernel assumes the system is with low ram based on many things: "vm.min_free_kbytes" (minimum FREE memory per zone), "vm.extfrag_threshold" (too much memory fragmentation), CMA-something (contiguous memory allocation, some stuff needs memory to be contiguous) and "vm.extra_free_kbytes" (minimum really FREE total ram). When one of these thresholds are triggered, it starts asking modules/drivers to "shrink" memory usage. This includes the file system, the jurassic lowmemorykiller and many other drivers:

mm/zcache.c: register_shrinker(&zcache_shrinker);

fs/gfs2/main.c: register_shrinker(&qd_shrinker);

fs/gfs2/glock.c: register_shrinker(&glock_shrinker);

fs/cifs/cifsacl.c: register_shrinker(&cifs_shrinker);

fs/quota/dquot.c: register_shrinker(&dqcache_shrinker);

fs/super.c: register_shrinker(&s->s_shrink);

fs/ubifs/super.c: register_shrinker(&ubifs_shrinker_info);

fs/xfs/xfs_qm.c: register_shrinker(&qinf->qi_shrinker);

fs/xfs/xfs_buf.c: register_shrinker(&btp->bt_shrinker);

fs/mbcache.c: register_shrinker(&mb_cache_shrinker);

fs/nfs/super.c: register_shrinker(&acl_shrinker);

fs/f2fs/super.c: register_shrinker(&f2fs_shrinker_info);

arch/x86/kvm/mmu.c: register_shrinker(&mmu_shrinker);

arch/arm/mvp/mvpkm/mvpkm_main.c: register_shrinker(&mvpkmShrinker);

arch/arm/mach-msm/sec_debug-dfd.c: register_shrinker(&dfd_shrinker);

arch/arm/mach-msm/sec_debug.c: register_shrinker(&dfd_shrinker);

drivers/md/dm-bufio.c: register_shrinker(&c->shrinker);

drivers/staging/android/lowmemorykiller.c: register_shrinker(&lowmem_shrinker); <- disabled

drivers/staging/android/ashmem.c: register_shrinker(&ashmem_shrinker);

drivers/staging/ramster/zcache-main.c: register_shrinker(&zcache_shrinker);

drivers/gpu/ion/ion_cma_secure_heap.c: register_shrinker(&sheap->shrinker);

drivers/gpu/ion/ion_system_heap.c: register_shrinker(&heap->heap.shrinker);

drivers/gpu/drm/ttm/ttm_page_alloc.c: register_shrinker(&manager->mm_shrink);

drivers/gpu/drm/ttm/ttm_page_alloc_dma.c: register_shrinker(&manager->mm_shrink);

drivers/gpu/drm/i915/i915_gem.c: register_shrinker(&dev_priv->mm.inactive_shrinker);

net/sunrpc/auth.c: register_shrinker(&rpc_cred_shrinker);

My implementation of lowmemorykiller simply ignores this: it will start killing apps based only on the minfree values, obeying the order (first unused apps, then background apps, and so on...)

swapping to sdcard can be done, was done in the past, but no one can torelate it. It is slow as hell to write and slow to read. Think that we already have slowdowns while trying to swap to a compressed RAM space.. and compressed RAM is like 1000x faster than a SD...
[Samsung Galaxy S 5 Unified Development] fipsy:
Is it only ignored in your kernel version? Otherwise the setting in Boeffla Config would be useless. I'm quite sure it isn't ignored on boeffla kernel. I had noticeable differences when changing swappiness with boeffla kernel. I didn't check it with your kernel yet.
[Samsung Galaxy S 5 Unified Development] KazuDante:
so your approch is def the better way as of now if i understand it correctly , maybe swap to sd might come relevant if sdcards become faster , i think even now we are still on class10 sdcards , but are the read and writes also limited by the devices we use as well?
[Samsung Galaxy S 5 Unified Development] imarsh72:
I've installed the hotplug version and left it as is, 3 out of 4 cores are idling most of the time, device feels nippy and games run fine so I'm happy , cheers ?
[Samsung Galaxy S 5 Unified Development] fbs:
Our device has only 2gb of ram instead of 8gb or 16gb for one unique reason: RAM is ridiculously more expensive than flash memory (sdcards). But it is also ridiculously faster

I just made a comparison using my phone:

600MB to RAM took 2.08 seconds, 288MB/s

600MB to SDCARD took 43.65 seconds, 14MB/s

So, it's incomparable. SD cards will be as fast only if they cost as much, or maybe not even like that, because RAM doesn't have to maintain its content while non-powered, so it's another form of storing data. If you turn off your phone, all ram content is lost, but SD content is not, right? So it isn't so right to compare them so directly like that..

Anyway, 2GB of RAM is plenty of memory. We'd only need more RAM if we'd want many apps running together/in parallel.

Here's a brief list of running processes on my phone right now, so we can get an idea about how much RAM they consume

[I]toybox ps -A -o name,RSS -k -RSS[/I]
[B]NAME (RAM resident size in MB)[/B]
com.facebook.katana 86.476
system_server 82.884
com.google.android.gms 81.220
com.badoo.mobile 78.336
com.android.systemui 77.668
ogle.android.gms.persistent 74.728
com.facebook.orca 70.276
com.whatsapp 59.596
com.google.android.gm 58.892
com.android.vending 57.932
com.instagram.android 52.780
googlequicksearchbox:search 51.704
(...)
com.android.phone 19.144

As always, Facebook is the biggest memory hog of all time(86 + 70). I wonder how phones with 290MB of RAM run it... (GT-S6102)

And even though we have "system_server" using 82mb of RAM we still see many other parts of the system itself as separate processes (vending, gm, systemui, gms), each one using more RAM..

But anyway, even Facebook using ~156MB of RAM by itself, it's not even close to the total phone memory (~ 1,700MB)
[Samsung Galaxy S 5 Unified Development] fbs:
You may set it to any value but the kernel won't use it. I had to hard-code some stuff to make it faster like it is..

The "vm.swappiness" value definition all over the web is a bit wrong. The correct one would be like this: "Amount of program data (APPs) that are in-memory you are willing to swap to swap-space, INSTEAD of decreasing the file-cache, IN CASE of low-memory conditions."

Note that you have to be in low-memory condition to trigger this. The way vm.swappiness was coded (from 1 to 100), the file-cache internal value was always 140. So even when set to 100, the kernel would first get rid of all cache, then try to move in-memory apps to swap-space. This is not fair, and we wouldn't want to shrink all our file-cache in favor of apps that we may not even be using! ZEROING our file-cache means that any access to WhatsApp history (ie. when receiving a message or writing a new one) would need to re-read the database on our internal memory instead of accessing it directly on the RAM (if it was cached before). It's the file-cache that makes our gui smooth, because any options we may have set are already on RAM and not on the internal memory (which is slow). So the other way around is better: store old apps on swap-space (which is in ram also, but compressed), and maintain a healthy amount of file-cache. It is based on the size of file-cache that LMK starts killing.
[Samsung Galaxy S 5 Unified Development] KazuDante:
Thank you so much for taking the time to explain it to me regarding ram/memory subject of our device.

Yes even I noticed that facebook and FB messenger are ram hogs, that is why i switched to the Lite versions long ago.

My last question is do you have any plans of either upping this project to Oreo or just a stock LOS15 kernel but with the mem mod that you tweaked in this project?
[Samsung Galaxy S 5 Unified Development] fbs:
AFAIK our Oreo version is using just the same old kernel from LOS14.. So, anyone can install "my" kernel on it with no problems.

Even if it's using a modified kernel, the lmkmod is just a .c file, and the "nozcache" is just a switch (on or off). Anyone can get my source code and see/copy
[Samsung Galaxy S 5 Unified Development] KazuDante:
oh ok , that i was not aware of (same old los 14 kernel ) . Thanx again and thank you for your work on the S5.
[Samsung Galaxy S 5 Unified Development] fipsy:
I think there's a problem with the last kernel version. I had noticed that the phone became slower and slower after 1-2 days of continuous operation. It takes quite a long time to load Google Maps and it reacts a bit sluggish. At the same time, the free swap is constantly down to 0 MB.

Now I have tested the current Boeffla kernel (beta15) again and the problem does not occur. Even after a few days of operation there are always 50-80 MB swap free and Google Maps always runs at the same high speed. I think I remember that the problem with full swap also occurred with Boeffla kernel in the past, but it was fixed. If the free swap is constantly down to 0 MB, the device will always slow down considerably. I had already noticed that for years now. I'm afraid your change in preference for the cache over the swap is the cause of this.

---------- Post added at 05:39 PM ---------- Previous post was at 05:28 PM ----------

Just to say: Modern SD cards easily achieve 90-100 MB/sec read speed and 40-60 MB/sec write speed at a price of about 30€ for 64 GB. This is comparable to a rotational hard disk. With the SD card reader in my notebook, 90 MB/s are quite normal. The difference is probably the S5's hardware, which is a bottleneck and does not allow high speed operations on sd cards.

---------- Post added at 05:52 PM ---------- Previous post was at 05:39 PM ----------

This is because not all segments of a program are needed at the same time. The unused segments are simply removed from the memory and others are reloaded. The program will then run much slower, but it will run. In this way, you can run programs that are larger than the available RAM. The swap, for example, is used for this paging. This is also the reason why the device becomes very slow when no swap is available.
[Samsung Galaxy S 5 Unified Development] fbs:
When it was Dalvik, instead of ART, it was almost like that. Like the app was modular, just some parts of it were interpreted at a time. But its loading was slower
[Samsung Galaxy S 5 Unified Development] fipsy:
But even ART offers JIT compilation. I think on devices with low memory nothing has changed much. Otherwise it wouldn't be possible to run the same app on many very different devices. Here is a quite good explanation: https://source.android.com/devices/tech/dalvik/configure
[Samsung Galaxy S 5 Unified Development] drewcu:
Have the same issue where the kernel gets slower over time and I need to reboot. Kernel is quite snappy initially so it's a small price to pay but it'd be nice if there's a "fix." Can't compare to the other Boeffla based kernels as I haven't tried them for very long.

Thanks.
[Samsung Galaxy S 5 Unified Development] fbs:
It is not this JIT that made dalvik work with so little memory... jit was done in dalvik too, on android 3.x I think.

Anyway it was a trade-off... tiny amounts of ram used but longer wait times for the user
[Samsung Galaxy S 5 Unified Development] cdrivex4:
any chance of a build for the s5 900fd? or you keeping it all just klte?
[Samsung Galaxy S 5 Unified Development] fbs:
new build: linaro7 instead of gcc4, and "swappiness" working again
[Samsung Galaxy S 5 Unified Development] fbs:
Did boeffla work for your phone? I don't known what a 900fd is.. lol
[Samsung Galaxy S 5 Unified Development] fbs:
try this new build and compare please.. any "solid" feedback is appreciated
[Samsung Galaxy S 5 Unified Development] cdrivex4:
900f=klte 900fd==klteduos, both s5 variants, was hoping you could build the s5 duos variant also of you are able to build for the standard s5. haven't tried the kernel yet, but if as good as everyone says it is am sure it should work a lot better than the current state of the official s5 builds.
[Samsung Galaxy S 5 Unified Development] fbs:
See if this would even install... :P
[Samsung Galaxy S 5 Unified Development] fbs:
my god, something terrible must have happened to these 10 people that downloaded the DUOS version... not a single word from any of them !!!!!!! :P
[Samsung Galaxy S 5 Unified Development] cdrivex4:
sorry bout that havent had time to try it out yet.

tell me before i flash this what do i need to make a backup of in twrp? is it just the system partition.

my duos is daily driver so can't afford to be without it for work.