How to downclock the CPU of J320F to save power ? - Samsung Galaxy J3 (2016) Questions & Answers

Hello everyone , i have installed the RR ROM on J320F ! and i would like to limit CPU frequency to save power .
I tried several apps but none of them worked .. the system keeps changing the settings back.
Is there a way to do that ?
Thank a lot

With the latest version you can choose the low power mode to set the maximum at 1350MHz ... it's a first try so I'm not sure of all.

djeman said:
With the latest version you can choose the low power mode to set the maximum at 1350MHz ... it's a first try so I'm not sure of all.
Click to expand...
Click to collapse
Thanks for your reply Djeman.
Yeah i know that..But i would like to reduce it more.. 900 Mhz for example?! can I ?!
is there a way to change the whole cpu government?!

Change all nope, it's only interactive for now.
And all settings for the interactive mode are here => https://github.com/djeman/android_d...cm-14.1/rootdir/etc/init.j3xnlte_base.rc#L138
"hispeed_freq" is the value set in low power mode => https://github.com/djeman/android_v...en-source/libs/power/power_interactive.c#L218
You can set 900MHz, it's one of the 4 values defined for the cpu => https://github.com/djeman/android_d...s/base/core/res/res/xml/power_profile.xml#L20

I'm talking about the max frequency I don't know why but i can't set it to a values other than 1500 or 1350Mhz.. i can change the hi_freq to whatever i want but the the max frequency no ! so the cpu most of the time goes above that limit (hi_freq).

Because the max frequency do not changes, it's always 1500.
We have a scaling on 5 values and cpu hotplug to disable cores.
The value you can set is the scaling max frequency.
Available frequencies are here:
Code:
j3xnlte:/ # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
1500000 1350000 1200000 900000 768000
You can set the maximum here:
Code:
j3xnlte:/ # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1500000
In low power I set it with the driver at 1350 (hispeed_freq value):
Code:
j3xnlte:/ # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1350000

Really sorry Djeman !! .. but i could not change it !!
Every time i change it with rootbrowser it change back to the original value
I tried TRWP Terminal but /sys partition seems to be Read-only i don't know !
same thing with adb shell !

I need to enhance my power driver ^^
With a new power mode between low and balanced profil and better profiles.
I found some examples in others projects => https://git.sphere.ly/dtc/device_motorola_msm8226-common/blob/m-dtc/power/power.h
But to enhance it I need to understand all parameters :x

You will find everything here if you want :
https://forum.xda-developers.com/galaxy-s2/general/ref-kernel-governors-modules-o-t1369817
You are right , it's a heavy task to tweak governor ! Especially if you cannot find any documentation online .
I had headache trying to modify system files.
There's some running services that restore defaults values everytime i edit them.
I'm giving up ??

Solved
Heyy @djeman , i have finally succeeded in setting up the frequency limit .
there is another file that should be modified simultaneously with "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" .. this one :
/sys/power/cpufreq_max_limit
But apparently,you should first set the min frequency then the maximum otherwise the cpu will be locked in a single frequency.
I don't really know how and why ... but this works for me!
Here is my settings :
Code:
echo "768000" > /sys/power/cpufreq_min_limit
echo "768000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "900000" > /sys/power/cpufreq_max_limit
echo "900000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "900000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
The CPU freq now is oscillating between 768 and 900 MHz cos the hispeed_freq and max are the same.
it is on 768 and on Demand ( 85 % loaded indicated here /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads ) they scale up to 900Mhz.
I don't need 1500 Mhz .. I'm not running 3D games here or whatever
Hope these informations will be useful for someone

Yep all the discussion will be useful, you speak with the main dev
In one of the next update I will add a low power mode with your settings and a new mode between low and normal with my little downclock at 1350.
For now I'm analizing how works the fast dormancy, I think it's a good feature to reduce battery draining.

Fast Dormancy ! it's the fisrt time that i hear about this !
it seems effecient.
Good luck with that ?

Setcpu app not work
may be must custom in kernel

minhngt said:
Setcpu app not work
may be must custom in kernel
Click to expand...
Click to collapse
No , these apps will not work .Actually you don't need them.
If you want to Overclock the CPU than you can't .The current kernel doesn't support that yet.
But If you want to downclock the cpu you can create an init.d file that contains the script posted above with your preferred interactive governor settings.

Can you shown me the way to do it?
Tks so much^^

the easiest way( maybe ) :
1- Install ES File Explorer
2- Open ES explorer menu and scroll down and activate "root explorer" option (of course you must have rooted the system first).
3- Browse to /etc/init.d folder and create a new file with any name you choose (without extension)
4- copy and past these lines there :
Code:
echo "768000" > /sys/power/cpufreq_min_limit
echo "768000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "900000" > /sys/power/cpufreq_max_limit
echo "900000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "900000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
5- Replace the max frequency 900000 Hz with whatever you want from these (768000,900000,1200000,1350000,1500000) and save the file.
6- Select the file, click 'properties' , click 'change permissions' and check the execute properties.
7- that's all .. Enter the developer options and activate "show cpu infos" to make sure that the frequency has been changed.

Related

[APP] Configurator - partition/wipe/backup/restore sd card, other tedious tasks

