yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S 5 Unified Development] fitittome:
Brilliant! This reliably crashes my phone when the memory gets close to full. :highfive: The guru's are bound to say that is what is meant to happen with ALMK. But isn't this a start? My virgin test phone is at work, so if we can devise a plan I am willing to test.

Edit: First thought is to run it on a virgin 20SEP nightly then the 04OCT and compare.
[Samsung Galaxy S 5 Unified Development] Ragnar Eldur:
Couldn't help myself, just expressing the love for real awesome Android phones and the bloody disgust for this rotten Apple iPhones. ?
[Samsung Galaxy S 5 Unified Development] fbs:
You could test my LMKmod Kernel (based on boeffla kernel beta 12)

https://xdaforums.com/galaxy-s5/unified-development/unofficial-boeffla-kernel-lmkmod-low-t3685662
[Samsung Galaxy S 5 Unified Development] fitittome:
Sure I will. But I think I might have jumped to conclusions. If I fill the RAM the phone does what is pretty much a 'half' soft reset. I guess that LMK kicks in and shuts down the Firewall, Fill RAM app and everything else and I get kicked back to the logon screen.

The device seems to work, to a fashion, at about 80% full, much more than that and the fill ram program resets.

I can switch off ALMK in Kernel Auditor, but I need a better understanding of what's going on, because frankly, I am out of my comfort zone.

The thing is, we now have an app that can get us to the limits and this has been the problem until now.

I think progress is being made. Just not sure on how best to proceed.
[Samsung Galaxy S 5 Unified Development] fbs:
But this isn't the correct behaviour. It SHOULD slowly start killing every background processes, and the last one should be the "Fill RAM" app, because it's in your screen(foreground).. Then everything should be normal again, because it would free a LOT of ram when killing "fill ram". No internal system process should be killed or soft reboots should happen..
[Samsung Galaxy S 5 Unified Development] airman1951:
It's only me or SMS messages can't be sent anymore with the last build?
[Samsung Galaxy S 5 Unified Development] kevin#34:
me, no probem with SMS sending
[Samsung Galaxy S 5 Unified Development] fitittome:
I agree 100% after thinking about it.

Except for the 'internal processes', I think something is going awry when the app fills to the max. But I think this is a different issue. Probably worthy of investigation anyway.

Then we go full circle again. I have to admit I am confused.

:eek:
[Samsung Galaxy S 5 Unified Development] fipsy:
Don't forget: EVERYONE can suddenly become an "edge case" user, if he has a certain requirement or installs a certain app - as long as the system has fundamental errors. Therefore, it must always be the aim to build a system as faultlessly as possible! This is in the interest of all users. Even those who don't (yet) notice any problems.

---------- Post added at 07:27 PM ---------- Previous post was at 06:53 PM ----------

Hey, great! Please also give the special Boeffla Kernel a try that [MENTION=516058]fbs[/MENTION] has compiled! I've been using it since September 29th and I don't have any LMK-issues anymore. The only disadvantage is that the device is a little slower and after a longer period of operation it starts to lag. But fbs obviously managed to turn off the part of the kernel that is responsible for all the trouble.

My suggestion would therefore be that fbs could compile multiple versions where only one part is disabled at a time, so that we can isolate the problem.

---------- Post added at 07:51 PM ---------- Previous post was at 07:27 PM ----------

Oh, didn't know you opened a new thread! The last version based on beta12 you posted in this thread had heavy issues for me. Taking a HDR picture with Snap Camera took more than one minute and the phone extremely lagged. So I hat to revert to your first version based on beta11. But now I will of course test your new version. :highfive:

---------- Post added at 07:55 PM ---------- Previous post was at 07:51 PM ----------

Does switching off the ALMK have any effect on these issues? Because for me switching off ALMK doesn't change ANYTHING! That's why I was afraid that adaptive LMK is not the real problem!
[Samsung Galaxy S 5 Unified Development] dmcleod:
Hi,

made build from the sources four days ago. Installed and everything seemed to be fine BUT

External SD Card ist not readable under /storage/0000-0000

If I switch to /mnt/media_rw/0000-0000 I can see everything what's on the external SD Card.

Deleting .android_secure didn't help.

Anyone an idea how to solve this problem?

Thanks in advance!
[Samsung Galaxy S 5 Unified Development] fitittome:
Well I never thought I would install another kernel! But now have [MENTION=516058]fbs[/MENTION] LMKmod Kernel installed! :cool:

Using Kernel Auditor I ran the Ram fill app, with and without ALMK. It crashed the app eventually, just like the stock los kernel. It lasted longest with ALMK switched off.

I could see it hovering in the mid 90's % for a long while and the stock Los kernel seems to fail at that point much quicker. LMKmod seemed better with or without ALMK compared to stock.

Look. I don't know enough. I don't mind testing but I am not sure I am proving much at the moment. Remember, I am not seeing issues with the Los kernel.
[Samsung Galaxy S 5 Unified Development] fbs:
That old build you've tested had many other stuff turned off.. one of them (I don't know which) caused a mysterious lag after some hours.. I couldn't understand how.. but this build on the other thread has only the lmk mod
[Samsung Galaxy S 5 Unified Development] revjamescarver:
Just a quick question maybe someone could help with, with the stock Samsung ROM the amount of free space on the device and SD card was refreshed automatically after file operations of any kind, with LOS, while it functions perfectly (after disabling ALMK), it does not refresh the amount of free space at all, so after moving files or downloading a lot I have to reset the phone for it to recompute the amount of space available, is there a setting I am missing, or does anyone know of an app that forces the system to do it? Thanks in advance, and for the work on the great rom
[Samsung Galaxy S 5 Unified Development] fitittome:
This is a problem with Filer, we never got to the bottom of it. I think 3rd party file managers like Amaze do things better. If you eject the storage in settings and remount it sorts things out.
[Samsung Galaxy S 5 Unified Development] revjamescarver:
Thanks a bunch.

Hey, thanks for the heads up and help, I use a huge amount of data and move things around a lot, so any thing that helps with this constant restarting is greatly appreciated.
[Samsung Galaxy S 5 Unified Development] fipsy:
It's a problem with the sdcardfs filesystem. I deactivated it in /system/build.prop. Then automatically FUSE is used. FUSE does not have any issues concerning free space.
[Samsung Galaxy S 5 Unified Development] MikeRWK:
Is there any advantage in running the official nightlies vs the unofficial release? The unofficial is working well for me and it seems really stable
[Samsung Galaxy S 5 Unified Development] fitittome:
Filer has the same problem on internal storage, which isnt. Admittedly it caused mucho confusion with sdcardfs.

Edit: internal storage does use sdcardfs!
[Samsung Galaxy S 5 Unified Development] Immortal0907:
official weeklies are more up to date with everything, latest security patch, latest lineageos changes... Official is stable to I mean no reboots or anything for me its working as it should...
[Samsung Galaxy S 5 Unified Development] fipsy:
Due to my studies since March of this year, I believe that I can trace the cause of the issue with calculating free memory space back to the sdcardfs file system. I ran many tests with 4 file managers: Android File Manager, ES File Manager, Total Commander and Root Explorer. The results were always the same for all 4 file managers: If I used sdcardfs, all four of them had problems with calculating the free disk space. When I switched the system to using FUSE, the problems with all 4 file managers disappeared immediately. Both regarding the internal sd storage as well as the external card formatted with exFAT.

---------- Post added at 01:47 AM ---------- Previous post was at 01:04 AM ----------

After testing your kernel extensively, I can only recommend it! I would like to mention that here in the thread. It's really worth a test! Boeffla Kernel is very good, but why not make good things even better! :highfive: This is the blessing of Open Source. Nothing can compare to it.
[Samsung Galaxy S 5 Unified Development] PorchSong:
Here is a guaranteed way to reproduce memory force quitting things. Load up a route in Waze, load up Google play music and start streaming. . . This will cause a battle of the programs cancelling each other out. If this doesn't do it for you, while having everything going as mentioned above, send a text message. . .it will clear out your entire memory. I'm so disgusted with memory management right now. It's totally broken the ROM.

Also try running Endomondo while tracking a hike, and then send a text... Your running Endomondo gets nuked losing your continuous tracked trail. Again, major problems with memory management right now. I've set swampiness and swap pressure both to 30, seems to marginally help.

Just my two cents.
[Samsung Galaxy S 5 Unified Development] fipsy:
I understand your anger quite well! But did you ever try the new kernel compiled by fbs? It solved all these problems for me.
[Samsung Galaxy S 5 Unified Development] fitittome:
OK. Given [MENTION=5110154]fipsy[/MENTION] comments, I thought this had been fixed but lost track of it. You can turn off sdcardfs from a root shell with this rather neat script that the dev came up with in the JIRA:-

