Rock64pro and CPU Fan

Here we go MichaIng

Before Reboot

root@DietPi:~# mkdir -p /etc/systemd/system/ats.service.d
root@DietPi:~# echo -e '[Unit]\nAfter=getty.target' > /etc/systemd/system/ats.service.d/start-later.conf
root@DietPi:~# ls -l /etc/systemd/system/ats.service
lrwxrwxrwx 1 root root 54 Dec 22 20:34 /etc/systemd/system/ats.service -> /usr/local/lib/luarocks/rocks/ats/master-0/ats.service
root@DietPi:~# ls -l /lib/systemd/system/ats.service
lrwxrwxrwx 1 root root 54 Dec 22 20:34 /lib/systemd/system/ats.service -> /usr/local/lib/luarocks/rocks/ats/master-0/ats.service
root@DietPi:~# ls -l /usr/local/lib/luarocks/rocks/ats/master-0/ats.service
-rw-r----- 1 root root 218 Dec 22 20:34 /usr/local/lib/luarocks/rocks/ats/master-0/ats.service
root@DietPi:~#

After a Reboot I hear now the Fan for just 2-3 seconds and then it’s going Off :wink:


After Reboot

root@DietPi:~# ls -l /etc/systemd/system/ats.service
lrwxrwxrwx 1 root root 54 Dec 22 20:34 /etc/systemd/system/ats.service -> /usr/local/lib/luarocks/rocks/ats/master-0/ats.service
root@DietPi:~# ls -l /lib/systemd/system/ats.service
lrwxrwxrwx 1 root root 54 Dec 22 20:34 /lib/systemd/system/ats.service -> /usr/local/lib/luarocks/rocks/ats/master-0/ats.service
root@DietPi:~# ls -l /usr/local/lib/luarocks/rocks/ats/master-0/ats.service
-rw-r----- 1 root root 218 Dec 22 20:34 /usr/local/lib/luarocks/rocks/ats/master-0/ats.service
root@DietPi:~#

looks like putting it into right order fix it

Indeed, solved by the DietPi team!

Thx for your great support and patience Joulinar and MichaIng

Great :slight_smile:. Still not sure which device exactly it the one we need to wait for, but getty.target is obviously sufficiently later on boot sequence.

Strange service setup with the doubled symlinks to the service and that it has no global read permissions set, however, seems like it can be ignored.

Installing on a new fresh system.

hhmmm time-out

root@DietPi:~# luarocks build https://raw.githubusercontent.com/tuxd3v/ats/master/ats-master-0.rockspec
Cloning into 'ats'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Connection timed out

Error: Failed cloning git repository.
root@DietPi:~#

But url is alive https://raw.githubusercontent.com/tuxd3v/ats/master/ats-0.2-0.rockspec

root@DietPi:~# ping 140.82.121.3
PING 140.82.121.3 (140.82.121.3) 56(84) bytes of data.
64 bytes from 140.82.121.3: icmp_seq=1 ttl=51 time=10.7 ms
64 bytes from 140.82.121.3: icmp_seq=2 ttl=51 time=10.6 ms
64 bytes from 140.82.121.3: icmp_seq=3 ttl=51 time=10.5 ms
64 bytes from 140.82.121.3: icmp_seq=4 ttl=51 time=10.5 ms
64 bytes from 140.82.121.3: icmp_seq=5 ttl=51 time=10.9 ms
64 bytes from 140.82.121.3: icmp_seq=6 ttl=51 time=10.5 ms
64 bytes from 140.82.121.3: icmp_seq=7 ttl=51 time=10.8 ms
64 bytes from 140.82.121.3: icmp_seq=8 ttl=51 time=10.6 ms
c64 bytes from 140.82.121.3: icmp_seq=9 ttl=51 time=10.8 ms
64 bytes from 140.82.121.3: icmp_seq=10 ttl=51 time=10.6 ms
^C
--- 140.82.121.3 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9016ms
rtt min/avg/max/mdev = 10.477/10.657/10.933/0.142 ms
root@DietPi:~#

