yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S8 & S8+ Cross Device Development] God's Bro:
is it necessary to use your TWRP for flashing your kernel. I already flashed the new kernel via TWRP 3.4. I faced no such issues btw.

Small doubts on increase sampling rate, ZRAM and touch boost. For gaming will I keep sampling rate checked or unchecked?. Since I play heavy Fps games on my device which percentage of ZRAM should I set. I got a random reboot when my device is running WhatsApp when I set the ZRAM to 50%. Device heats slightly when touch boost set to max, which boost setting is beneficial for a user like me?

The best thing in this kernel is, the heavy apps loads faster than the galaxy s9. Overall for me the recent kernel is good in terms of temperature management, battery life and performance. Great kernel as always. Keep up dev, Good luck(y);)
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
It's not mandatory, if the official release works well.

I was suggesting to update first TWRP in case someone had my provious version installed, because i made some changes in RAM layout and there was some risk to trig a Samsung boot logo loop.

Another reason to use TWRP with the same kernel you will use for booted Android is due to some possibly interferences with filesystem drivers if the kernel version is not the same, e.g. Linux 4.4.11 vs. 4.4.150. Also i like in general to use my custom kernel in recovery.

So it's not to give some disrespect to the TWRP maintainer.

For gaming use this settings:

Screen:

Toch Boost Duration: 3000 ms

CPU:

up_threshold: lowest (65)

Cool Freq: 2002 MHz

GPU:

up_threshold: lowest (40 - 45)

Cool Freq: 455 MHz (or if you don't care about more heat then set 546 MHz)

Profile: Performance Plus

zRam: 50 %

With above settings you will easily break every record for the S8.

Especially with coming kernel with fixed thermal stuff for CPU / GPU !

last_kmsg ??? (you can find it in demo app) - But if you have already rebooted after the random reboot then the unexpected reboot reason is lost. In that case try next time.

Finally ! - Thanks !
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Changelog

Kernel V. 2021.01.26

Fixed device heating up

CPU/GPU: optimized thermal throttling (performance)

A2N Kernel Control V. 3.2

CPU/GPU: updated "Cool Freq" (DVFS)

----------------------------------------------------------------------------------------------------------

Uploaded as well TWRP with this patched kernel inside. ^^
[Samsung Galaxy S8 & S8+ Cross Device Development] rostifaner:
@ace2nutzer

On previous version I have got random soft reboot when calling.

Here is last kmsg.

Love your work, keep it up)

UPD

Also on newest release got random reboot
[Samsung Galaxy S8 & S8+ Cross Device Development] Devil90:
So just the flash of the last TWRP (of course yours) and magisk right?

without wipe?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
TWRP, kernel and Magisk without any wipe.

Wipe dalvik-cache or even wipe data is only needed if there are some issues.

But even without issues, it is a good practice to wipe dalvik every 3 months to avoid performance loss.
[Samsung Galaxy S8 & S8+ Cross Device Development] predict9:
Lets gooo nice update bro keep up
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
As for the soft reboot: you need to provide dmesg next time.

And for random reboot on latest kernel: what did you the last 5 minutes ?

Did you change zRam size ? - or did you enable / disable wifi ?

Also was it shortly after a fresh reboot ?
[Samsung Galaxy S8 & S8+ Cross Device Development] rostifaner:
Always use 50% zram and with new version I set only 2.4 ghz band. Change settings yesterday.

Last 5 minutes: wifi on, bt connected, swiping Instagram feeds then press power button and after ~10 sec it goes to reboot. It was ~15 minutes after fresh reboot.

Upd

