yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Do you mean all apps menu ? So not just the apps placed on the homescreen.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Yea, only apps menu (app drawer), not on home screen. Maybe a force close?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
OK, never faced this on S8. I believe there is something wrong with your phone, ROM or user apps. Later i'll show you how to find out what is using so much RAM. Killed by lmk.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Hmm. Yea its weird it happens to me this issues.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Latest build still ok ? - For me zero issues so far with zRam 90 %.

Also no glitches after coming from deep sleep.

How to check RAM usage:

with ADB or terminal emulator app, run:

top -s 6 -n 1

and see "RES". Value is in MB.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Still ok with the latest test build, so far i know no problems🤷‍♂️ do i need the su command before running the other command in terminal emu?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Not needed. You can also remove "-n 1" and it'll run for ever, so you have a "RAM monitor". To stop it, press "Q" or "Strg + Q".
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Dont know which they are from🤷‍♂️
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Ohh you need first "su" cmd. Here with adb works without root.

Then use landscape mode, otherwise you won't see which package it's on the corresponding line.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
I dont see anything suspicious here. Seems normal for me🤷‍♂️
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yeah, nothing wrong.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Got a random reboot with screen off 2 min after i checked social media.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Just out curiosity, which error does it give everytime in kmsg?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
It's not everytime the same error, but similar. But it think it's just one bug.

Spoiler content hidden.

I'm not very skilled at Linux memory management.

It's very low-level stuff.

I do suspect it has something to do with the movable pages or virtual memory.

There is a little mess ...

Samsung partially added patches from newer kernels for movable pages for the stock driver zSwap, but not for zRam. Now we want to use zRam, because it's faster. Another problem is, there is no proper documentation about added patches on top (commits). And this makes it very hard to track bugs. Also it's hard to upstream this kernel. Because most of the patches would just fail, due to some patches already applied and so on. Same problem for device specif patches, no commits at all. Samsung did that mess on Galaxy Ace 2 and i was hoping they would do a more cleaner job on Galaxy S8, but the same mess here.

If kernel source were clean like official Android kernel source, and just added device specif patches on top, even without proper commits messages, it would be possible to filter out device specific patches, and then simply adding that patch on top of latest Android kernel. Then we never had stability issues. But well, we will fix it anyway.

Uploaded new test kernel .. disabled

CONFIG_ZRAM_MIGRATION_SUPPORT
and
CONFIG_MALI_DMA_FENCE

Bsically CONFIG_MALI_DMA_FENCE is disabled in stock kernel, don't know why Samsung didn't enabled it, since it compiles fine without any error.

And CONFIG_ZRAM_MIGRATION_SUPPORT was originally enabled for zSwap, but adapted from me to work with zRam too. So disabled, maybe i did some mistake here.

Both are optimizations for better performance, maybe one of them is a culprit.

And there are further 2 optimizations that i suspect that it could make also problems .. but we will disable them in next test build if still unstable. After that. i'm out of ideas.

Those 2:

CONFIG_RBIN
CONFIG_ION_RBIN_HEAP
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
Report dev exprience using test kernel 30 november i had some lag that stuck for a while come smooth for while too when open facebook whatsapp and other social media apps for other apps game and other almost same problem but no more then 1 second in social media apps it took 3 or 5 sometime

To day i will test new test kernel
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Alright, its kinda ****ty indeed, but yea its fixable, only takes some time with testing and fixing and repeat🤷‍♂️ but yea installed the new test kernel
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
@ace2nutzer maybe its a idea to talk with a other kernel dev if the problems persists, dont wanna be a **** or something but just a advice and maybe its useful😅 did the same thing for my case with my linux servers and game panel😊
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
First lets test those 2 test kernels.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Yea first that, but in mean while i dont have any random reboot yet.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Day 1, stable. No random reboots besides a shutdown becus i run out of accu and some lagging for a few secs so now and then🤷‍♂️
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Random reboot while checking apps.