containing:

rockspec_format = "1.0"
package = "ats"
version = "0.2-0"
description = {
summary = "Active Thermal Service",
detailed = [[
This tool, provide support for Rockpro64, Active thermal Service( Fan Control ).
]],
homepage = "https://github.com/tuxd3v/ats",
license = "See License..",
maintainer = "tuxd3v [tuxd3v@sapo.pt](mailto:tuxd3v@sapo.pt)"
}
source = {
url = "https://github.com/tuxd3v/ats/archive/v0.2.0.tar.gz",
file = "ats-0.2.0.tar.gz",
dir = "ats-0.2.0"
}
dependencies = {
supported_platforms = "linux",
"lua >= 5.3"
--[["lua-dev >= 5.3"
he doesn't know what is lua5.3-dev, needed to provide "lualib.h","lauxlib.h","lua.h" headers to build shared library..
Anny way, that package is provided by apt-get( Operating System Pkg Manager ), Luarocks doesn't know about, but no problem..
Because dependency check is provided in table var 'external_dependencies' bellow..
]]
}
build = {
type = "make",
makefile = "Makefile",
build_target = "all",
build_pass = true,
build_variables = {},
install_target = "install",
install_pass = true,
install_variables = {},
variables = {},
modules = { ats = "src/ats.c" }
}

how to solve this?

Something you need to report to developer of the installations script, to change the behavior.

As far as I can see, install script is trying to use following command to clone the repository

git clone --depth=1 git://github.com/tuxd3v/ats ats

However, GitHub does not support the git:// protocol anymore. Improving Git protocol security on GitHub | The GitHub Blog

A workaround could be

echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig

Now, try again

Working!

