Hello all,
I told you that I would create a tutorial about ATS Configuration, and here it is( sorry for the late on this.. ).
You need a supported Kernel for this to work( at least you need kernel 4.4.132-1083 ).
But the one bellow will work for sure:
This tutorial is about the version 0.2.0 ( Install Point 2. or 3. ), it is updated with the status of the project..
So please refer only to this first comment,
Some of comments below could be outdated( as the project is been updated.. )..
1) ATS, has a configuration file '/etc/ats.conf'
This File will define when ATS is active or not,
IF fan is always on, and the max power applied...
The values above are the default ones..
THERMAL0_CTL - CPU Thermal SysFs Control
THERMAL1_CTL - GPU Thermal SysFs Control
PWM_CTL - Power Control
MAX_CONTINUOUS_THERMAL_TEMP - Maximum Temperature were ATS adjust Fan power [ -20, 70 [,
Above this, power is always Maximum..
MIN_CONTINUOUS_THERMAL_TEMP - Minimum Temperature were ATS adjust Fan power [ -20, 70 [,
Bellow this, power is always Off.
MAX_PWM - Max PWM Fan Power ] 0, 255 ], above 255 ATS will automatically assign value 255, and bellow 0, the same.
MIN_PWM - Min PWM Fan Power [ 0, 255 [, bellow 0 ATS will automatically assign value 40, and above 254, the same.
ALWAYS_ON - Tell ATS when Fan should be ON/OFF { true, false },
- true, if you want the Fan always ON.
- false,if you want the Fan Cycling ON/OFF,
In this case, the algorithm works always in a 2 steps way( Time for Fan on, and Time for Fan off ):
- Timer for Fan ON, will increase with temperature rising, or decrease when temperature fall..
- Timer for Fan OFF, will decrease with temperature rising, or increase when temperature fall..
The values bellow( introduced in version 0.1.8 ), probably will be scratched out, because its almost impossible to create profiles with so different configurations any one has( different heatsinks, different Fans, different Humidity/Temperatures around the globe... ).
Instead, the controls above, would be better,( don't delete them because the code needs to be adjusted first for that..)
PROFILE_NAME - The name of the profile
PROFILE_NR - Profile number
2) A Practical Case..
Imagine you want max power at 100, the Fan always ON, and max power( 100 ) to be reached at 65°C:
3) Stop ATS, and start it again( new values will be read ).
4) Check values applied,
Start ats in test mode:
Here you can see at end:
'Stop ATS Service first [ service ats stop ]..'
No problem,
When you started ats in test mode, it detected that Service launched in 3) was already running..
So it report the config, and exit from test mode( The Service launched in 3) continues running, as expected )..
Its nice when you wanted to know what values are configured for example..
That's it!!
Hope you find a good tuning for your Fan/Cooler.
Best Regards,
I told you that I would create a tutorial about ATS Configuration, and here it is( sorry for the late on this.. ).
You need a supported Kernel for this to work( at least you need kernel 4.4.132-1083 ).
But the one bellow will work for sure:
Code:
apt-get update
apt-get install linux-image-4.4.138-1097-rockchip-ayufan-gb5128c0a1684 linux-headers-4.4.138-1097-rockchip-ayufan-gb5128c0a1684 linux-firmware-image-4.4.138-1097-rockchip-ayufan-gb5128c0a1684
reboot
This tutorial is about the version 0.2.0 ( Install Point 2. or 3. ), it is updated with the status of the project..
So please refer only to this first comment,
Some of comments below could be outdated( as the project is been updated.. )..
1) ATS, has a configuration file '/etc/ats.conf'
Code:
SYSTEM = {
BOARD = {
NAME = "ROCKPRO64",
CPU = "RK3399"
},
THERMAL0_CTL = "/sys/class/thermal/thermal_zone0/temp",
THERMAL1_CTL = "/sys/class/thermal/thermal_zone1/temp",
PWM_CTL = "/sys/class/hwmon/hwmon0/pwm1",
MAX_CONTINUOUS_THERMAL_TEMP = 60,
MIN_CONTINUOUS_THERMAL_TEMP = 40,
MAX_PWM = 255,
MIN_PWM = 40,
ALWAYS_ON = false,
PROFILE_NAME = "profile0",
PROFILE_NR = 0
}
return SYSTEM
This File will define when ATS is active or not,
IF fan is always on, and the max power applied...
The values above are the default ones..
THERMAL0_CTL - CPU Thermal SysFs Control
THERMAL1_CTL - GPU Thermal SysFs Control
PWM_CTL - Power Control
MAX_CONTINUOUS_THERMAL_TEMP - Maximum Temperature were ATS adjust Fan power [ -20, 70 [,
Above this, power is always Maximum..
MIN_CONTINUOUS_THERMAL_TEMP - Minimum Temperature were ATS adjust Fan power [ -20, 70 [,
Bellow this, power is always Off.
MAX_PWM - Max PWM Fan Power ] 0, 255 ], above 255 ATS will automatically assign value 255, and bellow 0, the same.
MIN_PWM - Min PWM Fan Power [ 0, 255 [, bellow 0 ATS will automatically assign value 40, and above 254, the same.
ALWAYS_ON - Tell ATS when Fan should be ON/OFF { true, false },
- true, if you want the Fan always ON.
- false,if you want the Fan Cycling ON/OFF,
In this case, the algorithm works always in a 2 steps way( Time for Fan on, and Time for Fan off ):
- Timer for Fan ON, will increase with temperature rising, or decrease when temperature fall..
- Timer for Fan OFF, will decrease with temperature rising, or increase when temperature fall..
The values bellow( introduced in version 0.1.8 ), probably will be scratched out, because its almost impossible to create profiles with so different configurations any one has( different heatsinks, different Fans, different Humidity/Temperatures around the globe... ).
Instead, the controls above, would be better,( don't delete them because the code needs to be adjusted first for that..)
PROFILE_NAME - The name of the profile
PROFILE_NR - Profile number
2) A Practical Case..
Imagine you want max power at 100, the Fan always ON, and max power( 100 ) to be reached at 65°C:
Code:
SYSTEM = {
BOARD = {
NAME = "ROCKPRO64",
CPU = "RK3399"
},
THERMAL0_CTL = "/sys/class/thermal/thermal_zone0/temp",
THERMAL1_CTL = "/sys/class/thermal/thermal_zone1/temp",
PWM_CTL = "/sys/class/hwmon/hwmon0/pwm1",
MAX_CONTINUOUS_THERMAL_TEMP = 65,
MIN_CONTINUOUS_THERMAL_TEMP = 40,
MAX_PWM = 100,
MIN_PWM = 40,
ALWAYS_ON = true,
PROFILE_NAME = "profile0",
PROFILE_NR = 0
}
return SYSTEM
3) Stop ATS, and start it again( new values will be read ).
Code:
service ats stop && service ats start
4) Check values applied,
Start ats in test mode:
Code:
root@rockpro64:~# ats -t
info:'SYSTEM' Table
info: 'BOARD' Table
info: 'NAME' = ROCKPRO64
info: 'CPU' = RK3399
info: 'THERMAL0_CTL' = /sys/class/thermal/thermal_zone0/temp
info: 'THERMAL1_CTL' = /sys/class/thermal/thermal_zone1/temp
info: 'PWM_CTL' = /sys/class/hwmon/hwmon0/pwm1
info: 'MAX_CONTINUOUS_THERMAL_TEMP' = 65
info: 'MIN_CONTINUOUS_THERMAL_TEMP' = 40
info: 'MAX_PWM' = 100
info: 'MIN_PWM' = 40
info: 'ALWAYS_ON' = true
info: 'PROFILE_NAME' = profile0
info: 'PROFILE' = 0
info:'Pratio' timers
info: 'Pratio[ -20 - 40 [' = 0
info: 'Pratio[ 40 ]' = 40
info: 'Pratio[ 41 ]' = 42
info: 'Pratio[ 42 ]' = 44
info: 'Pratio[ 43 ]' = 47
info: 'Pratio[ 44 ]' = 49
info: 'Pratio[ 45 ]' = 52
info: 'Pratio[ 46 ]' = 54
info: 'Pratio[ 47 ]' = 56
info: 'Pratio[ 48 ]' = 59
info: 'Pratio[ 49 ]' = 61
info: 'Pratio[ 50 ]' = 64
info: 'Pratio[ 51 ]' = 66
info: 'Pratio[ 52 ]' = 68
info: 'Pratio[ 53 ]' = 71
info: 'Pratio[ 54 ]' = 73
info: 'Pratio[ 55 ]' = 76
info: 'Pratio[ 56 ]' = 78
info: 'Pratio[ 57 ]' = 80
info: 'Pratio[ 58 ]' = 83
info: 'Pratio[ 59 ]' = 85
info: 'Pratio[ 60 ]' = 88
info: 'Pratio[ 61 ]' = 90
info: 'Pratio[ 62 ]' = 92
info: 'Pratio[ 63 ]' = 95
info: 'Pratio[ 64 ]' = 97
info: 'Pratio[ 65 ]' = 100
info: 'Pratio[ 65 - 70 [' = 255
Stop ATS Service first [ service ats stop ]..
Here you can see at end:
'Stop ATS Service first [ service ats stop ]..'
No problem,
When you started ats in test mode, it detected that Service launched in 3) was already running..
So it report the config, and exit from test mode( The Service launched in 3) continues running, as expected )..
Its nice when you wanted to know what values are configured for example..
That's it!!
Hope you find a good tuning for your Fan/Cooler.
Best Regards,