yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S 5 Unified Development] fitittome:
The noticeable effect of doing that last time was increased whining on the forum! At least there is support in the new kernel now to keep them happy! :crying:

Edit: I'm not sure you can turn off LMK in Kernel Aduitor.... The switch just makes it more or less aggressive... My interpretation of the attached label.
[Samsung Galaxy S 5 Unified Development] fipsy:
I interpret the label in such a way that the LMK always kills the apps exactly according to given memory values, while the adaptive LMK kills the apps in very different memory states. The question is whether LMK and ALMK are the same code or both have different codes.
[Samsung Galaxy S 5 Unified Development] fitittome:
IDK. Check here https://xdaforums.com/android/apps-games/app-kernel-adiutor-t2986129
[Samsung Galaxy S 5 Unified Development] Saber:
BFQ has been on Lineage kernel for a while now (but was added a little later on kernel rebased) and hasn't caused any issues in the past, so I don't think it relates at all to the LMK issues.

Performance wise, I can't see why BFQ would have a noticeable performance impact on our device. In fact it's a good choice, but I prefer simpler scheduling algorithms :)
[Samsung Galaxy S 5 Unified Development] fbs:
I'm afraid not all schedulers give each process a queue to use I/O like bfq does. But anyway bfq was made for rotational disks, not SD.. so I don't know..

I was shocked to see how much experimental code and ancient code are part of our kernel.. sounds like "hey, it booted this way, let's stop tweaking"
[Samsung Galaxy S 5 Unified Development] Saber:
As I would like to reiterate, BFQ has already been part of this LOS kernel for a while. This is the same with ALMK but as we've recently seen, the performance has degraded on our device.

Note: BFQ isn't just for rotational disks, it performs well on SSDs or flash storage as well (although throughput is not its main priority and thus doesn't perform as well in this category). The same thing with CFQ with all of the patches for solid state support.
[Samsung Galaxy S 5 Unified Development] fbs:
My sdcard is formatted (via TWRP) as exfat.. but LOS says it is corrupted, even though I've put a lot of files in it via UMS...

It's all working ok, all files are there, but after every boot, LOS says it's corrupt and want to ERASE it ....

Even the fsck.exfat (via twrp shell) hasn't any options to fix errors...

What to do ? I don't want to click on "ERASE" by mistake and loss everything...

Reformatting it as FAT32 isn't an option because I need 4gb+ file support
[Samsung Galaxy S 5 Unified Development] javelinanddart:
There seems to be a lot of confusion in this thread, I hope to clear it up a bit.

First off, LMK is low memory killer. It's something that's present on all systems, and you should not (and probably can't) turn it off.

Second, Adaptive LMK is what's being disabled, which is an LMK driver.

When the last rebase happened, adaptive LMK was omitted, and everything was working fine.

Some people complained on jira that memory management sucked, and then haggertk caved, and readded it.

Then more people started complaining that memory management got worse, so after all the complaining,

adaptive LMK is finally being disabled again, but it's still present to play around with in Kernel Adiutor, if you want.

Third, The I/O scheduler doesn't play any role in managing memory (which is the issue at hand here), and BFQ is used

across nearly all devices, and has been used for years (as pointed out by others) without any issues, so this is not a problem.

Fourth, if you're having storage issues, please try to format the sdcard at a real computer, and then try putting it back in your

phone. In addition to the fact that we've made some external storage changes lately, TWRPs tools may not be the most

reliable things to use for external storage, so try formatting this in some computer running Linux or Windows (Windows may handle exFAT the best)

and then seeing if the issues that are occuring still persist. Also, please don't flash any weird external sdcard "fixes".
[Samsung Galaxy S 5 Unified Development] fitittome:
[MENTION=5795145]javelinanddart[/MENTION] [MENTION=365798]Sabre[/MENTION] thank-you so much for contribution. Also, I apologise for raising the BFQ change I noticed. Thankfully it was simple for people with issues to eliminate this as the cause because it is simple to change. Also for confusing LMK with ALMK. My bad.

In the past when we had an obscure issue that was difficult to reproduce. [MENTION=1152821]rumburak[/MENTION] stepped up to the plate and produced a simple app to force the device to do something and the app turned red if the device failed or green if it passed. Using that app we got feedback from the users and the dev even used it to check things out and fix the issue.

I think what we need here is a simple app (targeted at the lowest possible API level) that allocates itself maybe a 500mb chunk of memory and sits there doing low level processing on it, maybe writing it out to external storage. So it behaves as an old fashioned 'background' app not using the current scheduling api's. In the old days, using Basic, I would have dimensioned a large array. The idea being that this app would consume half/three quarters of the devices memory resources. Then any one of us could run the app in addition to our normal apps.

Hopefully this would break things more frequently. Then maybe the dev could advise how we can switch on additional debugging info on the suspected services etc.
[Samsung Galaxy S 5 Unified Development] fitittome:
That is

good advice

I use one of these. In conjunction with this formatter program. That formatter program is like magic. It has got me out of a hole on many an occasion. One advantage of using Windows. ;)
[Samsung Galaxy S 5 Unified Development] mattnin:
I don't know how so many people have all these problems on their S5's. My whole family is on Lineage on the S5 and none of us have these issues. My wife has everything loaded on her phone that you can imagine from facebook to snapchat and other crapware and her phone continues on reliably every day. If there is ever a problem, nothing a wipe cache and dalvik won't fix.

