yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S8 & S8+ Cross Device Development] spdrfx:
I was set zram to 50 percent long time ago, and experiencing the high cpu usage once or twice every month, and it last for 10-15 mins. Not a big deal, but for now i turned off the zram.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Really ?! - GPU max_freq only 598 MHz ?!

Let me see the Git repo from the custom kernel that you use, maybe I can help.

Yeah then it's clear, you don't think so ?!

But that should only happen after fresh boot, because like I said it'll resize zRam from 100% to 50% or to 0%. (depends on what u've set in the app).
[Samsung Galaxy S8 & S8+ Cross Device Development] TechNoobForSale:
It’s the xxTR Kernel you suggested to me in the past. The dev now though seems to be also working on a cpu issue. Basically after a certain version of the xxTR Kernel, multi thread performance dropped significantly. The Mali G72 in the E9810 heats up much much less than our G71 and on average has better bins so it could overclock to 839MHz no problem most likely. But my developer ykkfive ran into the time-in-state trap (like you did for MIF) and Mustafacoo (xxTR Kernel developer) who actually uses some commits from you I believe I heard, is working on this overclock stuff as well as fixing cpu performance.

Release Release of xxmustafacooTR Kernel for exynos9810(S9,S9+,N9) - Version 45.4 · xxmustafacooTR/android_kernel_samsung_universal9810

Changelog using clang 16 (instead of gcc 13) Merged Configs Stock battery capacity (instead of samsung's capacity decreases) disabled nad balancer, secure os (new 9810 don't use them) zram default...

github.com

This is Mustafa’s GitHub for the Kernel. xxTR is the one with the overclock functions, not noble kernel.

Also mustafacoo’s Kernel has a game mode plug-in that basically disables the DVFS throttling driver. It makes me constantly scared when I play a game because there’s no thermal limit so the phone goes up 110C+ until it does emergency shutdown. Seems he couldn’t get rid of Samsung’s stock DVFS so he simply found this way around it, that is terrifying to my eyes. xxTR 44 Lite commit from December 2021 is his best performing release so far. The ones after have the cpu performance problem and the ones before are incomplete. GPU control is a bit broken on all releases.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
If GPU (aka g3d, or mali) is using devfreq then you can probably forget.

Here on S8 CPU big/lit and GPU don't use devfreq driver, while MIF and other system clocks uses devfreq. AFAIK OC devices from devfreq is possible but only limited to the stock DVFS table where a freq and voltage is assigned by default. Yes, even filling the missing voltage to obtain higher freq won't work at all if it uses devfreq. devfreq will just ignore DVFS table and use what is coming from ACPM / CAL-IF stuff.

To check if it uses devfreq, go here:

cd /sys/class/devfreq
ls
### on S8: ###
17000010.devfreq_mif 17000020.devfreq_int 17000030.devfreq_intcam 17000040.devfreq_disp 17000050.devfreq_cam

As you can see, mif but no GPU or mali.

Yeah disabling stock GPU thermal driver is quite easy and quick.

The work is to write custom thermal driver. Is it shutting down or rebooting ? Because it should reboot = too hot = miscalculations = kernel panic = reboot.

Yeah then it needs proper HMP optimizations and both CPU/GPU custom thermal driver to improve performance and to avoid overheating.
[Samsung Galaxy S8 & S8+ Cross Device Development] TechNoobForSale:
Hmm I see. Thanks for taking the time to give me an insight into this, Ace. Stuff like this takes time. I’ll discuss with mustafacoo about this.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Well after checking his defconfig and source code I can see he backported newer mali driver bv_r39p0. I'm not sure, but it seems that it lacks proper exynos support. If you check the folder "platform" inside that driver, there is no exynos folder. Latest mali driver version with proper exynos support seems to be bv_r26p0.

Also it seems to me that mali is not using devfreq ... see here.

So OC GPU should be possible for 9810 platform.

Steps to allow 839 MHz on 9810:

1. change to bv_r26p0 mali driver in defconfig.

2. adapt this commit for your source code. (that commit uses b_r16p0 version)

3. adapt this commit. (same here)

