[AKT][25th Dec][BETA] Advanced Kernel Tweaks v2.2.2 For OP5 & S835 devices

Search This thread

sabbir9985

Senior Member
Dec 30, 2012
135
25
Jessore
Successfully activated X.A.N.A Battery Extreme on xXx 4.0 ROM.
 

Attachments

  • Screenshot_20171017-231203.jpg
    Screenshot_20171017-231203.jpg
    149.1 KB · Views: 429

reawo

Senior Member
Sep 30, 2012
153
29
I deactivated my personal tweaks in exkm and applied the soilwork battery script

any hints what I may have done wrong?

for me the UI is mostly pretty laggy - for example scrolling really stuttering in XDA labs or anywhere where you got something to scroll.

kernel : render zenith 1.6
OOS 4.5.12 on OP5 rooted
xposed framework 88.1
 

RogerF81

Senior Member
Oct 14, 2015
1,939
1,389
Mannheim
I deactivated my personal tweaks in exkm and applied the soilwork battery script

any hints what I may have done wrong?

for me the UI is mostly pretty laggy - for example scrolling really stuttering in XDA labs or anywhere where you got something to scroll.

kernel : render zenith 1.6
OOS 4.5.12 on OP5 rooted
xposed framework 88.1

Hmm, strange, I use my tweaks myself and I have the same setup as you, I only don't use Xposed, and I don't have these issues. As far as I have seen, others use Soilwork battery as well without issues. But I'm working on it and still refining it a bit.
 

Ryther

Senior Member
Apr 2, 2012
368
228
34
Martinengo (BG)
Hi @Mostafa Wael ! First thing first, thank you to bring these settings on our phone and the SD835 ecosystem.
Second, I want to point out a couple of problem (I think) of the FusionB script: I'm on xXx+flash kernel and I've ensured that the ROM installed without any AKT ticks, but the script doesn't kick in on start and doesn't even apply completely on a manual installation. After extracting the script to try and apply it manually, I've found that setting timer_slack to -1 is shown as 4294947296 in EXKM (I've set it to 0). The standard clock for the BIG cluster is checked against the 2457400 value, but echoing the maxfreq variable show 2457600 so the script think that the CPU can be overcloked while it is not. Last but not least I think this line
Code:
echo 1000 /proc/sys/kernel/sched_select_prev_cpu_us
should be
Code:
echo 1000 > /proc/sys/kernel/sched_select_prev_cpu_us

Dunno if I'm right or wrong, but these are my findings, hope I could be of any help (other than my subpar English XD )

Keep up the great work!

EDIT: this is the output of the script after tweaking what I've found above (the line starting with BC is the output of this command: echo BC Freq $maxfreq/2457600). There are 3 more errors but I don't think they matter
Code:
-----------------------------------------------
Applying FusionB (Balanced Profile)
Advanced Kernel Settings
-----------------------------------------------
Device: One Plus 5 & S835 Devices
Stable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Checking Android version...
Android Nougat 7.1.X detected!
N detected... Applying proper settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Applying settings to LITTLE Cluster...
No LITTLE Cluster Overclocking detected.
Applying appropriate values.
Applying settings to BIG Cluster
BC freq 2457600/2457600
No BIG Cluster Overclocking detected.
Applying appropriate values.
==========================================
Checking whether you are using a Sultanxda based ROM or not
==========================================
Checking ROM...
Applying appropriate values.
setting appropriate values for input boost
==========================================
Disabling TouchBoost
Disabling BCL and Removing Perfd
Disabling Aggressive CPU Thermal Throttling
Tweaking HMP Scheduler for correcting BIG Cluster utilization
==========================================
Tweaking other various Settings
·I/O Values
/storage/emulated/0/_FLASH/OTHER/FusionB[354]: cat: /sys/block/../devices/soc/624000.ufshc/host0/target0:0:0/0:0:0:[0-4]/block/*/queue/scheduler: No such file or directory
/storage/emulated/0/_FLASH/OTHER/FusionB[354]: can't create /sys/block/../devices/soc/624000.ufshc/host0/target0:0:0/0:0:0:[0-4]/block/*/queue/scheduler: No such file or directory
Changing block I/O scheduler

