yashsingh1/xdaforums huggingface dataset:
[Sprint Samsung Galaxy S6] anon_coward:
I actually have the same issue as redhusker2016 and I can't figure out why. Open to suggestions.

- First boot on a fresh Odin of stock DRC2 boot, no issues at all.

- First boot on a fresh Odin of DRC2 + TWRP + tdhite-G920P-SkyHigh-v7.10-n-full-18-05-12.zip - I immediately lose MMS ability and multiple QuickTiles. I'm coming from the G920P Magisk debloat module thread, so I first thought it was the debloat module but it actually happens right after the v7.10 kernel flash.
[Sprint Samsung Galaxy S6] nostrings:
I can confirm the tiles missing. I don't use MMS, so I cannot confirm that.
[Sprint Samsung Galaxy S6] tdhite:
Ok,

So just to be sure, you are saying a pure, unaltered stock ROM over which you install this kernel loses the tiles?

That means just the kernel and not the debloat Magisk module.

Is that right? If so, I have some ideas, but have some serious digging to do. The only possible culprits are some specific shared libs that get overlaid by the kernel's Magisk module that sets everything up (e.g., Synapse support, Wi-Fi and Bluetooth security fixups, etc.).
[Sprint Samsung Galaxy S6] nostrings:
Correct.

Installed DRC2, booted, then went to download mode, installed TWRP, booted into TWRP, wiped everything but system, installed your kernel, then boot it up. And once the set up is complete, I see the tiles missing.
[Sprint Samsung Galaxy S6] anon_coward:
Yes sir, exactly. Pre-module install. Thanks for checking into it.

Also this may a different / unrelated or intentional issue but I noticed the /csc folder and a few others are missing completely after I went root exploring to try and find the APN / sprint ## keystrings files. Unless they were moved in Nougat? (Due to ## dialer codes being broken)
[Sprint Samsung Galaxy S6] nostrings:
Do you also get issues with GPS not working all the time, perchance?
[Sprint Samsung Galaxy S6] anon_coward:
Yeah. Yesterday was using gmaps to get to a job interview and it wouldn't stay locked / connected. Calibration was good. Service area also fine.
[Sprint Samsung Galaxy S6] nostrings:
Hmmm, I wish I had saved the stock kernel, so I could try that and see if it made any difference, so we could narrow down the problem. Did you save it by any chance?

EDIT

Well, I installed the stock kernel, with Magisk, and it made no difference with regards to tiles. Did not get a chance to test GPS, though.
[Sprint Samsung Galaxy S6] tdhite:
What does “it made no difference mean”? I assume stock plus Magisk ends up with lost tiles?

Also, as for GPS, I’ve never seen an issue nor heard of one. Possible a custom ROM issue?
[Sprint Samsung Galaxy S6] nostrings:
Sorry, I should have been more explicit.

I am using stock ROM, though I debloated it using your debloat module as base (I actually deleted virtually everything instead).

Here is what I did:

From TWRP, I factory reset my phone, formatted /system and /data.

Boot up on download mode, ODINed DRC2.

Booted up newly installed stock ROM

After I got the phone set (just to get to the home screen), I rebooted to download mode.

Flashed TWRP.

Rebooted to TWRP.

Deleted most of the apps, as per your debloat module as guide.

Then formatted /data.

Then installed your kernel.

Booted up.

Set up the phone.

And once I was on the home screen, that's how I noticed that the tiles were missing.

As to "it made no difference" part; I literally flashed the stock boot.img, then immediately flashed Magisk, then booted. This was NOT on a clean ROM - it was on the aforementioned debloated ROM.

Booted up - tiles still missing.

GPS is still mostly not locking on either kernel. This leads me to believe that the debloating is the culprit, if anything. I will try ODINing back stock, and checking then.