After that you can implement custom DVFS driver and finally add the voltage hack if needed.
[Samsung Galaxy S8 & S8+ Cross Device Development] TechNoobForSale:
He backported R39 because his Kernel supports A12 ROMs too in the permissive selinux variant. Normal enforcing A10 uses r26. This will help him unless he already did all of this and will apply in a future release. Biggest problem remains cpu performance. It lost about 10% multi core performance, and it’s not the first time I see a device suffer from this odd issue, my Nokia 8 on Android 12 builds had it too, and worse. Something changed in his V45.0 that caused this issue. 44 Lite did not suffer from such an issue
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
New Build Is Up !! - Kernel V. 2022.08.23

Changelog

Audio UHQ: re-implemented on big CPU

Fixed deep sleep issue (caused by UHQ audio patch)

HMP_CUSTOM: tiny optimizations

Re-enabled several kernel security features

Re-enabled all HID drivers as suggested by Google

CPU/GPU OC: updated custom DVFS table for better OC stability - thanks @PORTER2002 for testing 2,8GHz stability

Fixed Samsung DexPAD - S-PEN works now - thanks @Illutorium for testing

Fixed as well other Samsung accessoires

Dex should still work with 3rd-party adapters as well

GPU: added some more optimizations, especially for Vulkan render

Optimized various system clocks for higher efficiency

Optimized input booster for higher efficiency - it uses now Freqs from "balanced" profile to be more power efficient

GPU: slow screen orientation should be fixed as well

Audio: fixed audio scratching when adding a lot of filters

A2N Kernel Control V. 5.1

GPU: voltage control: synced voltages from kernel release

Performance Profiles: updated all profiles

CPU: updated "little only" switch

Audio: UHQ: replaced PM-QOS-LIT with PM-QOS-BIG since we use now audio on big CPU

Updated defaults

DOWNLOAD

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

Enjoy you lucky guys !!!
[Samsung Galaxy S8 & S8+ Cross Device Development] Arnz09:
Updated but no 5.1 kernel control update in playstore.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yeah, it's on the way bro, please wait 2 or 3 hours.
[Samsung Galaxy S8 & S8+ Cross Device Development] madhatter57:
Looking forward to test , yay

Control app keeps asking to update itself at license check even after I fully resintall the app from Playstore...
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Ohh I forgot to unlock, thanks for remind me. Should work in 10 min.
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
okey there is new update but i cant do that because no screen :")
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Do you have access over ADB ?

It works even over wifi but you still need to connect first normal usb cable with PC for initialization, also I've never tried if adb wifi works as well in twrp. But probably it's not needed. If so, I can provide a script for flashing kernel. Should work over adb sidelod ... because you need also to flash magisk after kernel flash.
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
yes i have it
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
i ussually use my phone with pc and its over adb the app i use it scrcpy (SCReenCoPY) and what the script for flash it via ADB?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Okay, later when I'm again on my notebook i'll post it. I'm over my S8 online right now.

Edit: @rtyuakatsuki

Here you'll find a script for flashing kernel over ADB.

But after that you need to flash Magisk. I've actually no clue how to do that. Maybe this is possible over the Magisk app ? - Try yourself or ask in Magisk thread.

Note: this is not a full kernel installation, but it's enough to update kernel(boot.img), kernel-modules and scripts(e.g. zram.sh). So if you flashed previous build properly in twrp, this method is sufficient and will work for you. Otherwise it's not suitable.

Steps:

1. open A2N app --> advanced power menu --> reboot to recovery

2. connect USB cable

3. create folder a2n_kernel_g950x_9.x and unpack a2n_kernel_g950x_9.x_2022.08.23.zip into it

4. make sure it's ready with "adb devices", if not wait a few secs and try again

5. run the script

./flash_kernel_g950x.sh

(script attached here)

6: finally sync and reboot