Maybe it's the Lineage bunch are just a bunch of perfectionists who want nothing but the best, who wouldn't, but it seems any issues at all on this phone are very minor. If you guys want to try a crappy running OS to compare, go back to stock! I think our Devs are badass for everything they do. This Lineage S5 phone is one of the best options out there, even compared to modern flagships!
[Samsung Galaxy S 5 Unified Development] Pally01:
Everyone in this thread is so happy for you.
[Samsung Galaxy S 5 Unified Development] javelinanddart:
I think you're underestimating how much ram 500MB really is, and how hard it is to use that much memory. In Java you have to create objects, which consist of chars, ints, booleans, etc at the lowest level. To use 1MB (1,000,000 bytes) you have to make 250,000 integer variables, which are 4 bytes each, and keep them all actively used so that they're not cleared up by garbage collection. It has to be a very complicated app in order to use that much memory, which means it's hard for us to write an app just to "debug" memory usage. Of course, some would be used in rendering things, however since that's always occurring when the screen is on, we can't count that in our "memory used" total. Now, in C you could use malloc over and over again to allocate that much memory, but the priority of a user program would be so low that it would be killed too easily, maybe even before it could finish allocating that memory. Additionally, you're overlooking another important part of memory management, which is that everyone likes it a different way, which is why people complained when adaptive LMK was and wasn't present. Personally, I have never had memory management issues with and without adaptive LMK, and neither has haggertk.
[Samsung Galaxy S 5 Unified Development] fitittome:
Thanks for that detail. I said what I said in completely the wrong way. :eek:

I should have thrown out what we needed as a group of S5 fanatics.......

A simple way to stress an S5.

So users can fiddle and we can see what fails where.

That was what I was getting at, as I am not seeing any problems at all myself.

I will not start spouting stories about how we used to sell 5mb external winchester drives at £1495 a pop...... ;)
[Samsung Galaxy S 5 Unified Development] Deathcommand:
So weird. I guess the nice thing is that it takes my phone about 20 seconds to reboot starting from the cyanogen logo.
[Samsung Galaxy S 5 Unified Development] :
i've had that happen a few times, as well... twice when restoring cm14 backups, i couldn't get my sim to be recognised and again today, after compiling/installing my cm14 rom.... had to factory reset to get it back...

hopefully it all gets smoothed out, stops doing that.
[Samsung Galaxy S 5 Unified Development] ascomputer:
TIPP!!/Info it's works fine with A BT-Headset

Testes On my 900FD newest build Form Herr ;)
[Samsung Galaxy S 5 Unified Development] cchri78:
How did you get in the menu. Please help.
[Samsung Galaxy S 5 Unified Development] rayzor666:
*#*#4636#*#* from phone or others an app called on playstore called AOSP/CM Hidden Menu.
[Samsung Galaxy S 5 Unified Development] RemusW:
SMS issue.

Enter into the dialer - *#*#4636#*#* select Phone information. scroll down to SMSC.

hope this helps you.

---------- Post added at 11:54 ---------- Previous post was at 11:42 ----------

i have tried refresh and update, manually entering the number and updating. done these a number of times rebooted and tried sending an SMS nothing works it still fails to send. And the SMSC remains blank.

