yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S8 & S8+ Cross Device Development] MfmeheyitsmeIam:
This is the dvfs table from my last kmsg if possible how can I increase the gpu frequency beyond 754000? If you could at leat tell me if it's possible at all???
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes and with some hacks we can use that limit of 839000.

I can't say if it's possible or not. But I think with enough skills & time it's possible. Those limits are coming from the acpm_dvfs.fw file. This firmware is copied at boot time in RAM and then after it's done, every drivers that need freq and voltage info will grab the data from RAM, not from the binary firmware file. So the hack should happen right after it's copied in RAM. This is how i've added voltage control. But for hacking max freq it's probably more difficult because you need to add a new entry and fill all the required data, it's not only freq and voltage, you need also PLL stuff.
[Samsung Galaxy S8 & S8+ Cross Device Development] MfmeheyitsmeIam:
Thank you for your time
[Samsung Galaxy S8 & S8+ Cross Device Development] MfmeheyitsmeIam:
Also I did find g3d pll rate table in drivers/soc/samsung/cal-if/exynos9820/cmucal-node.c
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yeah, good luck with OC. :cool:
[Samsung Galaxy S8 & S8+ Cross Device Development] heukpyo:
I've already tried all those methods.

Changing the voltage and temperature settings did not solve the problem.

But when I set the zram to 0%, the sound problem disappeared.

But if you keep using it, the sound problem will occur again.

In that case, set the zram back to 0% and reboot to resolve it.

If you don't reboot, the sound problem will not be solved.

In other words, if you reboot once every 30 minutes, you can use it without any sound problems.

Is there a way to solve the sound problem permanently without rebooting?

My grammar can be weird because I use a translator. Please excuse me.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Question if im making changes and compile it, does it automatically work with the a2n app or?😮
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Not yet, but in a few minutes I'll push a fix. This will allow to make latest A2N app working fine with custom user builds.

Edit:

done. Just update your local repo with "git fetch" and compile.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Thanks for your report and investigations!

It looks like audio processing gets moved to little CPU instead to stay on big CPU. I'll fix it shortly.

Nope, I've tested on latest build with Real Racing 3 and there is no audio issue. Can you tell me how to reproduce? - Do I need to use headphones? - Because I've tested without.

btw: did you try to uninstall a2n app and reboot and see if it's fixed?

Because you said that you'd update from 44 to 55 ... this is a big difference, there are around 9 months of development and changes between .. lots of commits.
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
Wow dev play RR3 :v hehe but that prove the sound problem not there because that one of heavy game
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
I was playing that game a few years ago on a Galaxy Ace 2 almost smooth.

I can't still trigger audio issue, even with headphones using UHQ upscaler and lowest freq for audio PM-QOS.

Edit: how to reproduce audio issue?

I've tried to install the same game he is using "KALPA" but I can't install it.
[Samsung Galaxy S8 & S8+ Cross Device Development] Twiq:
have you tried using 50% zram and swappines to 160?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Nothing to do with memory management. It's a problem with too low little or big CPU Freq.
[Samsung Galaxy S8 & S8+ Cross Device Development] pranil60:
It's been a week since I pressed reset button in battery capacity, and now it's showing 100%. Does this mean that I'm fine?
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Probably youre now fine
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes 100 % = full capacity available!
[Samsung Galaxy S8 & S8+ Cross Device Development] heukpyo:
Every time I use a cell phone, I get this symptom.

Same with or without headphones

I don't think it's just the audio problem.

If you look at the video that I uploaded,

There's a video that's rebooted and a video that's not.

If you look around 48 seconds of the norboot video,

you can see that there is a strange sound and a the screen freezing

Of course, the screen may not stop and only hear strange sounds.

On the contrary, the screen may pause for a while without hearing any strange sounds.

But rebooting solves all these symptoms for a while.

If you look at the reboot video, there is no strange sound or screen freezing.

But after about 20 minutes, the symptoms come back.

I said in my previous article that it was fixed when I modified the zram, but I don't think that's it.

If you look at the Freezing video, the screen freezing appears even in non-game situations such as home screen or screen scrolling.

If you reboot this too, it will be solved for a while like a strange sound during a game.

I tried it even after uninstalling the a2n app.

Still, this symptom hasn't changed.

I think I've reinstalled the kernel and ROM about five times.

The a2n setting of the images is cpu/gpu: up threshold 45%, max Temperature 100℃.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
@heukpyo

In the noreboot video CPU temp is max 60 °C and in the reboot video it's 70 °C. This is very strange.

A2N app is V55 ?, do wipe data of a2n app and reboot the phone.

Then show me kernel version in phone settings --> phone info --> software info. It should be R55.