adb shell sync && reboot
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
okey i will try soon dev i think i need to find cheap screen to just see twrp
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yeah, just find a cracked screen that still works. Another idea is to use "adb sideload a2n_kernel.zip" but for this you still need to enable first sideload in TWRP. Maybe with a modded twrp that starts directly in sideload could work. Or search the web how to enable sideload over terminal emulator. I did that, but didn't find something useful. Another method is to search for an app that can actually flash update.zip packages directly on running Android. Of course a reboot is still required. Good luck !
[Samsung Galaxy S8 & S8+ Cross Device Development] Adbnpk2013:
Hey dev , i have fleshed the latest kernal version and i have been faceing reboot problem. Now i dont know if its kernal issue or my phone is acting funky ( as i have a known charging port problem with my phone). Posting logcat and last kmsg. Please have a look.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Lets say you have github account, then you can fork an existing kernel repo. Then click on "Code" and copy the link.

In my case it's "https://github.com/ace2nutzer/Samsung_dreamlte_Kernel.git"

If you forked it, then adapt it to your username of course.

Also you only need to github account if you want to fork and want to push your commits online, so it's like having a backup of your patches.

git clone https://github.com/ace2nutzer/Samsung_dreamlte_Kernel.git

Wait till it's done.

Then, i'm not sure right now, but if you use cmd: "git remote -v" and there is nothing, then you need to add it like this:

username: you username, as you can't use ace2nutzer because you can't push commits to my repo, because you don't have my login password lol.

git remote add master https://github.com/username/Samsung_dreamlte_Kernel.git
git push --set-upstream master master

You also don't need to create a .gitignore file like I was writing here, because it's already there.

Anyway, before you start to commit any changes, you should configure your git username and e.mail like this:

git config --global user.name "Your Name"
git config --global user.email "youremail@yourdomain.com"

Note DO NOT run any cmd as root, because otherwise you will face severe issues with file permissions. So never use "sudo -i" ... instead use "sudo ..." and only if it's ever required to do so.

Thanks for the logs ! - Yeah it's "KERNAL" issue. :ROFLMAO:

Please write you guys the device model in your signature.

Then I don't need to ask everytime for device model when building a test kernel.
[Samsung Galaxy S8 & S8+ Cross Device Development] Adbnpk2013:
Lol , i was so used to the stability of previous build and thought this must be my phone 😄

Btw my model is S8+
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
I've re-enabled a few kernel security features, for having better protection against an attack. Also updated HMP driver. I think one of this changes is causing this. So there is nothing wrong with your phone and we will get soon back the old stability of this kernel.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Cool, i'll try it out when i have time and trying stuff out😛
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
btw: please check if you are really using kernel from 2022.08.23.

dreamlte:/ $ uname -r
4.4.111-a2n-g6e976ca0

??

If you are using this latest release, so not a test kernel then you can try with this hmp_kernel. If it works for 7 days stable, then let me know please. If you face again reboot, post again last_kmsg please, no need to post logcat as it's useless for debugging random reboots.
[Samsung Galaxy S8 & S8+ Cross Device Development] Twiq:
@ace2nutzer

idk what you did man, but the latest kernel update is awesome..

Usually whenever i go back from work the battery is around 10%-15%, and thats without gaming..

now i'm home and left with 20% and that's because i played Mario Kart for 1 hour-ish.. dang it man this is very battery efficient

edit : 950FD variant, balanced profile, only lowers the big and little cpu max freq according to your tips
[Samsung Galaxy S8 & S8+ Cross Device Development] Adbnpk2013:
sorry, i downgraded earlier to the previous stable version. but I am pretty sure that I flashed the latest 2022.08.23 when I got the reboots. i am fleshing the hmp_kernal now. i will report if I get reboot.
[Samsung Galaxy S8 & S8+ Cross Device Development] leonidasZ953:
With previous build read 9v and now its 5..I think it's better 9v, what you think about that guys?
[Samsung Galaxy S8 & S8+ Cross Device Development] Adbnpk2013:
Hey DEV and other members. i am facing a strange problem with my phone (s8+). previously I had a know charging port issue with the consistent "moisture detection notification". and thanks to @ace2nutzer brilliant work that was sorted out through kernel modification.

2 days ago I have changed the charging port. now everything works fine but another strange issue has risen.

the issue is that whenever I turn off or restart the phone, it doesn't turn back on.

it will turn back on when I connect the charger. and the funny thing is as long as the charger is connected the phone will restart normally back to OS and if turned off it will turn on again by pressing the power button.