All worked fine on CM13 but not on CM14/14.1.
[Samsung Galaxy S 5 Unified Development] rayzor666:
What device are you using. I'm using a g900i but it was my fault I couldn't send texts not the ROM. If you haven't messed with anything all you can do is a clean install. I had different issues after a clean install and did to do a complete wipe to fix everything(I wiped all internal and external from recovery). Sometimes you have to start fresh
[Samsung Galaxy S 5 Unified Development] haggertk:
README:

I am posting new builds, all dated 20161103. If you are flashing from earlier builds, there is something you MUST do in order to have telephony (both data and phone). The telephony databases got updated yet the auto-update code isn't all caught up yet. It happens every major bring-up. If you run unofficial builds during bring-ups you deal with this...

First off, you must delete /data/user_de/0/com.android.providers.telephony/databases/telephony.db* (both the .db and .db-journal) and /data/user_de/0/com.android.providers.telephony/databases/mmssms.db.* I'd recommend doing this from recovery, but you can do it after the phone is booted too. Either do it from an adb shell, phone terminal, or appropriate file manager/explorer.

Next, you need to delete data from the Phone app.

Finally, reboot after all this is done.

If you don't do this you will write a post stating that you don't have a SIM card, you lost your IMEI, your phone app is crashing, or all of the above and I won't respond because you didn't read the thread.

Changes:

Linux Kernel version 3.4.17. This required rolling back from STACKPROTECTOR_STRONG to STACKPROTECTOR_REGULAR, at least for now. This is equivalent to cm-13.0 state, but once the kernel is caught up more we shoudl be able to re-enable STRONG

A couple more OUIs added to macloader. Please still get with me if your bluetooth is glitchy when you get more than a couple feet away, turn your screen off, etc...