# mount -o remount,rw /system
# sed -i 's/ro.sys.sdcardfs=true/ro.sys.sdcardfs=false/g' /system/build.prop
# reboot

---------- Post added at 05:59 AM ---------- Previous post was at 05:34 AM ----------

I noticed this in the change log. Not that I profess to understand but makes sense to me (zcache) and certainly fits in with the problems being exhibited re ALMK/LMK.

https://review.lineageos.org/#/c/192510

---------- Post added at 06:38 AM ---------- Previous post was at 05:59 AM ----------

Never tried it. You would be on your own from a support point of view for obvious reasons. But I think a Nougat release is due/imminent.
[Samsung Galaxy S 5 Unified Development] BadToThePhone:
Official nougat xposed has released.
[Samsung Galaxy S 5 Unified Development] fitittome:
Sorry I was being an idiot, sdcardfs IS used on internal storage, hence my assumption on Filer. NEVER ASSUME! Sigh. :( There have been a number of patches re sdcardfs recently and the new filesystem support for sdcardfs in the kernel. I am sure everyone else is two steps ahead but I guess I should spend a bit of time investigating just so I feel happy inside. :)

edit: no I'm not an idiot! With sdcardfs disabled and therefore running fuse (checked, tick), 'Files' does not update the free space on internal storage when large zips are deleted. So, we need to treat this issue with care! So, no premature shouting about sdcardfs!!!!

edit2: This issue goes right the way back to the start of LineageOS.

What I am talking about is the free space only being updated with a storage eject.

It seems to happen with BOTH fuse and sdcardfs. I tried with a 31DEC2016 and 31MAR2017 nightly.

For anyone who is interested.

The default set-up is for SDCARDFS to be installed on both internal and external storage, it's been this way since the start of LineageOS.

'Files'

Reports sdcard1 314MB free

'Files', sdcard1, Storage settings reports 1.53GB used of 1.84GB

Reports SM-G900F 10.95GB free

Delete a 316MB file on sdcard1

Delete a 317MB file on SM-G900F/Download

Quit 'Files' and reload free space not refreshed.

Reboot and free space correctly reported.

Copy a 317MB file to sdcard1 and then to SM-G900F/Download

Quit 'Files' and reload free space not refreshed.

Reboot and free space correctly reported.

You can repeat this (with or without sdcardfs enabled) for all nightlies back to dot, its the same. So I guess it's not a regression, it must be hard-baked into Nougat. It was nostalgic that the CM File Manger shipped with the 31DEC nightly so I used the 'Download' UI instead.
[Samsung Galaxy S 5 Unified Development] PorchSong:
So far the battle of the programs staying in memory has been squashed. Btw, what governor are you using with this modded kernel?
[Samsung Galaxy S 5 Unified Development] fipsy:
I'm using the interactive governor. With the profile 'interactive - battery'.
[Samsung Galaxy S 5 Unified Development] PorchSong:
Where are you setting up the "interactive - battery" profile? I'm not seeing it when looking around.
[Samsung Galaxy S 5 Unified Development] revjamescarver:
Disabling sdcardfs

So I should just be able to disable it using kernel auditors build. prop editor and setting it to false?
[Samsung Galaxy S 5 Unified Development] fitittome:
That should work or see this post.

But scroll back a few posts and read what I was up to earlier.

If you get any more luck than me, post it here!
[Samsung Galaxy S 5 Unified Development] fipsy:
Since you are using a modification of the Boeffla Kernel, you can also use the Boeffla Config App. This allows the settings to be made in a fairly simple way. You can also use the Kernel Adiutor in parallel, but you have to be careful because both apps allow the same settings and can interfere with each other. You should therefore only use those settings of Kernel Adiutor at startup, which are not adjustable in Boeffla Config. For example, deactivating the "Adaptive Low Memory Killer", which is not possible with Boeffla Config.
[Samsung Galaxy S 5 Unified Development] revjamescarver:
Would seem to be a major problem in general