For now I haven't seen new cases
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
So the only changes is zram & wifi band ? - So anything else is just kernel/app defaults (also no init.d scripts ?

I've checked the last_kmsg2 ...

This caused the reboot:

Unable to handle kernel paging request at virtual address 11111111111111
<0>Internal error: Oops: 96000004 [#1] PREEMPT SMP
<4>Modules linked in: zram lz4_decompress lz4_compress zsmalloc usb_f_ptp usb_f_mtp_samsung [last unloaded: zsmalloc]
<0>exynos-snapshot: exynos_ss_get_reason 0x0 (CPU:5)
<0>exynos-snapshot: core register saved(CPU:5)
<0>FEMERR0SR: 0000000000030000, FEMERR1SR: 000000000000005b
<0>LSMERR0SR: 0000000000000000, LSMERR1SR: 0000000000000000
<0>TBWMERR0SR: 0000000000000000, TBWMERR1SR: 0000000000000000
<0>L2MERR0SR: 0000000000000000, L2MERR1SR: 0000000000000000
<0>exynos-snapshot: context saved(CPU:5)
<6>exynos-snapshot: item - log_kevents is disabled
<6>TIF_FOREIGN_FPSTATE: 0, FP/SIMD depth 0, cpu: 0
<4>CPU: 5 MPIDR: 80000001 PID: 23205 Comm: dkc.video.hdbox Tainted: G W 4.4.111-a2n-g86951ccd #8
<4>Hardware name: Samsung DREAMLTE EUR rev06 board based on EXYNOS8895 (DT)
<4>task: ffffffc86cd9a880 task.stack: ffffffc00da44000
<4>PC is at __kmalloc+0x98/0x1b8
<4>LR is at __kmalloc+0x20/0x1b8

Basically a memory allocation failure caused by this process:

dkc.video.hdbox

Try to uninstall HD VideoBox app and see if it's stable, let me know then.
[Samsung Galaxy S8 & S8+ Cross Device Development] osmaniyeliapo:
Can I use it on Android 10? Will it work?
[Samsung Galaxy S8 & S8+ Cross Device Development] recoman:
Report kernel a2n 20210126 :

Devices s8 plus

Rom hades v12, magisk v21,4, twrp 3310 in general a2n kernel

Kernel overhearting use gg chrome, fb, youtube battery drain.

Use gaming super overhearting ....

Kernel best smoothness. Thx mate dev
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
The stats and temps on your screenshots looks quite normal.

As for battery draining: check your real battery capacity in power menu from a2n kernel demo app.

Btw: make sure to enable MagiskHide in Magisk Manager app and see if it's cooler. My phone is pretty cool when using YouTube for hours in fullscreen mode.
[Samsung Galaxy S8 & S8+ Cross Device Development] Devil90:
I noticed that at boot when the samsung logo appears a few times it moves position up and then returns to its place.

In addition, always in the boot if I press the home button it vibrates is normal?

it also occurs to you @ace2nutzer?

Currently stock rom.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes sometimes, so far i didn't investigate since it's cosmetics.

But in current build there is no little CPU OC ... later i'll upload new build.
[Samsung Galaxy S8 & S8+ Cross Device Development] rostifaner:
also set cpu dvfs = 2002, gpu dvfs = 455, torch brightness = 10. Other changes by default without any scripts.

Done!

Upd

Got another reboot but before deleting that app and seems it cause by other reason
[Samsung Galaxy S8 & S8+ Cross Device Development] pranil60:
I overclocked my gpu using init.d, it shows maximum frequency as 572mhz in some hardware checker app( I tried two apps ) but in both of them it never goes over 546mhz when they monitor real time changes in frequency, during playing games.

Things I changed:

1 user_max_clock and user_min_clock

2 gpu_max_clock and gpu_min_clock

Things I observed

1 gpu_volt has default voltage number that required for 546

I'm requesting you to give me last hint.

And I found some bugs in 26-1-2020 kernel:

1 logo changing position and coming back to original position

2 moderate heating while playing games such as pubg upto 50 degrees(it actually feels)

3 Sometimes freezes screen, unable to touch and even buttons won't work until I go for force power off

and everything seems right, I will report if I found some more..
[Samsung Galaxy S8 & S8+ Cross Device Development] moreformusic:
So I made some testing this month and I concluded that Android 9 (Pie) is quite unoptimised despite kernel performance. I've tested fluidity and stability at some games in stock Pie ROM (with and without A2N kernel), and on some other custom ROM's based on Pie, and then on Hades ROM based on Q (Android 10) and I've seen that despide some errors, in hard fps games it was best, no lag, stable fps, no heating (despite lower CPU and GPU performance), etc.. So my question is how to make this stock rom as optimised as Q? I tried debloating as good as possible, but I think it's not just by that, I don't have very much development skills but that's my 5 cents
[Samsung Galaxy S8 & S8+ Cross Device Development] Devil90:
I also point out a slight delay in unlocking with fingerprint (App A2n control on default), I did the test by returning to stock kernel and it does not occur.
[Samsung Galaxy S8 & S8+ Cross Device Development] Luiz2004:
parabéns pelo bom trabalho. e se você conseguir rodar o gpu em 839 MHz no máximo dele sem o travamento do smartphone ficaria muito bom.

Translation: Congratulations for the good work. and if you can run the gpu at 839 MHz at most without locking the smartphone it would be very good.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
@rostifaner

flashed stock kernel and it's the same for me:

<6>[ 1.503567] [0: kworker/0:1: 1222] mmc_host mmc0: card inserted
<6>[ 1.528284] [5: kworker/u16:0: 6] mmc_host mmc0: Bus speed (slot 0) = 25000000Hz (slot req 400000Hz, actual 390625HZ div = 32)
<6>[ 1.588560] [6: kworker/u16:0: 6] mmc_host mmc0: Bus speed (slot 0) = 25000000Hz (slot req 300000Hz, actual 297619HZ div = 42)

So according to this, the only significant change would be int_freq ... set from 400 @ 667 MHz.

i've uploaded a test kernel for S8 with int_freq = 400 MHz.

But honestly i still doubt that this is the culprit, i do more believe that it's caused by Filesystem error(s) or CPU/RAM failures.

Test Kernel attached here.
[Samsung Galaxy S8 & S8+ Cross Device Development] pranil60:
I'm using stock rom and I was not familiar with init.d script before 2 days ago. But somehow I learned my own from scratch and reached upto here.

1 is my current config having the same conditions as I mentioned in previous post

2 was my experimental script where I was actually able to reach 572mhz even after removing gpu_volt command it hitted 572mhz.. but temperature was such that I served two cups of tea to my guests with extra sugar. So I decided to turn back to normal setting.

And I don't know how to change DVFS, it would be great if you tell me it will save my experiment time.

And some more bugs that I observed and like to let you know:

1 when both fast wireless and fast wired charging is connected mobile chooses wireless over wired charging which is slower than wired. BTW I would just disconnect cable if wireless charging or simply put my device little eccentric over wireless charger pad, no problem for me actually

And most IMPORTANT thing, THANK YOU very much. Even without above modifications kernel works so good. My primary intention to apply this kernel was to improve PUBG performance, but want more stability so wanted to overclock gpu further more, so...

Again Thank You!
[Samsung Galaxy S8 & S8+ Cross Device Development] predict9:
Idk what yall saying but i have 0 problems with this kernel only after the update i get random reboot idk why but i dont mind cuz its reboots after a day or something so its all good for me(y)(y)
[Samsung Galaxy S8 & S8+ Cross Device Development] predict9:
I want 1 thing tho if u got time to make can put something like a custom profile thanks ss keep uppp the good workj
[Samsung Galaxy S8 & S8+ Cross Device Development] God's Bro:
I guess I broke my phone. it always shows a message "System UI isn't responding" over and over again. The phone is totally unusable and it keeps freeze on home screen when I unlock it. Even my headphones isn't receiving sound from the jack and volume buttons and power button responds after 30sec time, However this happened after I changed some settings in the a2n app. the settings I changed was ,

ac current 2200, battery idle on, bat temp 43

touch boost 4000ms

big CPU and suspend both 2.4, DVFS 2.4, small CPU and suspend both 1.8 others default

GPU 572, DVFS 572 others default

ZRAM 75 others default

WIFI 2.4ghz others default

Was using horizon rom 4.9

According to my experience the problem caused after I set ZRAM to 75. I usually does a restart when I apply new settings and I usually clear all cache including Dalvik. Any idea what has happened? I cant even get "last_kms" for the developer to see the issue and I hardly turned off my device.

So after that I flashed horizon rom and it didn't work, 2nd I cleared all data, system, cache and installed horizon newly and the same thing happened(without root and a2n kernel). Lastly I installed stock rom using Odin after clearing everything and its still the same. Please give me a advice to fix this problem.
[Samsung Galaxy S8 & S8+ Cross Device Development] moreformusic:
Well you can start by getting a log file though ADB (both from ROM and Kernel) so we can see what exactly is causing this problems. Look out in the forum for instructions or just search on google:)
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Set GPU DVFS to 455 MHz or change freq to what ever you want:

echo 455000 > /sys/kernel/gpu/cool_freq

Set CPU DVFS to 2002 MHz or change freq to what ever you want:

echo 2002000 > /sys/module/exynos_ufc/parameters/cool_freq

"Value 0" means "system default" and is the default.

To your script 1:

i wouldn't change min_freq as this will only drain more battery with almost no other benefit.

Also you don't need to set governor to ondemand, because it's already the default one.

To your script 2:

Almost redundant, except the change to static gov .. but best one is ondemand for gaming, but try them all no problem.

Also "gpu_volt" is not a read-write interface, read_only, so it doesn't have any effect to write to this interface.

This is somehow a stupid bug, but you can easily avoid this, right. :LOL:

That's great !

Well nothing holds for ever ... also i doubt that your phone will work stable with that older kernel, because it seems that the eMMC is broken, try to start from scratch with flashing latest stock ROM .. then flash stock kernel from my FTP... or test a bit without any modifications ... even the fact that the stock kernel from my FTP server doesn't have any significant changes except the minimal required changes to avoid forced device encryption !

Right.

No sorry, nothing to do with eMMC, also this option is disabled as well in stock kernel.

Yeah and this is the confirmation that it's hardware issue.

unlikely ...

Hmm OK but it's not normal, a random reboot should never happen if everything is fine, even not after your phone is for 1 year online.

So better to post a last_kmsg you can simply generate from demo version in debug menu.

In the future, for sure. (y)

DVFS Freq's too high ...

If the phone doesn't respond like in your case, you can do a dirty reboot by holding power key + volume down key for 7 sec.

Then when it's booted up, simply open A2N demo app and generate the logs if possible.

Sounds bad, but without logs it's almost impossible to tell you what is wrong.

Yeah in fact i'd wrote several times how to do that, seems that people are too lazy to search the the thread, anyways i've written it again but more professional lol:

So now #adb_logs for the archive:

in booted android with ADB:

(works even without root or TWRP)

adb shell logcat -d > logcat.txt // saves the logcat.txt in the current directory where ADB is running.

and post the logcat here ...

and after a forced reboot to the recovery (without to boot adroid):

(TWRP required but magisk not needed here)

adb pull /proc/last_kmsg last_kmsg.txt // saves last_kmsg.txt to the current directory

Also if random reboot happened, you can still reboot directly to the recovery and pull last_kmsg ... works as well.

Note: but do not power off and then boot to the recovery, becasue by powering off the logs will be deleted from RAM.
[Samsung Galaxy S8 & S8+ Cross Device Development] predict9:
i play with 2.5 dvfs all the time no overheat or lag and zram at 75% the only thing is every minute 1% dies
[Samsung Galaxy S8 & S8+ Cross Device Development] God's Bro:
i got the last kms via your app.. but having a difficulty in uploading to xda
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Try to rename to last_kmsg.log

if it doesn't work too, then zip the file.
[Samsung Galaxy S8 & S8+ Cross Device Development] God's Bro:
here, i hope it works and you can check it
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Oh i'm sorry, i was convinced that in stock defconfig it's disabled, but it's enabled. Now i've reverted that commit. so in theory it should work stable again in coming build.

And according to the last_kmsg from @predict9 it seems that it has really to do with that commit.

But the errors with mmc0 probably will persist in your phone, anyway, if everything will work fine and stable then i wouldn't care. I'm actually fixing DVFS as it turned out it's again buggy. :sneaky:

Looks like there is a conflict with thermal throttling and little CPU OC.

Because in stock kernel it works better ... but also not really good, instead to throttle GPU it literally throttles CPU ... and GPU throttles too late. :LOL:

I hope i can fix this, then it will work like a charm.
[Samsung Galaxy S8 & S8+ Cross Device Development] pranil60:
So I just found out that when I change my settings according to attached init.d script.. my BIG CPU frequency reduced to 2002mhz which is cool freq. Also GPU frequency reduced to 455mhz whuch is cool can frequency. And these above mentioned frequencies(2002 and 455) are maximum frequencies as indicated in hardware detection software... so, what are my actual frequencies..

And actually I am in trouble right now...

My apps taking a alot of time to open that is youtube takes 7 seconds and other most of the apps takes more time than before, I havev attached the init.d script... only thing I've changed is last command addition

echo 2002000 > /sys/module....cool_ freq
[Samsung Galaxy S8 & S8+ Cross Device Development] pranil60:
In addition I cleared Dalvik cache and cache after applying that last command
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
@ up

echo 260000 > /sys/kernel/gpu/user_min_clock

is redundant because like i said before it's already the default.

And for now, forget the 2 last lines, because DVFS is actually buggy.

Aslo zRam is buggy, disable it. (it'll be hopefully stable in next build)

@God's Bro

thanks for your last_kmsg, but unfortunately it didn't contain the reboot reason, but nevermind since the one from predict9 did the job.
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
This my tune for pubg on s8+ stable OC no reboot even freeze ouh i found something on this kernel when OC gpu more than 572mhz when more than that the screen is freezing but when i call still run that caused by no volt when more than 572 i have been check on gpu_asv_table the voltage is zero i hope you check it and make voltage for that

"I like overclock" 😄😄😄
[Samsung Galaxy S8 & S8+ Cross Device Development] God's Bro:
Sometimes device works as normal. but again that issue comes. here i doesnt get any random reboots.. only thing is the sounds and mic start to fail or not responding. i cant press the volume button the issue comes. Today when i was playing pubg suddenly headphone sounds went and a huge noise came out from the device's main speaker. The screen started to freeze.

*Note- According to my knowledge anything which currently happening to my device is not because of the a2n kernel, this is happening may be my device is so old and might be a hardware issue.

*I got one random reboot, i attached the file below
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
@ up

as i said, zRam is buggy, disable it for now, on next build it should work better.

<0>Unable to handle kernel paging request at virtual address 11111111111119
<2>sec_debug_set_extra_info_fault = KERN / 0x11111111111119
<1>pgd = ffffffc86d311000
<1>[11111111111119] *pgd=0000000000000000, *pud=0000000000000000
<0>Internal error: Oops: 96000044 [#1] PREEMPT SMP
<4>Modules linked in: zram lz4_decompress lz4_compress zsmalloc usb_f_ptp usb_f_mtp_samsung
[Samsung Galaxy S8 & S8+ Cross Device Development] God's Bro:
any idea what has happened to my device? anyone?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Reboot to recovery and wipe cache / dalvik cache.

Then once Android is fully booted up use any Root Explorer ..

or if you don't know which to choose, use this:

File Manager for Superusers - Apps on Google Play

Powerful, simple & customizable File Manager & Root Browser for superusers

play.google.com

then grant root permission, and go to /system/etc/init.d

and open 99_user with "Text-Editor"

and add the following line of code in line "4" (under User init.d script)

/system/etc/A2NKernelControl[G95x]/zram.sh 0

then save and reboot .. this is a workaround till i'll upload new build !
[Samsung Galaxy S8 & S8+ Cross Device Development] pranil60:
Hi mr.A2N, I did experiment of your kernel on various roms and heres the result:

1. Light Rom: Best gaming rom ever with A2N

2. Hades rom: Overall best rom with aesthetics and better gaming performance

For above two roms I got stable nearby 60 fps at both 1080p and WQHD when gpu was overclocked(both max clock and cool frequency)

3. Stock rom: Off course better in every way you get better performance while retaining all other samsung's stock features.. but in gaming its little tricky, but its stable.

AND for above bug. I found that whenever I clean cache and dalvik cache after editing init.d or flashing kernel it slows down some functions. Maybe it bugs zram or frequencies. And applications takes alot of time to run..

Again thanking you.. If you want init.d script I can send
[Samsung Galaxy S8 & S8+ Cross Device Development] pranil60:
Heres PUBG trial video

Without recording 1080p and 1440p gives 60fps.. even more smooth when GameOptimizationService is disabled. That game plugin app requires GOS for monitoring fps so I used stock there.. Even 1080p at HD gives 60fps.

Actually TDM gives less FPS compared to other maps. I used 572mhz max clock it actually helps. If I overclock CPU a little bit more, it will easily conquer S9 devices. And those CPU and GPU performance threshold and cool frequency are also very useful.
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
Nice dude i think i will make voltage for GPU because when clock more than 572mhz that will shut graphic go to very² lag caused by no input power
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
that what i mean zero power input
[Samsung Galaxy S8 & S8+ Cross Device Development] predict9:
so which rom is best for gaming if its a light rom which one
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Right, due to the buggy DVFS, don't worry i'm actually fixing it. :)

That's normal after wiping dalvik cache, after some time then it'll work faster than before.

You can do, no problem, but be aware that i'm aware that the stock config is not tuned to 100 % for battery or performance, it's adjusted for a 50 % balance between battery / performance.

So if you guys don't like a balanced profile, you have to tune several thing you can see in demo app.

Read all descriptions in the app, it helps you to understand how to tune for battery or performance.

Every of you is welcomed to provide kernel patches, so if you are a developer or power user, feel free to send your pull request here:

GitHub - ace2nutzer/Samsung_dreamlte_Kernel: Custom Kernel

Custom Kernel. Contribute to ace2nutzer/Samsung_dreamlte_Kernel development by creating an account on GitHub.

github.com

Then i'll review your patch and if it has some benefit, it'll be merged.

Yup i know and is nothing new, but on some S8 devices the voltage is fully assigned.
[Samsung Galaxy S8 & S8+ Cross Device Development] God's Bro:
Thank you ill do
[Samsung Galaxy S8 & S8+ Cross Device Development] God's Bro:
didnt u test horizon rom 4.9?