All the changes to the greater cm-14.1 since the last build
[Samsung Galaxy S 5 Unified Development] aogakid:
same here :(
[Samsung Galaxy S 5 Unified Development] brandon79:
Do I delete these before or after I flash the new build just to be clear
[Samsung Galaxy S 5 Unified Development] dyval:
It states you can do it after the phone has booted and reboot after that.
[Samsung Galaxy S 5 Unified Development] dari-woka:
Im already in your previous 14.1.

If I skip this version, when installing the next one, do I have to do all this also? (Or its only for this particular release?)

Thanks
[Samsung Galaxy S 5 Unified Development] brandon79:
Thankyou for the reply I was just a little unclear about it
[Samsung Galaxy S 5 Unified Development] ThaiFighterGo:
I just flash klte 20161103, deleted files via recovery and phone app data. Phone and cell data works fine.
[Samsung Galaxy S 5 Unified Development] haggertk:
Unclear. It should get ironed-out, but I'd at least be prepared to do it in the future as opposed to a full data wipe...
[Samsung Galaxy S 5 Unified Development] RemusW:
SMS issue

Ok i have just tried tried installing the latest 03/11 build.

Wiped everything except the SD card.

USB storage gave this error -

Formatting USB Storage using mkfs.fat... mkfs.fat process ended with ERROR: 1

Unable to wipe USB Storage.

Unable to wipe /usbstorage.

installed the latest build.

installed OpenGapps mini.

rebooted.

Completed initial setup accepting all defaults.

Changed no settings or installed anything.

Tried sending an SMS. Same result failed to send. retries also fail.

Entered service menu.

refreshed and updated.

rebooted.

Tried sending an SMS and again it fails.

I also tried doing it all again from scratch but wiping the cache/dalvik after installing the rom but before installing Gapps and wiped the cache/dalvik after installing Gapps before rebooting.

SMS sending fails no matter what i do.

I am using the G900F international version.

I am at a loss to see why this is happening can anyone help.
[Samsung Galaxy S 5 Unified Development] 4rz0:
Does CM14 come with systemless root?
[Samsung Galaxy S 5 Unified Development] Jaanto:
The same is happening here. Not a fresh install but dirty flash. On latest build (Nov 3), KLTE G900F. Can open standard messaging app but app crashes when trying to send a text. The same with different other sms apps. Doesn't matter if you set one or the other as standard messaging app.
[Samsung Galaxy S 5 Unified Development] Deathcommand:
I think I figured it out. My phone will say no sim card until I get SPRINT service. My phone doesn't know how to roam. Instead of roaming it will just disconnect.
[Samsung Galaxy S 5 Unified Development] haggertk:
Yup, looks like we need to kill the mmssms database as well (this will delete your messaging history):

# rm /data/user_de/0/com.android.providers.telephony/databases/mmssms.db* && reboot

Then clear data on Messaging if it's still acting up...
[Samsung Galaxy S 5 Unified Development] fipsy:
This is really very interesting and is in line with my observations. I formatted my SD card on Windows 10 with exFAT. LOS has never complained or said that something was damaged. But if I put the card into my PC's card reader and run a check (chkdsk) it will be repaired EVERY time! If I put it back into the smartphone afterwards, I have a folder "FILE.000" with lost files in both TWRP and LOS. It seems that the implementation of exFAT on LOS is more than faulty!

That's the same with me, too! I would recommend to put the card into a PC and repair it in Windows! Then insert it into the smartphone and boot into TWRP. Then delete the directory \FOUND.000 with the file manager.

---------- Post added at 06:32 PM ---------- Previous post was at 06:15 PM ----------

Great! What you're saying confirms my opinion to 100%. That's how I have also understood the previous statements in the thread. Just one question:

When was this done? On September 13th or 20th?
[Samsung Galaxy S 5 Unified Development] paulcarroty:
Fellas, anybody tried the LOS 10.04 update? Is it ready to use?
[Samsung Galaxy S 5 Unified Development] fipsy:
There's no need to "steal" that much memory. My app, which is always killed (FolderSync), has a maximum memory requirement of 71 MB according to the LOS app memory info. That's enough to be killed after a few seconds.

Since C we have simple malloc() for that. :D
[Samsung Galaxy S 5 Unified Development] fipsy:
I also formatted my SD card with exFAT on the PC. But in the meantime, LOS has "spilled" more than 13 GB of "Unknown files" (as you can see in the attached screenshot) onto the SD card. I can't access these files anymore, so I have to backup and reformat the card. All very unpleasant!
[Samsung Galaxy S 5 Unified Development] fipsy:
Is there no NIO ByteBuffer object on Android you could fill with random chars every second?

ByteBuffer bb = ByteBuffer.allocate(200);

I only have two apps that cause problems, but both are very important to me! One is the Nandroid script from Ameer Dawood, which is started with SManager at night to create a Nandroid backup and the other is FolderSync, which is used to get the backup onto my NAS in the morning. Both have not been working since September 20th because they are always killed after a few seconds.
[Samsung Galaxy S 5 Unified Development] 10goto10:
Have you tried switching to NTFS? LOS and TWRP mounts them natively, and it has journaling which means it can roll back file operations in case of unexpected shutdown / crashes. Performance will be lower, but I think it's worth the extra reliability. I've been using it for about a month now, and it survived a hard crash (tried backing up apps while streaming music with the builds w/ wonky LMK, I think it killed some important process and the phone soft-reboots) and some heavy writes (downloading, etc.)

FWIW I hadn't had any problems with Linux's NTFS implementation since 2010 (does Android use ntfs-3g?)
[Samsung Galaxy S 5 Unified Development] fipsy:
Didn't try that so far. Even didn't know that LOS and TWRP are capable of NTFS. This possibility has never been mentioned here in the thread. Why the hell not? :o
[Samsung Galaxy S 5 Unified Development] fitittome:
It was mentioned back here:-

https://xdaforums.com/showpost.php?p=74045341&postcount=8528

Merged here:-

https://review.lineageos.org/#/c/190106/
[Samsung Galaxy S 5 Unified Development] fipsy:
Ah, okay. But that seems to be a whole new story. So the question here is also how reliable the whole thing works.
[Samsung Galaxy S 5 Unified Development] javelinanddart:
Re: When was adaptive LMK merged, i'm not sure whether or not it was present in the 9/13 builds, it was pushed on 9/13, but I don't know whether or not it made the deadline for getting changes in for the build, and it could also vary by variant, variants that were built later could have it, whereas previously built ones may not have it. I could flash all those builds and figure it out, but I really don't want to :P

As for allocating a buffer, see my previous concern about getting the process killed because of LMK, or the buffer cleared up because of garbage collection, because it's not being used, it's just being written to, without reading from it. EDIT: Additionally, we would have to do this continuously, which could cause conflicting results because of large CPU usage.

EDIT2: A better way to stress RAM usage might be opening a lot of tabs in Chrome and switching between a lot of them, as Chrome is quite the memory hog
[Samsung Galaxy S 5 Unified Development] fitittome:
I don't recall seeing anything in TWRP to format to NTFS. I think Android has been able to mount them since forever, but I assume not via an SD-Card, hence the update along with exfat. I am certain the SD-Cards will have to formatted on a Windows machine as mentioned before.
[Samsung Galaxy S 5 Unified Development] kevin#34:
me!

it seems to run ok, apparently no differences compared to previous update
[Samsung Galaxy S 5 Unified Development] fitittome:
Could this help?

https://github.com/stressapptest/stressapptest
[Samsung Galaxy S 5 Unified Development] javelinanddart:
I feel like I'm going in circles here, the point seems to be missed that everyone likes their memory management differently.

Sure that might help in stressing memory, but it seems we fall into three groups:

1. Not having issues

2. Didn't like adaptive LMK

3. Like adaptive LMK

I happen to fall into group 1. If you're in group 2, we disabled adaptive LMK by default, so have fun. If you're in group 3, you can manually enable adaptive LMK in Kernel Adiutor.
[Samsung Galaxy S 5 Unified Development] fbs:
I'll try it.

Right now my phone crashed when I wasn't using it, and now it's bootlooping... oh god.. :(

---------- Post added at 09:47 PM ---------- Previous post was at 09:41 PM ----------

This app does work nice for testing lmk.. it can malloc a little ram a time or try to use it ALL. It runs continuously and slowly (not so slow..)

I was using it to test a modification I called "timely LMK"...

https://play.google.com/store/apps/details?id=me.empirical.android.application.fillmemory
[Samsung Galaxy S 5 Unified Development] pepe100:
Yes I agree
[Samsung Galaxy S 5 Unified Development] fipsy:
I did that now because I had masses of unknown files on my external sdcard. But then the sdcard had a new Serial Number (Hex-ID) so that many Apps and especially scripts I manually created didn't work anymore, because there is no unique name for the external storage since marshmallow. But thank God you can change the ID in Windows with the MiniTool Partition Wizard. Whew!
[Samsung Galaxy S 5 Unified Development] pepe100:
When will be released the update with adaptive LMK disabled by default ??
[Samsung Galaxy S 5 Unified Development] fipsy:
But it would have to be a background task that needs to be killed and that's not possible with Chrome.

---------- Post added 8th October 2017 at 12:02 AM ---------- Previous post was 7th October 2017 at 11:57 PM ----------

I think on next wednesday if I correctly understood haggertk.
[Samsung Galaxy S 5 Unified Development] fbs:
I just formatted my sdcard via LOS itself.. (then it became FAT32 again instead of exfat)...

But then... after a reboot it's complaining again that it is corrupted !! LOL

Maybe it's being corrupted when I use UMS (boeffla kernel) to copy files to it... ???? I thought the problem was the exfat format but it just happened with FAT32 also!! which LOS itself formatted ....
[Samsung Galaxy S 5 Unified Development] fipsy:
Welcome to the club! I am also in the process of formatting my SD card. However, on the PC with exFAT. I don't have any problems so far. And I don't like to ruin my newly formatted card by a UMS test again. Sorry! :p But I recently copied some files to the card via UMS. Since then I had many "Unknown files", so I had to reformat the card. I've never had the problem before! So it can be related to copying via UMS!

AND: I just tested sdcardfs instead of FUSE, which I normally used. The error with the calculation of the free disk space, which I already reported in March of this year, is back! My God! In between it was working properly, but now the old bug has obviously crept in again! If you delete files, the free space remains unchanged. For the internal card with ext4 as well as for the external one with exFAT.
[Samsung Galaxy S 5 Unified Development] fitittome:
I am in group 1. :) Which is great for me! ;)

What I am looking for is a clean and simple way for ANY user who ISN'T having a problem to be able to simply and consistently reproduce it. The actions of the people who are seeing this problem at the moment cannot be emulated easily.

Then, any one of us, including any dev, could simply do xyz and see the problem, get a logcat etc. That's where I am coming from. It's more from a support perspective.

We did this before for sdcardfs! This is trickier but if we can cobble together something, surely it will be for the greater good?
[Samsung Galaxy S 5 Unified Development] pepe100:
I am a normal user And I would like a stable release for daily use.
[Samsung Galaxy S 5 Unified Development] fitittome:
We, S5 users, probably have the most stable release. The overwhelming majority do not perceive any problems whatsoever.

What I am seeking is a consistent and reproducible way of breaking things to help the handful of the edge case users who do have a problem.