I wrote this to help when I'm flashing roms and thought I'd share. Let me know what you think - comments, suggestions, fixes.
This is a batch file that gives a menu to perform the following functions:
Code:
echo [1] Edit user.conf
echo [2] Swap status
echo [3] Turn Swap On
echo [4] Turn Swap Off
echo [5] Set swappiness
echo [6] Memory Status
echo [7] Partition SD Card
echo [8] Mount SDCARD in recovery
echo [9] Unmount SDCARD in recovery
echo [10] Repair EXT partition
echo [11] Erase EXT partition
echo [12] Backup EXT partition
echo [13] Restore EXT partition
echo [14] Push lockscreen image
echo [15] Reboot device to recovery
echo [16] Reboot device
echo [17] Wipe device <--- May be buggy
echo [99] Exit
Partitioning is done by using 51dusty's sdparted.
v1.1
Added Repair EXT partition
Added Wipe device (may be buggy)
Extract config.bat to your adb directory (containing adb.exe and AdbWinApi.dll) and run it.
If you aren't familiar with adb, check this thread here.
phillip_hooper said:
I wrote this to help when I'm flashing roms and thought I'd share. Let me know what you think - comments, suggestions, fixes.
This is a batch file that gives a menu to perform the following functions:
Code:
[1] Edit user.conf
[2] Swap status
[3] Turn Swap On
[4] Turn Swap Off
[5] Set swappiness
[6] Memory Status
[7] Partition SD Card
[8] Mount SDCARD in recovery
[9] Unmount SDCARD in recovery
[10] Erase EXT partition
[11] Backup EXT partition
[12] Restore EXT partition
[13] Push lockscreen image
[14] Reboot device to recovery
[15] Reboot device
Partitioning is done by using 51dusty's sdparted.
Extract config.bat to your adb directory (containing adb.exe and AdbWinApi.dll) and run it.
Click to expand...
Click to collapse
Hi Phillip, this looks like it has some promise. Can you give some more specifics (commands) for the noobs (like once you open ADB, what then?), or, does a menu come up? I am at adb remount/successful. now what? Thanks.
wbexpress said:
Hi Phillip, this looks like it has some promise. Can you give some more specifics (commands) for the noobs (like once you open ADB, what then?), or, does a menu come up? I am at adb remount/successful. now what? Thanks.
Click to expand...
Click to collapse
All you have to do is run config.bat, don't run adb. Type the number of what you want it to do.
Here's some more explanation of what this does, minus the obvious ones.
[1] Edit user.conf
This will automatically pull the user.conf file and open an editor, then automatically put it back on your phone after you make your changes and save.
[2] Swap status
[3] Turn Swap On
[4] Turn Swap Off
[5] Set swappiness
This asks for a value then sets the swappiness to that value.
[6] Memory Status
This shows how much RAM and swap is available and how much is in use.
[7] Partition SD Card
This asks what filesystem you want (EXT2, EXT3, EXT4) on your SDcard, and how big you want the swap partition to be, then formats the card have a FAT32, EXT?, and Swap partition.
[8] Mount SDCARD in recovery
This gives your SDCARD a drive letter in windows while the phone is in recovery mode.
[9] Unmount SDCARD in recovery
[10] Erase EXT partition
[11] Backup EXT partition
This copies the files in your EXT partition to a folder on your computer.
[12] Restore EXT partition
[13] Push lockscreen image
This takes a picture you put in the same folder as config.bat and makes it the background image of your lockscreen.
[14] Reboot device to recovery
[15] Reboot device
phillip_hooper said:
All you have to do is run config.bat, don't run adb. Type the number of what you want it to do.
Here's some more explanation of what this does, minus the obvious ones.
[1] Edit user.conf
This will automatically pull the user.conf file and open an editor, then automatically put it back on your phone after you make your changes and save.
[2] Swap status
[3] Turn Swap On
[4] Turn Swap Off
[5] Set swappiness
This asks for a value then sets the swappiness to that value.
[6] Memory Status
This shows how much RAM and swap is available and how much is in use.
[7] Partition SD Card
This asks what filesystem you want (EXT2, EXT3, EXT4) on your SDcard, and how big you want the swap partition to be, then formats the card have a FAT32, EXT?, and Swap partition.
[8] Mount SDCARD in recovery
This gives your SDCARD a drive letter in windows while the phone is in recovery mode.
[9] Unmount SDCARD in recovery
[10] Erase EXT partition
[11] Backup EXT partition
This copies the files in your EXT partition to a folder on your computer.
[12] Restore EXT partition
[13] Push lockscreen image
This takes a picture you put in the same folder as config.bat and makes it the background image of your lockscreen.
[14] Reboot device to recovery
[15] Reboot device
Click to expand...
Click to collapse
Yeah, this is gonna be sweet when I get some time to play around with it. If I have ?'s would you prefer PM's or in open forum?
This looks awesome. Do you have to already have apps2sd on your mt3g for use of step 7? Or is this just an easier way to do so?
wbexpress said:
Yeah, this is gonna be sweet when I get some time to play around with it. If I have ?'s would you prefer PM's or in open forum?
Click to expand...
Click to collapse
Feel free to post in the thread.
rizoh66 said:
This looks awesome. Do you have to already have apps2sd on your mt3g for use of step 7? Or is this just an easier way to do so?
Click to expand...
Click to collapse
7 is to create partitions on the card, then if you flash a rom that uses apps2sd it'll use that ext partition. It uses sdparted to create the partitions, which I think has become standard on most roms. If you flash a rom without it, you can put it on there using the link the first post.
CPU status readings
Hi Phillip, I'm having a lot of fun with your configurator. I would like to ask your opinions on some things related to CPU speed. To that end, I have enclosed the user.conf text I ran, below. The first question is, though: do you have an opinion as to whether the Overclock Widget app causes any potential conflicts or issues? If so, I will get rid of it. My sense from communicating with Mike Taylor on the JACxROM thread is that the ROM more or less sets the CPU automatically. Next, as I understand it, if sacrificing a bit of battery life is acceptable, then the minimum frequency can be set higher, and in one of his last posts he recommended 245760. From what I am attaching below, I am not savvy enough to know exactly what I've got going here. The terms "scaling min freq" and "default" are a little bit beyond me. Bottom line: is the lowest setting currently 128000 or 245760, and is there really any harm in having it set to this level or even higher? I'm almost always plugged into some power source, so battery life does not concern me. Finally, please explain what this means at the bottom of the reading: "percent cpu usage before going up a speed step". Thanks...
# General parameters
general{
apps2sd=1 # this is useless here, require a modified a2sd script
CONF_FILE="/system/bin/user.conf" #location of user.conf
media2sd=1 # moves the medias to sd if /system/sd/media exists
permission_fix=0 # perform permission fix at start up (this parameter sets to 0 after script is executed)
odex_auto=0 # perform auto create or del odex for applications installed or removed within 3 days
odex_apk=0 # creates odex for apk that does not have odex yet (this parameter sets to 0 after script is executed)
odex_all=0 # creates odexes for all apks (this parameter sets to 0 after script is executed)
}
#compcache related parameters
compcache{
compcache_en=1 # enable(1) or disable(0) compcache
cc_disksize=32 # Ram swap disksize - any number between 1 to 95 should work; default is 1/4 of the RAM (24)
cc_memlimit=16 # Limit the memory usage for backing swap (cc .5x known issue-defaults to 15% of total RAM)
cc_backingswap_en=1 # enable(1) or disable(0) backing swap
cc_backingswap=/dev/block/mmcblk0p3 # pointing to the backingswap partition device, swap
cc_swappiness=28 # default 60
}
#create swap file for compcache or linux swap
swap_file{
swap_file_en=0 # set to 1 to create swap file
# set to 0 to del the swap file
linux_swap_file_size=32 # swap file size in MB
linux_swap_file=/system/sd/swap.file # pointing to the swap file location ( must be /system/sd/)
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=0 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p3 # swap partition device
swappiness=30 # default 60
}
#virtual memory
sys_vm{
sys_vm_en=1 # enable(1) or disable(0) virtual memory configurations
page_cluster=0 # default 3, (0 since CM3.9.6+)
laptop_mode=0 # default 0
dirty_expire_centisecs=3000 # default 3000
dirty_writeback_centisecs=500 # default 500
dirty_background_ratio=5 # default 5
dirty_ratio=10 # default 10
}
#cpu clock
proc_cpu{
proc_cpu_en=1 # enable(1) or disable(0) user cpu configurations
# freqency options
# 19200
# 122880
# 128000
# 245760
# 384000
# 528000
scaling_min_freq=128000 # default 245760
scaling_max_freq=528000 # default 528000
sampling_rate=2000000 # default 2000000 depending on kernel version
powersave_bias=0 # default 0, (200 since CM3.9.6+ )
up_threshold=45 # default 40, percent cpu usage before going up a speed step
}
# custom shell commands, these commands run last
custom_shells{
#echo "Hello!!!" # example
#echo "You can create your own cmmands here" # example
}
I'm glad you're getting use out of it. I've never used the overclock widget, as you said, you don't really need it because the rom does it for you. I set the minimum cpu to 384000 and up threshold to 30 and it stays speedy.
The up threshold - the percent cpu usage before going up a step means how much of the cpu do you want to get used before it speeds the cpu up. I set this at 30. I really don't know if these settings do any damage, but it runs fast. I'm sure the battery takes a hit, but my phone stays plugged in a lot.
For the user.conf file I make these changes:
compcache_en=0
cc_backingswap_en=0
linux_swap_en=1
swappiness=40
scaling_min_freq= 384000
up_threshold=30
phillip_hooper said:
I'm glad you're getting use out of it. I've never used the overclock widget, as you said, you don't really need it because the rom does it for you. I set the minimum cpu to 384000 and up threshold to 30 and it stays speedy.
The up threshold - the percent cpu usage before going up a step means how much of the cpu do you want to get used before it speeds the cpu up. I set this at 30. I really don't know if these settings do any damage, but it runs fast. I'm sure the battery takes a hit, but my phone stays plugged in a lot.
For the user.conf file I make these changes:
compcache_en=0
cc_backingswap_en=0
linux_swap_en=1
swappiness=40
scaling_min_freq= 384000
up_threshold=30
Click to expand...
Click to collapse
Sorry, I think I'm doing something wrong. I just changed those values, hit "enter", x'ed out of the cmd screen, reopened, entered "1", but the values did not change. Is there a final step I am missing? Do I need to click "save" in the drop down of the cmd screen instead of "enter" on the keyboard?
wbexpress said:
Sorry, I think I'm doing something wrong. I just changed those values, hit "enter", x'ed out of the cmd screen, reopened, entered "1", but the values did not change. Is there a final step I am missing? Do I need to click "save" in the drop down of the cmd screen instead of "enter" on the keyboard?
Click to expand...
Click to collapse
I see what happened. You edited the temp file that gets put on your computer and saved it, but closed the command window before it was put back on your phone. After saving your edits, you have to choose 'exit' from the file menu. That'll exit the editor, then put the changed file onto your phone and return you to the menu.
After editing:
alt+f (file menu)
s (save)
alt+f (file menu)
x (exit)
phillip_hooper said:
I see what happened. You edited the temp file that gets put on your computer and saved it, but closed the command window before it was put back on your phone. After saving your edits, you have to choose 'exit' from the file menu. That'll exit the editor, then put the changed file onto your phone and return you to the menu.
After editing:
alt+f (file menu)
s (save)
alt+f (file menu)
x (exit)
Click to expand...
Click to collapse
OK, that was beyond easy. Thanx again. One last question (for now): I know even less about the whole compcache/linux swap thing than I do about CPU settings. However, I think I get it that you either use one or the other, and in post #9 I'm assuming you're using the linux swap and not compcache. Can you explain why you chose one over the other? I know there's all sorts of debates, just wanted to hear your thoughts on the subject.
wbexpress said:
OK, that was beyond easy. Thanx again. One last question (for now): I know even less about the whole compcache/linux swap thing than I do about CPU settings. However, I think I get it that you either use one or the other, and in post #9 I'm assuming you're using the linux swap and not compcache. Can you explain why you chose one over the other? I know there's all sorts of debates, just wanted to hear your thoughts on the subject.
Click to expand...
Click to collapse
I use linux swap because I'm running jacxheroski 2.1 (I tried 2.2a/b/r4 and it was too buggy and rebooted) and compcache doesn't work on the MyTouch on 2.1. I really don't know anything about how each works and how they are different, I just know linux swap works for me.
phillip_hooper said:
I use linux swap because I'm running jacxheroski 2.1 (I tried 2.2a/b/r4 and it was too buggy and rebooted) and compcache doesn't work on the MyTouch on 2.1. I really don't know anything about how each works and how they are different, I just know linux swap works for me.
Click to expand...
Click to collapse
Good enough. Yup, I'm gathering as I read more, "to each his own". Mike recommended the settings he put into the JACxROM, so I'll go with the master's recommendations. Thanks again.
new info
Hi Phillip, long story shorter, Mike changed some things up on the earlier JACxROM version, and based on what he said and what I'm attaching, it appears linux swap vs. compcache is the way to go on that one. He recommends a 64 MB swap partition. I am not able to tell what size it is. Can you? Your configurator is really fun but still a bit beyond me...
# User.conf by miketaylor00
# General parameters
general{
apps2sd=0 # this is useless here, require a modified a2sd script
media2sd=1 # moves the medias to sd if /system/sd/media exists
}
#compcache related parameters
compcache{
compcache_en=0 # enable(1) or disable(0) compcache
cc_disksize=32 # Ram swap disksize - any number between 1 to 95 should work
cc_memlimit=18 # Limite the memory usage when backing swap is used
cc_backingswap_en=0 # enable or disable backing swap
cc_backingswap=/dev/block/mmcblk0p3 # pointing to the backingswap partition device
cc_swappiness=28 # default 60
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=1 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p3 # swap partition device
swappiness=30 # default 60
}
#virtual memory
sys_vm{
sys_vm_en=1 #enable(1) or disable(0) virtual memory configurations
page_cluster=3 # default 0
laptop_mode=0 # default 0
dirty_expire_centisecs=3000 # default 3000
dirty_writeback_centisecs=500 # default 500
dirty_background_ratio=5 # default 5
dirty_ratio=10 # default 10
}
#cpu clock
proc_cpu{
proc_cpu_en=1 #enable(1) or disable(0) user cpu configurations
# freqency options
# 19200
# 122880
# 128000
# 245760
# 384000
# 528000
scaling_min_freq=192000 # default 245760
scaling_max_freq=528000 # default 528000
sampling_rate=2000000 #default 200000 depending on kernel version
powersave_bias=0 # default 0, CM3.9.6 default uses 200
up_threshold=45 # default 40, percent cpu usage before going up a speed step
}
wbexpress said:
Hi Phillip, long story shorter, Mike changed some things up on the earlier JACxROM version, and based on what he said and what I'm attaching, it appears linux swap vs. compcache is the way to go on that one. He recommends a 64 MB swap partition. I am not able to tell what size it is. Can you? Your configurator is really fun but still a bit beyond me...
Click to expand...
Click to collapse
Using swap automatically uses the full swap partition (whatever size you set when you formatted the SD card).
Use "[6] Memory Status" from the menu.
Your total swap size will be across from "Swap:" under "total" heres mine (62676):
Code:
total used free shared buffers
Mem: 97852 96120 1732 0 620
Swap: 62676 25528 37148
Total: 160528 121648 38880
any chance of this being converted to linux-friendly ?!
I might be able to do the work to convert the script to linux-friendly, if mr hooper would allow it!
crizznaig said:
any chance of this being converted to linux-friendly ?!
I might be able to do the work to convert the script to linux-friendly, if mr hooper would allow it!
Click to expand...
Click to collapse
That'd be awesome. I don't use linux, but if you want to knock that out, feel free. I'll add it to the first post.
Hi, I'm new to Android.
I installed the SDK, and put your script in ../android/tools
Yes, I put ../android/tools in my path (winxp).
I'm running Cyanogenmod 4.1.999
when I run your script, it says 'Device state is unknown'.
I can mount my sdcard as a removable drive when I connect it via usb to my computer. Did I not install something that I needed to?
Also, does anyone know where Cyanogen put the user.conf in his mod?
Thanks in advance and sorry for my noobitude.
olorin12 said:
Hi, I'm new to Android.
I installed the SDK, and put your script in ../android/tools
Yes, I put ../android/tools in my path (winxp).
I'm running Cyanogenmod 4.1.999
when I run your script, it says 'Device state is unknown'.
I can mount my sdcard as a removable drive when I connect it via usb to my computer. Did I not install something that I needed to?
Also, does anyone know where Cyanogen put the user.conf in his mod?
Thanks in advance and sorry for my noobitude.
Click to expand...
Click to collapse
If you are in recovery mode it should say device is unknown. This is normal. If the phone is booted and shows unknown then you'll want to be sure you installed the usb_drivers from the sdk properly.
Thanks, that worked.
I have 2 computers, drivers would not update on one, but the were able to install on the other. Can't figure out why.
I'm using cyanogenmod 4.1.999, and it says that I don't have a user.conf, and it also says 'system/bin/swap not found'.
This is what it shows when I press 6 (memory status):
total used free shared buffers
Mem: 98140 96300 1840 0 432
Swap: 96812 24520 72292
Total: 194952 120820 74132
Device is booted.
Is it normal for that much memory to be used (I have the 192mb Mytouch)?
P.S., thanks for the Configurator app!

