yashsingh1/xdaforums huggingface dataset:
[G4 General] kessaras:
well , here we talk about mods and at genesix thread about the kernel, but no big deal :p

this kernel by default it has stock settings. we need to set it afterwards the way we want it ;)
[G4 General] Vipery:
Not really true , stock settings give me 3h SOT. And for me is a lot, even if it isn't, because with stock kernel I make 2,15h. I think my battery is a bit "finished" lol Aicp+Lama+90less works well combined with Greenify, auto brightness 50%. :D

I still not understand how see if script runs well or not. Because little is set to Alucard and BIG to stock governor, all to the same max frequencie. Is this normal?
[G4 General] kessaras:
Yeah. And this is me on stock these days for testing purposes and this is my battery after 27 hours I still have 33 hours remaining. Of course not only with this script but with disabled the useless services and with amplify to block a few wakelocks
[G4 General] Vipery:
I am on AICP(CM14.1 I think), which service do you think I must disable? As I see sometimes GPlay services suck my battery a bit (I have already disabled autosync) but I don't see a huge strange battery drain. Just screen.
[G4 General] kessaras:
"My android tools" is the app name. Install and open it.

search for :

measurement

wearable

those two are definately useless unless you use a android watch.
[G4 General] kessaras:
i need a tester with CM 14.1 using Llama Kernel to test my init.d script. Any of the 3 he likes.

He only has to use it for 3 or 5 days and tell me his opinion on it so that i can improve it more.

( can't change everyday from stock to cm/aosp with my everyday phone , i need it for work too lol )
[G4 General] Vipery:
Send me the less mode. I will try it and let you know if It works better. I flash everyday AICP otas and than again the kernel with your scripts (otas overwrite system files). if it's not a problem I can try it.
[G4 General] in1400:
I can test the 90balanced for you, no Problem!

Send me the file.
[G4 General] kessaras:
download from the op. they are tested now.

follow the op to install and if your rom does not support init.d on boot, emulate init.d with an app.

just don't forget in 3 or 5 days you and everyone to tell me your opinion so i can improve them.

how did it go, what would you like to change, etc.

cm/aosp is set to execute slowly after boot. 2 minutes. just for precaution and do not slow down the boot process.
[G4 General] Vipery:
Here is working well. 3.5h sot that for my standards is good. Never had slow downs, sometimes when Fleksy need to show up take a while. However I don't play games so, can't test it with them I just use Chrome/Messaging app, music player and youtube. And they runs good.

Edit: I forget to mention that I don't use WiFi during tests, I am out and I use only LTE/4G that its ON 24/7 never turned off.
[G4 General] in1400:
Hi Kessaras,

how can I check, that the tweak is really working? Any settings that I can confirm?

I think it's working, but I'm not sure.
[G4 General] kessaras:
adb shell
cat sys/kernel/msm_mpdecision/conf/idle_freq
exit

how much is it ?
[G4 General] in1400:
1344000 is shown

:good:
[G4 General] kessaras:
its all good then :)
[G4 General] in1400:
90balanced seems to work good! :good:

But the init.d script ist working only, if I started it manually in KernelAdiutor / Init.d / long press on the script and than "Execute 90nalanced" an OK.

Emulate init.d set to ON isn't working ...

... but I think it's Kernel related!

Starting the script manually after a reboot works fine! :good:
[G4 General] kessaras:
will check soon. currently im under stock for testing too. im waiting for genesix fix for stock to fully test that its working and then ill be back to cm/aosp
[G4 General] XeniX_Force:
[MENTION=5461026]kessaras[/MENTION]

Can u suggest me which one to use

I play games rarely.

I mostly use Kik and 9gag on my phone. And lots of net browsing. So I am confused if I should use 90less or 90balanced.

Oh and let's say I use either of them and I turn on battery saver will that cause lag?
[G4 General] kessaras:
90 less and if you are on stock based rom only with llama kernel , you must remove all scripts in init.d except the 00*(something)

. llama kernel is not compatible with the already existed scripts from before.
[G4 General] XeniX_Force:
I'm on cm14.1 man didn't u recognize me from the cm thread? :crying:

And what if I turn on battery saving mode with 90 less?
[G4 General] kessaras:
sorry haha, github, editting scripts on pc, updating other phones here (outside pc) , maintaining some other scripts on other phones... i feel smoke coming out of my head :D

not a problem cm14.1 and all cm/aosp based are fully compatible.

only some details must be fixed by genesix to enable init.d support by default.