It would seem to be a major problem with the system in general. I Am a noobe when it comes to android (coded in machine language and assembly back in the day) but an inherent function of the hardware is to report free space, this is a kernel function that reads a returned value from the hardware controller, all hardware that is actually responsible for accessing and writing to file systems has micro code baked in to provide this information, and it is up to the os to deal with this information. Linux itself handles this properly from within the Linux kernel, as does Mac OS and windows. It seems that the "android" code being written does not take these basic and rudimentary system calls into account. Android runs on top of a basic Linux kernel so it would seem that the basic code to access the hardware values has been eliminated in favor of portability which in my opinion is a serious mistake as when you stop accessing the hardware on a basic low level you start sacrificing speed and efficiency.
[Samsung Galaxy S 5 Unified Development] fipsy:
I feel that's very confusing! Because in my case, the problems with calculating the free space will disappear immediately when I use FUSE. I copied files with sizes between 1-3 GB to the internal and external memory several times and deleted them afterwards. With FUSE there have never been any issues. Have you ever tested a different file manager?

But what is also clear: As long as a file is in access, it cannot be deleted and still occupies storage space. That is correct and a different matter. Windows e. g. does not allow the deletion of such files at all. Linux, on the other hand does, which I consider to be a very bad concept! I always only cared about files that were really deleted from the filesystem not the ones that have been named to .fuse_hidden[Hex-Number] and are still present!

The weird thing is, I can't reproduce your problem with FUSE at all. How can it be that both our systems work so differently?!
[Samsung Galaxy S 5 Unified Development] revjamescarver:
I'll give it a shot

