![]() |
|
Tool to Control Fan - fanctl - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98) +--- Forum: Linux on RockPro64 (https://forum.pine64.org/forumdisplay.php?fid=101) +--- Thread: Tool to Control Fan - fanctl (/showthread.php?tid=6489) |
RE: Tool to Control Fan - fanctl - Drago - 11-20-2018 I can't get this to install for the life of me. Installed dependencies, created symlink, then: Code: cat <</usr/bin/lua5.3 >> /etc/luarocks/config.lua
> variables = {
> UNISTD_INCDIR = "/usr/include",
> STAT_INCDIR = "/usr/include/$( gcc -dumpmachine )",
> TYPES_INCDIR = "/usr/include/$( gcc -dumpmachine )",
> LUALIB_INCDIR = "/usr/include/lua5.3",
> LAUXLIB_INCDIR = "/usr/include/lua5.3",
> LUA_INCDIR = "/usr/include/lua5.3",
> LUA53_LIBDIR = "/usr/lib/$( gcc -dumpmachine )"
> }
> /usr/bin/lua5.3I then ran: Code: luarocks build https://raw.githubusercontent.com/tuxd3v/ats/master/ats-0.1-6.rockspecAnd I got this output: Code: Warning: variable CFLAGS was not passed in build_variables
gcc -c -fPIC -Wall -Werror -O3 -g -I/usr/include/lua5.3 -o src/sleep.o src/sleep.c
gcc -shared -Wl,-soname,sleep.so.0 -llua5.3 -o sleep.so.0.1 src/sleep.o
install --preserve-timestamps --owner=root --group=root --mode=750 --target-directory=/usr/sbin src/fanctl
install --preserve-timestamps --owner=root --group=root --mode=640 --target-directory=/lib/systemd/system systemd/fanctl.service
if [ ! -d /usr/lib/aarch64-linux-gnu/lua/5.3 ];then \
mkdir -p /usr/lib/aarch64-linux-gnu/lua/5.3; \
fi
install --preserve-timestamps --owner=root --group=root --mode=640 --target-directory=/usr/lib/aarch64-linux-gnu/lua/5.3 sleep.so.0.1
if [ -L /usr/lib/aarch64-linux-gnu/lua/5.3/sleep.so ];then \
rm -f /usr/lib/aarch64-linux-gnu/lua/5.3/sleep.so; \
fi
ln -s /usr/lib/aarch64-linux-gnu/lua/5.3/sleep.so.0.1 /usr/lib/aarch64-linux-gnu/lua/5.3/sleep.so
systemctl enable fanctl
ats 0.1-6 is now installed in /usr/local (license: See License..)When I run Code: service ats statusI get: Code: ats.service - ATS - Active Thermal Service
Loaded: loaded (/lib/systemd/system/ats.service; enabled; vendor preset: enab
led)
Active: activating (auto-restart) (Result: exit-code) since Tue 2018-11-20 12
:11:19 EST; 5s ago
Main PID: 8548 (code=exited, status=1/FAILURE)
Nov 20 12:11:19 DietPi systemd[1]: ats.service: Main process exited, cod
e=exited, status=1/FAILURE
Nov 20 12:11:19 DietPi systemd[1]: ats.service: Unit entered failed stat
e.
Nov 20 12:11:19 DietPi systemd[1]: ats.service: Failed with result 'exit
-code'.I'm not sure what I'm doing wrong, could someone help? RE: Tool to Control Fan - fanctl - tuxd3v - 11-20-2018 (11-20-2018, 11:17 AM)Drago Wrote: I can't get this to install for the life of me. Hello Drago, when you issue: Code: cat <<HERE >> /etc/luarocks/config.lua
variables = {
UNISTD_INCDIR = "/usr/include",
STAT_INCDIR = "/usr/include/$( gcc -dumpmachine )",
TYPES_INCDIR = "/usr/include/$( gcc -dumpmachine )",
LUALIB_INCDIR = "/usr/include/lua5.3",
LAUXLIB_INCDIR = "/usr/include/lua5.3",
LUA_INCDIR = "/usr/include/lua5.3",
LUA53_LIBDIR = "/usr/lib/$( gcc -dumpmachine )"
}
HEREYou need to press enter after If you don't succeed, then try the master version: Code: luarocks build https://raw.githubusercontent.com/tuxd3v/ats/master/ats-master-0.rockspecIt will be the next stable version.. RE: Tool to Control Fan - fanctl - Drago - 11-20-2018 (11-20-2018, 03:26 PM)tuxd3v Wrote:(11-20-2018, 11:17 AM)Drago Wrote: I can't get this to install for the life of me. I tried installing the master version and still no luck. RE: Tool to Control Fan - fanctl - tuxd3v - 11-20-2018 (11-20-2018, 03:31 PM)Drago Wrote: I tried installing the master version and still no luck. Ok, no problem, When you install the master branch version, what is the output you get? I have tested with debian and with ubuntu versions, you are in DietPi, its nice if you could help me, so that I also improve compatibility with DietPi EDIT: Also what do you get in the logs? Check with this command: Code: journalctl -u atsRE: Tool to Control Fan - fanctl - Drago - 11-20-2018 (11-20-2018, 06:42 PM)tuxd3v Wrote:(11-20-2018, 03:31 PM)Drago Wrote: I tried installing the master version and still no luck. Here's the output after trying to install the master version: Code: Cloning into 'ats'...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 16 (delta 1), reused 6 (delta 0), pack-reused 0
Receiving objects: 100% (16/16), 95.96 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1/1), done.
Warning: variable CFLAGS was not passed in build_variables
gcc -c -march=armv8-a+crc -mtune=cortex-a72.cortex-a53 -fPIC -Wall -Werror -O3 -g -I/usr/include/lua5.3 -o src/ats.o src/ats.c
gcc -shared -Wl,-soname,ats.so.0 -llua5.3 -o ats.so.0.2 src/ats.o
Install ATS Tool ..................: ats in /usr/local/sbin
Install ATS Service File ..........: ats.service in systemd
Remove previous ATS Library .......: ats.so.* from /usr/local/lib/lua/5.3
Install new ATS Library ...........: ats.so.0.2 in /usr/local/lib/lua/5.3
Create soname symLink .............: ats.so in /usr/local/lib/lua/5.3
Starting ATS Service..
\u25cf ats.service - ATS - Active Thermal Service
Loaded: loaded (/lib/systemd/system/ats.service; enabled; vendor preset: enab
led)
Active: activating (auto-restart) (Result: exit-code) since Tue 2018-11-20 20
:51:53 EST; 1s ago
Process: 16998 ExecStart=/usr/local/sbin/ats (code=exited, status=1/FA
ILURE)
Main PID: 16998 (code=exited, status=1/FAILURE)
Nov 20 20:51:53 DietPi systemd[1]: ats.service: Failed with result 'exit
-code'.
Makefile:46: recipe for target 'install' failed
make: *** [install] Error 3
Error: Build error: Failed installing.And here's what I get in the logs: Code: Nov 20 20:58:43 DietPi ats[17492]: exit 1
Nov 20 20:58:43 DietPi systemd[1]: ats.service: Main process exited, code=exited, status=1/FAILURE
Nov 20 20:58:43 DietPi systemd[1]: ats.service: Unit entered failed state.
Nov 20 20:58:43 DietPi systemd[1]: ats.service: Failed with result 'exit-code'.
Nov 20 20:58:51 DietPi systemd[1]: ats.service: Service hold-off time over, scheduling restart.
Nov 20 20:58:51 DietPi systemd[1]: Stopped ATS - Active Thermal Service.
Nov 20 20:58:51 DietPi systemd[1]: Started ATS - Active Thermal Service.
Nov 20 20:58:51 DietPi ats[17503]: getConditions: Warning, Values { THERMAL0_CTL, THERMAL1_CTL, FAN_CTL }: /sys/class/thermal/thermal_zone0/temp, /sys/class/
thermal/thermal_zone1/temp, ERRORRE: Tool to Control Fan - fanctl - tuxd3v - 11-20-2018 (11-20-2018, 08:00 PM)Drago Wrote: Thanks, ![]() Yup, You need to update your kernel..that version doesn't get exported to SysFs the needed controls.. I don't know if you have access to this Kernels, but try it: 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
rebootAfter reboot it should start automatically.. You can stop it, Code: service ats stopand run a test: Code: ats --testTo see timers and power it applies to fan, also temps..when done crtl+C and start service again: Code: service ats start
service ats statusRE: Tool to Control Fan - fanctl - Drago - 11-20-2018 (11-20-2018, 09:10 PM)tuxd3v Wrote:(11-20-2018, 08:00 PM)Drago Wrote: Will updating the kernel mess with my DietPi install? Nevermind, I was able to update the kernel and it works now! Thanks for your help! Here's the output from test: Code: Stopping for[ seconds ]............... 10
CPU Temperature[ max 70 °C ].......... 60
GPU Temperature[ max 70 °C ].......... 60
Fan PWM Duty Cycle value[ 0 - 255 ]... 190
--------------------
Running for[ seconds ]................ 10
CPU Temperature[ max 70 °C ].......... 42
GPU Temperature[ max 70 °C ].......... 41
Fan PWM Duty Cycle value[ 0 - 255 ]... 62
--------------------
Stopping for[ seconds ]............... 90
CPU Temperature[ max 70 °C ].......... 42
GPU Temperature[ max 70 °C ].......... 41
Fan PWM Duty Cycle value[ 0 - 255 ]... 0
--------------------And the service running: Code: ats.service - ATS - Active Thermal Service
Loaded: loaded (/lib/systemd/system/ats.service; enabled; vendor preset: enab
led)
Active: active (running) since Tue 2018-11-20 22:31:04 EST; 5s ago
Main PID: 2593 (lua)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/ats.service
\u2514\u25002593 lua /usr/local/sbin/ats
Nov 20 22:31:04 DietPi systemd[1]: Started ATS - Active Thermal Service.The fan is kind of loud actually, any advice on damping the sound? RE: Tool to Control Fan - fanctl - tuxd3v - 11-21-2018 (11-20-2018, 09:19 PM)Drago Wrote: The fan is kind of loud actually, any advice on damping the sound? For Now, its only possible editing : '/usr/local/sbin/ats' In future releases, will be there a config file '/etc/ats.conf' Changing the profile will lower the fan speed.. You can change line 68, of file '/usr/local/sbin/ats' change: FANSPEC = "profile1" for "profile2" or even "profile3" it will have a less aggressive power output.. What are the characteristics of your fan? RE: Tool to Control Fan - fanctl - stFfn - 11-21-2018 (11-19-2018, 03:28 PM)tuxd3v Wrote:(11-18-2018, 01:59 PM)Girbur Wrote: Got it sorry Hey, ok so i´ve played arround with these settings a bit but im not sattisfied with the result i produced ![]() what i want to do is use Profile 3 or what ever and then i want the fan to always run but kinda slow so. this way it cools and is not as loud. is that possible? if yes could you give me the numbers i need to put in and where? ![]() Greetings Steffen p.s. i think i found it my selfe after i wrote this post ![]() is this correct to change this setting: MAX_FAN_PWM? I changed it to 150 and the fan is mutch quieter. or am i wrong and did something fatal?
RE: Tool to Control Fan - fanctl - tuxd3v - 11-21-2018 (11-21-2018, 01:32 PM)stFfn Wrote: p.s. i think i found it my selfe after i wrote this post That is one way of limiting without changing too much ![]() The PWM curve by Interpolated method is: |