5/1/2017 || V10 (msm 8992) || CPU, GPU, IO, RAM "Tweaks"

warBeard_actual

Senior Member
Mar 27, 2016
363
1,130
0
So the dev section here has been active recently with some high quality work, and I am looking to add to the fun :D

**SEE POST 2 FOR CHANGE LOG**

***VERY IMPORTANT IF YOU ARE GOING TO USE THIS MOD, you need to navigate to the /system/etc folder on your device, and rename the file "init.lge.zramswap.sh" to "init.lge.zramswap.sh.bak" so it does not run at boot.

This is a step by step instruction on how to replace the /system/etc/init.qcom.post_boot.sh file for the LG V10. Be it known, however, that this instruction (and file) can be used with any device running the Snapdragon 808 SoC combo.

What does this do?

Simple. It turns your device into an even more efficient powerhouse. Here are is a list of everything done:

-Interactive Governor tuning for performance and better battery life, a quick description of what I did...
-low load, quick response, low frequency
-high load, quick response, higher frequency
-modified input boost settings for Interactive
-Adjusted GPU target load values
-Switched IO scheduler to noop, and tuned accordingly
-Adjusted minfree values (RAM management, it is a little more multi-tasking friendly)
-Adjusted VM parameters - swappiness, dirty ratios, cache pressure, centisec values, etc (again to complement multi-tasking... your data will hang out a little bit more before being written to disk, but house cleaning won't happen all at once, so there is still good performance and your system won't bog down while it is flushing the toilet)
-DISABLED zRAM!!! - I have no idea why a device with 4 GB of RAM has zRAM enabled. This is purely a waste of CPU cycles and other system resources. You want physical memory, not compressed memory.
-Changed congestion algorithm to cubic (better network performance... assuming the network bandwidth is already there ;) ;)
-Cleaned up the shell file and fixed some errors.
-More to come!


How to do this, we'll just get right to it.


Download this app https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
Download this file https://drive.google.com/open?id=0BzM9W6qUvx-gcm1SVDhsTDVWZ3M

And while you are here, check this out, decide which one you want.
http://forum.xda-developers.com/showpost.php?p=66792862&postcount=109

Very important you put the file on the root of your INTERNAL SDCARD!!!
Do not forget to do this.


After you do that, open terminal emulator, and type the following commands in the order they are presented (I would highly recommend just copying them from this post and switching back and forth between your browser and the terminal app):

Code:
su
Code:
cd /
Code:
mount -o remount,rw /system
Code:
cd /system/etc
Code:
rm init.qcom.post_boot.sh
Code:
cd /sdcard
Code:
mv init.qcom.post_boot.sh /system/etc
Code:
chmod 0644 /system/etc/init.qcom.post_boot.sh

Double check the file has been replaced with a file explorer of some sort, double check permissions, then reboot. Good to go.

Some of this stuff explained http://forum.xda-developers.com/tmo...nux-virtual-machine-explained-part-1-t3386956
 

Attachments

Last edited:

warBeard_actual

Senior Member
Mar 27, 2016
363
1,130
0
CHANGE LOG***

May 1, 2017
-Pretty major overhaul of the file. I've done some stuff on the Axon 7 that has been pretty effective. Rolling those changes out to other devices. https://drive.google.com/open?id=0BzM9W6qUvx-gcm1SVDhsTDVWZ3M

May 31, 2016
-Replaced corrupted files. Good to go now!
Dangerously version (fixed) https://drive.google.com/open?id=0BzM9W6qUvx-gVHBGWEp3QkpURVE
md5sum: a632c866e22114c0e18fa335f005293e

May 25, 2016
Quite a bit of changes here...
-VM completely readjusted. vfs_cache_pressure set back to default 100 to fairly reclaim memory pages that have been allocated to block specific data about file location, etc.. there are tons of write ups on this stuff if you guys want to investigate more into what this setting does, how it works. It's basically a fairness multiplier centered around a value 100. + or - that value increases or decreases the probability that the kernel will reclaim those certain memory pages relative to swap.
-Swappiness reduced drastically... from 80 to 40 (default is 60 depending on which kernel you are running)
-dirty ratio and dirty background ratios reduced drastically to avoid massive amounts of data being flushed and causing system hangups when that ceiling is hit. (lol this happened to me... system ran out of mem... *shrugs* I go hard bros)
-Increased the probably of the system to reclaim memory pages, and made a pretty big adjustment to writeback_centisecs and expire_centisecs
-Changed functional aspects of the interactive governor again - it is perfect. Nominal user experience. Same with touch input_boost. This system definitely has a sweet spot, and I'm pretty sure we've found it now.
-Decided to ditch the laptop mode idea and not mess with the RAM console outputs, the functional loss wasn't returning enough reward. So, here we are.
-Adjusted minfree once more, to
-It is important to note that the system will, admittedly, not multitask quite as aggressively. I had to do this, however, for myself mostly. As I was achieving OOM conditions and hitting the high ceilings set in other parameters like dirty_ratio and when it hits that wall, man it hits hard. Complete lock up for a good 40 seconds while everything is getting dumped from memory. I need a phone with more RAM lol. Didn't think that would ever happen on my mobile set up with 4 GB of it but here we are. I suppose I could re-enable zRAM for myself? But that would hardly help as compression ratios aren't going to yield me an extra gigabyte. Ok now I'm rambling. DOWNLOAD THE FILE!
 