/storage/emulated/0/_FLASH/OTHER/FusionB[354]: cat: /sys/block/../devices/soc/624000.ufshc/host0/target0:0:0/0:0:0:[0-4]/block/*/queue/scheduler: No such file or directory
·Memory Values
·TCP Values
westwood reno cubic
------------------------------------------------------------
FusionB Successfully Applied!
You may now tweak them further
using EXKM or Kernel Adiutor
------------------------------------------------------------

Done, press ENTER then close

This is the modified script:
Code:
#!/system/bin/sh
#Interactive Governor tweaks for OnePlus 5.
#Fusion profiles are set for a balanced and performance use.
#FusionB, FusionP and Stock settings are present in this script.
#FusionB is tweaked in a way that Cluster 1 (small) uses mostly the frequencies from 300 to 1555 and when needed, Cluster 2(big) enters to help, using frequencies up to 1881 and jumping above that when extreme load is present.
#FusionP is still in development
#Stock are the stock settings from Stock kernel
#Scripts made by Senthil360 and Asiier and changed by patalao
#Credits for @Asiier [user=5060769]@Mostafa Wael[/user]/@Senthil360
#TWEAKS_BEGIN
echo ""
echo -----------------------------------------------
echo Applying 'FusionB (Balanced Profile)'
echo Advanced Kernel Settings
echo -----------------------------------------------
sleep 0.5
echo "Device: One Plus 5 & S835 Devices"
echo Stable
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sleep 0.3
echo Checking Android version...
if grep -q 'ro.build.version.sdk=25' /system/build.prop; then
	echo Android Nougat 7.1.X detected!
	sleep 0.3
	echo N detected... Applying proper settings
fi
if grep -q 'ro.build.version.sdk=24' /system/build.prop; then
	echo Android Nougat 7.0.X detected!
	sleep 0.3
	echo N detected... Applying proper settings
fi
if grep -q 'ro.build.version.sdk=26' /system/build.prop; then
	echo Android Oreo 8.0.0 detected!
	sleep 0.3
	echo O detected... Applying proper settings
fi
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sleep 0.3
#Apply settings to LITTLE cluster
echo Applying settings to LITTLE Cluster...
sleep 0.5
#Temporarily change permissions to governor files for the LITTLE cluster to enable Interactive 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
#Grab Maximum Achievable Frequency for the LITTLE Cluster
maxfreq=$(cat "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq")                
if test $maxfreq -eq 1900800; then
    #Temporarily change permissions to governor files for the Little cluster to set the maximum frequency to 1900MHz
    echo No LITTLE Cluster Overclocking detected. 
    echo Applying appropriate values.
    chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    echo 1900800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq     #Core 0 Maximum Frequency = 1900MHz         
    chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
    echo 55 1248000:65 1401600:85 1670400:95 1824000:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads 
    chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
elif test $maxfreq -eq 2112000; then
    #Temporarily change permissions to governor files for the Little cluster to set the maximum frequency to 2112MHz
    echo LITTLE Cluster Overclocking detected. 
    echo Applying appropriate values.
    chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    echo 2112000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq     #Core 0 Maximum Frequency = 2112MHz         
    chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
    echo 55 1248000:65 1401600:85 1670400:95 1900800:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads 
    chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
    maxfreq=$(cat "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq")
fi
if test $maxfreq -lt 1900800; then
    #Temporarily change permissions to governor files for the Big cluster to set the maximum frequency to 1900MHz
    echo LITTLE Cluster Underclocking detected!!
    sleep 1
    echo We recommend not to UnderClock the CPU as the tweaks already will take care of that If needed
    echo The tweaks will continue getting applied but we recommend setting the CPU to Max frequency!
    sleep 4
    chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
    echo 55 1248000:65 1401600:85 1670400:95 1824000:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads 
    chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
elif test $maxfreq -gt 2112000; then
    #Temporarily change permissions to governor files for the Little cluster to set the maximum frequency to 2112MHz
    echo LITTLE Cluster Overclocking detected. 
    sleep 1
    echo This OverClock is higher than normal and only possible on Xceed Kernel
    echo The tweak will continue getting applyed
    echo " Althought it might not reach the maximum frequency you have sett as it haven't been made to work with frecuencies higher than 2112 Mhz "
    #chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    #echo 2112000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq     #Core 0 Maximum Frequency = 2112MHz         
    #chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
    echo 55 1248000:65 1401600:85 1670400:95 1824000:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads 
    chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
fi
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/*
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack
echo 1171200 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
echo 20000 1324800:40000 1555200:80000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/align_windows
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
if [ -e "/sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction" ]; then
    chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction
    echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction
fi
sleep 0.5
#Apply settings to Big cluster
echo Applying settings to BIG Cluster
sleep 0.2
#Temporarily change permissions to governor files for the big cluster to enable Interactive governor
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
#Grab Maximum Achievable Frequency for the Big Cluster
maxftarget=2457600
maxfreq=$(cat "/sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_max_freq")    
echo BC freq $maxfreq/$maxftarget
if test $maxfreq -eq $maxftarget; then
    #Temporarily change permissions to governor files for the Big cluster to set the maximum frequency to 2457MHz
    echo No BIG Cluster Overclocking detected. 
    echo Applying appropriate values.
    chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
    echo $maxftarget > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq     #Core 2 Maximum Frequency = 2457MHz         
    chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
    chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
    echo 65 1190400:75 1574400:90 1824000:98 2112000:100 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads 
chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
elif test $maxfreq -lt $maxftarget; then
    #Temporarily change permissions to governor files for the Big cluster to set the maximum frequency to 2457MHz
    echo BIG Cluster Underclocking detected!!
    sleep 1
    echo We recommend not to UnderClock the CPU as the tweaks already will take care of that If needed
    echo The tweaks will continue getting applied but we recommend setting the CPU to Max frequency!
    sleep 4
    #chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
    #echo $maxftarget > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq     #Core 0 Maximum Frequency = 2457MHz         
    #chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
    chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
    echo 65 1190400:75 1574400:90 1824000:98 2112000:100 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads 
    chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
elif test $maxfreq -gt $maxftarget; then
    #Temporarily change permissions to governor files for the Little cluster to set the maximum frequency to 2457MHz
    echo BIG Cluster Overclocking detected. 
    sleep 1
    echo This OverClock is higher than normal and only possible on Xceed Kernel
    echo The tweak will continue getting applyed
    echo " Althought it might no reach the maximum frequency you have set as it hasn't been made to work with frecuencies higher than 2457 Mhz "
    sleep 4    
    #chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
    #echo $maxftarget > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq     #Core 0 Maximum Frequency = 2457MHz         
    #chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
    chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
    echo 65 1190400:75 1574400:90 1824000:98 2112000:100 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads 
    chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
fi
sleep 0.5
chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/interactive/*
#Tweak Interactive Governor
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_slack
echo 1056000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
echo 40000 1420800:80000 1728000:150000 2035200:100000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
echo 80 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/ignore_hispeed_on_notif
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/boost
echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/fast_ramp_down
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/align_windows
echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse_duration
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
if [ -e "/sys/devices/system/cpu/cpu4/cpufreq/interactive/enable_prediction" ]; then
    chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/interactive/enable_prediction
    echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/enable_prediction
fi
sleep 0.2
echo "=========================================="
echo Checking whether you are using a Sultanxda based ROM or not
echo "=========================================="
#Checking whether you are using a Sultanxda based ROM or not
echo Checking ROM...
sleep 0.2
echo Applying appropriate values.
if [ -e "/sys/kernel/cpu_input_boost/enabled" ]; then
    echo Disabling Input Boost for the LITTLE cluster and for the BIG Cluster and custom thermal driver of Sultanxda
    chmod 644 /sys/kernel/cpu_input_boost/enabled
    echo 0 > /sys/kernel/cpu_input_boost/enabled
    chmod 644 /sys/kernel/msm_thermal/enabled
    echo 0 > /sys/kernel/msm_thermal/enabled
else
echo setting appropriate values for input boost
fi
if [ -e "/sys/module/cpu_boost/parameters/input_boost_freq" ]; then
chmod 644 /sys/module/cpu_boost/parameters/input_boost_freq
echo 0:672000 1:0 2:0 3:0 4:806400 5:0 6:0 7:0 > /sys/module/cpu_boost/parameters/input_boost_freq
chmod 644 /sys/module/cpu_boost/parameters/input_boost_ms
echo 100 > /sys/module/cpu_boost/parameters/input_boost_ms
else
echo "*Input Boost is not avalible for your Kernel*"
fi
sleep 0.3
echo "=========================================="
#Disable TouchBoost
echo Disabling TouchBoost
    if [ -e "/sys/module/msm_performance/parameters/touchboost" ]; then
    chmod 644 /sys/module/msm_performance/parameters/touchboost
    echo 0 > /sys/module/msm_performance/parameters/touchboost
else
    echo "*Not supported for your current Kernel*"
fi
#Disable BCL
echo Disabling BCL and Removing Perfd
if [ -e "/sys/devices/soc/soc:qcom,bcl/mode" ]; then
echo -n disable > /sys/devices/soc/soc:qcom,bcl/mode
fi
#Enable Core Control and Disable MSM Thermal Throttling allowing for longer sustained performance
echo Disabling Aggressive CPU Thermal Throttling
if [ -e "/sys/module/msm_thermal/core_control/enabled" ]; then
echo 1 > /sys/module/msm_thermal/core_control/enabled
fi
if [ -e "/sys/module/msm_thermal/parameters/enabled" ]; then
echo N > /sys/module/msm_thermal/parameters/enabled
fi
#Tweak HMP Scheduler to feed the Big cluster more tasks
sleep 0.3
echo Tweaking HMP Scheduler for correcting BIG Cluster utilization
echo 2 > /proc/sys/kernel/sched_window_stats_policy
echo 75 > /proc/sys/kernel/sched_downmigrate
echo 85 > /proc/sys/kernel/sched_upmigrate
echo 9 > /proc/sys/kernel/sched_spill_nr_run
echo 100 > /proc/sys/kernel/sched_spill_load
echo 30 > /proc/sys/kernel/sched_init_task_load
if [ -e "/proc/sys/kernel/sched_heavy_task" ]; then
    echo 0 > /proc/sys/kernel/sched_heavy_task
fi
if [ -e "/proc/sys/kernel/sched_enable_power_aware" ]; then
    echo 1 > /proc/sys/kernel/sched_enable_power_aware
fi
echo 5 > /proc/sys/kernel/sched_ravg_hist_size
if [ -e "/proc/sys/kernel/sched_small_wakee_task_load" ]; then
	echo 5 > /proc/sys/kernel/sched_small_wakee_task_load
fi
if [ -e "/proc/sys/kernel/sched_wakeup_load_threshold" ]; then
	echo 110 > /proc/sys/kernel/sched_wakeup_load_threshold
fi
if [ -e "/proc/sys/kernel/sched_small_task" ]; then
	echo 15 > /proc/sys/kernel/sched_small_task
fi
if [ -e "/proc/sys/kernel/sched_big_waker_task_load" ]; then
	echo 35 > /proc/sys/kernel/sched_big_waker_task_load
fi
if [ -e "/proc/sys/kernel/perf_cpu_time_max_percent" ]; then
	echo 15 > /proc/sys/kernel/perf_cpu_time_max_percent
fi
if [ -e "/proc/sys/kernel/sched_select_prev_cpu_us" ]; then
	echo 1000 > /proc/sys/kernel/sched_select_prev_cpu_us
fi
if [ -e "/proc/sys/kernel/sched_restrict_cluster_spill" ]; then
	echo 0 > /proc/sys/kernel/sched_restrict_cluster_spill
fi
echo 950000 > /proc/sys/kernel/sched_rt_runtime_us
echo 1000000 > /proc/sys/kernel/sched_rt_period_us
#echo 1 > /proc/sys/kernel/sched_migration_fixup
if [ -e "/proc/sys/kernel/sched_freq_dec_notify" ]; then
	echo 410000 > /proc/sys/kernel/sched_freq_dec_notify
fi
if [ -e "/proc/sys/kernel/sched_freq_inc_notify" ]; then
	echo 410000 > /proc/sys/kernel/sched_freq_inc_notify
fi
if [ -e "/proc/sys/kernel/sched_boost" ]; then
	echo 0 > /proc/sys/kernel/sched_boost
fi
#Tweaks for other various Settings
sleep 0.5
echo "=========================================="
echo Tweaking other various Settings
echo ·I/O Values
if [ -d /sys/block/dm-0 ] || [ -d /sys/devices/virtual/block/dm-0 ]; then
if [ -e /sys/devices/virtual/block/dm-0/queue/scheduler ]; then
    DM_PATH=/sys/devices/virtual/block/dm-0/queue
fi
if [ -e /sys/block/dm-0/queue/scheduler ]; then
    DM_PATH=/sys/block/dm-0/queue
fi
string=/sys/devices/virtual/block/dm-0/queue/scheduler;
Zen_Available=false;
if  $BB grep 'fiops' $string; then
     Zen_Available=true;
fi
if [ "$Zen_Available" == "true" ]; then
   if [ -e $DM_PATH/scheduler_hard ]; then
       echo fiops > $DM_PATH/scheduler_hard
   fi
    echo fiops > $DM_PATH/scheduler
    sleep 2
    echo 300 > $DM_PATH/iosched/sync_expire
    echo 3000 > $DM_PATH/iosched/async_expire
    echo 10 > $DM_PATH/iosched/fifo_batch
    chmod 644 $DM_PATH/iosched/sync_expire
    echo 400 > $DM_PATH/iosched/sync_expire
fi
if [ "$Zen_Available" = "false" ]; then
    if grep -q 'ro.build.flavor=lineage_oneplus3-userdebug' /system/build.prop; then
        echo ZEN not avalible, setting 'Noop' instead...
	if [ -e $DM_PATH/scheduler_hard ]; then
           echo noop > $DM_PATH/scheduler_hard
        fi	
        echo noop > $DM_PATH/scheduler
    else
        echo ZEN not avalible, setting 'CFQ' instead...
	if [ -e $DM_PATH/scheduler_hard ]; then
           echo cfq > $DM_PATH/scheduler_hard
        fi	
        echo cfq > $DM_PATH/scheduler
    fi
fi
fi
for i in /sys/block/../devices/soc/624000.ufshc/host0/target0:0:0/0:0:0:[0-4]/block/*/queue; do
  string4=$($BB readlink -f $i/scheduler | cut -d 'q' -f1 | cut -d 'k' -f2 | cut -d '/' -f2 | tr a-z A-Z)
  string5=$($BB cat $i/scheduler | cut -d ']' -f1 | cut -d '[' -f2 | $BB tr a-z A-Z)
  if [ "$string5" == "NOOP" ]; then
      echo "Leaving $string4 block at default $string5"
      echo ""
      sleep 0.1
  fi
  if [ "$string5" != "NOOP" ]; then
      echo "Changing $string4 block I/O scheduler"
      if [ -e $i/scheduler_hard ]; then
          echo fiops > $i/scheduler_hard
      fi
      echo fiops > $i/scheduler
      echo ""
      sleep 2
      # Initialize string 6 to avoid reference conflicts
      string6=$($BB cat $i/scheduler | cut -d ']' -f1 | cut -d '[' -f2)
      if [ "$string6" == "zen" ]; then
         echo 300 > $i/iosched/sync_expire
         echo 3000 > $i/iosched/async_expire
         echo 10 > $i/iosched/fifo_batch
        chmod 644 $i/iosched/sync_expire
        echo 400 > $i/iosched/sync_expire
    fi
  fi