once, the phone turns on it will function like a normal phone, no issue at all.

things I already tried:

1) checked on other know working charging ports ( same issue)

2) checked on other know working battery ( same issue)

3) reflowed and even changed the power I.C (same issue)

peculiarity I have noticed:

1) it will go into ODIN mode when the phone is turned off and i press bixby+vol down+power. but it will not power on until charger is connected.

2)as already mentioned above, the phone will work like normal on with charger connected. afterword if i remove the charger it wont turn off or shut off and something.

i was wondering if i could be related to software somehow, as i have tried most of hardware related fixes.

DEV and all member , if anyone can help, i will be grateful. thanks
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Checked right now with Samsung AFC charger and it's 9V. Or do you mean with USB-PD ? But probably it's like always hardware issue. Check the USB ports and the cable. It's very sensitive and it can fallback to 5V if the contact is not well.

Why you don't test with the stock kernel ? You can flash it like a2n kernel update without any wipe.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes I know. GPU Freq updated as well in profiles. But I believe only changed it for balanced profile, even increased it. But also adapted RAM Freq to be more appropriate with the profiles. As well using balanced Freq for input booster. Before it used alway max freq for lit big and RAM. That's why you face a big difference. Also on top, together with input booster it'll boost the freq of the internal flash storage as well from 267 MHz @ 400 MHz.

Samsung didn't use this optimization at all, but it seems to improve scrolling when it has to read or write data from storage at the same time, yeah it fixes lags. 400 MHz is here power efficient as well. Next step is 533 MHz and 667 MHz. The higher Freq steps are only used when I/O load is really high.
[Samsung Galaxy S8 & S8+ Cross Device Development] rostifaner:
@ace2nutzer hi bro. What do you think about upstreaming kernel to newest version and built with clang?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
I don't like clang at all. I compile everything with GCC. And upstreaming is unfortunately very problematic on Samsung kernels. I don't say it's impossible but it's very tricky and requires a lot of time and work. It's based on Android kernel 4.4.111 but it has some patches from 4.9.x version. On top it has of course Samsung own patches for this exynos device and again on top all the a2n mods (400+ commits). So an auto merge of Android kernel patches using "git am 0.patch" or a 3 way merge strategy "patch -p 1 -i 0.patch -r rejects" would fail all the time and then yo have to open the text file "rejects" and add manually all the patches that couldn't be applied because of above mentioned reasons.
[Samsung Galaxy S8 & S8+ Cross Device Development] Twiq:
@ace2nutzer not pushing it, but any chance adding BBR into TCP Congestion Algorithm?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
No sorry.
[Samsung Galaxy S8 & S8+ Cross Device Development] leonidasZ953:
Voltage has change with last kernel..Previous build always with 9v and same chargers/cables..Now its hold 5v
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Checked right now changelog and there is no changes at all in charger control starting with previous release from 01.07.2022. So you can flash 01.07 build and you should get 5V as well. If so check your hardware. It works with 9V for me.
[Samsung Galaxy S8 & S8+ Cross Device Development] leonidasZ953:
Thanks for answer really, strange with that..Now phone dont burn like old build..
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yeah with 5V it's less heat. But you still didn't test with previous build and you didn't tell me what charger you use. Is it with original Samsung AFC charger or you use USB-PD that supports 5, 9 and maybe even 12V ?

Sometimes it happens also to me that it shows 5V. But it's like a said before a contact issue of the USB connectors, because I unplug, wait 2 sec and re-plug it again, then it's 9V lol. I'm facing this issue since first day, so I do assume it's hardware issue by Samsung or so.
[Samsung Galaxy S8 & S8+ Cross Device Development] TechNoobForSale:
Yeah I have this problem too, but with multiple phones. It's literally cable or charger related. The newest Kernel release didn't directly give me any issue with charging voltage.
[Samsung Galaxy S8 & S8+ Cross Device Development] leonidasZ953:
Its stock Samsung charger and cable too.. I flash previous kernel a long time ago..i Flash new when you share it..
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Okay thanks. But future release will just fix random reboots. I'll not change anything in charger control since there is nothing wrong with it.