Read your post and from what it seems, it would appear to be a failure on the part of the kernel itself to actually read the values returned by the hardware itself after file operations. The Linux kernel that Android is built on has this code and functions exactly like it should on Linux systems, so was that code removed in the Linux kernel for Android? Confusing.
[Samsung Galaxy S 5 Unified Development] fipsy:
It even causes the whole system to crash when the memory seems to be full (although in reality it is not full at all). At the moment nobody seems to know exactly what the real cause of the problem is. In earlier Android versions there was no such problem.
[Samsung Galaxy S 5 Unified Development] fitittome:
No! I have always used the std. LOS filer app. It is confusing. Also, if you open a terminal shell and check with df the free space is reflected immediately! I am still trying to understand. This was a bog standard, virgin, LOS install.
[Samsung Galaxy S 5 Unified Development] fipsy:
Maybe it's just a problem with the LOS File Manager? I hardly ever use it. And therefore our different experiences. Maybe you should also use Root Explorer? Only for testing.
[Samsung Galaxy S 5 Unified Development] fitittome:
Maybe I should. :( I should also file a JIRA for Files, I think.... Just missed a bugbash. Simple out of the box apps should just work. Need to think and investigate some more.
[Samsung Galaxy S 5 Unified Development] revjamescarver:
Tried that

Tried root explorer, ES file explorer, and a couple others, same result, settings still reports the wrong values and even though there is enough space none of the apps work, so I don't think the issue is with filer, but in the kernel.
[Samsung Galaxy S 5 Unified Development] fipsy:
My favorite quote in this thread is from [MENTION=516058]fbs[/MENTION]. It more than aptly sums up all the misery with Android, LOS and the kernel: sounds like "hey, it booted this way, let's stop tweaking" (https://xdaforums.com/showpost.php?p=74062665&postcount=8576)
[Samsung Galaxy S 5 Unified Development] fitittome:
That's helpful. Could you open a terminal and try doing a df -h as you are doing that. I am not sure what it will prove but may narrow things down a bit.
[Samsung Galaxy S 5 Unified Development] fipsy:
Which filesystem have you been using during your tests? sdcardfs or FUSE?

And if you used sdcardfs: Could you run the same test again with FUSE?
[Samsung Galaxy S 5 Unified Development] revjamescarver:
Will do

Yeah I'll give it a go, I'll move a couple gig of data back and forth and give you the results

---------- Post added at 12:53 PM ---------- Previous post was at 12:50 PM ----------

Was using sdcardfs, I'll try it with both and run df - h in a terminal for each just to see and get back with you on the results
[Samsung Galaxy S 5 Unified Development] cdrivex4:
I have found also that if you have the phone connected via USB file transfer, and have just downloaded something, it doesn't show until you do a restart... Unplugging and plugging back in does not help it show up, which really it should.

On a side note, battery profiles are not sticking either, the efficiency profile is meant to keep max CPU at 1036 but after a while something breaks and CPU clock will go up to full clock 2.4ghz
[Samsung Galaxy S 5 Unified Development] jdrch:
This is the 2nd thread I've seen since last night talking about USB file transfer. In my experience that's been broken and unreliable in Android since late 2011.
[Samsung Galaxy S 5 Unified Development] fipsy:
Do you mean UMS mode if you talk about USB file transfer? The UMS mode was reconstructed a few weeks ago by Lord Boeffla in the actual Boeffla Kernel. At first glance, it seems to work, but there are also speculations that corrupted files are generated when you use it. That's not entirely clear yet.
[Samsung Galaxy S 5 Unified Development] jdrch:
Referring to non-ADB USB file transfer between an Android device and a PC. Up to the Galaxy Nexus' release, phones would show up as UMS on PCs. After that, they showed up as MTP devices, IIRC. The rationale behind the change made sense, but it also made USB file transfer sufficiently problematic for me to switch to sneakernet or LAN methods exclusively.
[Samsung Galaxy S 5 Unified Development] cdrivex4:
wow, was sure it was working at some point before August.

by default we using mtp, USM (please correct me if am wrong) locks out the OS for synchronized file access so that any device reads it as a flash drive. until you dismount. would be useful to have again though, but not the current state of affairs.
[Samsung Galaxy S 5 Unified Development] fitittome:
Yes! That, I am guessing is MTP, I am seeing issues with that too. Unmounting and remounting doesn't fix either. I considered this a separate issue free space reporting.
[Samsung Galaxy S 5 Unified Development] jdrch:
Probably just my opinion and experience speaking, but MTP is a total mess. I avoid it like the plague, especially since much better file transfer methods exist.
[Samsung Galaxy S 5 Unified Development] fipsy:
Okay, so UMS was meant. Some tests concerning the Boeffla UMS mode are still pending. I didn't want to ruin my data on the newly exFAT formatted SD card during the tests. But maybe someone would like to do some more detailed tests with a test phone? UMS is much faster and more convenient than FTP or LAN transfer. Especially since there is no longer a really good app that supports Samba. At least not for exFAT formatted SD cards. I always used the Samba Filesharing App so far. But unfortunately, it does not support exFAT.
[Samsung Galaxy S 5 Unified Development] revjamescarver:
Sdcardfs

Was using sdcardfs, I'll try it with both and run df - h in a terminal for each just to see and get back with you on the results

ADDITIONAL INFORMATION

I copied the same 1.5 gig file back and forth between internal and external storage with sdcardfs enabled and disabled, with sdcardfs enabled storage free space as reported by df - h in terminal was wrong using filer, ES, and root explorer, with sdcardfs disabled, the free space was shown correctly using the same apps, so it appears that at least in my case, the problem seems to be with sdcardfs itself so I'll have to leave it disabled for now.

---------- Post added at 02:10 PM ---------- Previous post was at 01:56 PM ----------

Just finished copying a 1.5 gig file back and forth, using the df -h in a terminal reported the same, free space was still reported as wrong, did the same test with sdcardfs disabled and the reported values were correct without a restart so at least in my case the culprit appears to be with sdcardfs itself.
[Samsung Galaxy S 5 Unified Development] brianinmaine:
From my own experience transferring files, nothing beats https://superbe.am for speed. Costs a couple bucks for the pro version. I've also had plenty of issues with mtp. For samba shares I use solid explorer. Works ok but still not as fast as superbeam.
[Samsung Galaxy S 5 Unified Development] SuperSandro2000:
Portal by pushbullet is free and fast af
[Samsung Galaxy S 5 Unified Development] fipsy:
Thank you so much for this test! That's exactly the result I've always had! Therefore, I was absolutely convinced that it is a problem with sdcardfs that has been around for about a year and is still not fixed despite endless complaints.

---------- Post added at 10:40 PM ---------- Previous post was at 10:32 PM ----------

But if I see it right, Solid Explorer is not a Samba server but only a client. There are plenty of them. But the best thing is, if you can access your smartphone as a drive from your computer. That requires a Samba server. And there are only a few of them that work with Nougat.
[Samsung Galaxy S 5 Unified Development] fitittome:
How on earth can we get more diagnostic info for fuse/sdcardfs? I guess that it whatever it is, it will be incomprehensible to mere mortals.
[Samsung Galaxy S 5 Unified Development] HosseinMoradi2007:
it seems klteduos build has failed again :(

will it be fixed in next build ?