done
if [ -e "$DM_PATH/iostats" ]; then
	echo 0 > $DM_PATH/iostats
fi
if [ -e "$DM_PATH/rq_affinity" ]; then
	echo 1 > $DM_PATH/rq_affinity
fi
if [ -e "/sys/block/dm-0/bdi/read_ahead_kb" ]; then
	echo 512 > /sys/devices/virtual/block/dm-0/bdi/read_ahead_kb
fi
if [ -e "/sys/block/sda/bdi/read_ahead_kb" ]; then
	echo 512 > /sys/block/sda/bdi/read_ahead_kb
fi
echo ·Memory Values
echo 0 > /proc/sys/vm/swappiness
echo 100 > /proc/sys/vm/vfs_cache_pressure
echo 40 > /proc/sys/vm/dirty_ratio
echo 10 > /proc/sys/vm/dirty_background_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 100 > /proc/sys/vm/dirty_expire_centisecs
echo 250 > /proc/sys/vm/dirty_writeback_centisecs
echo 0 > /proc/sys/vm/oom_kill_allocating_task
echo 3 > /proc/sys/vm/page-cluster
echo 64 > /proc/sys/kernel/random/read_wakeup_threshold
echo 128 > /proc/sys/kernel/random/write_wakeup_threshold
if [ -e "/sys/module/lowmemorykiller/parameters/enable_adaptive_lmk" ]; then
chmod 666 /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
chown root /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo 0 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
fi
if [ -e "/sys/module/lowmemorykiller/parameters/enable_adaptive_lmk" ]; then
	echo 0 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