You need to replace your USB cable, it doesn't last for ever.
[Samsung Galaxy S8 & S8+ Cross Device Development] Adbnpk2013:
I

I am using

I am using hmp_kernal as u suggested. Faced a reboot after a day use. Here is last_kmsg
[Samsung Galaxy S8 & S8+ Cross Device Development] Twiq:
[/QUOTE]

now that you mentioned it.. my phone restarted unexpectedly last night, didn't knew when it happened, when i woke up and tried to use my phone it asked me to solve the pattern lock after restart

here's the last_kmsg incase you need one

last_kmsg | Powered by Box

app.box.com
[Samsung Galaxy S8 & S8+ Cross Device Development] PIKO!!!:
Same here. 2 random reboots in latest kernel when not using the phone. I don't have last_kmsg but if it happens again i will share it. Today didn't happened.
[Samsung Galaxy S8 & S8+ Cross Device Development] spdrfx:
same here, 2 rr in 5 days.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Do not power off the phone after a random reboot. Instead generate the log in a2n app demo. The useful info was lost. But I do assume it was still the same reason.

@Twiq thanks for your report. Same reason.

Therefore I've uploaded a new test kernel in "test" folder.

It has the keyword: "slub". Lets test with that. Uploaded for S8/S8+. If someone need it for Note8 as well, let me know.

Also don't use OC while testing stability.

You can attach last_kmsg.gz here directly.
[Samsung Galaxy S8 & S8+ Cross Device Development] Twiq:
Downloaded, flashed it and booted just fine..

is there any particular steps you want me to do?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Nope, just do what i said. Once it works stable for 1 week, I can do new release with higher optimizations.
[Samsung Galaxy S8 & S8+ Cross Device Development] Adbnpk2013:
Flashed the new test kernel. Got reboot.
[Samsung Galaxy S8 & S8+ Cross Device Development] Twiq:
8 hours uptime, no rr yet and i hope none will occur..

but i feel like there's something wrong with multitasking, i'm not sure it's kernel or just something else.. but i know i haven't had this issues before

for example after opening stuff the opening firefox and changing address bar to open up website/query google then it hangs until i clear all running programs from tasks and reopening it.. same thing happened with Mario Kart Tour

i disabled zram (0%) since 2 kernel builds ago
[Samsung Galaxy S8 & S8+ Cross Device Development] Twiq:
@ace2nutzer welp i jinxed it, it rr'd not long after i posted my reply
[Samsung Galaxy S8 & S8+ Cross Device Development] Twiq:
2nd rr today
[Samsung Galaxy S8 & S8+ Cross Device Development] ReggaHyko:
Support with hadesrom pie?
[Samsung Galaxy S8 & S8+ Cross Device Development] leonidasZ953:
Yeah ofc, I have same rom now
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Try with pcrypt kernel while in the meantime I'm trying to understand whats going on. Or if you need 100% stable kernel, downgrade to v. 2022.07.01 for now. Sorry for the inconvenience.
[Samsung Galaxy S8 & S8+ Cross Device Development] leonidasZ953:
For news I downgrade to 2022.07.01 and again voltage charge with 9v..I check this with 3 differents cables and chargers..Different from last kernel charging is hot..
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
And for those who want to help with debugging you can first test the pcrypt kernel and then the kernel_debug version. The debug version should hopefully help, because i've enabled some useful debugging.

Like always post last_kmsg.gz after an unexpected reboot and write which kernel version was in use while the reboot occurred.
[Samsung Galaxy S8 & S8+ Cross Device Development] Twiq:
does it have to be in that order? or could i just jump to debug?

downloading both as i'm typing

edit: flashed the pcrypt.. now i'm going to play mario kart and see what happens
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes in that order please.

Btw in my case latest release works stable. I did a wipe of apps cache and dalvik-cache, maybe that's the fix ?
[Samsung Galaxy S8 & S8+ Cross Device Development] Twiq:
i wiped mine too when using latest.. but i didn't wipe when flashing slub and pcrypt..

btw 8 hrs 42 minutes uptime using pcrypt now..

can you tell us what's the differences/changes between the slub, pcrypt and debug?