I have to say that the one thing that I confirmed by running the stock rooted kernel, is that it does not have the memory leak issue SkyHigh does. Actually, I rarely lost root, while I ran the phone for 5 days, without rebooting or losing root! The memory leak *may* have something to do with root loss on this kernel, though I cannot say that conclusively.

I hope that helps.
[Sprint Samsung Galaxy S6] AgentJeffy:
Hey. I installed this on my stock rom that was already rooted but synapse isn't allowing me to customize anything.

Did I miss something?
[Sprint Samsung Galaxy S6] nostrings:
What is it saying when you open up Synapse?
[Sprint Samsung Galaxy S6] AgentJeffy:
It was saying no UCI support. I resolved this by reinstalling the full kernel and the installing the custom Magisk file over my already existing Magisk install. But now I'm experiencing a different issue.

After a little while magisk loses root now and it shows as uninstalled. I know magisk was having issues with this on other devices before but I never experienced them prior to the kernel update.

Any solution to this?
[Sprint Samsung Galaxy S6] nostrings:
Glad you solved the first issue.

The second issue... That's the life with Magisk and Samsung
[Sprint Samsung Galaxy S6] AgentJeffy:
I would believe that if it were doing that on my phone before installing all this stuff. I'd also believe it if it was having this issue on the other 2 magisk rooted phones I have access too.

It started with something from this install. I'm curious to some sort of fix.
[Sprint Samsung Galaxy S6] Mysticblaze347:
Love the wifi password fix. However... wifi hotspot subscribtion issue still remains (7.0 N) and now unlike the April 2018 release... this update breaks modding files (via root explore for me). I cannot successfully edit/apply edits to files.

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

I am having "gps signal lost" issues as well.
[Sprint Samsung Galaxy S6] AgentJeffy:
Wish I had saved my original boot backup. I don't think the author is still actively working on this project... :(
[Sprint Samsung Galaxy S6] Mysticblaze347:
Well that sucks if so.
[Sprint Samsung Galaxy S6] AgentJeffy:
You're not wrong. I'll flash a stock rom if push come to shove but... Still stinks. Didn't expect to have to reset the device. I thought this was still active.
[Sprint Samsung Galaxy S6] nostrings:
Jeez guys - take a breath.

Magisk + losing root issue is well known, at least to people that have used TW based ROMs and kernels. For those that don't believe me for some reason, my claims are easily verifiable by doing a rudimentary search - have at it. Let me say this outright - there is nothing exclusive to this kernel that elicits this behavior - it's Magisk.

As for GPS - [MENTION=4988866]tdhite[/MENTION] knows of the reports here, and may address them at his convenience. He has a life outside XDA.
[Sprint Samsung Galaxy S6] Mysticblaze347:
Oh, thank you for letting me know he might be pretty busy. I had no clue. Without this knowledge I would be lost in life.

...aside. thank you td for your hard and time consuming work. Always appreciated :).
[Sprint Samsung Galaxy S6] tdhite:
[KERNEL] [ROOT][MM | N] [SM-G920P] [12-may-2018] SkyHigh Kernel (Port) [v7.10]

Hey all,

I still know of no GPS issues related to the kernel. I use GPS all the time, for example, and never lose lock. Further, location services work flawlessly. With that said, I do not modify the phone other than this kernel and my debloating Magisk module. If you need help with gps, I need logs and the complete modifications list made to the phone.

As for Magisk, yes, it is and has always been challenged with keeping root. It’s not only Samsung phones, but all phones generally. You don’t actually lose root. Note that you can ‘adb shell’ in and issue “su”and you will get root. The bug is purely apps running under zygote (i.e., Android apps).

And not to worry, still maintaining things. Other than a seemingly pesky mem leak, I don’t know of any bugs.
[Sprint Samsung Galaxy S6] Mysticblaze347:
The gps issue happens about 5 min after manual screen off. The rom dev said he has no idea why either. I will send a log during occurrence of "gps signal lost". Regains on screen awake again.