After that, reboot the phone 2 times and generate a last_kmsg and post it here. I'll check your stock voltages.

And you are sure with the stock kernel from my download site there is no sound issue?

Edit:

checked the logs, only strange thing is a problem with the modem, in fact you don't have a cell signal. Which phone model are you using?
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
Ouh i hear it that cause low voltage try with charge it will lose the sound i am sure with it your battery is the problem
[Samsung Galaxy S8 & S8+ Cross Device Development] TechNoobForSale:
The reason why I speculated it is a problem related to his phone's hardware is exactly this. I don't care it "doesn't happen with stock Kernel". Hundreds of people have tried this Kernel and no one experienced this issue. The problem is probably exasperated on A2N Kernel since it's very "powerful". But it's something related to his phone. And because of that, troubleshooting will take time.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Its fun to look around in the kernels settings, so much things u can add/disable and change, anyway had first some issues with running the cleanup.sh script and the other 2 scripts and probably missed some depencies for it but i looked up which common ones was needed for making kernels and installed them and it ran just fine afterwards.😮
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Great! Just post the errors here, i'll help you to make the 3 important scripts running without errors.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Sure, if i ran in problems or issues or questions ill let you know.
[Samsung Galaxy S8 & S8+ Cross Device Development] heukpyo:
I tested the temperature again and there was no problem.

I think there was a problem with the test environment.

Yes, the stock kernel had no problems with sound and freezing.

I think the cell signal doesn't work in this kernel because my cell phone is a domestic model in Korea.

USIM is not recognized in this kernel.

If you install the Korean version of the pure ROM/kernel, the call works well.

The phone model is SM-G950N.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Thanks for the info. According to the last_kmsg you have flashed the correct kernel for 950N KORean version.

Maybe @rtyuakatsuki can help you to make your Korean phone working properly, he has G955N and everything works properly.

As for the sound glitch:

In A2N app set the following settings:

Audio --> PM-QOS-BIG: 1170 MHz / PM-QOS-LIT: 949 MHz

CPU --> voltage for 2314 MHz Step: 1030 mV

voltage for 1690 MHz Step: 1100 mV

GPU --> voltage for 572 MHz Step: 720 mV.

Please test the settings one-by-one and let me know which one solved the sound issue. Reboot is not needed, just apply one setting and start a game.
[Samsung Galaxy S8 & S8+ Cross Device Development] rtyuakatsuki:
Ouh i know this problem the problem is the stock rom from korean version make the imei is unknow try custom rom it but stock custom rom that will running well in my case i have note 8 have same problem N950N

I don't know how that can be happen but there is some major error between kernel and the rom EFS of korean version has diffrent structure but the imei still there because efs of samsung came from hardware but if change it will be changet it forever to revert it before change make backup if your imei lost but you never change something the imei still there
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
What do you think guys, should I update this damn kernel from 4.4.111 @ 4.4.302 to get latest security patches and fixes?
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
I should do it, some Security patches and fixes are always nice
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
@ace2nutzer is this the correct folder structure? or need the gcc folder in the aik linux folder? also in which folder do i need git pull? becus i ran an test build yesterday and remember you say the compile process would be long and not like in seconds completed like when i did.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Looks good. Now you need to download source code, there are also the clean edit build scripts. Just open new terminal in kernel folder and run the git clone cmd, this will download kernel source code.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
@ace2nutzer well i know you dont support kvm on this kernel but tried to add kvm support myself in the kernel for the limbo emulator but with compiling the buildscript it doesnt seem to add the modules or something, also with testing on my phone it doesnt seem to have a /dev/kvm folder afterward.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
I'm not familiar with KVM on Android, so I can't help there.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
well kinda sucks but yea. also sad there is little to none documentation about it for android so yea doesnt help either lmao but yea, i give up then lol. worth a try.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
There are some Android kernels with added kvm support, but you need to find one example for arm64. Then you can cherry-pick the required commits. Also you need probably to know how to fix merge conflicts and build errors.

Btw so did you managed to build the kernel properly without errors on a stock sources from my repo?

build script should run without errors and after you flashed the kernel on your phone if it was properly compiled you should see in phone info software info the kernel compilation date and time from today.

Btw2 someone already added successfully Kali Nerhunter support on this kernel. Note: when cherry-picking commits always start from old to new.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Hmm okay, i will try that when i have time and motivation for it and find out how to cherry pick the commits becus im new to this stuff.

It seems it build a new kernel and maked a flashable zip and runs fine too on my phone, but now you said it it uses the date of latest official release (see screen)

Yea i saw that one coming by a long time ago lol, thought too like a kvm enabled kernel and other stuff but im not sure, but yea i will look into it and if it is useful to pick something out of it.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
This is not your compiled kernel.