Setting powersave_bias using init.d script

I have the following init.d script, named 05mpoffpsb200. It disables mpdecision but it fails to set the value of powersave_bias. I have to manually change it on every boot to make it work. Anybody know to make the script set the powersave_bias value?
Code:
#!/system/bin/sh
su
stop mpdecision
echo "200" > /sys/devices/system/cpu/cpufreq/intellidemand/powersave_bias
Hi,
I don't use this kernel, but are you sure it's the right path (ok it seems good)?
Try with this:
#!/system/bin/sh
echo "200" > /sys/devices/system/cpu/cpufreq/intellidemand/powersave_bias
Click to expand...
Click to collapse
Other than that, others init.d sripts work?
Sometimes you can change some settings in live but it didn't work with init.d scripts (I think it depends how it's defined when the kernel is compiled or something like that ).
You can try with an app with a setting like "on boot completed" -> SetCPU (the app sets the value on boot without init.d scripts, works well in general).
Or ask in the kernel thread?
Yeah the same script successfully stops mpdecision service like I said, but fails on the powersave_bias setting.
I even tried a script with the lone powersave_bias setting but it does not work.
Is the governor getting changed to intellidemand after boot up ?
maybe it's not setting because a different governor is in use while booting.
if thats the case add a line for each core to change it's governor to intellidemand befor the powersave_bias setting
does the powersave bias command work as expected if you run it in terminal after booting?
If so, try adding a sleep command before the powersave bias line; could be some conflict during bootup that interferes with the powersave bias setting.
viking37 said:
Hi,
I don't use this kernel, but are you sure it's the right path (ok it seems good)?
Try with this:
Other than that, others init.d sripts work?
Sometimes you can change some settings in live but it didn't work with init.d scripts (I think it depends how it's defined when the kernel is compiled or something like that ).
You can try with an app with a setting like "on boot completed" -> SetCPU (the app sets the value on boot without init.d scripts, works well in general).
Or ask in the kernel thread?
Click to expand...
Click to collapse
I didn't read your addition to your comment, but I will that out.
meangreenie said:
Is the governor getting changed to intellidemand after boot up ?
maybe it's not setting because a different governor is in use while booting.
if thats the case add a line for each core to change it's governor to intellidemand befor the powersave_bias setting
Click to expand...
Click to collapse
I do have the governor selected and "applied on boot" using the performance settings (in main settings). Possibility of the device using a different governor before setting it to intellidemand seems quite plausible.
halluci293 said:
does the powersave bias command work as expected if you run it in terminal after booting?
If so, try adding a sleep command before the powersave bias line; could be some conflict during bootup that interferes with the powersave bias setting.
Click to expand...
Click to collapse
Yes, the script does work as intended on manual execution which supports the possibility mentioned by meangreenie.
I will look into it and post back my results.
Thank you for the input everyone.