Last edited:

11868

Member
Jul 25, 2014
22
12
0
When I try to move the file it's giving me this error. I have BusyBox and pretty sure it's on read/write access. What am I doing wrong -_-


1|[email protected]:/ # mv init.qcom.post_boot.sh /system/etc
mv: init.qcom.post_boot.sh: remove: Read-only file system
1|[email protected]:/ #
i got problem with the !!!!!!cd /sdcard , writing

i tried cd /storage/emulated/0

and worked for me
 

klbjr

Senior Member
Mar 16, 2008
1,320
192
93
Wilmington, DE
So this can be used on the G4? And does this overwrite settings within the kernel? If I push this file and I don't like the results can I flash a kernel to get rid of the changes?
 
  • Like
Reactions: grom44

warBeard_actual

Senior Member
Mar 27, 2016
363
1,130
0
When I try to move the file it's giving me this error. I have BusyBox and pretty sure it's on read/write access. What am I doing wrong -_-


1|[email protected]:/ # mv init.qcom.post_boot.sh /system/etc
mv: init.qcom.post_boot.sh: remove: Read-only file system
1|[email protected]:/ #
Your system wasn't mounted as rw when you executed the command

Can this be done with the root explorer instead of terminal emulator?
It can, yes, I just prefer the old school way. You can manually drop the file in the /etc folder after deleting the previous one. Just need to make sure the permissions are set appropriately.

So this can be used on the G4? And does this overwrite settings within the kernel? If I push this file and I don't like the results can I flash a kernel to get rid of the changes?
Yes, this can be used on the G4 and any other device using the Snapdragon 808. Overwrite settings within the kernel? No, I wouldn't say that. sysfs is more of a userspace / virtual file system that allows you to interact with the hardware... but the parameters we are working with here are completely writable, not permanent, and more important, will reapply AFTER boot. So, no, flashing a kernel will not revert the changes. If you want to go back, you'll need the original file to replace mine with.

Hope this answers your questions.
 
Last edited:

rirozizo

Senior Member
Jul 6, 2010
2,859
1,547
193
wonderland... soon
Since the file is hosted on Dropbox, anyone who has a dropbox account please choose the login option, and transfer the file to your dropbox before downloading it from your own storage to avoid OP's dropbox being blocked for too many downloads in a row.

Good Job OP, nice to see Junior Members doing something great in the dev section :)
 
  • Like
Reactions: warBeard_actual

danstheman7

Senior Member
Apr 20, 2011
493
64
0
Long Island NY
So I did it last night, and so far battery life seems to be much worse than before when nothing has changed but these tweaks. Any idea why? Battery stats is the same for me as usual with the exception of Android System being at 6% and Android OS at 6% use each.
 

amoot329

Senior Member
Dec 23, 2012
222
63
48
So far so good, not sure what battery usage will be like. I had terrible lag in a game called Underworld Empire and that has disappeared! How badly was the kernel/system coded before?!

Question ❓, how come your file is smaller than the original? Was there a lot of excess code that was useless?

Sent from my debloated rooted LG V10 using Tapatalk
 

warBeard_actual

Senior Member
Mar 27, 2016
363
1,130
0
Since the file is hosted on Dropbox, anyone who has a dropbox account please choose the login option, and transfer the file to your dropbox before downloading it from your own storage to avoid OP's dropbox being blocked for too many downloads in a row.

Good Job OP, nice to see Junior Members doing something great in the dev section :)
I'll try to upload the file elsewhere, didn't consider that. However, it is a very small file and dropbox might not notice/care. Good observation.

So I did it last night, and so far battery life seems to be much worse than before when nothing has changed but these tweaks. Any idea why? Battery stats is the same for me as usual with the exception of Android System being at 6% and Android OS at 6% use each.
Coincidence maybe? Keep monitoring, report back.

Also, bear in mind: rebooting your system causes a little more activity within the OS the first day or so (particularly google services) and it does have an effect on battery drain.

So far so good, not sure what battery usage will be like. I had terrible lag in a game called Underworld Empire and that has disappeared! How badly was the kernel/system coded before?!

Question , how come your file is smaller than the original? Was there a lot of excess code that was useless?

Sent from my debloated rooted LG V10 using Tapatalk
Yes, it is smaller because I removed everything that was not relevant to the msm8992 SoC. Qualcomm uses common files for just about everything and anything they can - saves them time, hassle and consolidates work somewhat.

Most of the content removed from the stock file is for other platforms not relevant for us.
 
Last edited:
  • Like
Reactions: freeza and amoot329