kernel 12-02

Zram 90%
[Samsung Galaxy S8 & S8+ Cross Device Development] spdrfx:
Same here, except the social media thing. Unfortunately, i have no kmsg. Zram 30 percent.
[Samsung Galaxy S8 & S8+ Cross Device Development] spdrfx:
**Edit: nvm, im using an older kernel
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
You can get kmsg with the a2n demo app and then go to the debug section of it. It saves then the log in the root of your internal storage
[Samsung Galaxy S8 & S8+ Cross Device Development] Krawzer:
Okay, I will wait for it then and try again,
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
New Kernel & App is Up !!

Changelog

Kernel 20191118

Attempt to fix randomly heating up

HMP: Calibrated Tunables - now it works properly when the Small Cpu is overclocked

Removed OC Freqs for the Big CPU - not stable (caused miscalculations)

Improved performance and battery life

More smoothly and more responsive

Extras:

Uploaded also twrp recovery including this kernel version for S8 / S8+ (fixed instability and improved speed)

A2N Kernel Control V1.6

CPU/Profile: Removed OC Freqs for Big CPU (was not stable)

Performance Profile works properly now

Enjoy :)

Download
[Samsung Galaxy S8 & S8+ Cross Device Development] MariosAdamidis:
Great kernel! Where can i download the full version of the kernelcontrol?
[Samsung Galaxy S8 & S8+ Cross Device Development] binhminhluc9h:
I'm using only this kernel with default setting (without Kernel Control App), it's great, thanks
[Samsung Galaxy S8 & S8+ Cross Device Development] wer159p:
really smooth and nice kernel i even seem

5 star

i got new problem here.

when i use phone net usb connect to pc

it won't work

hope it can be fix in future.

thank for good work!
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
@ up