else
	echo ' *Adaptive LMK is not present on your Kernel* '
fi
if [ -e "/sys/module/lowmemorykiller/parameters/minfree" ]; then
	echo 23939,44091,58788,73485,88182,102879 > /sys/module/lowmemorykiller/parameters/minfree
else
	echo ' *LMK cannot currently be modified on your Kernel* '
fi
echo ·TCP Values
string2=/proc/sys/net/ipv4/tcp_available_congestion_control
if grep 'westwood' $string2; then
echo westwood > /proc/sys/net/ipv4/tcp_congestion_control
else
	echo Westwood not avilable, using Cubic
	echo cubic > /proc/sys/net/ipv4/tcp_congestion_control 
fi
sleep 1
echo ------------------------------------------------------------
echo 'FusionB' Successfully Applied!
echo "Fusion Balanced" > /data/system/current_profile
echo   You may now tweak them further
echo    using EXKM or Kernel Adiutor
echo ------------------------------------------------------------
echo ""
echo " Done,  press ENTER then close"
sleep 4

#################################################
#Modded by patalao
#Ported by Mostafa Wael
#Please say thanks and give proper credits if you're using this profile. 
#Credits
#*soniCron *Alcolawl *RogerF81 *Asiier *Mostafa Wael *Senthil360 and all of those that have share their profiles on Nexus 5X/6P Advanced Interactive Tweaks respective threads.
 