You could post the terminal output from the bulld script.

Just copy paste what you get on the screen while you run the scripts clean edit and biild. They should run without errors or your paths are wrong.

That's why I was asking to post the result from the scripts at first.

First build stock a2n kernel and flash to your phone, if this works without problems you can start to edit kernel options, build and flash. Note to save the new kernel configuration keep the name ".config" and go to "OK" this will save your new changes to the g950x_defconfig which you can check later with "git diff".

To revert all changes in source code just run:

git reset --hard

git clean -d -f

git fetch

This will restore to the latest a2n kernel sources.

I think your issue is that you have downloaded the kernel sources in the AIK-Linux folder, just move it out then it's beside AIK-LINUX folder, that's right.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
yea it seemed i had the kernel sources in the aik-linux folder my bad lol, but i make a new build and see if it changes.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
its still doing the same thing and same build date with just stock source. also i cant catch the terminal output when its building becus it switches to repack script afterwards, but it builds without errors
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Ohh right, that's annoying. In fact i had to fix this in the repackimg.sh script in AIK-Linux, basically you only need to search for the "clear" line and remove it, then it'll not wipe all the useful terminal output.

You also need to increase the terminal output or scroll buffer .. just check terminal emulator settings. This is to have the whole compile output to be checked at every compilation for any warnings or errors.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
clean and edit is right.

In build script there are 2 errors that you should fix:

1. Warning: Using cpio 2.13 may result in an unusable repack; downgrade to 2.12 to be safe!

2. multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0)

1. Error i had to fix it as well ... you can downgrade it system-wide... but the better solution is to not mess it up with the system, therefore the better fix is to download the cpio 2.12 and then to make it using only for AIK-Linux. If you don't know how to do that, i can tell you later, as i'm not on my laptop now. For now you can skip.

2. Error is kinda strange as I see it for the first time. Try to search the web for this .. maybe it's a known issue with your used Ubuntu version. They break compatibility for old kernel sources with their latest Ubuntu releases.

I'm using lubuntu 20.04.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
okay, well i tried to fix yyllocc issue yesterday and when it got fixed it got stuck on a other issue so yea. maybe it is becus i use the latest version of ubuntu but i try first with reinstalling to 20.04 and hope it fix all the issues. about cpio issue i look into it and download the 2.12 version and somehow point it to aik-linux
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes it's a good idea to use 20.04, as I can't remember that I had to fix many things. As for cpio, I believe you need to point to your local cpio in some of the AIK-Linux scripts where everywhere cpio binary is called, it's not difficult.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
But honestly i wouldn't give up after seeing the second error. Most of the time they are easy to fix by installing the missing binaries. Or like the first error is a redefinition, so only need to compare both same definitions in the files and if they are same defined you only need to delete one. Indeed around 2 - 5 errors related to the Linux distro itself are pretty normal according to my experiences over the years. Because installing other ubuntu version also takes his time. ;)
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
yea youre true about it lol, im kinda giving up easily and after while i find out mostly what the problem is or how i can solve it lmao. anyways good news, kernel is compiling rn and is taking longer than first :D anyway how long takes it normally to compile?
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Sounds great! Hmm it depends on the CPU .. how fast it's and how many threads it can handle at the same time. I hope you have set the proper amount of build jobs. By default it's 2 because my CPU is just dual core with no hyperthreading. With hyperthreading it would be 4 jobs on a dual core CPU. For me it takes around 13 - 20 min when building from scratch (after running clean.sh). If you have much better CPU, it should take around 5 min.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
yea thats kinda what it took, got it on 4 jobs on a ryzen 5 5600h 12 threads so 6 cores with each 2 threads if i say right and i run lubuntu on vmware so it takes a bit performance away with virtualization lol
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Why you use 4 threads if you can use 12? :D with 12 threads it could finish the build in just 2 or 3 minutes lol.

You can also reduce compilation time and kernel size by disabling drivers which you don't need. E.g. disabling F2FS and NFS, since they are big drivers. So now compiled successful without errors and warnings?
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
i can add 2/3 more threads if i wanted, but above that impacts the performance of vmware becus overhead etc. yea i disabled those 2 drivers but weird thing is since i disabled those and did check the kernel info in setting on phone after flashing it it updated the compile time while i did first a test compile from stock and that one showed compile time from 30 nov 2022. Maybe the same identical kernels somehow?🤷‍♂️
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Hmm that's strange. You should get updated compile time even without changes, because you never compiled the kernel before. After that, if you compile again by only running the build script and you change nothing, then build time will not update and compilation is much faster because the build system recognize that it's not needed to recompile files that didn't change. So it'll only repack ramdisk, DTB and create the zip package, it takes only a few seconds then.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Hmm yes indeed, but yea tech acts sometimes weird so guess its another example like that lol, it works for now till i fup something😂
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Have fun. :)