if init.d isn't working on boot for you automatically now, open kernel adiutor and apply it manually in init.d tab in adiutor ;)
[G4 General] XeniX_Force:
How do I know if the script executed on boot or if I have to manually execute it?
[G4 General] kessaras:
in terminal

adb shell
cat sys/kernel/msm_mpdecision/conf/idle_freq

you should see 1344mB
[G4 General] XeniX_Force:
It says adb not found.
[G4 General] kessaras:
sorry forgot a slash

cat /sys/kernel/msm_mpdecision/conf/idle_freq
[G4 General] XeniX_Force:
Lol when I just execute adb shell it says adb not found.
[G4 General] kessaras:
adb drivers
[G4 General] XeniX_Force:
Oh I need a PC? Ugh

I should've known.

Currently I don't have a pc
[G4 General] kessaras:
lol. terminal in the g4 ?
[G4 General] XeniX_Force:
Yup was doing terminal emulator

Did this
[G4 General] XeniX_Force:
BTW that is a file path right?

Decided to browse it.

There is no msm_mpdecision folder
[G4 General] kessaras:
this is really frustrating. i have h815 and i can't test h811.

from what i see now, h811 system file tree is different from h815 .......

its the same phone with the same kernel but the path is different.

remove the script from init.d its useless. use kernel kernel adiutor for now.

i can make a seperate script for h811 if i had some help from someone to use terminal and ls command and send me the file trees
[G4 General] XeniX_Force:
Care to elaborate please?

I would love to help but I don't understand what u said
[G4 General] kessaras:
oke. thanks. that will be great help to make scripts for all h811 users. ill pm you with details
[G4 General] XeniX_Force:
Sent u the reply. BTW about those services. Which services do I need to stop?
[G4 General] kessaras:
only those that you don't use. we can't disable the same. for example wearable is for android watch or other equipment unknown to me.

what services to disable its something that each one of us has to dig into , learn more and disable
[G4 General] XeniX_Force:
Well I don't have any android watch or gear

Can u tell me which ones u disabled?

And do u need anything else for h811 scripts?
[G4 General] kessaras:
i can share mine, but first

which launcher do you use ? because the default one is disabled in my file and if you use it you will get to bootloop and need to wipe everything
[G4 General] XeniX_Force:
I'm using Nova.
[G4 General] kessaras:
Use this to restore the disabled in my android tools pro app. I'll remove it later. I don't want anyone make any mistake and use it and blame me for going into bootloop haha
[G4 General] kessaras:
[MENTION=5620693]tanveer7652[/MENTION]

so script is fine now that you are on llama kernel ?
[G4 General] XeniX_Force:
Well 90less gave me lag. Too much lag. Gonna try out 90balanced tomorrow and let u know.
[G4 General] kessaras:
ok. but shouldn't give lag. when you have time lets see this together so i can improve it. This time on llama kernel for sure !
[G4 General] XeniX_Force:
I'll reply to thread early in the morning tomorrow
[G4 General] XeniX_Force:
UPDATE: 90less is not causing lag anymore. I had to wipe cache and dalvik cache but that worked. Idk why.

Battery life has increased a lot.
[G4 General] kessaras:
FIX External SD not mounting after reboot

adb shell
su
df

in my case my external sd is named C9FD-1604

mount -o bind /mnt/media_rw /storage/C9FD-1604

reboot to check that it's mounted.

careful you don't mount the external sd inside internal sd, system or data.

Im not responsible if you mount your external sd wrong.
[G4 General] kessaras:
[MENTION=7909585]papsr6[/MENTION] I'll send you later in the evening. Xda now has some error in the messages. Maybe they update or change somthing
[G4 General] kessaras:
Best tweak for more battery life:

Forget Facebook ~ \m/
[G4 General] Minto107:
True. On my GS3 I used Facebook lite and it's much better than regular fb app, otherwise I just greenify this ****ty app and its fine [emoji14]

Wysłane z mojego LG-H815 przy użyciu Tapatalka
[G4 General] wici:
First of all, thanks for this neat idea.

I've taken a look to the 90less script and noticed a few things like "cpufreq" path does not exist for cpu1..5, it's only for cpu0, so these lines don't work:

Using LlamaSweet.R7.1-N.h815.UBER4.9.
[G4 General] kessaras:
Because I only lowered the big CPU that's why. I didn't want to lower the small cpus. If you want lower value for all CPU and the same frequency you can also do that in one only line. Use cpu* instead of 1 2 3 4 5