Magisk could be the culprit of all the issues. Very possible.
[Sprint Samsung Galaxy S6] nostrings:
You're welcome

---------- Post added at 06:49 PM ---------- Previous post was at 06:42 PM ----------

As I previously said, I am thinking it has something to do with debloating - for both GPS and tiles missing. When I get some free time, I will test that hypothesis (I should have just used the magisk module, and no actually deleted the damn APKs).

The mem leak - running `top` when the device slowed down, yielded nothing of note. I am not sure what I can do to capture relevant info. to post back.
[Sprint Samsung Galaxy S6] Mysticblaze347:
;) Lol

Wanted to try to re-add the file "ANT+firmware" from original stock, but I cant find one atm. Read it could have something to do with wifi/location
[Sprint Samsung Galaxy S6] Mysticblaze347:
So to save everyone trouble for gps issue with maps,ect. ... shut powersaver off! This is the single issue. After this whole time digging and testing, this was the issue.
[Sprint Samsung Galaxy S6] nostrings:
I never have that on, and I still have that issue. :rolleyes:
[Sprint Samsung Galaxy S6] Mysticblaze347:
In magisk manager there is a module I just seen and seems kosher called "Global Optimized GPS File Replacer". Might help. Worth a shot ;).
[Sprint Samsung Galaxy S6] Mysticblaze347:
So I got hotspot to work by using "APN Manager" and added ",dun" after "mms" in green highlighted field.

Apn-config.xml manual edits didnt change anything but the app oddly did.
[Sprint Samsung Galaxy S6] AgentJeffy:
I'm 100% sure that the issue with magisk now is related to the custom Magisk included with this setup being an old version before they solved the unrooting issue. I've got several other S6 that have magisk installed with no issues.

OP how do I uninstall all of this? Just flash a factory kernel?
[Sprint Samsung Galaxy S6] kelayz:
Possible to use the kernel without magisk?

Have had it get stuck on boot and require odin flash to stock to fix.
[Sprint Samsung Galaxy S6] tdhite:
Yup. Just flash another boot image. As for Magisk fix, if true, it’s just a standard Magisk upgrade, the module won’t change, so if truly fixed, the upgrade would also fix it with this kernel.
[Sprint Samsung Galaxy S6] tdhite:
Sorry, no. The module actually sets up all that is necessary for Synapse and whatnot.
[Sprint Samsung Galaxy S6] tdhite:
Precisely what the hotspot fix the kernel sets up. Look at /system/etc/init.d and there are two hotspot fix scripts.

Why do you need manual fixup?
[Sprint Samsung Galaxy S6] Mysticblaze347:
I wish I knew. Your fixes possibly highly contributed, but this fully enabled on my end for some reason.

Running your old 6.0 kernel as well. Only one that didnt break root explorer file modding my end oddly.

Also wanted to add that magisk refuses to pass safetynet no matter what kernel version, or before/after manual mods to xmls.
[Sprint Samsung Galaxy S6] tdhite:
SafetyNet has always passed with this kernel. You are altering things in a way that prevents it. See attached pic. That is this kernel with my debloating module and latest upgraded Magisk.
[Sprint Samsung Galaxy S6] Mysticblaze347:
It did not pass even before I altered anything. Could be the rom itself. Not a huge deal, was just pointing out.
[Sprint Samsung Galaxy S6] Mysticblaze347:
I have a question that may seem odd, but with a theory. Is there a way you can release a module or something that allows the governor cpu frequencies to be changed? I want to manually underclock and see if it helps with my phone turning into an oven. Gets way too hot and cam just dies out until cooled off. My old note 3 never had this issue lol. Tried alot of apps thats supposedly do, but they dont.
[Sprint Samsung Galaxy S6] tdhite:
The Synapse support in the kernel’s Magisk module that gives you that already. Are you not using Synapse?
[Sprint Samsung Galaxy S6] Mysticblaze347:
I had no clue about synapse being an app lol.