Last edited:
  • Like
Reactions: JeanEatsWorld

ulxerker

Senior Member
Jul 6, 2015
4,138
1,081
XANA is very good ... unfortunately, the changed values only stick until a reboot. after a reboot there are the kernel's defaults again and you have to re-apply the script.

though, in the terminal after issuing su and AKT xana is still shown as the current script but according to the values it isn't. you can see that in EXKM, for example.
 

Stupifier

Senior Member
Jun 8, 2010
1,906
680
Hmm, strange, I use my tweaks myself and I have the same setup as you, I only don't use Xposed, and I don't have these issues. As far as I have seen, others use Soilwork battery as well without issues. But I'm working on it and still refining it a bit.
SoilWork Battery works great for me. Maybe there is a very very slight scroll stutter.....but I save so much battery using this I really think it is an acceptable sacrifice.

I'm getting below 1%/hr screen off drain and no greater than 5%/hr active drain. I don't play games. Most of my use is browsing internet and configuring/testing Tasker profiles
 

RogerF81

Senior Member
Oct 14, 2015
1,939
1,389
Mannheim
SoilWork Battery works great for me. Maybe there is a very very slight scroll stutter.....but I save so much battery using this I really think it is an acceptable sacrifice.

I'm getting below 1%/hr screen off drain and no greater than 5%/hr active drain. I don't play games. Most of my use is browsing internet and configuring/testing Tasker profiles