EDIT:

I believe that this in the screenshot is not cpu0, it's cpu4 and 5, the big ones and for the above reason. Use cpu* in one line for all cpus.
[G4 General] wici:
Actually, what I meant is these paths do NOT exist, so those lines in the script where you set the governors for CPUs 1..3 and max freq for CPUs 4 and 5 are not doing anything.

See:

h815:/ # ls /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
ls: /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor: [B]No such file or directory[/B]
h815:/ # ls /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
ls: /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor: [B]No such file or directory[/B]
...
h815:/ # ls /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
ls: /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq: [B]No such file or directory[/B]
h815:/ # ls /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
ls: /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq: [B]No such file or directory[/B]
[G4 General] kessaras:
those paths are the same on ALL android devices , even on PC linux are the same. how can they be wrong ?

pffff , you could just ask before you say that.

when the cpu is offline they don't exist. they are "hidden" somehow. don't ask me how , i don't know either.

when the cpu comes online , they exist.

test it in adiutor. then go check what is active on boot. you will see the same paths. how ? why ?

i don't know. but they are there.

another way to test it is do fast 2 commands.

set active the cpu1 and then try ls what you did. you will find it there.

But the paths DO exist and they are the same in all linux and android.

EDIT see screenshot.

edit2 , also ls is wrong. its not folder, new screenshot
[G4 General] kessaras:
so my script is flawless. i know what i'm doing ;)

edit:

to explain more. the sleep command i use and set a big timing to rest , is for a reason. the reason is to get the right timing when the cpu is 100% active for sure , else it would fail to set the governor.

another way to avoid waiting for the cpu to be online and get the timing, was to set the cpu active before i set the governor
[G4 General] wici:
That made perfect sense, I guess all CPUs are online on bootup so they're set correctly.

Thanks kessaras!
[G4 General] kessaras:
read above i explain more ;) nope

edit again:

explaining some more.

if i set a cpu online manually it somehow interrupts the hotplug. of course the hotplug when we do something, an action , even if we only turn screen on and off, it works again. But i don't want any problems. So the best deal for me was to get the timing right.

Do this test since you love this and you are researching it.

~ don't touch the phone ~

Do

echo 1 > /sys/devices/system/cpu/cpu2/online

and immidiately

cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

you will see alucard.

still don't touch the phone. don't even go close to the sensor and wait as much time you want and do again

cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

cpu is still active and hotplug isn't working.

Now touch the screen , turn it on and do again

cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

path missing. cpu is offline again and hotplug is working.
[G4 General] wici:
I also noticed cpu[1..3]/cpufreq are just symlinks to cpu0/cpufreq so they don't need to be set.

Same for cpu5/cpufreq, it's a symlink to cpu4/cpufreq.

I just noticed two typos:

#Kernel Tweaks
chmod 666 > sys/module/lowmemorykiller/parameters/minfree
chown root > sys/module/lowmemorykiller/parameters/minfree
...

should be (no ">" in these commands):

#Kernel Tweaks
chmod 666 /sys/module/lowmemorykiller/parameters/minfree
chown root /sys/module/lowmemorykiller/parameters/minfree
...
[G4 General] kessaras:
will check the symlink. thanks i didn't notice the > there.

EDIT: not symlink.

just the hotplug takes the value from cpu0 to write cpu1,2,3

and cpu4 to write cpu5.

but you just helped me realise something to make the script better.
[G4 General] kessaras:
This is the best i can do from my side. Now to get even better results, it's all on genesix.

If anyone needs help to change anything, to add or to remove from those customisations, feel free to ask.
[G4 General] kessaras:
[MENTION=7514965]jskasia[/MENTION] read post #4 again.
[G4 General] jskasia:
Thanks mate. I knew that. Actually, I successfully patched my rom with your settings (partially).

However, it shown negative results. I meant the system consumed lots more energy. At that point, I could not manage to turn things up, therefore, I reversed back to stock.

--------

Besed on qcom_postboost.sh, I am currently trying to underclock the cpu and find the optimal value between power and performance. Do you have any clue on this ?
[G4 General] kessaras:
hmmm. i took a look at it now.

hotplug in stock is at the same file path ? /sys/module/msm_thermal/core_control/ ?

edit: sorry that was the thermal monitor.

path to hotplug : sys/kernel/msm_mpdecision/ ?