Defy Mini: Updated the overclock-module

-- Update:
User Guitwo2 wrote an excellent init.d-script to load the overclock-module on boot. To make it even easier to use, he made a flashable zip. See this post: http://forum.xda-developers.com/showpost.php?p=39659179&postcount=6
Hi,
i recently updated the overclock-module (see attachement). Before starting it, find the required addresses in memory, as the module's defaults match only the RTFR-Firmware:
Find address of transition-table
Open adb-shell, become su and type
Code:
cat /proc/kallsyms | grep -A 1 pll0_960_pll1_245_pll2_1200_pll4_800_25a
You'll find the address at the leftmost side in the first row of the result.
Find address time-in-state-table
In the same shell, type
Code:
cat /proc/kallsyms | grep -A 1 cpufreq_stats_table
Again, the required address ist at the left side of the first row.
Then, one can try to install the kernel module. Parameter "pll2_l_val" ist used to adjust the multiplier of pll2. Default is 62, i got it stable at 69 (=CPU-Speed of 69 * 19.2 Mhz / 2 = 662 MHz). You can also try to set the multipliers of pll0 and pll1. I didn't test it.
So, with the above addresses one types the following to load the kernel module (replace the addresses with the ones you found, where parameter acpu_freq_tbl_addr equals transition-table and parameter cpufreq_stats_tbl_addr takes the time-in-state-table-address) :
Code:
busybox insmod /sdcard/temp/defymini_oc.ko pll2_l_val=63 acpu_freq_tbl_addr=0xc0755bdc cpufreq_stats_tbl_addr=0xc0789134
Update: In version 0.3 there is another parameter, "vdd", which takes a value between 1 and 7 (don't play with it, as there is no error handling!), where 1 is the lowest and 7 the highest vdd. Default is 6.
CHANGELOG
2013-04-29 0.4 added source (use it for other devices with locked bootloader)
2013-04-08 0.4 beautified messages, show current vdd
2013-04-01 0.3 added vdd-level for highest freq as parameter
2013-03-27 0.2 added time-in-state table modification (CPUSpy etc)
2013-03-21 0.1 initial release
rootdefyxt320 said:
Can we change the socinfo_get_msm_cpu() or is it already fused into the silicon chip?
Click to expand...
Click to collapse
No, but we can change the definition for soc-id 96 to msm7225aa. I did it. Didn't work. when switching to 800Mhz via PLL4, device hangs and reboots.
Using cat /proc/kallsyms | grep -A 1 pll0_960_pll1_245_pll2_1200_pll4_800_25a gives grep: not found
write: Broken pipe
Bernd.Defy said:
No, but we can change the definition for soc-id 96 to msm7225aa. I did it. Didn't work. when switching to 800Mhz via PLL4, device hangs and reboots.
Click to expand...
Click to collapse
Probably not supported in kernel or we can try some how to patch it via modules like the Motorola Defy MB525/MB526 which has a locked bootloader or try to obtain the Defy XT535 kernel aka boot.img and flash it via fastboot but it's risky. I can't get the memory addresses. Just upload your boot.img from your nandroid backup so I can flash it via fastboot. What's the difference between PLL2 overclocking and PLL4 overclock?
Bernd.Defy said:
Hi,
i recently updated the overclock-module (see attachement). Before starting it, find the required addresses in memory, as the module's defaults match only the RTFR-Firmware:
Find address of transition-table
Open adb-shell, become su and type
Code:
cat /proc/kallsyms | grep -A 1 pll0_960_pll1_245_pll2_1200_pll4_800_25a
You'll find the address at the leftmost side in the first row of the result.
Find address time-in-state-table
In the same shell, type
Code:
cat /proc/kallsyms | grep -A 1 cpufreq_stats_table
Again, the required address ist at the left side of the first row.
Then, one can try to install the kernel module. Parameter "pll2_l_val" ist used to adjust the multiplier of pll2. Default is 62, i got it stable at 69 (=CPU-Speed of 69 * 19.2 Mhz / 2 = 662 MHz). You can also try to set the multipliers of pll0 and pll1. I didn't test it.
So, with the above addresses one types the following to load the kernel module (replace the addresses with the ones you found, where parameter acpu_freq_tbl_addr equals transition-table and parameter cpufreq_stats_tbl_addr takes the time-in-state-table-address) :
Code:
busybox insmod /sdcard/temp/defymini_oc.ko pll2_l_val=63 acpu_freq_tbl_addr=0xc0755bdc cpufreq_stats_tbl_addr=0xc0789134
Click to expand...
Click to collapse
I just followed your instructions.
The addresses were the same.
It seems to work so far.
Mine seems stable too.
Great work !
I am loading it on boot via a init.d script.
With : TNBST_4_0A.1F.0ERPS - WE_Orange_Spain_v22_0223_FLEXTNBST
What could we probably gain by increasing PLL0 and PLL1 ?
And which value should we choose ?
With pll2: 70 I get 672MHz stable.
Sh0m1 said:
Using cat /proc/kallsyms | grep -A 1 pll0_960_pll1_245_pll2_1200_pll4_800_25a gives grep: not found
write: Broken pipe
Click to expand...
Click to collapse
Code:
cat /proc/kallsyms > /sdcard/toto.log
Then search for pll0_960_pll1_245_pll2_1200_pll4_800_25a in the /sdcard/toto.log file.
---------- Post added at 11:08 AM ---------- Previous post was at 10:38 AM ----------
If you want to load the module on boot and have init.d support, there is attached a init.d script that will do it automatically.
There is a CWM flashable zip
0 - push the XT320_overclock.zip on your sdcard
1 - Make sure you have busybox installed
2 - Reboot with a CWM... (recovery.img attached)
Code:
>adb reboot bootloader
> fastboot boot recovery.img
3 - Flash XT320_overclock.zip thorough CWM
4 - Enjoy !
Default values are : pll2=69 and vdd=6
Edit /etc/init.d/66ocmodule for further tweaking.
In V2 - updater-script has been updated, to fix busybox permission issues.
66ocmodule script change log :
V0.1
First be sure to adjust pll2_l_val, acpu_freq_tbl_addr and cpufreq_stats_tbl_addr.
Be sure that defymini_oc.ko is in /sdcard/
1 - push the module to your phone :
Code:
adb push 66ocmodule.txt /sdcard/66ocmodule.txt
2 - in shell mode, remove the extension .txt and move the file to /etc/init.d folder
Code:
mv /sdcard/66ocmodule.txt /etc/init.d/66ocmodule
3 - Change mode to -rwxrwxrwx
Code:
chmod 777 /etc/init.d/66ocmodule
4 - Change user/group to root/root
Code:
chown 0.0 /etc/init.d/66ocmodule
That should work.
NB : you may have to remount your /system partition in rw to change user/group
Code:
busybox mount -o remount,rw -t auto /system
NB2: For init.d support go to : http://forum.xda-developers.com/showthread.php?t=1933849
NB3: have only one version of 66ocmodule in your /etc/init.d directory to avoid trouble.
NB4: if you are experiencing trouble with step 2, use
Code:
cp /sdcard/66ocmodule_vX.X.txt /etc/init.d/66ocmodule
rm /sdcard/66ocmodule_vX.X.txt
where X.X is the number version
NB5: be extra careful when editing the files. You could mess when with the end of line markers. I recommend using Notepad++ and check if the end of line markers are in unix format (LF) (view/show symbol/show all characters). You can correct that easily with edit/EOL conversion/convert to UNIX format
NB6: make sure there is a blank line in the end of the file as well
V0.2
gets automatically the needed addresses.
Module is supposed to be located at /data/defymini_oc.ko
If troubleshoot refer to the /data/oc.log log file.
Set for a 700MHz oc
Follow steps 1 to 4 for installation. Read NB, NB2 and NB3.
V0.3
Checks for the presence of older versions and gives a warning
Checks if the module is already loaded (unload if true)
Chekcs in the end if the module is loaded
+ Minor changes
pll value and module path can be edited in the beginning of the file
Follow steps 1 to 4 for installation. Read NB, NB2 and NB3.
V0.4
Vdd support
+Minor changes
pll and vdd values and module path can be edited in the beginning of the file
Follow steps 1 to 4 for installation. Read NB, NB2 and NB3.
V0.5
best busybox support
+Minor changes
pll and vdd values and module path can be edited in the beginning of the file
V0.6
Force vdd change if performance governor set
+ Minor changes
Follow steps 1 to 4 for installation. Read all NBs.
pll and vdd values and module path can be edited in the beginning of the file
Follow steps 1 to 4 for installation. Read NB, NB2 and NB3.
V0.7
+ Minor changes
V0.8
Log some info, available in logcat
V0.9
Can adjust all pll values.
What could we probably gain by increasing PLL0 and PLL1 ?
And which value should we choose ?
Click to expand...
Click to collapse
Tried to oc pll1 -> distorted display. can't recommend that. OC'ing PLL0 leads to somewhat faster 480 MHz frequency (480 MHz is generated by PLL0 and DIV2, so 960MHz / 2 => 480 MHz.) In the module only changed PLL2 is payed attention for modified frequency-tables.
---------- Post added at 11:53 AM ---------- Previous post was at 11:25 AM ----------
rootdefyxt320 said:
What's the difference between PLL2 overclocking and PLL4 overclock?
Click to expand...
Click to collapse
Simple difference: PLL2 exists in SOC, PLL4 does not exist. So Motorola didn't underclock something, they got a crippled MSM7225A. Speed ist limitied by hardware.
I'm pushing pll2_l_val to 73 (+11)
I get 700 MHz stable for now. Without overeating.
I'll keep you posted.
Guitwo2 said:
I'm pushing pll2_l_val to 73 (+11)
I get 700 MHz stable for now. Without overeating.
I'll keep you posted.
Click to expand...
Click to collapse
Do you still use the "performance" governor?
Re: Defy-Mini: Updated the overclock-module
I use setCPU with different governor. All seems to work. Higher freq (600) is replaced by a new one thanks to your OC module.
Btw 700 is stable. I runned some stress tests. Performances are increased. Linpack score goes from. 14.5 to 17.5 MFLOPS.
I was wondering if the soc pll were used by other stuff than cpu. Could explain your troubleshoot when oc pll0.
XT230 rocks now
Guitwo2 said:
I use setCPU with different governor. All seems to work. Higher freq (600) is replaced by a new one thanks to your OC module.
Btw 700 is stable. I runned some stress tests. Performances are increased. Linpack score goes from. 14.5 to 17.5 MFLOPS.
XT230 rocks now
Click to expand...
Click to collapse
...but keep an eye on stability.
For ~16% overclocking ~20% higher MFLOPS? Hmmm.... sounds - interesting.
Re: Defy-Mini: Updated the overclock-module
Bernd.Defy said:
...but keep an eye on stability.
For ~16% overclocking ~20% higher MFLOPS? Hmmm.... sounds - interesting.
Click to expand...
Click to collapse
I would rather have a buggy phone than a awfully slow one... (thank you motorola).
The linpack result shows a .5 MFLOPS standard deviation.
XT230 rocks now
I'm a noob, can you tell me what exactly do i need? Busybox?
Re: Defy-Mini: Updated the overclock-module
Sh0m1 said:
I'm a noob, can you tell me what exactly do i need? Busybox?
Click to expand...
Click to collapse
Busybox / adb or a terminal emulator / root access
Eventually init.d support if you want to use my script to automatically load the module at boot.
XT230 rocks now
Ok so i've installed busybox, done steps in the first post but nothing happened? Is it normal that the phone hadn't restarted or something?
Sh0m1 said:
Ok so i've installed busybox, done steps in the first post but nothing happened? Is it normal that the phone hadn't restarted or something?
Click to expand...
Click to collapse
It's definatly a good sign if your phone doesn't reboot. Just check the Frequencies using CPU-Spy or something else.
And please post your Firmware-Version and the adresses you used, i'll add them in the first post.
I just installed your module from the first post and i changed value from 63 to 70, and now i have 672mhz. How can i change pll2 value again? What do i type? If i use your module but with 73 instead od 63 i get: File already exists.
Re: Defy-Mini: Updated the overclock-module
Sh0m1 said:
I just installed your module from the first post and i changed value from 63 to 70, and now i have 672mhz. How can i change pll2 value again? What do i type? If i use your module but with 73 instead od 63 i get: File already exists.
Click to expand...
Click to collapse
reboot and load it again with other arguments.
Or use rmmod command
Code:
busybox rmmod defymini_oc.ko
XT230 rocks now
Sh0m1 said:
I just installed your module from the first post and i changed value from 63 to 70, and now i have 672mhz. How can i change pll2 value again? What do i type? If i use your module but with 73 instead od 63 i get: File already exists.
Click to expand...
Click to collapse
You have to remove the module first (no need to reboot):
Code:
rmmod defymini_oc.ko
Then you can install the module again.
Alright i've used 66overclock file and pushed it manually with root explorer, changed permissions, set owner and i've edited it so pll2 is 73. My phone is rebooting atm, i will post if i had success.
---------- Post added at 04:22 PM ---------- Previous post was at 04:12 PM ----------
I just cant get it to keep freq at 700 after reboot. I've done everything from Guitwo2's post and it keeps resetting to 600MHz after reboot

Llama Sweet Kernel Tweaks

Feature list​
- sets hostname to LG-G4 something that was missing at first from lineage/aosp 7.1.1 (maybe i will remove that)
- Better mount point flags
- Internal storage:
nomerges
nr_requests
lower safe read_ahead_kb
cfq scheduler
cfq scheduler tweaks
remove add_random (if its enabled in the kernel by default)
rq_affinity
- external storage:
nomerges
nr_requests
lower safe read_ahead_kb
cfq scheduler
cfq scheduler tweaks
remove add_random (if its enabled in the kernel by default)
rq_affinity
- Net and virtual memory:
tcp_congestion_control
disable_ipv6
dirty_writeback_centisecs
dirty_expire_centisecs
dirty_background_ratio
dirty_ratio
drop_caches
kernel.panic
min_free_kbytes
overcommit_ratio
panic_on_oom
swappiness 0 #llama doesn't have zram feature, it's useless on Lg G4
vfs_cache_pressure
- CPU customisations ~depends on your choice of script~
balanced ~doesn't make any cpu changes~
less ~for less battery drain, cpu rests more~
more-less ~for a lot less battery drain, but with a big lag (will soon try fix stability and smoothness)~
performance ~for full cpu power, but rest when the screen is off~
- Kernel customisations
msm_thermal ~off on battery save / on and set a safe temp. for performance~
lowmemorykiller
read_wakeup_threshold
write_wakeup_threshold
hotplug customisation
- Only the safe internet customisations
tcp_timestamps
tcp_tw_reuse
tcp_sack
tcp_tw_recycle
tcp_window_scaling
tcp_keepalive_probes
tcp_keepalive_intvl
tcp_fin_timeout
For stock based roms follow the guide in post #2
How to "install" it ? Simple
1.unzip
2.place it in /system/etc/init.d
Code:
adb root
adb remount
adb push <your tweak> system/etc/init.d/
3.change its permissions to 755
4.lastly change owner:group to root:shell
Code:
adb shell
su
mount -o remount rw /system
chmod 755 /system/etc/init.d/<your tweak>
chown root:shell /system/etc/init.d/<your tweak>
If you don't have a pc, type in a terminal inside your g4
Code:
su
mount -o rw remount /system
chmod 755 /system/etc/init.d/<your tweak>
chown root:shell /system/etc/init.d/<your tweak>
Those of you that use the new systemless root method of chainfire you can put the script in /system/su.d or in /su/su.d with permissions 700 (same permissions at folder and script) and set owner:group to root:root
Those of you that use the new magisk root method you can put the script in /magisk/.core/service.d/ with the same permissions and ownership as in init.d
Those coming using search bar and don't have this phone and this kernel, don't try it, unless you know what to edit to "fit" your own kernel.
These tweaks aren't just for faster easy setting up our phone, they are more useful for those that don't want to have root access ON, for various personal reasons. They can apply those settings on boot and setup their phone without the need of root and an app asking for root.
Easy removal: delete the script and reboot. And never use more than one of these scripts inside init.d
Careful, some stock based roms have preinstalled some scripts inside init.d by default.
Those must be removed after flashing Llama Sweet Kernel. They are not compatible and they cause instability !
BIG Thanks to this genius
@genesixxbf3
for his kernel to our lg g4.
XDA:DevDB Information
[Tweaks][MM/N][H815][H811]Kernel Tweaks[CM/STOCK/AOSP], Tool/Utility for the LG G4
Contributors
kessaras, genesixxbf3
Version Information
Status: Stable
Created 2016-12-09
Last Updated 2017-04-25
Reserved
This is a guide for ALL stock based roms and all kernels.
My script will only add tweaks that apply to all kernels.
For those that are rooted with SuperSu, they must first fully remove it.
Nub guide to change SuperSu for Magisk root:​
Step 1.
SuperSu must be removed.
Go into supersu -> settings -> fully remove root access.
###Or download and flash in recovery mode the UnSu script from osm0sis thread.###
Step 2.
Use hardware key combination to boot to TWRP.
###If you used the UnSu script, no need to reboot to recovery, skip step 2 and go to next one.###
Step 3.
Flash latest magisk flashable zip for users that are not rooted yet.
It sais: "If you're not rooted, or something went wrong and you need a clean start"
Download that .zip file and flash it.
Now you are rooted again. Reboot to your rom.
Step 4.
Download Magisk Manager from play store. In that app you can even enable systemless root to hide root from the apps, or do many things that you like.
Questions further go to magisk thread not here. And don't forget to re-enable usb debugging. After you removed root, that was toggled, ###Unless you used the UnSu script again. That means that before reboot you were already rooted.###
Now it's time to install your script.
Download the compressed tweak from this post , uncompress it and follow the next guide.
The steps are the same with the lineage based roms and it works for ALL lineage based roms too
If you use a root file manager then you can skip the guide and just cut - paste the script in /magisk/.core/service.d/
set permissions to 755, ownership to root:shell and reboot.
INSTALLATION​Step 1.
place it in /magisk/.core/service.d/
Code:
adb push /<path to the script>/90balanced /sdcard/
adb shell
su
mv /sdcard/90balanced /magisk/.core/service.d/
Step 2.change its permissions to 755 if it's not already set to 755 by default
Code:
chmod 755 /magisk/.core/service.d/90balanced
If you don't have a pc, type the same commands in g4 terminal but of course without the adb command. Script is supposed to be in path /sdcard/
not in /sdcard/download/ or whatever path. Otherwise edit the command "mv ..." to match the script path.
That's it. Reboot to apply your tweaks.
~I will add Llama Sweet kernel tweaks for stock based ROMS when Genesixxbf3 fixes the bluetooth issue.
Until then all use this one that applies to all kernels including Llama.
Special thanks to:
@topjohnwu for developing Magisk
and to
@osm0sis for his UnSU script
My scripts are not meant for use with kernel adiutor.
Changelog
31/01/2017
- fixed stability for "90less"
- changed to "westwood" tcp congestion control
01/02/2017
- changed to Fiops scheduler only for the 90less and 90more-less
- fixed stability for 90more-less
12/02/2017
- when screen is on, 3 cores always online not 1.
- fixed stability for 90less , 90more-less
- 90balance, interactive governor stable and at the same time conserving some battery
- big cores governor is same with small cores
15/02/2017 and 20/02/2017
- changed back to cfq scheduler
- added cfq scheduler tweaks
- fixed path to disable ipv6
09/03/2017
- fixed a bug for those that big cores were found disabled on boot
Although this is something caused from dirty flashing and can only be fixed with a clean flash
18/03/2017
- Added better mount point flags for Lineage/Aosp based roms, for f2fs, for those that prefer using f2fs partitions format
- i changed the way the mount points get set, now you don't need busybox if you don't want to.
- bigger timer rate for interactive governor for the balanced tweak, balanced can conserve battery now too.
25/04/2017
- Less-more is not lagging anymore but of course it still loads slow since cpu runs at a lower frequency
- interactive governor in balanced script saves more battery than before
- All scripts now give a small cpu frequency amount on input to reduce lag
- At less and less-more the hotplug sets the cores online at a lower frequency. Before, with those scripts you could rarely see the other cores online
kessaras said:
You can request any setting for kernel and cpu you want. I can add them for you.
Screenshots of battery with 90less.
~Haven't done anything special. Brightness is at normal with "auto" ON, gapps stock, usage: Normal, chat, xda, phone Calls/Messages, GPS ON.
Many factors determine the battery drain, such as 3rd party apps, ads from apps, services and more, don't blame my settings. Those settings are absolute and tested and i only do this to help everyone.
Click to expand...
Click to collapse
Thanks for you work, I am using H818p without BL unlock. Currently, I can modify /etc/init/qcom.post_boot.sh from this thread (http://forum.xda-developers.com/tmo...-msm-8992-cpu-io-ram-interactive-gov-t3351478).
The question is, can I port some tweaks from this thread to the stock kernel using qcom.post_boot ? I am not familiar with the seqence of boot, any idea ?
Thanks,
jskasia said:
Thanks for you work, I am using H818p without BL unlock. Currently, I can modify /etc/init/qcom.post_boot.sh from this thread (http://forum.xda-developers.com/tmo...sm-8992-cpu-io-ram-interactive-gov-t3351478).
The question is, can I port some tweaks from this thread to the stock kernel using qcom.post_boot ? I am not familiar with the seqence of boot, any idea ?
Thanks,
Click to expand...
Click to collapse
Scripts are only for Llama kernel. So,
it depends if the stock kernel has same file "trees". Worst case scenario is to not be able to boot. If you can enter recovery you can fix it by doing :
Code:
rm /system/etc/init.d/<name of the script>
Or use the recovery file manager to delete it,
reboot and you are fine.
Don't use 90less as it is or for sure you won't boot. Less is using alucard governor which doesn't exist in stock. Open script and edit those lines, change alucard to interactive.
"kernel tweaks" delete them. the stock kernel doesn't have same hotplugs and heat protection.
EDIT:
a part of the scripts does work for stock without llama kernel. it's not dangerous because the stock lg rom doesn't have init.d support on boot and the script only can be applied inside kernel adiutor by enabling init.d emulator.
you can use it then. you will just not get the 100% out of it.
in the 90less you wont get the alucard governor and the hotplug to let the cpu rest.
the only alternative available is to make you one that edits the interactive governor to work almost the same as alucard and conserve a bit more battery than the stock interactive does.
@matgesiarz
follow the op
kessaras said:
Scripts are only for Llama kernel. So,
it depends if the stock kernel has same file "trees". Worst case scenario is to not be able to boot. If you can enter recovery you can fix it by doing :
Code:
rm /system/etc/init.d/<name of the script>
Or use the recovery file manager to delete it,
reboot and you are fine.
Don't use 90less as it is or for sure you won't boot. Less is using alucard governor which doesn't exist in stock. Open script and edit those lines, change alucard to interactive.
"kernel tweaks" delete them. the stock kernel doesn't have same hotplugs and heat protection.
Click to expand...
Click to collapse
Okay, I successfully put the tweaks (balance) on to init.qcom.post_boot.sh. My phone boot without any problem. After few days we will see the result.
Thanks
we just need to push scripts or I need also to clean the init.d folder first from other scripts? I am on ChyperOS 3.1.4
If I understand right, if I put this tweak I don't need to setup any kernel modification in apps like EX Kernel manager, isn't?
Vipery said:
we just need to push scripts or I need also to clean the init.d folder first from other scripts? I am on ChyperOS 3.1.4
Click to expand...
Click to collapse
no you don't clean the init.d folder. if you do that you will lose important script that needs the rom to boot. you only use one of those scripts in init.d, if you put 2 of those in, delete the one.
Oletros said:
If I understand right, if I put this tweak I don't need to setup any kernel modification in apps like EX Kernel manager, isn't?
Click to expand...
Click to collapse
exactly and if you need any change and you don't know how to edit the script, you can ask me to add it for you
kessaras said:
no you don't clean the init.d folder. if you do that you will lose important script that needs the rom to boot. you only use one of those scripts in init.d, if you put 2 of those in, delete the one.
Click to expand...
Click to collapse
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Vipery said:
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Click to expand...
Click to collapse
only what the op sais. only group owner. its already set from me, but you have to at least check if its set, if not, set it. group owner shell
Thanks for the tweaks!
Sorry for this perhaps silly question, but which is supposed to be more battery friendly between balanced and less?
joaste said:
Thanks for the tweaks!
Sorry for this perhaps silly question, but which is supposed to be more battery friendly between balanced and less?
Click to expand...
Click to collapse
less refers to less battery consuption and its only by a little cause we don't want to have lags. Of course we can do it even more battery friendly but we will have a very slow phone.
kessaras said:
less refers to less battery consuption and its only by a little cause we don't want to have lags. Of course we can do it even more battery friendly but we will have a very slow phone.
Click to expand...
Click to collapse
Thanks for the clarification!
kessaras said:
exactly and if you need any change and you don't know how to edit the script, you can ask me to add it for you
Click to expand...
Click to collapse
Thanks
Ok,I applied your 90less tweaks and here's what I've got after reboot:
The big cores governor-interactive,max.freq.-1248
The little cores governor-alucard,max.freq.-1440
MSM Hotplug-OFF
MSM MPDecision Hotplug-ON
Is that ok or...?
welder73 said:
Ok,I applied your 90less tweaks and here's what I've got after reboot:
The big cores governor-interactive,max.freq.-1248
The little cores governor-alucard,max.freq.-1440
MSM Hotplug-OFF
MSM MPDecision Hotplug-ON
Is that ok or...?
Click to expand...
Click to collapse
nothing applied on boot.
in less,
max for the big is set to 1536
and hotplug is off to not get load for nothing since the temp wont go higher than 60 even under the hot summer sun.
kessaras said:
nothing applied on boot.
in less,
max for the big is set to 1536
and hotplug is off to not get load for nothing since the temp wont go higher than 60 even under the hot summer sun.
Click to expand...
Click to collapse
So I should change the max for the little cores to 1536 and everything else is ok?
Vipery said:
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Click to expand...
Click to collapse
...

[H812][UsU][v29a]Ultimate custom settings/tweaks mega-post

This is for the H812 only, however I am sure much can be used on any device. I decided to make one post of all my settings instead of individual posts in different threads as a way to avoid off topic etc. This is a wip and I will update as required.
*** Use anything I say at your own risk, I will not be held responsible for bricking or otherwise screwing up your device in any way. No whining about this doesn't work or that it doesn't make any sense etc I say again USE AT YOUR OWN RISK ***
Ok so first thing is to backup then backup and copy backup to multiple locations, backup again (lol)!!!
Backup then Unlock with UsU (SALT) by @steadfasterX here: https://forum.xda-developers.com/g4/general/unlock-unlock-lg-g4-device-usu-t3760451 Make sure to install TWRP and make backups.
Figure it out yourself by reading the OP several times and post as necessary in that thread.
Install the Nougat v29a mentioned in the above thread under FAQ #16.
Install Titan kernel (H811 stock Nougat) by @kessaras here: https://forum.xda-developers.com/g4/development/g4-t3667878
I use 1.7 with the following settings:
EDIT:I have since changed these settings although the following is still good.
Big cores at 1632 max 384 min.
Little cores at 1440 max 384 min
CPU gov intelliactive for both.
Disable CPU boost.
GPU using cpufreq gov.
FIOPS for both internal and external set to 1024kb.
Low memory killer set to light.
Misc settings, enable fsync with Westwood TCP.
Install Magisk with Dolby Atmos (LeEco Le Pro3), Enable Doze for GMS (huge savings for battery) and Unified Hosts Adblock modules.
NOTE: I use Adaway beta 4.09 now instead of unified hosts module. Google framework module for Google apps like Phone. Single user mod and force fast charge are also good!
For now that should be enough to get a bunch of users messed up, I have other tweaks like bloat removal, useful apps etc to add later if people want them.
Feel free to post questions about the above for further explanation/clearification.
Do not ask for help fixing things you break, that's what backups are for!
Cheers!
Edit: Great post for H812 consider thanking that user
https://forum.xda-developers.com/g4/general/unlock-unlock-lg-g4-device-usu-t3760451/page110
List of useful apps that I use:
Kernel Adiutor
https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor
Magisk
https://forum.xda-developers.com/apps/magisk/beta-magisk-v13-0-0980cb6-t3618589/page577
Build prop editor
https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor
BusyBox
https://play.google.com/store/apps/details?id=ru.meefik.busybox
Catlog
https://play.google.com/store/apps/details?id=com.nolanlawson.logcat
Devcheck
https://play.google.com/store/apps/details?id=flar2.devcheck
ES File Explorer
https://play.google.com/store/apps/details?id=com.estrongs.android.pop.pro
Official TWRP
https://play.google.com/store/apps/details?id=me.twrp.twrpapp
Quick Reboot
https://play.google.com/store/apps/details?id=com.antaresone.quickrebootpro
Titanium Backup
https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackup
Wifi analyzer
https://play.google.com/store/apps/details?id=info.wifianalyzer.pro
Build.prop edits that may help;
ro.build.fingerprint
lge/p1_rgs_ca/p1:6.0/MRA58K/1619418088183:user/release-keys
(Passes safety net check for me, use the entry from your original MM built.prop)
ro.product.model
LG-H812
(Helps apps show correct model)
ro.gps.agps_provider
1
(From original build.prop)
ro.ril.def.preferred.network
9
ro.telephony.default_network
9
telephony.lteOnCdmaDevice
1
telephony.lteOnGsmDevice
1
(Networking to use LTE 4g etc)
ro.factorytest
0
(Removes an error in log)
*** I soft bricked my device changing too many entries in build.prop so be cautious.
Here's a list of all the apps I have frozen in Titanium Backup.
com.android.cellbroadcastreceiver
com.android.LGSetupWizard
com.google.android.apps.books
com.google.android.apps.docs.editors.sheets
com.google.android.apps.docs.editors.slides
com.google.android.apps.magazines
com.google.android.play.games
com.google.android.talk
com.google.android.videos
com.google.android.webview
com.lge.appbox.client
com.lge.bnr
com.lge.bnr.launcher
com.lge.cloudhub
com.lge.concierge
com.lge.easyhome
com.lge.email
com.lge.exchange
com.lge.fmradio
com.lge.gcuv
com.lge.gestureanswering
com.lge.homeselector
com.lge.ia.task.smartsetting
com.lge.iftttmanager
com.lge.launcher2
com.lge.lgaccount
com.lge.lgdmsclient
com.lge.lgmapui
com.lge.mtalk.sf
com.lge.myplace
com.lge.myplace.engine
com.lge.qvoiceplus
com.lge.remote.setting
com.lge.sizechangable.favoritecontacts
com.lge.sizechangable.weather.platform
com.lge.sizechangable.weather.theme.optimus
com.lge.smartcover
com.lge.smartsharepush
com.lge.sync
com.lge.updatecenter
com.lge.wernicke
com.lge.wernicke.nlp
com.maluuba.android.qvoice
com.rsupport.rs.activity.lge
com.sika524.android.quickshortcut
com.ti.server
One of the easiest and most effective ways to increase the perceived speed and snappiness of your device!
Developer Options > Drawing
Window animation scale [Off or .5]
Transition animation scale [Off or .5]
Animator duration scale [1x]
Here are the settings I use for the stock Titan kernel (1.7 I been having issues with 1.8) including Kernel Adiutor profile:
Code:
version 1
profile
commands
path /sys/module/msm_performance/parameters/cpu_max_freq4
command echo '4:1440000' > /sys/module/msm_performance/parameters/cpu_max_freq
path /sys/module/msm_performance/parameters/cpu_max_freq5
command echo '5:1440000' > /sys/module/msm_performance/parameters/cpu_max_freq
path /sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq4
command #{"path":"\/sys\/devices\/system\/cpu\/cpu%d\/cpufreq\/scaling_max_freq","value":"1440000","min":4,"max":5,"bigCpus":[4,5],"LITTLECpus":[0,1,2,3],"corectlmin":2}
path /sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor0
command #{"path":"\/sys\/devices\/system\/cpu\/cpu%d\/cpufreq\/scaling_governor","value":"intelliactive","min":0,"max":3,"bigCpus":[4,5],"LITTLECpus":[0,1,2,3],"corectlmin":2}
path /sys/module/cpu_boost/parameters/input_boost_enabled
command echo '0' > /sys/module/cpu_boost/parameters/input_boost_enabled
path /sys/module/cpu_boost/parameters/boost_ms
command echo '0' > /sys/module/cpu_boost/parameters/boost_ms
path /sys/module/cpu_boost/parameters/input_boost_freq0
command echo '0:0' > /sys/module/cpu_boost/parameters/input_boost_freq
path /sys/module/cpu_boost/parameters/input_boost_freq4
command echo '4:0' > /sys/module/cpu_boost/parameters/input_boost_freq
path /sys/class/kgsl/kgsl-3d0/devfreq/governor
command echo 'cpufreq' > /sys/class/kgsl/kgsl-3d0/devfreq/governor
path /sys/block/mmcblk0/queue/scheduler
command echo 'fiops' > /sys/block/mmcblk0/queue/scheduler
path /sys/block/mmcblk0/queue/read_ahead_kb
command echo '1024' > /sys/block/mmcblk0/queue/read_ahead_kb
path /sys/block/mmcblk0/queue/iostats
command echo '0' > /sys/block/mmcblk0/queue/iostats
path /sys/block/mmcblk1/queue/scheduler
command echo 'deadline' > /sys/block/mmcblk1/queue/scheduler
path /sys/block/mmcblk1/queue/read_ahead_kb
command echo '2048' > /sys/block/mmcblk1/queue/read_ahead_kb
path /sys/block/mmcblk1/queue/iostats
command echo '0' > /sys/block/mmcblk1/queue/iostats
path /sys/module/lowmemorykiller/parameters/minfreechmod
command chmod 666 /sys/module/lowmemorykiller/parameters/minfree
path /sys/module/lowmemorykiller/parameters/minfreechown
command chown root /sys/module/lowmemorykiller/parameters/minfree
path /sys/module/lowmemorykiller/parameters/minfree
command echo '21780,29040,36300,43560,50820,65340' > /sys/module/lowmemorykiller/parameters/minfree
path /proc/sys/vm/swappiness
command echo '60' > /proc/sys/vm/swappiness
path /sys/module/msm_thermal/parameters/enabled
command echo 'N' > /sys/module/msm_thermal/parameters/enabled
path /sys/module/msm_thermal/core_control/enabled
command echo '1' > /sys/module/msm_thermal/core_control/enabled
path /sys/module/cpu_boost/parameters/input_boost_ms
command echo '0' > /sys/module/cpu_boost/parameters/input_boost_ms
Have fun!
EDIT: Added a Kernel Adiutor profile json zipped file as per suggestion.
https://drive.google.com/file/d/1mOdzGOI0f25NEQJLCS81nwqa-FCBq1sX/view?usp=drivesdk
Latest profile I am using with excellent results:
https://drive.google.com/file/d/13JFYnbjc7zxZed2Pgsp0KtdyiyOMICCO/view?usp=drivesdk
Turn off dt2w and pocket detection. I use my phone at work and it keeps coming on and randomly running apps, pocket dialing and opening the camera app. Very annoying for me.
Use Shortcut Master: https://play.google.com/store/apps/details?id=org.vndnguyen.shortcutmaster.lite
Select 3 dot menu > search for knock. Find the hidden menu in the list. Select launch and it will open a menu to allow disabling of this feature. (It also disables dt2sleep.
Select 3 dot menu > search for pocket. Same procedure as above.
This has probably been posted already but I wanted to post here. (Credit to reddit user spring45 https://www.google.ca/amp/s/amp.red...to_disable_double_tap_to_wake/#ampf=undefined)
Mmmm....
grantdb said:
Here are the settings I use for the stock Titan kernel (1.8):
Have fun!
Click to expand...
Click to collapse
Hi, not everyone can interpret the code. How'bout you just state the settings you choose instead. Thanks for sharing.
fi5z.x9 said:
Hi, not everyone can interpret the code. How'bout you just state the settings you choose instead. Thanks for sharing.
Click to expand...
Click to collapse
Will try if I get time.
Well I personally would prefer kernel Adiutor profiles.. You can export that and a user can import it.. That way you could even share several ones easily..
Jm5c
Sent from my LG-H815 using XDA Labs
Hi. Come to this post from Titan kernel one. I saw that this is about stock firmware v29a plus Titan kernel 1.7 for H812.
My question is, Can I use the Kernel Adiutor profile in my H815?
kinuris said:
Hi. Come to this post from Titan kernel one. I saw that this is about stock firmware v29a plus Titan kernel 1.7 for H812.
My question is, Can I use the Kernel Adiutor profile in my H815?
Click to expand...
Click to collapse
I don't see why not. They have the same options. Make sure you create your own profile in case something doesn't work. No matter what you can always flash the kernel again.

Categories

Resources