Glad to hear :highfive:
 

obol2

Senior Member
Nov 23, 2014
1,481
422
Home
SoilWork Battery works great for me. Maybe there is a very very slight scroll stutter.....but I save so much battery using this I really think it is an acceptable sacrifice.

I'm getting below 1%/hr screen off drain and no greater than 5%/hr active drain. I don't play games. Most of my use is browsing internet and configuring/testing Tasker profiles
What kernel?

Sent from my HTC Dream using XDA Labs
 

Stupifier

Senior Member
Jun 8, 2010
1,906
680
What kernel?

Sent from my HTC Dream using XDA Labs
SoilWork is only meant for EAS-Based Kernels. There are only two EAS-Based Kernels available for OnePlus5. I am using RenderZenith.

I think the AKT Devs need to add a note directly into the Terminal menu telling people which Profiles are for HMP Kernels and Which are for EAS Kernels. I have a feeling a lot of people just plain don't know and don't read unless it is right in their face on the AKT Terminal Menu. My 2 cents
 

ulxerker

Senior Member
Jul 6, 2015
4,138
1,081
Was wondering how will i know if the changed profile was applied thru kernel adiutor? Like are there any settings that supposed to change?

yeah, especially governor settings ... just compare them before and after, or: if there are a lot of values in the target_loads setting then it has been applied.
 

HamburgerxDDD

Senior Member
Sep 28, 2014
282
12
Manila
yeah, especially governor settings ... just compare them before and after, or: if there are a lot of values in the target_loads setting then it has been applied.

According to AKT, the profile has been applied successfully. But nothing has changed in CPU Governor and target_loads. I wonder what's wrong?