~EDIT_2: nvm i just saw it. its totally different. i haven't seen it how it operates, i was always on custom and llama since i got the phone... sorry.
[G4 General] jskasia:
Sorry mate, for the locked device, we currently able to modify only /system partition and unable to touch others. As far as I know the kernel audio app simply put the settings on post boost script.

My idea is to find the correct underclock script (just like which of kernel auditor) and put them on the post boost script. The problem are:

1. We don't have root. And we cannot generate the command ourself.

2. We don't know exactly the right settings which are optimal. All I can think of is hit and miss approach. Or just copy the settings which worked already from the existing rom of unlocked devices
[G4 General] kessaras:
this is the only thing that works without root. maybe even if decompile kdz make changes and compile it to kdz to flash it back.

what a pain.....
[G4 General] jskasia:
SAD but true, this is the way we build things up a custom rom without root nor recovery. See my posts https://xdaforums.com/g4/themes-apps/theme-t3466595
[G4 General] kessaras:
when a phone has issues, even the simplest parts of developing have issues.

cm/aosp/lineage tweaks are fine.

stock ones somethimes don't fully execute on boot. i'm really wondering if i should suggest in op for stock based users to always use kernel adiutor or not.

it's really giving me a headache every time i go to stock for testing new ideas to add in the script.....
[G4 General] kessaras:
22-Jan-2017

Since soon i'll be leaving this device too, for many reasons (main reason is LG mistakes)

i want to give you the option to select , choose, vote, tell me your opinions, your likings too so that i can edit these scripts or even add more scripts that you will all use for the rest of your time with LG g4.

Take you time, think of what you want me to change or add and tell me, here or in private message, doesn't matter where.
[G4 General] dextructor:
Sorry to hear that, but the G4 made my wife very happy too. Until now the only issue it's the overheating with MM stock or custom ROM's beside it. Good luck with your new device ;)
[G4 General] kessaras:
live debloat script for LG-G4 , for stock based roms
[G4 General] genesixxbf3:
New kernel Available !!

Nougat only

Changelog :

- security update (Feb)

- Fiops

- Blu Active

- enforcing

I uploaded them to AFH as my server bandwidth is limited

h815: https://www.androidfilehost.com/?fid=673368273298930064

h811: https://www.androidfilehost.com/?fid=745425885120706875
[G4 General] steadfasterX:
Any chance to get it for MM too?
[G4 General] genesixxbf3:
no MM is depecrated by now
[G4 General] kessaras:
i had a small miscalculation that decreased stability.

i had set 1 and later 2 minimum cores always online with screen ON. That was a mistake.

It's impossible to always have a load lower than 60% with only 2 cores online with screen on. That was causing the hotplug to set CPU online-offline every other second which caused a small decrease to stability. From now on we have 3 cores minimum online with screen ON.
[G4 General] kessaras:
15/02/2017

changed back to cfq scheduler.

Added cfq scheduler tweaks;

This time LG G4 executes and multitask faster even with a very low cpu profile.