Even with zRam ? (u've to enable it over the Full Version App)
[Samsung Galaxy S8 & S8+ Cross Device Development] khanhbang2013:
Firstly, the battery charge is slow, so can I adjust the charging element? Second: the kernel seems to penetrate into the 4G network very slowly, third: the applications that use it are often reloaded, the fourth: the battery seems to go overnight, usually other kernels I drop 2%, this kernel 4 to 5%
[Samsung Galaxy S8 & S8+ Cross Device Development] kote156mza:
Please support N8 N950F devices .
[Samsung Galaxy S8 & S8+ Cross Device Development] tarikkaya:
ace2nutzer dex ethernet not work please stock ethernet drv upload zip
[Samsung Galaxy S8 & S8+ Cross Device Development] S_I_N_E:
Hello,

first off thank you very much for the work and love you have put into your project.

Sadly, on my G955F setup with unofficial-lineageos-16.0 I can't boot up with this kernel.

After flashing it (yes, I wiped /data before), it just shows the boot animation infinitely, I waited for 20 minutes.

Any way to solve this issue?
[Samsung Galaxy S8 & S8+ Cross Device Development] poxapoxa:
Changes Causing Overheating And Shutdown

Well after several tests using Kernel + APP KERNEL PAID. I could come to the following conclusions and observations.

- Example: Running the game Pubg mobile with Gpu in 572 MHz overclock mode or (PROFILE PERFORMANCE) the phone restarts in a matter of 1 minute, not to mention that the phone gets to heat up so much by itself, the same happens to change CPU settings, any clock change other than stock numbering would turn off the phone by itself and go beyond its 80/90 ° being impossible to hold in hand.

- Positives: Control charger works perfectly up to its 3000mA afc too.

-3x brighter flashlight brightness not working continues intensity remaining stock continues to function normally.
[Samsung Galaxy S8 & S8+ Cross Device Development] milyas:
Hey.. looks good.. but stuck on boot logo on my g950fd.. never booted.. m using hari rom v6.0 with nx r29.
[Samsung Galaxy S8 & S8+ Cross Device Development] ih8snow.lc:
Just wondering is there a way to overclock the screen, even if it is a very minimal amount
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
I think it's possible to implement it. But actually i don't know how many users are interested in this feature.
[Samsung Galaxy S8 & S8+ Cross Device Development] S_I_N_E:
Oh, which ROM is supported then?

Anyways, here I uploaded the G955F unofficial lineage 16.0 ROM script you asked for:

cdn. discordapp .com/attachments/499685764527816705/647159217563893761/init.rc
[Samsung Galaxy S8 & S8+ Cross Device Development] kmgnm:
on stock based roms
[Samsung Galaxy S8 & S8+ Cross Device Development] S_I_N_E:
Oh, I was hoping some custom ROM :D
[Samsung Galaxy S8 & S8+ Cross Device Development] kmgnm:
roms based on stock are custom roms too :P

but sure it would be awesome to see version of this kernel dedicated to AOSP based roms
[Samsung Galaxy S8 & S8+ Cross Device Development] khanhbang2013:
Smoothness is very good, but the battery seems to drop quickly, need to solve the battery waiting
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
@ace2nutzer im testing since after latest random reboot without zram to test if it is the kernel itself what causes problems or the zram that causes it or maybe something is wrong with my mobile what causes it. Anyway im already 12h in with the test. Dont know how long im gonna test it, guess for 36h becus i got normally a random reboot within 48h.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
@ace2nutzer its the zram, nothing wrong with my mobile of something else in the kernel, got no reboot meanwhile i was using zram 0% so its stable without it.
[Samsung Galaxy S8 & S8+ Cross Device Development] incognitonk:
How do you install Magisk for this kernel? I've extracted the boot.img from the kernel zip file and selected that in the magisk manager app. But I get the following error message:

- Device platform: arm64-v8a
- Installing: 23.0 (23000)
- Copying image to cache
! Installation failed

What is the recommended way of installing Magisk?
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Download a magisk v23 flashable zip and flash it in twrp. Dont use a lower version becus it causes a bootloop if u flash it on top of this kernel.
[Samsung Galaxy S8 & S8+ Cross Device Development] incognitonk:
Okay turns out you can just rename the magisk.apk to magisk.zip (from here) and flash it via TWRP. Got it installed now.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Okay well that is the first time i read that its possible to rename the file from .apk to .zip file and flash it. Well learnt something new😅
[Samsung Galaxy S8 & S8+ Cross Device Development] incognitonk:
Yeah same. It's mentioned here: https://github.com/topjohnwu/Magisk/releases/tag/v22.0
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Kinda neat
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
New official release is up !

Changelog

Kernel V. 2021.12.06

Another attempt to fix random reboots !

Swap: reverted zRam driver to stock - with some fixes by me

Improved LPM charging

Updated torch sysfs interface - for ultra bright torch

Updated kernel config

Disabled CONFIG_MEMCG (memory resource controller)

Optimized LMK driver (minfree values - should fix bad multitasking)

Wireguard: source update

A2N Kernel Control V. 3.7

Re-added autostart on boot

Torch: increased Max value: 15 @ 17 (Stock: 10)

Bug fixes

Improved stability

Reduced mobile data usage

Updated defaults

Uploaded also stock twrp with this kernel build inside.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Gonna flash it 😛
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
btw: in case you had bootloop, just re-download the kernel.zip and flash it again. There was a missing patch in updater-script.
[Samsung Galaxy S8 & S8+ Cross Device Development] animeallen:
The kernel app was crashing on me after the update, but clearing the app's data fixed it for me.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes, that was fully right ! - Maybe even cleaner way is to uninstall / install the app, then it'll wipe dalvik-cache as well.

This happens sometimes, because from time to time i do update my tools like java, ant, Android SDK...
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Lmk setting removed out the a2n full app?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes, there is no point in changing those values.

I've set good values that are well for both multitasking and gaming.

btw: was you having bootloop with the first uploaded kernel from today ? - Later i've fixed the issue and re-uploaded.

Or wasn't you fast enough ? :D
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Makes sense lol, well didnt have a bootloop but was saying to someone else if flashing a older magisk build there are chances he/she get a bootloop😅 and i just flashed the new twrp and kernel build, only issue i had was the spontanous crash of the full a2n app but got it fixed with a app wipe. So far the new kernel runs flawless and fast😛
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Well lets hope this time it's finally fast, stable and good battery life. 💪
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
I hope also its stable finally😊
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
Report dev charghing current cannot change any solution ? I flashed new kernel

Edit

Sorry dev i forgot flash new kernel hahaha
[Samsung Galaxy S8 & S8+ Cross Device Development] pranil60:
Just flashed new kernel... will see how it goes.. but new version of app is not working just closing continuously and suddenly after I open the it..
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
You need to wipe the data of the app or remove and reinstall it, its becus the newer version is build with updated tools so thats why this issue exist, but wiping the app data of the app or remove and reinstalling fix the issue.
[Samsung Galaxy S8 & S8+ Cross Device Development] rostifaner:
@ace2nutzer Random reboot again on the latest release.

Installed with new twrp and wiped all cache. Using 50% zram. It happened when phone was in deep sleep.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Soft reboot happend while checking on apps.

Everything default besides zram on 100%

Latest kernel build flashed with latest a2n twrp.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Was you unmounting some storages like sdcard or USB-flash ?

Or something related to namespaces ?

Weird error never seen before.

<3>As EXT4-fs error, printing data in hex
<3> [partition info] s_id : sda19, start sector# : 10374144
<3> dump block# : 0, start offset(byte) : 0
<3> length(byte) : 4096, data_to_dump 0xffffffc8562f0000

What is sda19 ? check it with "mount" command.

Maybe a broken sdcard or USB-flash ?

Anyway, latest kernel is still unstable, i got also one reboot.

But with different reason compared to your 2 logs.

And therefore uploaded a new test kernel 2021.12.07:

S8

S8+

Disabled RBIN driver. I think it's buggy.

If it works stable without it, then i'll try to fix it, because loosing 228 MB RAM is somehow painful.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Well atleast i didnt get a random reboot yet, besides a soft reboot. So guess some progress is made😅
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Well random reboot and soft reboot is almost the same.

I guess both hard/soft-reboot is caused by the same issue.

I got a few hours ago hard reboot.

According to the stack trace it's related to ion_rbin_heap driver, so i've disabled it for now. As you can see RAM is now less. (-228MB)
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
I see, if it fixed the issue i dont rlly mind becus most ram usage goes to the zram instead.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Well it's not fully lost, it's used by camera, video playback and live stream. Those 228 MB are real RAM uncompressed. Considering zRam on those 228 MB is like a loss of 512 MB.

In those 512 MB fits 2 - 3 apps.
[Samsung Galaxy S8 & S8+ Cross Device Development] pranil60:
A lot of reboots* 7-12-2021
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
@ace2nutzer is it possible that the different bootloader versions and roms in combination with this kernel is a variable what causes this problems?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
No... what about latest test v. 07.12 ?

For me so far no problems.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Same, no problems yet.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
If the problem is solved what causes random reboots, the other kernel optimalisations will be back enabled later right?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes, at least i'll try to fix and add it back. It's just for better RAM utilization.

But more RAM = overall improvement.
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
until this day i never got random reboot maybe cause by zram ?wheni update to new kernel i not use the zram and 35 hour no reboot for me but only one problem i face multitasking is way too bad here any suggestion dev ?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
There is no way to optimize multitasking without to use swap.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
@ace2nutzer i got again a sort of memory corruption after 24h uptime becus chrome and parallel space got in a crash state, maybe some other apps also. After reboot it was solved. Idk if it is usefull for you if i upload logcat/dmesg and kmsg logs in this case after doing a reboot.
[Samsung Galaxy S8 & S8+ Cross Device Development] Adbnpk2013:
the a2n Kernal app keeps asking for play store update. i have already updated the play store to version 28.3.18-21 [0] [PR] 414068199. what do i do now ? any help will be appreciated.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Got that issue also after a reboot, after few minutes when the system is fully started the issue disappears.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Latest version is 28.2.10-21 for me on Android 9 stock. From where did you get version 28.3.18 ? Maybe it's rolling out ? Once i get 28.3.18 too i'll sync and it'll work for you. If you don't want to wait, you could downgrade to 28.2.10 ... then the app works again.

The dialog message offers you a link "APK" to get a working version.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
last_kmsg is only useful after random reboot. For everything else use logcat without to reboot, so your logs are useless. But nevermind, i got the same issue. I'm currently fixing it.
[Samsung Galaxy S8 & S8+ Cross Device Development] psygenius:
Here's my contribution to the debug effort. I had a random reboot during normal screen on usage reading a message in messaging app. 30% ZRAM. Latest test kernel 7/12. Thanks.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Alright, i keeping it in mind if i got again issues with apps caused by a memory issue.
[Samsung Galaxy S8 & S8+ Cross Device Development] rostifaner:
Yup, just cleaned my sdcard and put it again.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
For next build ... but for current build not needed, as i'm already aware.

Reboot caused by filesystem error.
[Samsung Galaxy S8 & S8+ Cross Device Development] rostifaner:
means something wrong with sd?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Maybe yes, since it's maybe a false positive due to kernel issues for now.
[Samsung Galaxy S8 & S8+ Cross Device Development] rostifaner:
@LINDES0311 what is it?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Good news:

1. Play Store v. 28.3.16 is now unlocked.

2. As for A2N app crashes: It seems that the crashes only happens on custom ROM's, but don't worry, i've already fixed, just wait for update. (if it still crashes then, re-install it)

3. Random reboots very likely fixed in next test kernel !

Stay tuned.
[Samsung Galaxy S8 & S8+ Cross Device Development] Adbnpk2013:
the playstore has automatically updated itself to the mentioned version. the problem is when i try to install the apk which the kernal app directs me to , it fails during installation. i also tried playstore apk form other sources and the same happens as well. i think i will wait for the playstore update from your side. in the mean time if you happen to find out any work around do let me know @ace2nutzer
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Official (original) Play Store v. 28.3.18 is now on FTP available and unlocked in the A2N app. If your Play Store updated automatically, you don't need to do anything now.

The A2N app should work normal now.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
@ace2nutzer it happend again after 24h that i got a mem corruption, this time every app got in a crash state, im also unable to get a logcat and dmesg log about it becus the a2n demo app got also in a crash state.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Again a crash state happend with google playstore or with playstore services, but this time i got dmesg and logcat logs about it.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Random reboot happend 4 min ago
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes yes keep calm and wait for new test kernel .. you didn't understand what i wrote ? I know what's wrong and i'm actually fixing and testing it.

Use stock kernel for now. Check my FTP server.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Sorry didnt want to chase you up lol and probably i didnt read that good enough, but gonna to switch to stock for meanwhile😅 but any eta when it will be available?

Edit:

Btw doesnt the custom twrp cause issues with the stock kernel if i flash the stock kernel with it? Becus it was the case if i flash a2n kernel with the stock twrp. Just asking to be sure😅
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Honestly i didn't spend much time in checking what happens if you flash kernel that is significantly different from the kernel inside twrp.

What is well known: you will have Samsung logo glitches.

But you can bypass this and other potential memory corruptions by simply powering off after kernel flash.

So DO NOT tap reboot to system.

Or use stock twrp.

Then you will boot with clean RAM, no glitches and so on.

New test kernel probably online in around 48h. Maybe even earlier ...