I just ckd it, and its gonna take me a min to set.

Thank you for info.
[Sprint Samsung Galaxy S6] Mysticblaze347:
Well I tried and still did not solve.

Do you possibly know of a fix that REALLY works?

It overheats on cam use. Sometimes can't even reach 2 min recording if hot outside.

I know it not an issue on your end. I just cant find a true fix at all other than new phone :(.

Figured I would ask you since you seem to be the S6 mad scientist :).
[Sprint Samsung Galaxy S6] nostrings:
If you're recording 4K or 1080p60, while it's hot out, you really won't get better results. It sucks, but it's the nature of these 1st gen 64 bit SoC - they are terribly unoptimized.

You can undervolt a tad, but I am not sure how much that contributes to running cooler, if at all.
[Sprint Samsung Galaxy S6] Mysticblaze347:
Well, I am going to try a replacement and see if it helps. I have doubts. Hope I am wrong. Gonna be phoneless for a few weeks :(

I tried undervolting and it did not help much if any. Even crashed it a few times pushing lowness on cpu/gpu.
[Sprint Samsung Galaxy S6] Wormsnake:
I hate to ask, but is this project still alive?
[Sprint Samsung Galaxy S6] Mysticblaze347:
I cant say how alive lol. I chk it when froggy. I did get my replacement tho a few days ago. I sadly was right on my feeling...it still gets hot (flat stock or rooted don't matter). I still have S6, but now fiddling with the LG V20 for sprint. Cant root atm with it cause of arb1 implemented in software version for sprint. Be cautious if updating. Root is becoming forbidden. I grabbed it for a few reasons such as the removable battery and sd card slot. Also....it don't get hot lol. Sorry for long post. I just was saying :).
[Sprint Samsung Galaxy S6] nostrings:
What do you need updated? Or do you have a bug report?

---------- Post added at 03:42 AM ---------- Previous post was at 03:39 AM ----------

Yeah, you really should not expect much from S6, especially at this point. The V20 is an awesome phone... Enjoy it!
[Sprint Samsung Galaxy S6] tdhite:
For everyone's info -- this project is not dead, just not particularly in need of any updates as far as I know. I intent to burn on this until my phone physically dies or is no longer useful on the network.
[Sprint Samsung Galaxy S6] nostrings:
[MENTION=4988866]tdhite[/MENTION] - Other than the memory leak, I think it also might not be respecting HMP LITTLE packing. At least, eyeballing the CPU cores while doing things (ktoonz gov'na, obviously), big cores come online at the same rate, and virtually the same load as if the option is disabled.

Thanks for holding the fort with the only custom kernel for this device. ?

OT: for those that may have had issues with the GPS; try setting the location setting to Device Only.

Obtain a lock. I use GPS Status, but use your preferred app.

Once that is done, set it back to High Accuracy, and that should be it.

I get a lock within seconds afterwards, everytime.

I think the issue is really a ROM issue, and not a kernel issue, as this has only happened on DRC2 for me.
[Sprint Samsung Galaxy S6] tdhite:
Memory Leak Fix?

I believe I've located the issue folks are seeing regarding a memory leak in the kernel.

If you would do me the favor of doing the following, either in an 'adb shell' or a terminal with root permissions, I believe you will see your memory stabilize.

BB=/vendor/skyhigh/busybox
su
echo 0 > /vendor/skyhigh/res/synapse/SkyHigh/cortexbrain_background_process

Then (again with root privileges), edit the file: /system/xbin/cortexbrain-tune.sh and comment out the line that reads (the value at the end might be a 1 or a 0 (zero), doesn't matter for this test):

cortexbrain_background_process=1

to look like:

#cortexbrain_background_process=0

Then reboot and let me know how memory goes thereafter.

There appears to be a pretty severe memory leak in busybox and that script executes forever, causing the buxybox bug to leak memory on the process's KernelStack (the stack the kernel allocates for applications to make sys calls, which scripts to a LOT). If the above fixes things for folks, I'll update the kernel's magisk module to fix it all. The cortexbrain_tune.sh script is of questionable value in all reality, so it will default to off, and also there are bug fixes in the Synapse handlers for enabling/disabling it.
[Sprint Samsung Galaxy S6] nostrings:
Thanks. Will report back.

EDIT:

[MENTION=4988866]tdhite[/MENTION]

So, that made a difference. It definitely lasted noticeably longer , with the same usage. However, the leak was still there at the end of the day. Apps were being actively killed - it almost looked like the phone was thrashing on something - and then one or two of them restarting (I use Tasker and Viber, so their icons are in the status bar - they would disappear intermittently, sometimes both).

I let the phone like that, as painful as it was to use (any action took >=5 seconds to complete), till it finally hot-rebooted. And even then, it was still laggy as hell, with the same memory leak persisting.

I'd take this a step further - can we try without any of the scripts (save for Synapse hooks) and see if that further takes out any of these issues?

Thanks for your help with this - much appreciated!
[Sprint Samsung Galaxy S6] tdhite:
In the end, the script is not actually at fault, rather accelerates the consumption of memory.

The leak, though I don't know exactly which process, involves a thread cleanup problem as far as I can see. I built and ran a kernel with kmemleak built in so I could actually see and debug allocations in the kernel itself. From boot to, oh, 24 hours or so, checked at six hour time frames, here are 'potential' leaks in the kernel (potential just means kmemleak can't be *certain* it's a leak, just could be:

total memleak.txt size: 3315392

total memleak.txt size: 10019185

total memleak.txt size: 0

total memleak.txt size: 0

That is a total of about 13.5 Megabytes of memory. Even if they're real, that's not really material amounts of memory.

However, watching the KernelStack, which is stack sets the kernel allocates on behalf of apps so they can make syscalls, is growing without bound. here is the allocation set over the same time frame:

KernelStack: 92576 kB

KernelStack: 173088 kB

KernelStack: 187760 kB

KernelStack: 214128 kB

That is a quarter Gig of memory locked for application stacks. That should be stable at, say, 100MB at worst, more like 64MB or so.

So, now to find what app or code is either: 1) not properly killing threads of execution; or 2) not properly dropping kernel stacks for apps.

That's more difficult to find. What I actually don't know is if the stock kernel exhibits the same behavior (growing KernelStack). If someone could run stock kernel for a while, Magisk rooted (so we have basic parity), and issue this once in a while from a shell (no root access needed) and report results, that'd be great:

grep KernelStack /proc/meminfo

:eek:
[Sprint Samsung Galaxy S6] nostrings:
I can do that. Give me a couple of days, and I will report back.

Thanks!
[Sprint Samsung Galaxy S6] a_normal_nickname:
Would you mind uploading the 7.0 update only of Nougat? I saw a lot of update only versions for MM, but none for Nougat :(
[Sprint Samsung Galaxy S6] nostrings:
[MENTION=4988866]tdhite[/MENTION]

Here is what I have for the first 24hrs.

Anything else I can provide?
[Sprint Samsung Galaxy S6] tdhite:
Pretty much proves what I thought. KernelStack is leaking somehow. Very hard to find. :)
[Sprint Samsung Galaxy S6] nostrings:
That's a bummer. Any memory related commits that might be responsible for this?
[Sprint Samsung Galaxy S6] tdhite:
Might be hard, but thinking I found it. KernelStack holding steady around 55-60M after a day. I'll test a bit more and release if it holds.

:cool:
[Sprint Samsung Galaxy S6] nostrings:
Sweet!

Looking forward to giving that a whirl, and seeing what you changed to get it there.

Thanks!
[Sprint Samsung Galaxy S6] nostrings:
How is testing coming along? If you need help, I am able to contribute. ?
[Sprint Samsung Galaxy S6] shawn67:
Count me in as a tester as well
[Sprint Samsung Galaxy S6] tdhite:
Still a bit challenged. I got one, which makes the KernelStack grow quite a bit slower, but there are some others. Right now it looks like GPU related code stealing pages and never releasing. Going as fast as I can. To do this you ahve to run kmemleak built into the kernel, which is probably not something you all want to mess with (have to run various scripts to scan memory and dump things based on cron jobs).

Anyway -- hang in. Working on it all. I know this is a recent thing, so not all that many commits to fight and figure which remain the culprits.

:fingers-crossed:
[Sprint Samsung Galaxy S6] shawn67:
Any updates? I having to clean my dalvik cache daily
[Sprint Samsung Galaxy S6] a_normal_nickname:
Cleaning dalvik-cache helps you avoid the ram overflow?
[Sprint Samsung Galaxy S6] tdhite:
I honestly can’t imagine the need for that. The cache has nothing to do with either the kernel or the KernelStack, rather caches runnable apks in a more suitable state for starting and reloading apps.

In any event, the progress I’ve made is the lead is isolated (as far as I can find with work and tooling) to WiFi and modems. Possibly a multipath tcp. I have had a heck of a travel schedule of late, so have not had a chance to dig in their. However, running international carriers has absolutely solidified those areas as at issue. Very rapid kernekstack growth, dramatically more than non-roaming work.
[Sprint Samsung Galaxy S6] nostrings:
Yeah, purging cache is not going to affect anything kernel related.

[MENTION=4988866]tdhite[/MENTION]

One thing I have noticed, though I am not sure if it's related, is when I turn my mobile data off (but still have net access via WiFi), is that `15510000.mdmpm_pdata` wakelock prevents the phone from sleeping. When the data mobile toggle is on, this is usually not a problem.

Thanks for the update!
[Sprint Samsung Galaxy S6] digitalchaos1980:
I can also second this. I've been using my S6 as a secondary device for the time being and have it in airplane mode with the WiFi on and I'm having the same wakelock.

Chuck

---------- Post added at 10:21 AM ---------- Previous post was at 10:18 AM ----------

I must also say a big Thank You to you [MENTION=4988866]tdhite[/MENTION] just for keeping this going! We are at the S9 now and although I would love to have one, I am still quite satisfied with my S6. It's a great little machine and this kernel helps to keep it great!

Chuck
[Sprint Samsung Galaxy S6] tdhite:
Well folks, sorry for the long hiatus, difficult to find leaks.

Progress, though. Not done yet. There is still a process cleanup leak because the stack count is growing much too high over the course of about a week. It should be maybe 1500 to a few thousand, not 34,000!

I'll post this update because the memory is much better. I'll find the kernel stack leak and that'll do it I think.
[Sprint Samsung Galaxy S6] digitalchaos1980:
Hey man, good to see ya still dev'in for the still great S6! Yeah I have still had issues with the system ram usage slowly growing but it's not been terrible. I have actually moved on to an S7 now but I still use the S6 for my drones and as a universal remote in the house since Samsung had to moronically remove the IR blaster from the S7 lol. Anyways I still like to keep the ole '6 tuned and running efficiently and your kernel has been amazing other than the one ram issue, and I've been able to tolerate it because of the rest of the awesomeness that far outweighs it! But it's nice to see you getting a handle on the issue. I used to go crazy trying to figure out if I had set something wrong or had an Android problem. And I did finally figure out that turning UKSM completely off seemed to calm the ram usage so much that I didn't have to reboot but maybe once a day or two instead of two or three times a day. I think I posted about it earlier in this thread a year or so ago. OK well, thanks again for keeping this phone on its toes and I wish you and your family a very Merry Christmas and awesome New Year!

Chuck
[Sprint Samsung Galaxy S6] nostrings:
Awesome!

Thanks for working on this - I am looking forward to ditching the stock kernel!