[OnePlus 2 Android Development] nexus_vl:
It took me some time, but here is my init.d script and quick guide as how to apply.

Copy the following text:

#!/system/bin/sh

### CPU ###

echo 0 > /sys/module/cpu_boost/parameters/sync_threshold

chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq

echo 1632000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq

chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq

chmod 644 /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq

echo 1632000 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq

chmod 444 /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq

chmod 644 /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq

echo 1632000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq

chmod 444 /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq

chmod 644 /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq

echo 1632000 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq

chmod 444 /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq

chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq

echo 302400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq

chmod 644 /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq

echo 302400 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq

chmod 644 /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq

echo 302400 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq

chmod 644 /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq

echo 302400 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq

chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

echo 1708800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

chmod 644 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

echo 1708800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq

chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq

echo 1708800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq

chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq

chmod 644 /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq

echo 1708800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq

chmod 444 /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq

chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor

echo interactive > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor

chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor

chmod 644 /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor

echo interactive > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor

chmod 444 /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor

chmod 644 /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor

echo interactive > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor

chmod 444 /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor

chmod 644 /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor

echo interactive > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor

chmod 444 /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor

chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

chmod 644 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

echo interactive > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

echo interactive > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

chmod 644 /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

echo interactive > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

chmod 444 /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

echo 302400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

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

chmod 644 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

echo 302400 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

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

chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq

echo 302400 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq

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

chmod 644 /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq

echo 302400 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq

echo 250 > /sys/module/cpu_boost/parameters/boost_ms

echo 1 > /sys/module/cpu_boost/parameters/input_boost_enabled

echo 250 > /sys/module/cpu_boost/parameters/input_boost_ms

echo 0:1344000 1:0 2:0 3:0 4:0 5:0 6:0 7:0 > /sys/module/cpu_boost/parameters/input_boost_freq

echo 19000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay

echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time

echo 10000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate

echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/align_windows

echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse_duration

echo 99 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load

echo 1440000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq

echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy

echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis

echo 60000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_slack

echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif

echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load

echo 90 1344000:99 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads

echo 90 1478400:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads

echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay

echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/align_windows

echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration

echo 99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load

echo 1555200 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq

echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy

echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis

echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time

echo 10000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate

echo 60000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack

echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif

echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load

### CPU HOTPLUG ###

echo 1 > /sys/module/msm_hotplug/msm_enabled

echo 0 > /sys/module/msm_hotplug/io_is_busy

echo 100 > /sys/module/msm_hotplug/fast_lane_load

echo 1 > /sys/module/msm_hotplug/max_cpus_online_susp

echo 4 > /sys/module/msm_hotplug/max_cpus_online

echo 3 > /sys/module/msm_hotplug/min_cpus_online

echo 0 > /sys/module/msm_hotplug/parameters/debug_mask

echo 80 > /sys/module/msm_hotplug/kick_in_load_big

echo 4 > /sys/module/msm_hotplug/max_cpus_online_big

echo 1 > /sys/module/msm_hotplug/min_cpus_online_big

echo 20 > /sys/module/msm_hotplug/offline_load

echo 30 > /sys/module/msm_hotplug/offline_load_big

echo 90 > /sys/module/msm_hotplug/online_load_big

echo 20 > /sys/module/msm_hotplug/update_rate

### THERMAL ###

echo 1 > /sys/module/msm_thermal/core_control/enabled

echo N > /sys/module/msm_thermal/parameters/enabled

echo 0 > /sys/module/msm_thermal/vdd_restriction/enabled

### GPU ###

echo 450000000 > /sys/devices/soc.0/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk

echo 27000000 > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq

echo msm-adreno-tz > /sys/devices/soc.0/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/governor

### SCREEN ###

echo 256 256 256 > /sys/devices/platform/kcal_ctrl.0/kcal

echo 1 > /sys/devices/platform/kcal_ctrl.0/kcal_enable

echo 35 > /sys/devices/platform/kcal_ctrl.0/kcal_min

echo 0 > /sys/devices/platform/kcal_ctrl.0/kcal_invert

echo 0 > /sys/devices/platform/kcal_ctrl.0/kcal_hue

echo 248 > /sys/devices/platform/kcal_ctrl.0/kcal_val

echo 262 > /sys/devices/platform/kcal_ctrl.0/kcal_cont

echo 280 > /sys/devices/platform/kcal_ctrl.0/kcal_sat

### BATTERY ###

echo 0 > sys/module/battery_current_limit/parameters/low_battery_value

### I/O SCHEDULER ###

echo maple > /sys/block/mmcblk0/queue/scheduler

echo 2048 > /sys/block/mmcblk0/queue/read_ahead_kb

echo 0 > /sys/block/mmcblk0/queue/rotational

echo 0 > /sys/block/mmcblk0/queue/add_random

echo 0 > /sys/block/mmcblk0/queue/iostats

echo 1 > /sys/block/mmcblk0/queue/rq_affinity

### LMK ###

echo 18432,23040,27648,32256,69120,84480 > /sys/module/lowmemorykiller/parameters/minfree

echo 0 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk

### VIRTUAL MEMORY ###

echo 15 > /proc/sys/vm/dirty_ratio

echo 5 > /proc/sys/vm/dirty_background_ratio

echo 15 > /proc/sys/vm/swappiness

### ENTROPY ###

echo 256 > /proc/sys/kernel/random/read_wakeup_threshold

echo 512 > /proc/sys/kernel/random/write_wakeup_threshold

echo 0 > /proc/sys/vm/laptop_mode

### MISC ###

setprop service.adb.tcp.port -1

setenforce 0

sysctl -w net.ipv4.tcp_congestion_control=westwood

echo 2011 > /sys/class/timed_output/vibrator/vtg_level

stop logd

echo N > /sys/module/sync/parameters/fsync_enabled

I'm using "DroidEdit Free" to create a script.

Just paste in the app and save as for example: "99_cpu_benschhold" without the quotes of course. (see attachment)

Best to save the file in internal storage so you always have a copy. After you dirty flash a custom rom the script will be gone.

Cope and past the file (without extension!) in the: /etc/init.d folder, with rootbrowser or any other app that's capable.

Give permissions (also see attachment) rwxr-xr-x or 0755

Reboot and all done.

PLEASE READ : all values after "echo" are my own settings (to much work to look up the default values)

For example:

echo 1632000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq

The value after echo is the one that's going to be applied, in this case: 1632000 what is applied? Max frequency of cpu 4!

I think I've got almost every setting covered in the script, if not please say so ?

If entered wrong values or typos, settings won't be applied, you actually can't do much wrong here.

Just check and recheck.

If some rom does not support init.d, "universal init.d" app can be of some help.

Please correct me if I made some mistakes, this is al lot of text.

Cheers...

There's always Google and XDA the search for more info or help.