[Galaxy S6 Android Development] Setialpha:
Kernel Stuffz

=== Kernel Settings ===

For NanoROM you don't need tools like Synapse or Kernel Adiutor to modify kernel settings. It comes with it's own script to manage kernel settings.

/system/su.d/999kernel​

=== Configuration Files ===

By default the script has three pre-set configuration files:

/system/etc/kernel/arter97.settings	arter97 kernel​

/system/etc/kernel/hacker.settings	Hacker Kernel​

/system/etc/kernel/stock.settings	Samsung Kernel​

depending on your installed kernel the correct pre-set is loaded. Your own configuration needs to go to

/system/etc/kernel/custom.settings	User Settings​

it will always be loaded in favour of the pre-set configurations.

If you don't want the script to do anything, create an empty file:

/system/etc/kernel/disabled.settings​

and reboot, then the kernel default values will be used. Remove that file and reboot to let the script do it's work again.

=== File Format ===

The format of the configuration file is simple

option=value

for non-array values and

option=( key1 value1
key2 value2
... ... )

for array values (currently only the voltage table is an array).

=== Possible Options ===

The script covers most relevant options you might want to tweak. Note: even if the installed kernel does not support all settings, your configuration file must include all options, to ensure the script is properly working.

Thus I recommended copying over one of the pre-set configuration files and modify it to your needs. Next follows a list of possible configuration options.

1] cpu_governor
default values:	arter97	userspace
Hacker	userspace
stock	userspace

use the following command to check available governors:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

2] io_scheduler
default values:	arter97	fiops
Hacker	sioplus
stock	cfq

use the following command to check available schedulers:

cat /sys/block/sda/queue/scheduler

3] io_readahead
default values:	arter97	2048
Hacker	2048
stock	2048

4] tcp_congestion
default values:	arter97	westwood
Hacker	reno
stock	cubic

5] power_suspend_mode
default values:	arter97	1 [userspace] {0, 3 unsupported}
Hacker	1 [userspace]
stock	1 [userspace]

Note:	0	[autosleep]
1	[userspace]
2	[lcd]
3	[hybrid]

6] power_suspend_state
default values:	arter97	1 [on]
Hacker	1 [on]
stock	1 [on]

Note: 1 [on] only possible when power_suspend_mode is 1 [userspace],
else it'll always be 0 [off]

7] gentle_fair_sleepers
default values:	arter97	0 [off] {unsupported}
Hacker	0 [off]
stock	0 [off] {?}

8] big_max_freq
default values:	arter97	2400000 [2.4 GHz]
Hacker	2400000 [2.4 GHz]
stock	2400000 [2.4 GHz]

use the following command to get the clock speeds for big core:

cat /sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster1_freq_table

9] big_min_freq
default values:	arter97	200000 [200 MHz]
Hacker	200000 [200 MHz]
stock	200000 [200 MHz]

use the following command to get the clock speeds for big core:

cat /sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster1_freq_table

10] low_max_freq
default values:	arter97	1800000 [1.8 GHz]
Hacker	1800000 [1.8 GHz]
stock	1800000 [1.8 GHz]

use the following command to get the clock speeds for low core:

cat /sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster0_freq_table

11] low_min_freq
default values:	arter97	200000 [200 MHz]
Hacker	200000 [200 MHz]
stock	200000 [200 MHz]

use the following command to get the clock speeds for low core:

cat /sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster0_freq_table

12] arch_power
default values:	arter97	0 [off] {unsupported}
Hacker	1 [on]
stock	0 [off] {?}

Note: architecture specific power saving options.

13] laptop_mode
default values:	arter97	0 [off] {unsupported}
Hacker	0 [off]
stock	0 [off] {?}

14] power_efficient
default values:	arter97	N [off] {unsupported}
Hacker	Y [on]
stock	N [off] {?}

Note: power efficient work queues

15] kernel_samepage
default values:	arter97	0 [off]
Hacker	0 [off]
stock	0 [off]

Note: kernel samepage merging reduces unrequired RAM usage,
at slightly less battery life

16] kernel_samepage_sleep
default values:	arter97	100 [ms]
Hacker	100 [ms]
stock	100 [ms]

Note: KSM scan intervall in milliseconds

17] kernel_samepage_cpu
default values:	arter97	95 [%]
Hacker	95 [%]
stock	95 [%]

Note: KSM maximum cpu usage

18] swappiness
default values:	arter97	50 [%]
Hacker	50 [%]
stock	50 [%]

Note: higher value = kernel puts off unused objects from RAM faster

19] dirty_writeback
default values:	arter97	0 [off] {?}
Hacker	1 [on]
stock	0 [off] {?}

Note: delays writeback for faster operation, slightly higher chance
of possible data loss when phone is crashing while writing data

20] adb_over_wifi
default values:	arter97	-1 [off]
Hacker	-1 [off]
stock	-1 [off] {?}

Note: default for [on] is 5555 (equals to port)

21] low_volt_table
default value	(1800000:500000
1704000:625000
1600000:500000
1500000:637500
1400000:975000
1296000:925000
1200000:887500
1104000:850000
1000000:812500
900000:775000
800000:737500
700000:706250
600000:681250
500000:656250
400000:631250
300000:625000
200000:625000) [all kernels]

Note: de/increment by multiples of 6250, eg: 625000 > 631250 > 637500 > ...

Note: changing this array is only recommended if you know what you're
doing. Wrong handling of this might result in data loss, unstable
operating system or if you overdo it: hardware damage.

22] big_volt_table
default value:	(2400000:1062500
2304000:1062500
2200000:1062500
2100000:1050000
2000000:1012500
1896000:975000
1800000:937500
1704000:906250
1600000:875000
1500000:843750
1400000:818750
1300000:793750
1200000:775000
1100000:750000
1000000:725000
900000:706250
800000:687500
700000:668750
600000:650000
500000:650000
400000:650000
300000:650000
200000:625000) [all kernels]

Note: de/increment by multiples of 6250, eg: 625000 > 631250 > 637500 > ...

Note: changing this array is only recommended if you know what you're
doing. Wrong handling of this might result in data loss, unstable
operating system or if you overdo it: hardware damage.