(you will notice a big difference when opening-closing apps and when apps load tasks. A noticable easy example is at settings -> apps. We used to wait a couple of seconds, now we don't wait any more)

~EDIT: i also recommend my new cfq tweaks on your linux. I'm testing them since a week and i have a great difference in speed
[G4 General] joaste:
[MENTION=5461026]kessaras[/MENTION]

I'm back on crdroid from imperium, and installed the latest llama kernel and your script (which I had used before on both stock and CM 14 based ROMS).

The strange thing is after boot, some parameters do not seem to be applied, like cfq as i/o scheduler, min 3 cores online, etc. However, it seems that some things are being applied such as turning on the mpdecision hotplug (which funnily enough I could not get to work with just crdroid and llama using Kernal Adiutor - only the first hotplug would work) .

Any ideas? I'm a bit stumped on this one :confused:

Any help would be much appreciated!

thanks
[G4 General] kessaras:
Will check it within two days. I haven't updated my rom since a month. I'll update and check.
[G4 General] kessaras:
[MENTION=4254898]joaste[/MENTION]

i'm on cr 2.2 and llama right now and everything applies successfully. i don't see any problem here. something else you did wrong.

since i updated i'll stay with this rom a couple of days so we will find the problem.

What i did:

lineage 13 (old)

twrp > nandroid backup (so i can restore later)

advance wipe > system , data, cache , dalvik-cache

reboot to twrp

flash rom , kernel > reboot

~waiting~ > enabling su from settings and push script in init.d

installing a simplified busybox , because crdroid doesn't have it installed

reboot to twrp

flash aroma gapps , i prefer it because it debloats the rom at the same time > reboot

done
[G4 General] tachiquan3:
Does anyone here knows how to online 2 little cores and 2 big cores only?
[G4 General] kessaras:
you can't.

That's something decided by the drivers for the CPU coming from LG.

The big cores get online when the small cores have a x% load or bigger and then they automatically get offline again.

Also if we don't use the hotplug, the same thing happens.

The big cores get a load when the small cores have a x% load or bigger.

So basically small cores do everything and the big ones get to do only the "very hard work".

~EDIT: your reason is what ? why do you want to turn the phone into a quad core ?

The only way is to turn it into a dual core and the big ones will come online/offline depended to the load. That will cause you huge lag and the phone will be super slow.

I can make a script for you if you really wanna turn it into a dual core

i checked it now, it can only be dual core with only 1 big core always on. not 2.

If you want something like that, tell me.
[G4 General] tachiquan3:
Thanks for the fast reply. Yea youre right, big cores doesnt really care about little's load. What i did was i made a script to online 3 little cores and 1 big core only if needed. ?
[G4 General] kessaras:
Yup that works. Also 2 + 1 is possible.
[G4 General] tachiquan3:
Naah 2 cores lags. Anyway thanks i made a script for gpu and adreno idler. Now i wont use kernel manager apps hehe. ?
[G4 General] joaste:
Thanks. I didn't install busybox. Could that be the issue?

Will try again when I get à chance.
[G4 General] MaxFluteHD:
This Picture on the end of your post, where did you get this information?
[G4 General] kessaras:
Logcat.

But instead using just logcat and then trying to adjust my eyes to find what I need, I used

adb logcat > logcat.txt

Or if I didn't have A PC, from the phone terminal:

logcat > /sdcard/logcat.txt

Then I open the txt file and I easy search and find what I need
[G4 General] joaste:
Well I just tried again with RR.

Same thing happens. CFQ does not get applied. Hotplugging does though.

Edit: Westwood is not being set either

Edit2: just tried 90less - alucard and hotplugging are set, but not the I/o scheduler and its parameters. Westwood is not set either.
[G4 General] kessaras:
H811 or H815 and which rom build and which llama are you flashing?

Init.d did have issues but on an older build and I think genesix fixed that on his last build.

Also when you moved from imperium to aosp did you wipe system and data?

There isn't much I can do, I don't know exactly what you are doing wrong.

The file paths in the script are 100% correct, all of them. If you execute it in adiutor (remove the sleep timer that waits for the rom to boot first) , you will see that everything applies.

So either there is another script in init.d that interfere with this script, either you didn't wipe before flashing rom and kernel and gapps , either you flashed older kernel build. Only those 3. Nothing else comes to my mind.
[G4 General] joaste:
Sorry for that.

H815

RR -09-02-2017 build (by tylerdurden)

Llama R7.2N from 09-02-2017

I just tried executing the script through KA init.d emulator and that works. However again, most things do not apply on boot, even with KA. I need to run the script manually through KA.

There are only the 90userinit and 00banner scripts in the init.d folder, in addition to the 90less script.

I'll update the RR build now to the latest (19-02-2017).

Thanks for you help!
[G4 General] kessaras:
ok thats wierd. do in terminal

adb shell
su
. ./system/etc/init.d/90less

and gimme the result please.

~EDIT: download now my latest and test it. it hasn't any change as far as your problem, it has other fixes.
[G4 General] joaste:
I'll have to try this later as I'm at work now.

Was also going to try switching to the RR build from genesix but will do your thing first when I get a chance.

Stay tuned!

Thanks again!
[G4 General] kessaras:
This information is for everyone.

With the new systemless root method we can install our scripts, including this one of course, in /system/su.d.

This has an advantage.

The 90balanced script here will work for the stock lineage or stock MM LG kernel. Ok some tweaks will be missing, like the westwood tcp algorithm and a few more, but you will still gain a slim better battery life and performance. Have fun.
[G4 General] joaste:
Thanks kessaras.

I'm now on AICP with Llama. Putting the 90balanced script in the normal init.d folder works fine but putting it in the su.d folder under /system does not work for me.
[G4 General] tachiquan3:
Nice
[G4 General] marn3us:
Hi [MENTION=5461026]kessaras[/MENTION], thanks for your work!

I have a quick question: my AOSP-based rom already has a script called "90userinit" in the init.d folder, is it still ok to use your scripts?
[G4 General] kessaras:
yeap. 90userinit is from superuser