But keep in mind that's not fail-safe to disable or enable kernel options. You can make it worse and in the worst case you can introduce even random reboots. Anyway, for testing and learning it's not a problem at all, since you can flash R55 to make your phone working normal.

1. Step: compile and flash kernel, passed.

2. Step: edit kernel options, passed?

3. Step would be to edit some source files or to cherry-pick commits.

Last one is the most difficult part. Because you need a lot of know how.

Anyway, cherry-picking commits is not hard, at least if they apply without errors. Hence you need to understand the C language to be able to fix compile errors.

Anyway, at this point you should learn to commit your changes to avoid a mess. Also you will not be able to apply patches without to have a clean kernel tree. That means from time to time it's a good practice to commit your changes.

Check with

git status

About changes in your kernel tree.

To check what you have changed, run

git diff

Lets say defconfig is changed .. then commit your changes like that:

git commit -am "defconfig: disable F2FS"

Note: "-am" or better say the letter "a" will add all the changed files to just one commit. So if there are more that one changed files, you may only want to add only one file to your commit.

In that case do

git add (path to the file)

git commit -m "defconfig: disable F2FS"

And so on ....
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Okay, got it. Now you explain the git stuff, how do you upload it to github to an empty repo on my github or an forked one before doing stuff on the kernel and making commits? Becus i tried it yesterday and it didnt rlly work out😅
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
I'll explain for a forked project.

Post your forked git url.

And post what you get from:

git remote -v
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Alright, i will check tomorrow
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Alright, take your time.

As for the cpio fix:

In AIK-Linux folder, put your cpio_2.12 folder, inside should be bin/cpio.

Then add the following 2 new lines in both unpackimg.sh / repackimg.sh:

#!/bin/bash
# AIK-Linux/repackimg: repack ramdisk and build image
# osm0sis @ xda-developers

CPIO=cpio_2.12
export PATH=$CPIO/bin:$PATH

This will fix the cpio warning.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
sorry for late reaction, didnt have time yesterday to do stuff with kernel. anyways

output from remote -v

ryujin@ryujin-vmware201:~/Samsung_dreamlte_Kernel$ git remote -v

origin https://github.com/ace2nutzer/Samsung_dreamlte_Kernel.git (fetch)

origin https://github.com/ace2nutzer/Samsung_dreamlte_Kernel.git (push)

ryujin@ryujin-vmware201:~/Samsung_dreamlte_Kernel$

my forked repo from your repo

GitHub - Ryujin9610/Samsung_dreamlte_Kernel: Custom Kernel

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

github.com

about the cpio warning and fix, i cant find a 2.12 one with executables only one you can build or install in a tar.gz package. and downgrading with apt doesnt work becus apparently they remove it in the ubuntu 20.04 repos, but yea if the 2.13 cpio doesnt cause issues and only shows a warning im fine with it. also there seems no cpio folder in the aik linux/bin folder.
[Samsung Galaxy S8 & S8+ Cross Device Development] ace2nutzer:
Yes it's only a warning, but that should be an error usually, since that'll produce a broken boot.img, only 2.12 is supported and tested. You can read for information about this cpio 2.12 thing in the AIK-Linux thread.

I've attached a cpio_2.12 zip. Unpack and put it in AIK-Linux folder and add the 2 lines like I said before.

Setup your git repo:

git remote remove origin
git remote add -f origin https://github.com/Ryujin9610/Samsung_dreamlte_Kernel.git
git push --set-upstream origin master

"git branch" = master? if so, then "git push --set-upstream origin master" is right, otherwise edit accordingly.

To push your commits, just run "git push" or "git push -f" if you want to force push your local changes to your online repo even if there are conflicts.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Alright thanks, btw found someone on github made an test kernel with kvm enabled on a s8 exynos 8895 kernel https://github.com/boerck/android_kernel_samsung_universal8895_kvm/commits/master

Could be used to add it in a2n kernel somehow😮

Edit: seems like that one dont add a /dev/kvm folder too, guess u need a compatible rom added with the kvm modules and guess the qemu ones.

Edit2: so far i read it on here linux deploy https://github.com/raspiduino/a6lte-kvm installs the required things to activate kvm, but i'll try tomorrow and test if its the case.
[Samsung Galaxy S8 & S8+ Cross Device Development] Ryujin96:
Yea i thought already something like it wont work with only enabling it with some lines, but i'll try with patching and hope it works but yea like you said, it wil be a time consuming job depending how much commits there are about it. But yea thats how kernel developing works lol. Anyway nice thing to have me busy