Related
FIRST: Supercurio makes a really awesome app, so I highly recommend purchasing the pro version to support further development for two reasons. First, it's the right thing to do and second, I haven't figured out how to make all of the VooDoo sound settings work yet, and I'm a busy college student in my senior year attempting to convince someone to pay me, so I don't have much time on my hands (thus my erratic shower schedule).
That being said, I have attached a script that I run on boot. That being said, I'm running AOSP's oiCSv43 ROM with Eugene's Speedy 2 kernel. So long as your kernel supports the following options (which will be listed below), you shouldn't have a problem with this script. I've also verified that it works just peachy with GLaDOS 2.5 for ICS-- another very good ICS kernel [I head 2.6 is quite nice]. (This should also work for GB roms if anyone cares to test for me)
You must have
root
superuser
busybox, or an alternate way to mount /system as writable (there are 2 other methods AFAIK)
ROM that supports init.d scripts OR scripter or some other app like it (in this case, you can just add the script to scripter and set it to run on boot)
If you don't (know if you) have init.d support, check out this post by damnmisur about scripting with ROM Toolbox
This script changes the following:
cpu governor -> interactive
max freq->1000mhz
min freq->150mhz
touchwake enabled with 10 second delay
back light dimmer settings are commented out, so it uses whatever is default for you kernel
bln enabled with blink disabled
blx commented out (reverts to kernel default which is likely 96%)
voodoo_color/red_multiplier->2724764160
voodoo_color/green_multiplier->3059586880
voodoo_color/blue_multiplier->2944130880
voodoo_color/red_v1_offset->-26
voodoo_color/green_v1_offset->-30
voodoo_color/blue_v1_offset->-33
voodoo sound anti-jitter, hi-fi play, hi-fi record, dac direct, voodoo sound control enabled
headphone_amplifier_level->+3db
voodoo sound mono downmix disabled
USE AT YOUR OWN RISK! I AM NOT LIABLE IF ANYTHING GOES WRONG!!!
NANDROID NANDROID NANDROID.
ALWAYS MAKE A BACKUP
NANDROID
The script is in the zip. To install:
Unzip archive into same directory as adb (or wherever you want if you know what you're doing)
open a terminal
Code:
adb remount
adb shell
su
busybox mount -o remount,rw /system
exit
adb push 99whirlpool-Speedy_2 /system/etc/init.d/99whirlpool-Speedy_2
adb shell
chmod 755 /system/etc/init.d/99whirlpool-Speedy_2 && reboot
The file has no extension! If you want to edit it, open it in a text editor. If you don't know what you're doing, don't play with it. To disable boolean values, change the 1 (1 means true i.e. on) to a 0 (which means false, i.e. off).
frequency values are in hertz
you can find out what scaling governors and frequencies your kernel supports by typing
Code:
adb shell
su
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
Feel free to edit anything you'd like!
DO NOT FLASH THE .ZIP FILE! Extract and follow the directions above
thanks....
Nice but some of your changes are the exact opposite of what I use. So I'll just change voodoo settings because I'll be a lot less to change with every boot than if I was to use this.
I do of course use easy settings. Color multipliyer: all the way right.
Gama: all the way left.
Sent from my Nexus S 4G using XDA App. Developer of brickROM, and OP of XDA Thread of The Year 2011.
Thank you.
Don't voodoo settings stick by default? It seems my voodoo settings stick just fine without using any script?
Si_NZ said:
Don't voodoo settings stick by default? It seems my voodoo settings stick just fine without using any script?
Click to expand...
Click to collapse
They do with the PRO version, not the free one. I've also never had a problem with them NOT sticking on Pete Alfonso's GPA19, or any GB ROM for that matter, but many ICS users, including myself, have not been able to get our settings to stick recently.
This also means that I don't have to use NSTools or VooDoo Control.
Translation:
no apps changing settings on boot->
fewer individual SU requests (count the number of toast notifications, or check the request list in the superuser app for NSTools and VooDoo control on boot)->
faster boot sequence, and less lag on boot.
Not everyone may have this problem, but I and others do.
I'm visiting for a lesson, had read this before on aosp's or Eugene's kernel threads, but didn't get it so, wanted to ask and thank you for this help.
I'm trying to make voodoo stick, I downloaded your zip, opened and changed a couple of things in Wordpad, it asked to save and rezip, said yes. I used different multipliers and want bln to blink, so changed those numbers and the blink 0 to 1 (or vice versa, followed your directions).
So to do this, do I just flash zip in recovery? Any wipe or just flash away??
Like you said, I will backup, but really don't want to make a mess and thought I would double check first.
nmoreman said:
I'm visiting for a lesson, had read this before on aosp's or Eugene's kernel threads, but didn't get it so, wanted to ask and thank you for this help.
I'm trying to make voodoo stick, I downloaded your zip, opened and changed a couple of things in Wordpad, it asked to save and rezip, said yes. I used different multipliers and want bln to blink, so changed those numbers and the blink 0 to 1 (or vice versa, followed your directions).
So to do this, do I just flash zip in recovery? Any wipe or just flash away??
Like you said, I will backup, but really don't want to make a mess and thought I would double check first.
Click to expand...
Click to collapse
Don't flash the zip. It's just there so that I could upload the attachment properly.
The script is in the zip. To install:
Unzip archive into same directory as adb (or wherever you want if you know what you're doing)
open a terminal
Code:
adb remount
adb shell
su
busybox mount -o remount,rw /system
exit
adb push 99whirlpool-Speedy_2 /system/etc/init.d/99whirlpool-Speedy_2
adb shell
chmod 755 /system/etc/init.d/99whirlpool-Speedy_2 && reboot
I'll add a readme to the zip to make it more obvious.
Shark_On_Land said:
Nice but some of your changes are the exact opposite of what I use. So I'll just change voodoo settings because I'll be a lot less to change with every boot than if I was to use this.
I do of course use easy settings. Color multipliyer: all the way right.
Gama: all the way left.
Sent from my Nexus S 4G using XDA App. Developer of brickROM, and OP of XDA Thread of The Year 2011.
Click to expand...
Click to collapse
If your just worried about voodoo settings you could do the following :
http://forum.xda-developers.com/showthread.php?t=1366780 or just use the script from this method. Of course you have to edit numbers to your preference.
Sent from my Skanky Nexus S in the Matr1x using XDA App
damnmisur said:
If your just worried about voodoo settings you could do the following :
http://forum.xda-developers.com/showthread.php?t=1366780 or just use the script from this method. Of course you have to edit numbers to your preference.
Sent from my Skanky Nexus S in the Matr1x using XDA App
Click to expand...
Click to collapse
Thanks, I'm going to add this post to the OP as an alternative for those without init.d support
Hi,
I have seen people over-clock their HD2 to 1.5GHz,
Is this at all safe to do?
If so can it be done on an SD build for example Boxmax Runnymead V6.5
I understand you need a certain kernal, which one?
Thanks,
Alex
Yes it's safe
Your phone will go onto that speed only if it's needed and afterwards slow down.
I don't know the sd kernels but if you use dorimanx kernel for nand Roms (will work on every nand rom) you will have that feature.
Press the thanks button
Sent from my HTC HD2 using xda premium
alex.odell.2011 said:
Hi,
I have seen people over-clock their HD2 to 1.5GHz,
Is this at all safe to do?
If so can it be done on an SD build for example Boxmax Runnymead V6.5
I understand you need a certain kernal, which one?
Thanks,
Alex
Click to expand...
Click to collapse
To over clock on an sd build you have to edit your startup.txt .
Sent from my GT-I9100 using Tapatalk
I have last dorimax kernel,i use it since 3.2 version.Now it s about 1 mounth that my hd2 cpu is clocked @ max 1612Mhz and min 96Mhz (possible from 3.8)
Great performance with zram enabled,the phone is ultra fast and is not hot.
elesbb said:
To over clock on an sd build you have to edit your startup.txt .
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
How do you do that?
alex.odell.2011 said:
How do you do that?
Click to expand...
Click to collapse
The startup.txt should be in the same folder as the other sd rom files you download when choosing a rom. Just open it with notepad and make your changes.
chrisrj28 said:
The startup.txt should be in the same folder as the other sd rom files you download when choosing a rom. Just open it with notepad and make your changes.
Click to expand...
Click to collapse
I have no reference to "cpu frequencys" what text would I have to put, and where to set the min value to 384MHz to 1.5GHz.
Thanks guys
Isn't it possible to change CPU Frequencies by using SetCPU or is it SDCard relatet?
alex.odell.2011 said:
I have no reference to "cpu frequencys" what text would I have to put, and where to set the min value to 384MHz to 1.5GHz.
Thanks guys
Click to expand...
Click to collapse
This is the command you MUST use to set the overclock kernel speeds.
This is just an example , the 614400 is the speed in Khz . so Mhz would be 614.4 but the code in the text file must be in khz. It must be entered in between the quotes after the "set cmdline"
Code:
acpuclock.oc_freq_khz=614400 for 614.4 MHz. Choose multiples of 19.2 MHz
here i have an example of a simple startup.txt file also with the location of the cpu clock speed preset.
Code:
set mtype 2524
set ramaddr 0x11800000
set ramsize 0x1e400000
set KERNEL zImage
set initrd initrd.gz
set initrd_offset 0x00a00000
set cmdline "rel_path='Your path to android on SD' acpuclock.oc_freq_khz=614400"
boot
domimatik said:
Isn't it possible to change CPU Frequencies by using SetCPU or is it SDCard relatet?
Click to expand...
Click to collapse
SetCPU only "forces" which speeds to be used , the speeds must first be set by the kernel which is what the above command does in the startup.txt
Then you would use SetCPU to set the min and max frequencies of choice
elesbb said:
This is the command you MUST use to set the overclock kernel speeds.
This is just an example , the 614400 is the speed in Khz . so Mhz would be 614.4 but the code in the text file must be in khz. It must be entered in between the quotes after the "set cmdline"
Code:
acpuclock.oc_freq_khz=614400 for 614.4 MHz. Choose multiples of 19.2 MHz
here i have an example of a simple startup.txt file also with the location of the cpu clock speed preset.
Code:
set mtype 2524
set ramaddr 0x11800000
set ramsize 0x1e400000
set KERNEL zImage
set initrd initrd.gz
set initrd_offset 0x00a00000
set cmdline "rel_path='Your path to android on SD' acpuclock.oc_freq_khz=614400"
boot
SetCPU only "forces" which speeds to be used , the speeds must first be set by the kernel which is what the above command does in the startup.txt
Then you would use SetCPU to set the min and max frequencies of choice
Click to expand...
Click to collapse
Tried that but it didn't apply I did "1497600",
That just caused more lag?!?
Thanks
alex.odell.2011 said:
Tried that but it didn't apply I did "1497600",
That just caused more lag?!?
Thanks
Click to expand...
Click to collapse
did you then use SetCPU to set the Max clock speed ? and to set the proper governers ? and you have the code at the correct spot too right ? double and tripple check . also is it a multiple of 19.2 ?
elesbb said:
did you then use SetCPU to set the Max clock speed ? and to set the proper governers ? and you have the code at the correct spot too right ? double and tripple check . also is it a multiple of 19.2 ?
Click to expand...
Click to collapse
Ok I will reinstall android and try 1478400,
Alex
alex.odell.2011 said:
Ok I will reinstall android and try 1478400,
Alex
Click to expand...
Click to collapse
If you are doing everything correctly it should work without a problem . We will figure it out though
Hi guys tried it again,
No luck,
I am using Hasterin SenBT 8.6 (I think :S)
No luck, Maybe the kernal does not support OC,
Here is my "Startup.txt"
##BoxmaX S3.5 Runny v6.5##
set mtype 2524
set ramaddr 0x11800000
set ramsize 0x1e400000
set KERNEL zImage
set initrd initrd.gz
set initrd_offset 0x00a00000
set cmdline "rel_path=Android data_size=1024 acpuclock.oc_freq_khz=1478400 nand_boot=0"
boot
alex.odell.2011 said:
Hi guys tried it again,
No luck,
I am using Hasterin SenBT 8.6 (I think :S)
No luck, Maybe the kernal does not support OC,
Here is my "Startup.txt"
##BoxmaX S3.5 Runny v6.5##
set mtype 2524
set ramaddr 0x11800000
set ramsize 0x1e400000
set KERNEL zImage
set initrd initrd.gz
set initrd_offset 0x00a00000
set cmdline "rel_path=Android data_size=1024 acpuclock.oc_freq_khz=1478400 nand_boot=0"
boot
Click to expand...
Click to collapse
Can you link me to the ROM ? also are you able to boot at all ?
elesbb said:
Can you link me to the ROM ? also are you able to boot at all ?
Click to expand...
Click to collapse
Hi,
Yes it boots fine, running it now, great build I have 1.2GHz overclock as stock on build.
here you go...
http://forum.xda-developers.com/showthread.php?t=1256423
alex.odell.2011 said:
Hi,
Yes it boots fine, running it now, great build I have 1.2GHz overclock as stock on build.
here you go...
http://forum.xda-developers.com/showthread.php?t=1256423
Click to expand...
Click to collapse
Hmmm i see nothing about Overclocking on his thread , after you set the OC speed in your startup.txt can you still boot ? and check via SetCPU what the max cpu clock speed is at . it might be a simple format error .
elesbb said:
Hmmm i see nothing about Overclocking on his thread , after you set the OC speed in your startup.txt can you still boot ? and check via SetCPU what the max cpu clock speed is at . it might be a simple format error .
Click to expand...
Click to collapse
I have tried it again and it boots fine, when I go into SetCPU it just says the max speed is 1.2GHz ?!?!
Strange?
alex.odell.2011 said:
I have tried it again and it boots fine, when I go into SetCPU it just says the max speed is 1.2GHz ?!?!
Strange?
Click to expand...
Click to collapse
Hmm my only guess is the clock speed is hardwired into the kernel , id contact the dev of that ROM and ask him . It seems like OC is set by default
Sounds possible. Thanks for your help. 1.2GHz is still fast and safer I guess.
Sent from my HTC Sensation XL with Beats Audio X315e using xda premium
I've used Devil2_0.79 and now 0.94 since it was released.
As of today, when I change some setting (/sys/devices/virtual/misc/devil_idle/bus_limit to 1 or /sys/kernel/bigmem/enable to 1 or any other setting like this), after reboot all settings are reverted to default.
In more detail:
I use Root Explorer to navigate and edit. It says "Mounted as r/w" on top left.
I edit the file and change the setting, and upon exiting, I save the file. If I reopen the file, the change is there. After reboot, it reverts to default.
So, I can't control devil_idle and bigmem (my two tweaks on Devil Kernel).
Am I doing anything wrong? It used to work and changes were persistent...
I've even reflashed the kernel, wiped cache and dalvik, and still nothing.
Any help would be appreciated.
Jovenitto said:
I've used Devil2_0.79 and now 0.94 since it was released.
As of today, when I change some setting (/sys/devices/virtual/misc/devil_idle/bus_limit to 1 or /sys/kernel/bigmem/enable to 1 or any other setting like this), after reboot all settings are reverted to default.
In more detail:
I use Root Explorer to navigate and edit. It says "Mounted as r/w" on top left.
I edit the file and change the setting, and upon exiting, I save the file. If I reopen the file, the change is there. After reboot, it reverts to default.
So, I can't control devil_idle and bigmem (my two tweaks on Devil Kernel).
Am I doing anything wrong? It used to work and changes were persistent...
I've even reflashed the kernel, wiped cache and dalvik, and still nothing.
Any help would be appreciated.
Click to expand...
Click to collapse
You have to echo the desired value with some kind of init.d script or using command center and the devil.json (link in OP). Otherwise the file gets reverted to default.
.:Crack:. said:
You have to echo the desired value with some kind of init.d script or using command center and the devil.json (link in OP). Otherwise the file gets reverted to default.
Click to expand...
Click to collapse
Ok... something must have changed tha I haven't noticed, because before I could change values as I described, and they sticked.
I'm fairly proficient in Linux, so I shouldn't have a problem writing init.d scrips, but I'll give Command Center a try. much more user-friendly, IMO.
I'll report back on results.
Didn't work with CC. Settings are reset after reboot.
Didn't work with init.d script either.
placed script in /system/etc/init.d/
chmod'ed to 755
name: bus_limit (NO .sh extension)
contents:
Code:
#!/sbin/sh
log "Enabling Devil_Idle"
echo 1 > /sys/devices/virtual/misc/devil_idle/bus_limit
What am I doing wrong?
Jovenitto said:
Didn't work with init.d script either.
placed script in /system/etc/init.d/
chmod'ed to 755
name: bus_limit (NO .sh extension)
contents:
Code:
#!/sbin/sh
log "Enabling Devil_Idle"
echo 1 > /sys/devices/virtual/misc/devil_idle/bus_limit
What am I doing wrong?
Click to expand...
Click to collapse
You need to comment 'log "Enabling Devil_Idle' out by putting a # before it.
dark_knight35 said:
You need to comment 'log "Enabling Devil_Idle' out by putting a # before it.
Click to expand...
Click to collapse
contents:
Code:
#!/sbin/sh
#log "Enabling Devil_Idle"
echo 1 > /sys/devices/virtual/misc/devil_idle/bus_limit
Still not working...
Jovenitto said:
contents:
Code:
#!/sbin/sh
#log "Enabling Devil_Idle"
echo 1 > /sys/devices/virtual/misc/devil_idle/bus_limit
Still not working...
Click to expand...
Click to collapse
#!/system/sbin/sh
/sbin doesn't exist.
Gesendet von meinem GT-I9000 mit Tapatalk 2
dark_knight35 said:
#!/system/sbin/sh
/sbin doesn't exist.
Gesendet von meinem GT-I9000 mit Tapatalk 2
Click to expand...
Click to collapse
Rookie mistake...
Anyway, /sbin doesn't exist, neither does /system/sbin/sh...
I have /system/xbin/sh.
Changed it to
#!/system/xbin/sh
#log "Enabling Devil_Idle"
echo 1 > /sys/devices/virtual/misc/devil_idle/bus_limit
Click to expand...
Click to collapse
And still nothing.
/sbin/sh doesn't exist
/system/sbin/sh doesn't exist
/system/sbin/sh exists, doesn't work
Maybe you have to put a 'S' (capital) as first letter of the script. Some kernels only extract init.d scripts with it. I'm not sure if devil also.
It worked! Adding the S at the beginning of the file name did it.
For future reference, the file name is now S00_tweaks
Sent from somewhere in the Galactic Sector ZZ9 Plural Z Alpha, in the Western Spiral Arm of The Galaxy.
Well... I realize now that my success was not complete.
All settings are edited at boot, as necessary. So, devil_idle is working at my chosen frequencies.
It doesn't matter when Ii change these settings, because they take effect immediately.
Bigmem does not.
After changing I must reboot.
So, the setting is reset to 0, the phone boots and then my script edits it to 1.
At the time of boot, bigmem=0 (/sys/kernel/bigmem/enable, to be precise) and the kernelk boots as so.
init.d script is fine for devil_idle, but not for bigmem.
That leaves me exactly at the same place.
CC works now (I figured out the problem, wrong paths in json), but settings are still reverted at boot.
Jovenitto said:
Well... I realize now that my success was not complete.
All settings are edited at boot, as necessary. So, devil_idle is working at my chosen frequencies.
It doesn't matter when Ii change these settings, because they take effect immediately.
Bigmem does not.
After changing I must reboot.
So, the setting is reset to 0, the phone boots and then my script edits it to 1.
At the time of boot, bigmem=0 (/sys/kernel/bigmem/enable, to be precise) and the kernelk boots as so.
init.d script is fine for devil_idle, but not for bigmem.
That leaves me exactly at the same place.
CC works now (I figured out the problem, wrong paths in json), but settings are still reverted at boot.
Click to expand...
Click to collapse
DerTeufel built a test kernel with working bigmem. It boots and if you've set gigmem to something else than 0, it'll reboot to make it work.
hum...
Getting weirder and weirder...
/sys/kernel/bigmem/enable = 0, but 720p play/rec is working...
How do I check if i'm running on bigmem/xl/normal kernel mode?
Jovenitto said:
hum...
Getting weirder and weirder...
/sys/kernel/bigmem/enable = 0, but 720p play/rec is working...
How do I check if i'm running on bigmem/xl/normal kernel mode?
Click to expand...
Click to collapse
Did you flash the devil3 kernel? You can look in settings->apps->running, hiw many RAM you have.
Gesendet von meinem GT-I9000 mit Tapatalk 2
dark_knight35 said:
Did you flash the devil3 kernel? You can look in settings->apps->running, hiw many RAM you have.
Gesendet von meinem GT-I9000 mit Tapatalk 2
Click to expand...
Click to collapse
I'm on Devil2_0.94.
I was under the impression that Devil3 was for other phone(s)...
What are the major differences betweeen Devil3_0.71 and Devil2_0.94?
I doubt that D3 is just a newer version, because D2 is still being developed and released regularly...
Anyway... I've flashed Devil3_0.71.
Some settings are permanent (bigmem and devil_idle/enable were "1" at first boot), but some are not (user_max, user_min, user_min_max_enable still revert to defaults).
I'll keep with the init.d script to set these up, and can check if they are set as I wish with CC and correct them on the fly, if necessary.
The most important setting was bigmem and that one works.
Still, I would like to know why these other settings don't "stick". Is it a bug in the kernel or is it just made that way?
No, D2 isn't developed anymore. DerTeufel named his kernel to D3, as it's the same kernel for more devices now.
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.
INSTALLATIONStep 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
...
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.