4/20/2017 [] 7.1.1 UPDATE [] One Plus 3 (msm 8996) [] CPU, VM, RAM, IO "Tune"

Search This thread

warBeard_actual

Senior Member
Mar 27, 2016
363
1,131
4/20/2017 [] 7.1.1 UPDATE [] One Plus 3 (msm 8996) [] CPU, VM, RAM, IO "Tune"

ORIGINAL THREAD HERE: https://xdaforums.com/axon-7/development/2-15-2017-axon-7-msm-8996-cpu-vm-ram-t3557392

This mod was originally created for the Axon 7, but due to several requests, I've modified a version for the One Plus 3, please see below, and post questions or comments in the original thread above. Please state you are a One Plus 3 user if you have feedback in that thread, to consolidate user feedback and speed up response time.

Custom tuning for a device is always a necessity. "Canned" settings will get you by, but they are certainly never optimized for a specific device. In fact, Linux typically takes a general approach to find harmonic balance in default settings that will, for the most part, work in an acceptable manner for just about any device. There are a lot of resources available on this device, so we should utilize it in a manner appropriate to squeeze out as much battery life and performance as possible without sacrificing much of those outputs, don't you think? This is going to fix that for you.

Here is what is required of you before you begin:
1. Must be rooted
2. Must have the One Plus 3 OR a device running the Snapdragon 820, as this modification is not so much device specific, but hardware specific. The important aspect being the snapdragon 820 and the RAM disk size.
3. Must have write protection disabled. If the One Plus 3 requires write protection to be disabled, see the code and instruction below:
Using adb shell:
Code:
adb reboot disemmcwp
Using Linux terminal (from your phone, for example):
Code:
reboot disemmcwp

Let's begin.

Getting right to it, here's what I've done:


- modified parameters of the interactive governor, and quite extensively at that (search some of my threads if you want a little bit of a breakdown of the general approach I take)
- reconfigured input_boost parameters
- reconfigured vm parameters (again, the device has a lot of RAM resource, this will utilize it and give you a far better user experience. Basically, I've adjusted dirty_ratio, dirty_background_ratio, swappiness, and other parameters of the virtual machine.)
- disabled zRAM for 6 GB variants (RAM compression, again, not needed on this device really, this mod will save you CPU cycles and power) this will not apply to 4 GB devices, you will still have zRAM enabled.
- remapped minfree parameters for LMK (low memory killer) again only for 6 GB variants
- Tuned CFQ scheduler for flash storage devices
- Tuned "core_ctl" module (needs kernel support, I recommend freeza's latest version of BeastMode. For those wondering, yes, you can still use this mod with the stock kernel. It won't break anything.) again this will only apply to devices that support core_ctl at the kernel.

In a nutshell, that's what we're looking at here. I can guarantee you this will have a significantly positive impact on your device. Turbo time, homies.

How to install????


Easy. First, the file we are replacing is found in /system/etc... it is the "init.qcom.post_boot.sh" file - this file is basically shell scripts, which are applied at boot via this particular shell file.

All you have to do is download the file to your device, open up a file explorer (must have root capability), navigate to the /system/etc folder with said file explorer, mount your /system as RW (read write), delete your stock "init.qcom.post_boot.sh" file, and replace it with mine.

After you've successfully done this, change the new file's permissions to rw-r--r-- (0644), and then reboot!

Or, if you are brave, you can do it manually via a terminal app and get your fingers wet... if you choose to do that, see below:

Make sure the file is located on the root of your internal sdcard in /sdcard, open your terminal app (again, must have root) and type the following commands, hitting enter after each one (be careful to pay attention to the spacing).

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

I don't want credit, don't need you to give or offer donations, this is purely for the community in the spirit of Linux ideology. All I ask is for you to hit the thanks button :good:

That's pretty much it, guys. Enjoy!

DOWNLOAD
 
Last edited:

danny b.

Senior Member
Sep 10, 2014
118
52
Downloaded

ORIGINAL THREAD HERE: https://xdaforums.com/axon-7/development/2-15-2017-axon-7-msm-8996-cpu-vm-ram-t3557392

Hello, everyone. I would like to provide this modification for this device, as it uses the same SoC as the Axon 7, V10, HTC 10... and a few other devices.

If anybody is interested, please provide me with the STOCK init.qcom.post_boot.sh file, which is found in /system/etc and I will post the modified file and instructions on how to install it.

:good:
Ok see immediately improvement! Thanks !
Going to test it a couple of days!
 

AlkaliV2

Senior Member
Jun 12, 2012
1,506
1,700
¯\_(ツ)_/¯
Google Pixel 5
Read through your entire other thread, you have been updating pretty tirelessly. I installed it on Open Beta 14, ran cat /proc to ensure swappiness was good and it shows 1 just like the config file so the tweaks are up and running on my device. I'm running the beta with the stock kernel so I'll do some testing and see how it does with general performance over the next few days.

I don't know who asked to you share this with us, but we definitely appreciate it :good:
 
  • Like
Reactions: warBeard_actual

theduke7

Senior Member
Apr 8, 2011
1,631
1,124
Cairo
Samsung Galaxy A23
will test it for a couple of days and report...
Heads Up...
the adb command doesn't work for me on OB13, it reboots the phone and doesn't disable Write protection, i went around that by deleting and replacing the file from TWRP...
 

karthickkatta

Senior Member
Mar 13, 2012
254
44
chennai
Thank you I could see some battery improvements.i copied that file through twrp ..Using 4g and got 2.40 hours sot still 50 percent battery remaining.phone doesn't slow down or heat up it's a must try
 
  • Like
Reactions: warBeard_actual

AlkaliV2

Senior Member
Jun 12, 2012
1,506
1,700
¯\_(ツ)_/¯
Google Pixel 5
If i change the kernel like blue spark then its worth it ?
And orignel file is about 122 k and youe file is only 22k.

He addresses this in the original thread and it is the same size difference on the axon 7. He removed the generic options and put in modified and tuned optimizations for our specific hardware build instead of every MSM device. It definitely provides a more responsive system overall, but I haven't had it running long enough to see the battery impact on the device.
 
Last edited:

danny b.

Senior Member
Sep 10, 2014
118
52
Day 2 hotter than normal. In keep on testing

Edit: back to normal
Problem was new app
 
Last edited:

Nezorflame

Senior Member
How to check if it works?

Will it work on custom ROMs (AICP etc?)

Definitely no for custom ROMs. Using AICP with latest ElementalX, the file mentioned by OP is not even present in our /system/etc.
Anyway, pretty sure that kernel devs have already tweaked most of the parameters changed by this sh script, so I don't see any need for it for anyone except stock ROM and stock kernel users.

P.S. Still, a lot of work was done by OP, it definitely deserves a big Thank you.
 
Last edited:

warBeard_actual

Senior Member
Mar 27, 2016
363
1,131
Definitely no for custom ROMs. Using AICP with latest ElementalX, the file mentioned by OP is not even present in our /system/etc.
Anyway, pretty sure that kernel devs have already tweaked most of the parameters changed by this sh script, so I don't see any need for it for anyone except stock ROM and stock kernel users.

P.S. Still, a lot of work was done by OP, it definitely deserves a big Thank you.

Thanks for the nod. And while I can't speak to the changes implemented by kernel compilers on this forum, I would be willing to give you guys a comparison of the custom ROMs/combos you're running on your op3.

It might shed some light on whether or not you'd benefit from using it if you're using a CM type set up.

Here's what you do... Go into /sys/devices/system/cpu/cpu0/cpufreq/interactive ...

There will be a bunch of files in there for above_hispeed_freq, hispeed_load... A bunch of others. Open them up with a file explorer, snap a screen shot, post it here so I can see the values of your CM-based ROMs.
 
Last edited:

Chabola

Senior Member
Aug 17, 2016
94
30
Is there I way to confirm that it is working properly because I think it is but it feels like a placebo effect. Thanks for the mod :good:
 

Nezorflame

Senior Member
Thanks for the nod. And while I can't speak to the changes implemented by kernel compilers on this forum, I would be willing to give you guys a comparison of the custom ROMs/combos you're running on your op3.

It might shed some light on whether or not you'd benefit from using it if you're using a CM type set up.

Here's what you do... Go into /sys/devices/system/cpu/cpu0/cpufreq/interactive ...

There will be a bunch of files in there for above_hispeed_freq, hispeed_load... A bunch of others. Open them up with a file explorer, snap a screen shot, post it here so I can see the values of your CM-based ROMs.

Here are the contents of the .../interactive folder (everything except boostpulse - got 'Permision denied' on that).
That's for the AICP (based on LOS).
 

Attachments

  • interactive_contents.txt
    1.3 KB · Views: 25

Jerjawi

Senior Member
Jun 20, 2016
82
18
Hello.. Thanks for your mod.
I'm using freedomOS OB13 with francos kernel with his app. Already did all the steps in this thread.
Now, I Just wanted to know if it's just for stock phones or will it improve for everyone?
And how to check if everything is as it should?

Thanks in advance!

---------- Post added at 10:27 AM ---------- Previous post was at 10:22 AM ----------

will test it for a couple of days and report...
Heads Up...
the adb command doesn't work for me on OB13, it reboots the phone and doesn't disable Write protection, i went around that by deleting and replacing the file from TWRP...

Hey.. How did you check if the write protection is still disabled?
I'm on OB13 as well and my phone just restarted after the command and I thought that's it!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 36
    4/20/2017 [] 7.1.1 UPDATE [] One Plus 3 (msm 8996) [] CPU, VM, RAM, IO "Tune"

    ORIGINAL THREAD HERE: https://xdaforums.com/axon-7/development/2-15-2017-axon-7-msm-8996-cpu-vm-ram-t3557392

    This mod was originally created for the Axon 7, but due to several requests, I've modified a version for the One Plus 3, please see below, and post questions or comments in the original thread above. Please state you are a One Plus 3 user if you have feedback in that thread, to consolidate user feedback and speed up response time.

    Custom tuning for a device is always a necessity. "Canned" settings will get you by, but they are certainly never optimized for a specific device. In fact, Linux typically takes a general approach to find harmonic balance in default settings that will, for the most part, work in an acceptable manner for just about any device. There are a lot of resources available on this device, so we should utilize it in a manner appropriate to squeeze out as much battery life and performance as possible without sacrificing much of those outputs, don't you think? This is going to fix that for you.

    Here is what is required of you before you begin:
    1. Must be rooted
    2. Must have the One Plus 3 OR a device running the Snapdragon 820, as this modification is not so much device specific, but hardware specific. The important aspect being the snapdragon 820 and the RAM disk size.
    3. Must have write protection disabled. If the One Plus 3 requires write protection to be disabled, see the code and instruction below:
    Using adb shell:
    Code:
    adb reboot disemmcwp
    Using Linux terminal (from your phone, for example):
    Code:
    reboot disemmcwp

    Let's begin.

    Getting right to it, here's what I've done:


    - modified parameters of the interactive governor, and quite extensively at that (search some of my threads if you want a little bit of a breakdown of the general approach I take)
    - reconfigured input_boost parameters
    - reconfigured vm parameters (again, the device has a lot of RAM resource, this will utilize it and give you a far better user experience. Basically, I've adjusted dirty_ratio, dirty_background_ratio, swappiness, and other parameters of the virtual machine.)
    - disabled zRAM for 6 GB variants (RAM compression, again, not needed on this device really, this mod will save you CPU cycles and power) this will not apply to 4 GB devices, you will still have zRAM enabled.
    - remapped minfree parameters for LMK (low memory killer) again only for 6 GB variants
    - Tuned CFQ scheduler for flash storage devices
    - Tuned "core_ctl" module (needs kernel support, I recommend freeza's latest version of BeastMode. For those wondering, yes, you can still use this mod with the stock kernel. It won't break anything.) again this will only apply to devices that support core_ctl at the kernel.

    In a nutshell, that's what we're looking at here. I can guarantee you this will have a significantly positive impact on your device. Turbo time, homies.

    How to install????


    Easy. First, the file we are replacing is found in /system/etc... it is the "init.qcom.post_boot.sh" file - this file is basically shell scripts, which are applied at boot via this particular shell file.

    All you have to do is download the file to your device, open up a file explorer (must have root capability), navigate to the /system/etc folder with said file explorer, mount your /system as RW (read write), delete your stock "init.qcom.post_boot.sh" file, and replace it with mine.

    After you've successfully done this, change the new file's permissions to rw-r--r-- (0644), and then reboot!

    Or, if you are brave, you can do it manually via a terminal app and get your fingers wet... if you choose to do that, see below:

    Make sure the file is located on the root of your internal sdcard in /sdcard, open your terminal app (again, must have root) and type the following commands, hitting enter after each one (be careful to pay attention to the spacing).

    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

    I don't want credit, don't need you to give or offer donations, this is purely for the community in the spirit of Linux ideology. All I ask is for you to hit the thanks button :good:

    That's pretty much it, guys. Enjoy!

    DOWNLOAD
    2
    Definitely no for custom ROMs. Using AICP with latest ElementalX, the file mentioned by OP is not even present in our /system/etc.
    Anyway, pretty sure that kernel devs have already tweaked most of the parameters changed by this sh script, so I don't see any need for it for anyone except stock ROM and stock kernel users.

    P.S. Still, a lot of work was done by OP, it definitely deserves a big Thank you.

    Thanks for the nod. And while I can't speak to the changes implemented by kernel compilers on this forum, I would be willing to give you guys a comparison of the custom ROMs/combos you're running on your op3.

    It might shed some light on whether or not you'd benefit from using it if you're using a CM type set up.

    Here's what you do... Go into /sys/devices/system/cpu/cpu0/cpufreq/interactive ...

    There will be a bunch of files in there for above_hispeed_freq, hispeed_load... A bunch of others. Open them up with a file explorer, snap a screen shot, post it here so I can see the values of your CM-based ROMs.
    1
    I'm willing to give it a go...
    File attached ?
    1
    Read through your entire other thread, you have been updating pretty tirelessly. I installed it on Open Beta 14, ran cat /proc to ensure swappiness was good and it shows 1 just like the config file so the tweaks are up and running on my device. I'm running the beta with the stock kernel so I'll do some testing and see how it does with general performance over the next few days.

    I don't know who asked to you share this with us, but we definitely appreciate it :good:
    1
    Thank you I could see some battery improvements.i copied that file through twrp ..Using 4g and got 2.40 hours sot still 50 percent battery remaining.phone doesn't slow down or heat up it's a must try