root@DietPi:~# echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
root@DietPi:~# luarocks build https://raw.githubusercontent.com/tuxd3v/ats/master/ats-master-0.rockspec
Cloning into 'ats'...
remote: Enumerating objects: 24, done.
remote: Counting objects: 100% (24/24), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 24 (delta 1), reused 8 (delta 0), pack-reused 0
Receiving objects: 100% (24/24), 106.98 KiB | 4.28 MiB/s, done.
Resolving deltas: 100% (1/1), done.
Warning: variable CFLAGS was not passed in build_variables
** PLATFORM = linux  **
** OS       = 64Bits **
** ARCH     = armv8-a+crc **
** TUNE     = cortex-a72.cortex-a53 **
gcc -c -march=armv8-a+crc -mtune=cortex-a72.cortex-a53 -fPIC -Wall -Werror -O3 -g -I/usr/include/lua5.3  -o debug.o src/debug.c
gcc -c -march=armv8-a+crc -mtune=cortex-a72.cortex-a53 -fPIC -Wall -Werror -O3 -g -I/usr/include/lua5.3  -o ats.o src/ats.c
gcc -shared -Wl,-soname,ats.so.0 -llua5.3  -o ats.so.0.9 debug.o ats.o
Install Method: LuaRocks ..
SystemD Detected ..
Searching for Previous Install, and Remove it:
Creating Library Path: /usr/local/lib/lua/5.3
mkdir: created directory '/usr/local/lib/lua'
mkdir: created directory '/usr/local/lib/lua/5.3'
Install ATS Service File ..........: ats.service in '/usr/local/lib/luarocks/rocks/ats/master-0'
Install ATS Config ................: ats.config in '/usr/local/lib/luarocks/rocks/ats/master-0'
Install ATS Tool ..................: ats in '/usr/local/lib/luarocks/rocks/ats/master-0'
Install new ATS Library ...........: ats.so.0.9 in '/usr/local/lib/luarocks/rocks/ats/master-0'
Creating soname symLink ........: ats.so in '/usr/local/lib/luarocks/rocks/ats/master-0'
Creating Service symLink .......: ats.service in '/lib/systemd/system'
Creating Binary symLink ........: ats in '/usr/local/sbin/ats'
Creating Config symLink ........: ats.conf in '/etc/ats.conf'
Creating SharedObject symLink ..: ats.so.0.9 in '/usr/local/lib/lua/5.3'
Created symlink /etc/systemd/system/basic.target.wants/ats.service β†’ /usr/local/lib/luarocks/rocks/ats/master-0/ats.service.
Created symlink /etc/systemd/system/ats.service β†’ /usr/local/lib/luarocks/rocks/ats/master-0/ats.service.
Starting ATS Service..
● ats.service - ATS - Active Thermal Service
     Loaded: loaded (/usr/local/lib/luarocks/rocks/ats/master-0/ats.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-12-27 19:43:46 CET; 19ms ago
   Main PID: 1279 (lua)
      Tasks: 1 (limit: 4464)
     Memory: 452.0K
        CPU: 10ms
     CGroup: /system.slice/ats.service
             └─1279 lua /usr/local/sbin/ats

Dec 27 19:43:46 DietPi systemd[1]: Started ATS - Active Thermal Service.
ats master-0 is now installed in /usr/local (license: See License..)

root@DietPi:~#

With the new Bookworm above doesn’t work anymore

echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig

Install from master( last code, but more prone to errors… )

luarocks build https://raw.githubusercontent.com/tuxd3v/ats/master/ats-master-0.rockspec
Receiving objects: 100% (2159/2159), 740.61 KiB | 6.86 MiB/s, done.
Resolving deltas: 100% (1293/1293), done.

ats master-0 depends on lua >= 5.3 (5.3-1 provided by VM)
Warning: variable CFLAGS was not passed in build_variables
** PLATFORM = linux  **
** OS       = 64Bits **
** ARCH     = armv8-a+crc **
** TUNE     = cortex-a72.cortex-a53 **
gcc -c -march=armv8-a+crc -mtune=cortex-a72.cortex-a53 -fPIC -Wall -Werror -O3 -g -I/usr/include/lua5.3  -o debug.o src/debug.c
gcc -c -march=armv8-a+crc -mtune=cortex-a72.cortex-a53 -fPIC -Wall -Werror -O3 -g -I/usr/include/lua5.3  -o ats.o src/ats.c
gcc -shared -Wl,-soname,ats.so.0 -llua5.3  -o ats.so.0.9 debug.o ats.o
Install Method: LuaRocks ..
Makefile:106: *** ATS Binary Folder: /usr/local/lib/luarocks/rocks/ats/master-0, **NOT Detected**, ABORTING...  Stop.

Error: Build error: Failed installing.
root@DietPi:~#

do you have any ideas?

looks like something is missing on your system. Maybe the folder would need to be created beforehand?? :thinking:

yes indeed, could be!

will have a look later

the path changed in Debian Bookworm

root@DietPi:~# mkdir /usr/local/lib/luarocks/rocks/ats/master-0
mkdir: cannot create directory β€˜/usr/local/lib/luarocks/rocks/ats/master-0’: No such file or directory
root@DietPi:~# cd /
root@DietPi:/# ls usr
bin  games  include  lib  libexec  local  sbin  share  src
root@DietPi:/# cd ..
root@DietPi:/# ls
bin  boot  dev  etc  home  lib  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@DietPi:/# mkdir /usr/local/lib/luarocks/rocks/ats/master-0
mkdir: cannot create directory β€˜/usr/local/lib/luarocks/rocks/ats/master-0’: No such file or directory
root@DietPi:/# cd usr
root@DietPi:/usr# cd local
root@DietPi:/usr/local# cd lib
root@DietPi:/usr/local/lib# ls
luarocks  python3.11
root@DietPi:/usr/local/lib# cd luarocks/
root@DietPi:/usr/local/lib/luarocks# ls
rocks-5.3

it differs from

/usr/local/lib/luarocks/rocks/ats/master-0

/usr/local/lib/luarocks/rocks-5.3/

from here there are no more directories

made an issue request on github

1 Like