Also, when flashing a new profile in AKT, im receiving no such file directory on some parts.
 

sabbir9985

Senior Member
Dec 30, 2012
135
25
Jessore
Using SimpleGX Kernel on xXx 4.0 ROM. Current battery profile is X.A.N.A. Battery Extreme.

Please check the Android alarm and let me know if it's ok or not.
 

Attachments

  • Screenshot_20171018-120259.jpg
    Screenshot_20171018-120259.jpg
    156 KB · Views: 771
  • Screenshot_20171018-120158.jpg
    Screenshot_20171018-120158.jpg
    159.1 KB · Views: 767
  • Screenshot_20171018-120122.jpg
    Screenshot_20171018-120122.jpg
    175.2 KB · Views: 747
  • Screenshot_20171018-120108.jpg
    Screenshot_20171018-120108.jpg
    181.5 KB · Views: 735
  • Screenshot_20171018-120045.jpg
    Screenshot_20171018-120045.jpg
    176 KB · Views: 705
  • Screenshot_20171018-115937.jpg
    Screenshot_20171018-115937.jpg
    154.4 KB · Views: 691
  • Screenshot_20171018-120525.jpg
    Screenshot_20171018-120525.jpg
    98.8 KB · Views: 727

Top Liked Posts

  • There are no posts matching your filters.
  • 74
    After the enormous success and admiration from the discerning users, and being featured on a lot of sites among which are quite famous sites for the tech enthusiasts such as Android Authority and XDA's Portal, it was extremely hard on me and my fellow developers not to extend our support to such a great device as the OnePlus 5. But thankfully, my colleague XDA Recognised Contributor @Funk Wizard came to the rescue and made that possible. I am quite sure that you all would like to join me to thank @Funk Wizard and OnePlus' Adam Krisko for giving me the honour to develop for such a mesmerising device. Hopefully you can enjoy my endeavours in that project. I would also like to thank my fellow leading developers of the original AKT project @Senthil360 @patalao and @Asiier for doing their best. It was a wonderful journey that I am certain it wouldn't have been that enjoyable without them. And of course, I would like to say a huge thanks to all the users of AKT for their feedback and care - that goes without saying. I know I have been late and I am sure many have longed the release for unbearably long time, but as they say, better late than never.
    Ladies and gentlemen, I hereby declare AKT support of the OnePlus 5!

    If you are not familiar with what AKT is, I strongly urge you to head over to the original thread herehttps://forum.xda-developers.com/oneplus-3/how-to/advanced-interactive-governor-tweaks-t3476589/

    Now let's get to business. With the initial release, you shall find all the profiles you used to find in AKT for the OP3/3T and a pair of two new quite experimental profiles developed by my teammate @RogerF81 tailored specifically for those who use the EAS based RenderZenith kernel and Revan kernel, under the name of Soilwork, with a battery variant and balanced variant. Those who are unfamiliar, here is the breakdown of what you will find:
    AKT is mainly divided into 3 segments: Battery, Performance and Balanced.
    In each segment, the profiles are organised from the least battery friendly to the most battery friendly in ascending order

    Installation:
    1- Download the latest AKT zip file from the download link below
    2- Reboot into TWRP recovery
    3- Flash the zip file you have previously downloaded
    4- Reboot into system and leave it for a couple of minutes to settle
    5- Open your desirable terminal emulator app
    6- Grant it root permissions by typing "su" (without quotes)
    7- Type "AKT" (without quotes). It MUST be capitalized or else it won't work
    8- Follow the on-screen instructions displayed. I am fairly confident that they are intuitive enough to guide you to your profile
    9- Enjoy!!

    Notes:
    -> To judge the profile in question fairly, more particularly when it comes to evaluating how better or worse the profile has performed on the battery life front, you must use the profile for at least 2-3 charges (about 3 days) to expose the profile to all your different usage patterns.
    -> Battery life can be judged quite well with the aid of some figures, such as the active and passive drain rates reported from apps like EX Kernel Manager or AccuBattery. The separation of the active and idle drain rates is crucial when it comes to judging such things.
    -> If you are worried about the impact of AKT on your idle drain, then I strongly suggest you to read this post here. I believe this should clear a lot of the common misconceptions.
    -> This tweak is applicable across all phones that share the same SoC, that is the Qualcomm Snapdragon 835. However, it won't be as compatible as with the OnePlus 5 due to various differences in the UI skin the phone in question bears and the presence of some proprietary engines, some of which can be quite intrusive like HTC's pnpmgr. I reckon it is still worth a try though. Worst case would be full incompatibility which can be remedied by following the on-screen instructions to uninstall AKT

    Downloads:
    Google Drive Folder

    You can track progress of AKT and the internal testing of new profiles via Github

    Credits:
    @Funk Wizard and Mr Adam Krisko - for giving me a free cheeseburger :D
    @Asiier @patalao @Senthil360 - for their awesome work on the original AKT project for the OP3/3T.
    @RogerF81 - for his collaboration in this project.
    @ZeroInfinity @DeeZZ_NuuZZ @p50kombi @CharliesTheMan @Kyuubi10 @TotallyAnxious - my teammates :)
    @RenderBroken @joshuous - my mentors, learnt a lot from them
    30
    Merry Christmas Everyone!!

    Merry Christmas for all who celebrate it!
    For those who don't, I have made sure you too will enjoy it
    Attached to this post is a NEW Beta Build :good:
    Changelog:
    you tell me what you see :D

    Reminder: this is a beta build, it may have bugs still, so keep your eyes wide open and report any bugs you come across

    Cheers everyone!
    30
    Hey peeps! Been a long time since I last posted here. I am sure you are very very frustrated with the state of the project as of now, but hopefully, I won't ruin Xmas for you :)
    So I decided to upload a beta zip of AKT 2.0 here in the thread for you to test to speed things up a bit and hopefully I can manage to get AKT 2.0 polished around Xmas or so (even if it will cost me some time and pause studying for a little bit).
    Attached to this post is a beta AKT 2.1 build for you to test
    IF it says anything else than 2.1 in the installer text or in the terminal, then don't you worry. They are just cosmetic changes that will be ironed out easily.
    It's been a bumpy ride, I know, but it will level out quite soon.
    Would like to thank you all for your patience and support, and hopefully, this project will continue to grow and be more interesting as time passes.
    Cheers everyone!
    21
    Changelog:
    AKT-v1.0:
    -> Initial release
    AKT-v1.1:
    -> Fixed a bug that wouldn't let the big cluster's governor settings to be applied for FusionB, FusionC, FusionP, GhostPepper, HawkPepper,Project Zhana and Project XANA (all variants)
    -> Reviewed stock settings of EAS based kernels.
    NOTICE: the script will still say v1.0
    19
    Time for a status update and perhaps a couple of announcements! :D

    You left us for so long, are you done with it??
    Hell no! I am just extremely busy these days with my midterms and assignments, as well as having some health issues to deal with (my blood pressure level was reported to be quite high for the pas couple of days). But once all this is over, I will get cracking with AKT just like before, I am sure of that. Also I have some other projects that I work in and contribute to, one of which is the EAS-based RenderZenith kernel. So no, I am not done with AKT at all - not even in a while. This project will continue. And with that cleared out of the way, I have a couple of announcements to make :)

    AKT for the OP5 will get the app treatment!
    Yes you heard it right, AKT for the OnePlus 5 will come with your favourite app taste! Those who are not familiar with AKT, this essentially means that all you have to do to get the latest AKT installed is just to download an apk and install it! Just that, no zip flashing, no nothing! Huge props to @mrcigi for kindly accepting my request. He shall be working on that as soon as he can manage to squeeze out some time. He is bombed out with work currently. Give him a massive shout out! :highfive: :good:

    AKT Slack group launched!
    For more convenience to all the users who want to get their hands on the latest test profiles from me and @RogerF81 - who can't wait for the official release and are very keen to help - Rog and I have decided to launch a Slack group, whereas all members would be able to get their hands on the latest test versions and help us make things better and detect any bugs or issues with the profiles in a quicker manner. There are a couple of prerequisites though. In order to ensure maximum productivity, all members must be familiar with executing scripts via Terminal Emulator (or any sh script runner apps), taking logs such as kernel logs and logcats, and of course not to bug us with ETA questions (I think i didn't need to say that, did I?)
    Folks who find themselves eligible and think they can 'make a change' should send their emails in a PM to me or to @RogerF81 and he shall be able to get access to the slack group at akt-op5.slack.com

    That's been it for today. Here's to hoping this project will be nourished up and cleared from any bugs asap. Cheers!
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone