yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] benschhold:
Hey [MENTION=4231562]Yoinx[/MENTION]

I want to get rid of a bug in kerneladiutor and doesnt know any further

Optimized ARM64 governors tunables are stored for small cluster in CPU0/cpufreq, and big cluster CPU4/cpufreq

Not optimized govornor tuneables are stored are in the normal path CPU/cpufreq

Kernel adiutor is checking if the device is multicluster and sets it path to cpu0 or cpu4 cause its arm64

so we can only configure optimized governors tuneables and the others are not configurable

i already tried some things but they all endet in that i only can configure normal or optimized governor, never both...

thats the line which switches pathes:

public String getPath() {
return getPath(CPU.isBigLITTLE() ? String.format(CPU_GOVERNOR_TUNABLES_CORE, cpuFragment.core) :
CPU_GOVERNOR_TUNABLES, CPU.getCurGovernor(cpuFragment.core, true));
}

maybe you know a fix that it checks both pathes if one is " " or something

thanks

Ben
[Android Apps and Games] :
I'm not 100% what you mean. But what that's currently doing is checking if CPU.isBigLITTLE(), and you get one of two strings returned.

cpuFragment.core is a variable holding the core number (0-7 in this case).

CPU_GOVERNOR_TUNABLES_CORE is a constant with a %d substitute.

so what you end up with is the path for the constant substituted with the core number. IE: /blah/cpu%d/blah becomes /blah/cpuX/blah.

The easiest way to fix that for what I think you're asking would probably be to rewrite that function to something along the lines of

public String getPath() {
if (CPU.isBigLITTLE()) {
String path = String.format(CPU_GOVERNOR_TUNABLES_CORE, cpuFragment.core);
if (Utils.existsfile(path)) {
return path
}
else {
return String.format(CPU_GOVERNOR_TUNABLES_CORE, 0);
}
else {
path = CPU_GOVERNOR_TUNABLES, CPU.getCurGovernor(cpuFragment.core, true);
if (Utils.existsfile(path)) {
return path
}
else {
return CPU_GOVERNOR_TUNABLES, CPU.getCurGovernor(4, true);
}
}
return "";
}

Sorry for the pseudo code, but as I've stated I have limited connectivity.

This may need some changes for syntax and such. As well as changing

if (Utils.existsfile(path)) {

to

if (Utils.existsfile(path) && !Utils.readfile(path).isempty) {

if the file exists but is an empty file.

The other issue is that this will be called for each core, even though it's only read the 2 strings. It may be better to fix the loop that is that calling that function to simply run on core 0 and 4. IE: Change the loop something like

for (I = 0; i < 4; i +=4) {

However, that will break portability for other devices.
[Android Apps and Games] str8str:
Glad to see you back
[Android Apps and Games] hecksagon:
Can somebody explain how the wakelock sliders work? I have a 0-100 slider for msm-hsic and wlan-rx and a 0-8 slider for BCMDHD. Do these increase and decrease the incidence or the duration? Which direction on each scale do you move them?
[Android Apps and Games] benschhold:
thank you for your answer

big little check should be completly turned off cause it will always result in true and set my patchs do cpu"/core/" but i want it to check for governor tunables at cpu"/core/"/cpufreq and in cpu/cpufreq

so i can configure governors in both pathes

i now this is bit tricky, i also thought to make a symlink in kernel sys but if we would fix it in kernel adiutor we would fix it for every arm64 device

current situation: governors stored in :

cpu"core"/cpufreq (configurable)

cpu/cpufreq (not configuralbe) :(

i hope you understand what i want to say
[Android Apps and Games] Daandofreak:
Download link is not working.
[Android Apps and Games] anttaz:
May I say what an awesome mod this is and how well it is working many extra features than original Kernel Auditor app

Working Flawlessly on My HTC One M8
[Android Apps and Games] :
Not really. The app is intended to let people configure things. Why would you need to check in a location that only stores values that can't be configured? I'm assuming that your paths work like my 4 core paths... cpu/cpufreq affects all cores at the same time while cpuX/cpufreq affects only that one core. I had done this with a per-core control toggle so that you only check cpu/cpufreq when the toggle is disabled and switch to cpuX/cpufreq while the toggle is enabled.

Maybe I misunderstand what the isBigLittle check does, since I don't have a BigLittle device... its never really mattered to me. Is this something that's only broken on arm64 biglittle devices or all biglittle devices?

Is there somewhere in the sysfs to identify the device as arm64? I can't imagine that there wouldn't be, I just don't have the time to dig through the sysfs right now to try and figure one out... Plus, I don't have an arm64 device.
[Android Apps and Games] DSDONE:
What is the difference between this modded kernel auditor and the one in the play store?
[Android Apps and Games] nathanchance:
Did you even read the OP?
[Android Apps and Games] DSDONE:
Let me re read it
[Android Apps and Games] :
Perfect example of how to get added to an ignore list right there.
[Android Apps and Games] apophis9283:
Yoinx i updated MSM_LIMITER and now it wont work with KA-MOD. I know you are tied up at the moment and your internet situation, for future reference its the last commit

https://github.com/neobuddy89/shamu/commit/a20d80a4fc2d85efac4eb00b24c30eecbb20c1df

Looks like its the previous limiter commit as it states

limiter_enabled is now renamed to freq_control since this parameter

only affects frequency related parameters and not parameters like

scaling_governor, mpd_enabled, live_max_freq, etc.
[Android Apps and Games] :
Yeah, I've already been made aware...

That'll happen when something comes out after the last update for something else.
[Android Apps and Games] DSDONE:
My apologies
[Android Apps and Games] Hung0702:
Hi [MENTION=4231562]Yoinx[/MENTION] Firstly I want to thank you for the great work you've done for the community. You've made a good app into a great one, and it's the only app I use. I bought Trickster and EX Kernel Manager, but neither compare to the comprehensiveness and ease of KA-mod.

Anyway, I've run into the problem quoted above. flar2 suggested that the issue may lie with KA-mod and its interaction with EX kernel. Using the EX Kernel Manager app, I am able to reliably disable gboost, but for some reason KA-mod does not. I can verify that the files in those paths are set to '0' and '300000' but it appears that gboost is still enabled.

If it's not a problem with KA-mod, would you mind perusing the github linked in the quote for a possible solution? I wouldn't mind disabling gboost altogether.

I understand you're busy dealing with all the other kernels and I'm sure you've got personal/professional obligations as well. I'd appreciate any direction you could give.
[Android Apps and Games] apophis9283:
TBH Yoinx updating MSM_LIMITER might be a bad idea. He completely flipped the script.
[Android Apps and Games] :
I would probably dig through the sysfs paths a bit. Backup/uninstall KA-Mod completely if you think it's causing an issue. Look at the files in the path /sys/devices/system/cpu/cpufreq/elementalx/ (I think I put shell script to loop through all the files in the directory and cat them with the names somewhere in the thread). Do this with the default settings, then again after disabling the feature in the EX Kernel Manager app. See what's different. It's possible that it needs more values changed, though looking at the driver you linked I don't see anything in the code... It looks like echoing 0 to that value *should* disable it.

Also, what makes it "appear that gboost is still enabled" ? Is frequency stuck? Is a toggle not toggled right?

I would need to parse the version in the sysfs path to be able to generate the msm_limiter stuff in the app. It's going to take quite a bit of work and time that I simply do not have right now. When I get home I may put time into it, but as it was it took a few hours a day for a week or two to get that all worked out. I *barely* have any personal time currently.... It definitely isn't going toward coding... It's going toward not failing classes.

Let's face it though... KA has been around for awhile and so has MSM_Limiter... so far, as far as I know, this mod is the only one that really added support while maintaining support for a wide range of devices. It may take me a month or two before I get time to add support, but it'll happen eventually.

What do you mean "flipped the script" though?
[Android Apps and Games] apophis9283:
The way he deviated from what he has done in the past.
[Android Apps and Games] LupineDream:
If I may chime in here, yes a constant value for a non constant thing like the number of cores here would fail out on non quad core devices. Suggested: a numCores function that reads how many of the dirs in that directory, there's your value for the loop

2 and 4 core phones:

for (I =0; I<numCores(); I+=numCores())

But on a 2 core phone that uses both cores up so instead use a while loop to be sure subcode executes first with increnentor at bottom of loop:

short int I=0

do {

// code

I +=numCores()

} while (I <numCores)

Its either 2, 4, or 8, though.

Code acts on one core in the case of 2 or two cores in the case of 4 and 8.

If you're setting a divider though, you can configure this to work with as many cores as you'd like....

---------- Post added at 03:52 PM ---------- Previous post was at 03:50 PM ----------

I replied way too late on that. [emoji14]
[Android Apps and Games] :
I'm guessing that you replied to an earlier post, then saw the rest of the thread :p

Yeah, there's already a function that returns the number of cores, it's used heavily in the CPU fragment and associated functions.

The issue, is that I believe that there are 8 core variants that are ARM (32) as well as ARM64. If there's not, I suppose that would make things a little easier I guess.

As I don't have a big/little (8 core) device I can't really test any code or check any sysfs devices for them. *Maybe* I can setup a virtual device. However, I can't even try to do that during my deployment as I don't have dirty internet access. The main thing here is that big/little arm devices I haven't seen report an issue. The poster made it seem that this problem is purely with big/little arm64 devices.

As for your code, you're right. However, it's not something that needs to be done for 2/4 core devices. It's purely where the big/little clusters are reading from. The poster made it sound like core 0-3 read's from core 0's values while 4-7 read from core 4's values.
[Android Apps and Games] LupineDream:
Is he taking into account arm64 is most definitely not 32 bits wide when in 64 bit addressing mode? I wish I had the code in front of me too. I could fix this. Seems like cluster address access location is different for big/little vatiants. Hopefully that's standard or you'd have to set configurable constants at compile time for processor variants (snapdragon, etc. )

0-3 accessing a 64 bit wide address seems relevant That is if each folder is allocated a WORD (16 bits) wide in err. Remember with big / little they are endian. (Reverse addressing) so $0000000000000000 points to core 0 obviously, but $000000000000FFFF in endian is really read as $FFFF000000000000 if its not pushed in reverse which is why the other four folders read core 4 instead.

You need check endian architecture AND 32/64 as on a 64 bit endian addressing mode reversing the bits will give you core 4 instead of core 2 because you didn't consider reversing the whole 64 bit wide address.

It sounds like a problem with cluster address calculation .do a bit reversal on your final address calculation result and there should be no difference in folder 0 but folder 4 should then start to read at core 2 hopefully.

Endian is done with addressing clusters backwards but bit writing forwards I do believe...check endian big/little documentation to be sure of this. But I do believe OP has a routine running on an endian 64 bit processor.

1st QWORD (left to right as we read as humans) addresses:

$FFFF000000000000 core 8

$0000FFFF00000000 core 7

$00000000FFFF0000 core 6

$000000000000FFFF core 5

Bottom QWORD

$FFFF000000000000 core 4

$0000FFFF00000000 core 3

$00000000FFFF0000 core 2

$000000000000FFFF core 1

I used FFFF as the top of the core. Not the bottom, for easy reading purposes.

---------- Post added at 06:06 PM ---------- Previous post was at 06:01 PM ----------

I also forgot to mention is there a bit in a register to read at an address somewhere which determines what state the processor may he currently in? (32/64bit addressing mode) then the subroutine can address automatically at run time.
[Android Apps and Games] :
I think you may be thinking a little too in depth for what is being done. Here is the way that Grarak setup KA to get the core count.

https://github.com/yoinx/kernel_adi...arak/kerneladiutor/utils/kernel/CPU.java#L740

The code to detect whether it's big/little is just above that (basically it's just checking to see if there's more than 4 cores)
[Android Apps and Games] LupineDream:
So sorry, I'm an assembler programmer... I have a tendency to think very low level. :p

So its fixed then? I don't have the compiler or the device but I do have an i7 with 32 GB RAM if you would LIKE me to troubleshoot. Just offering...

return cores == 0 ? cores = Runtime.getRuntime().availableProcessors() : cores;

Thats an always-true expression...cores is always going to equal zero because its only defined in the true clause.

cores = Runtime.getRuntime().availableProcessors();

You also didn't take into account function scope, you're trying to get LITTLEcore and BigCore out of the scope of your function, so I modified a few things.

Try this:

Replace at line 709

public static byte getLITTLEcore() {
byte coreResult = isBigLITTLEinternal();
return (coreResult & 0b00001111);
}

public static byte getBigCore() {
byte coreResult = isBigLITTLEinternal();
return ((coreResult & 0b11110000) >> 4);
}

// Result either contains location of bigger core in a byte (upper register = bigger core, lower register = smaller core)
// or zero, meaning no big/little CPU.
public static byte isBigLITTLEinternal() {
if (getCoreCount() > 4) {
List<Integer> cpu0Freqs = getFreqs(0);
List<Integer> cpu4Freqs = getFreqs(4);
if (cpu0Freqs.size() > cpu4Freqs.size()) {
bigCore = 0;
LITTLEcore = 4;
return (LITTLEcore + (bigCore << 4));
} else if (cpu0freqs.size() < cpu4freqs.size()) {
bigCore = 4;
LITTLEcore = 0;
return (LITTLEcore + (bigCore << 4));
} else {
return 0;
}
} else {
return 0;
}
}

// Returns true if one core is larger than the other.
public static boolean isBigLITTLE() {
return isBigLITTLEinternal() != 0 ? -1 : 0
}

public static int getCoreCount() {
cores = Runtime.getRuntime().availableProcessors();
return cores;
}

Correct my syntax errors (if any). Now simply do this:

Pseudo-code

if (isBigLITTLE()) {
do big little oct core things with your larger/smaller core by calling getLITTLEcore() and getBigCore()
} else {
cores = GetCoreCount();
switch (cores) {
case is < 4:
// normal dual core do things here
continue;
case is = 4:
// normal quad core do things here
continue;
case else:
// normal 8 non big-little core things here.
continue;
}
}

I'm fond of iron-clad code. That means what ever the heck you throw at it you're good. Its especially helpful cross platform where you don't know what kind of CPU you're dealing with. That way you can drop this code into a library anywhere and it will work regardless. When you are coding cross platform a good rule of thumb is never use a constant on something that could potentially be different.

This code only tests for a big little oct core in the case of OP's concern, however. The routine to test all variants isn't needed if you intend a specific set of devices to develop for. I understand your concerns about big/little cores, so I just provided a fix for them in that case. I hope that helps at least.
[Android Apps and Games] :
No by all means, I appreciate the info.

That wasn't actually my code, that was all from Grarak's original coding. As I've stated though, I haven't actually had much time to put any work into this project and probably wont for another month or so.

When I do, I'll start investigating everything more.

As to the code. I believe that it was written that way so that cores would always be 0 if the Runtime command failed. IE: prevent a potential null pointer crash if the app couldn't get the number of cores. Since it would either return 0 or the number cores, the app could still create the dynamic layouts needed for anything relying on a core count (0 would just break the loops and just not generate anything).

The issue though isn't developing something that works for big/little devices specifically, it's developing for them while not breaking others.

It looks like what you did would work regardless of 32/64 bit devices though. It should be pretty trivial to only enact the big/little code in cases of more than 4 cores.

Thanks for the info/help.
[Android Apps and Games] LupineDream:
No problem. :) I drop in like a ghost like that to try and asisst where I can. ...and yes that was the idea, to get it working fully cross-platform regardless of 32/64 bit. That makes sense about the null pointer. I hadn't considered that an API may/may not contain the getAvailableProcessors() routine, or that some dum dum is trying to run it on a device that isn't rooted properly.

Sad to see you won't be working on this for a while. I'm like that too, I get to a project and then life happens.

Glad I could be of asisstance. Punch me out a PM if you need something down the line. :)
[Android Apps and Games] KC69:
Awesome app. Thanks Yoinx. Only question I have is after I've installed it, granted SuperSU, set it up, reboot, all changes applied. If I want to change something I hit the app icon in app drawer, it opens to the blue page with spinning gear, it says waiting for root. Never opens back up. Unless I have the play store version installed also. Weird. I'm sure I'm doing sumpin wrong. Any suggestions?
[Android Apps and Games] :
Shouldn't happen even with the playstore version installed alongside as I use a different package name.

Sounds like something wrong with the way that root was granted for it.
[Android Apps and Games] David 617:
Just to chime in here (as a Java/Android developer), I think that `core count` code is correct.

It is saying,

If cores equals 0 (ie the cores variable has not been initialized yet) then set `cores` to the amount of cores and return it. Other wise (`:`) return `cores`

So `cores == 0` will be true the first time this block runs, but false afterwards.
[Android Apps and Games] LupineDream:
Leave it to the experts. Thanks Dave Yoinx was a biiiit more considerate about it, though. Thanks, Yoinx. Im off.
[Android Apps and Games] Daandofreak:
Are you planning to include hotplug made by render broken (in his new build r3)?
[Android Apps and Games] David 617:
I meant no disrespect to you. You didn't need to respond like that.

Yoinx and I have been working together on this.
[Android Apps and Games] countryfolk07:
It really didn't seem disrespectful to me. You were just sharing your ideas. Wow. ?
[Android Apps and Games] apophis9283:
Yoinx prefers a relaxed enviroment. Lets just be thankful for the gift hes given us
[Android Apps and Games] LupineDream:
I spoke to Yoinx about it. Sorry that I misinterpreted. You know with text, you can't see the smirk behind a playful jive. No worries. Everything is fine.

I understand the views on emoji around here some people like using them some don't. I'm a big fan. ??

---------- Post added at 01:45 PM ---------- Previous post was at 01:44 PM ----------

I'd also like to add thanks for helping Yoinx out, Dave. I appreciate anyone willing to help with the project since its a stellar mod.
[Android Apps and Games] Chikko:
Trying to download the latest releas, but i alway have: data package error. Someone can help me?

Inviato dal mio A0001 utilizzando Tapatalk
[Android Apps and Games] apophis9283:
Try a different browser.
[Android Apps and Games] apophis9283:
Im actually working on getting the new limiter working with KA. Im in the file right now and neobuddy gave me the info i need.
[Android Apps and Games] wrongway213:
This right here - this is what a man does when he is in the wrong. I appreciate seeing posters on here willing to apologize and such when things like this happen - thanks for taking the time out to get the energy in the thread moving back positive :good:
[Android Apps and Games] okitavera:
Wow This App is AWESOME!!!

KCAL Profile, MSM Limiter, UKSM, and Many More.

Best Kernel Tweaker Ever!

- - - - -

Wakelock Section is Not Automatically Hiding When Kernel is Not Supported.
[Android Apps and Games] apophis9283:
So Ive learned this. All of MSM_LIMITERS options still fall under /sys/kernel/msm_limiter/

Only Limiter_Enabled needs to be changed to Freq_Control.

So going through and trying to correct it so the later versions of MSM_LIMITER arent broken.
[Android Apps and Games] Chikko:
Done but nothing is changed. Always the same error. Downloaded by pc and smartphone.

Inviato dal mio A0001 utilizzando Tapatalk
[Android Apps and Games] jamescable:
Android Version

Most if the time, that error means your current Android version doesn't recognize it as a app....meaning, you downloaded an app meant for a newer Android version and your not up to date
[Android Apps and Games] Chikko:
I solved with a clean flash of the rom!

Inviato dal mio A0001 utilizzando Tapatalk

---------- Post added at 05:31 PM ---------- Previous post was at 05:31 PM ----------

I solved with a clean flash of the rom! The file is ok.

Inviato dal mio A0001 utilizzando Tapatalk
[Android Apps and Games] Bryan Ong Manalili:
Nice one.. Thank you so much
[Android Apps and Games] Daandofreak:
May I ask when are u releasing new version of kernel adiutor mod where new hotplug state helper is also tweakable?
[Android Apps and Games] :
When it's released, the OP would be updated and the app will notify you that there's an update.

On a separate note, it's still not acceptable to ask for ETA's on XDA.

Want an ETA? Download the source, work on adding the feature. You'll have a constant ETA and have no reason to post asking for one.
[Android Apps and Games] BatDroid:
A good app from a great dev..But a problem..

Device : Gts5282

(on signature)

CANT SET THE SET ON BOOT OPTION.

I mean, I can set it,but after reboot, goes back to first state.

:)

a solution..

---------- Post added at 01:45 PM ---------- Previous post was at 01:43 PM ----------

When he will have time,dude.

Asking about Estimated Time Of Arrival isn't allowed in xda.

Devs has private concerns.

They have friends and family too.
[Android Apps and Games] :
For any section? For a specific section? Do the commands show in the "startup commands list" on the left? Are you sure that you don't have any conflicting things trying to set them? Ie: other apps set on startup, init.d scripts, ramdisk init settings, etc?

Try increasing the apply on boot delay and see if that helps. It may be that your particular rom is giving the boot complete intent too late or too early.
[Android Apps and Games] BatDroid:
Thanks sir.

I increased the delay and it worked.

My kernel takes a while to load cpu freq driver.
[Android Apps and Games] Thunderbolt69:
Strange, the app won't install on Bliss ROM, v6.3 4/20/16 build. It installed on previous versions of the ROM. Think it will work if just push it to system as a system app?
[Android Apps and Games] marcdw:
That is strange. Do you have Unknown Sources turned on (under Security I think)?

LG G3 D851, PAC-MAN ROM, Tapatalk 4.9.5
[Android Apps and Games] :
no major bug just build. prop not working since this app was born here
[Android Apps and Games] Redhexa:
can i keep use kernel audiutor from play store?....because i look on OP any reason like this

apologize if any word goes wrong.....
[Android Apps and Games] rignfool:
Yes