tuxd3v / ats

91 stars 12 forks source link

Starting service failed on archlinux-arm on rockpro3399 #30

Open Mithrandir2k18 opened 2 years ago

Mithrandir2k18 commented 2 years ago

I tried to install and run using the luarocks command. It installed and built correctly but starting the service gives an error. Here's my output:

# luarocks build https://raw.githubusercontent.com/tuxd3v/ats/master/ats-0.2-0.rockspec

ats 0.2-0 depends on lua >= 5.3 (5.4-1 provided by VM)
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 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 ATS Tool ..................: ats in /usr/local/sbin
Install ATS Config ................: ats.config in /etc
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.9 in /usr/local/lib/lua/5.3
Create soname symLink .............: ats.so in /usr/local/lib/lua/5.3
Starting ATS Service..
* ats.service - ATS - Active Thermal Service
     Loaded: loaded (/usr/lib/systemd/system/ats.service; enabled; vendor preset: disabled)
     Active: activating (auto-restart) (Result: exit-code) since Tue 2022-03-22 21:15:17 UTC; 1s ago
    Process: 2266 ExecStart=/usr/local/sbin/ats (code=exited, status=1/FAILURE)
   Main PID: 2266 (code=exited, status=1/FAILURE)
        CPU: 6ms

Mar 22 21:15:17 alarm systemd[1]: ats.service: Main process exited, code=exited, status=1/FAILURE
Mar 22 21:15:17 alarm systemd[1]: ats.service: Failed with result 'exit-code'.
make: *** [Makefile:119: install] Error 3

Error: Build error: Failed installing.

Do you support archlinux-arm?

RensOliemans commented 2 years ago

I have the same error during install, on Ubuntu 20.04.

$ uname -r
5.10.63-rockchip64
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
...

After install:

$ ats
getConditions: Warning, Values { THERMAL0_CTL, THERMAL1_CTL, FAN_CTL }: /sys/class/thermal/thermal_zone0/temp, /sys/class/thermal/thermal_zone1/temp, ERROR
exit 1

So it seems there's something wrong with the fan/pwm control. From ats.conf, I get that there are 5 supported fan controller paths, Only the last one exists on my system: image

Does this matter, that I don't have all pwm paths? If there's some other tests we have to do, just let us know!

RensOliemans commented 2 years ago

I installed ats with release 0.2.0, but since commit aa92468d7ce602b9a4fddc17d280b09b4944588e (#26) was after 0.2.0, my install didn't contain this updated code. Since my fan was at hwmon3, I needed the updated code.

I installed from source, and now everything works perfectly! @Mithrandir2k18 perhaps you can try this? Install option B

Mithrandir2k18 commented 2 years ago

That gives me pretty much the same result. Here's what I did/got:

$ git checkout  aa92468
Previous HEAD position was 5c588b4 bump shared library version..
HEAD is now at aa92468 Add more fan controller paths
$ git clean --force
Removing ats.o
Removing ats.so.0.9
Removing debug.o
$ make
** 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
$ sudo make install
Install Method: Make..
SystemD Detected ..
Searching for Previous Install, and Remove it:
removed '/etc/ats.conf'
removed '/lib/systemd/system/ats.service'
removed '/usr/local/sbin/ats'
removed '/usr/local/lib/lua/5.3/ats.so'
removed '/usr/local/lib/lua/5.3/ats.so.0.9'
Install ATS Service File ..........: ats.service in '/lib/systemd/system'
Install ATS Config ................: ats.config in '/etc'
Install ATS Tool ..................: ats in '/usr/local/sbin'
Install new ATS Library ...........: ats.so.0.9 in '/usr/local/lib/lua/5.3'
Creating soname symLink ........: ats.so in '/usr/local/lib/lua/5.3'
Starting ATS Service..
* ats.service - ATS - Active Thermal Service
     Loaded: loaded (/usr/lib/systemd/system/ats.service; enabled; vendor preset: disabled)
     Active: activating (auto-restart) (Result: exit-code) since Tue 2022-04-05 14:49:04 UTC>
    Process: 29313 ExecStart=/usr/local/sbin/ats (code=exited, status=1/FAILURE)
   Main PID: 29313 (code=exited, status=1/FAILURE)
        CPU: 11ms

Apr 05 14:49:04 alarm systemd[1]: ats.service: Main process exited, code=exited, status=1/FA>
Apr 05 14:49:04 alarm systemd[1]: ats.service: Failed with result 'exit-code'.

Same happens on current master and on tag v0.2.0.

RensOliemans commented 2 years ago

Hm that sucks, I don't have arch so can't test it. What is the output of ats? journalctl -f -u ats or systemctl status ats?

tuxd3v commented 2 years ago

hello Rens,

Just add the one you have to '/etc/ats.conf'...add a new path with
that name :)

in section

-- FAN Control[ String ]

PWM_CTL

'/sys/devices/platform/pwm-fan/hwmon/hwmon3/pwm1'

Then do a systemctl stop ats

And launch it in test mode, to see if it starts ok:

ats -t

if its ok, then CTRL+C

And 'systemctl start ats' :)

This problem was never solved and each time the system boots, or some
times it boot, it just peak a random number :(

It should have being fixed in device-tree in the aliases section, but
any time a image is released...they never fix it, and so then on boot
it can have a randon path.. :(

Regards,

tux

----- Mensagem de Rens Oliemans @.***> ---------

Data: Thu, 31 Mar 2022 03:19:10 -0700

De: Rens Oliemans @.***>

Assunto: Re: [tuxd3v/ats] Starting service failed on archlinux-arm
on rockpro3399  (Issue #30)

Para: tuxd3v/ats @.***>

Cc: Subscribed @.***>

I have the same error during install, on Ubuntu 20.04.

$ uname -r 5.10.63-rockchip64 $ cat /etc/os-release NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)" ...

After install:

$ ats getConditions: Warning, Values { THERMAL0_CTL, THERMAL1_CTL,
FAN_CTL }: /sys/class/thermal/thermal_zone0/temp,
/sys/class/thermal/thermal_zone1/temp, ERROR exit 1

So it seems there's something wrong with the fan/pwm control. From
ats.conf, I get that there are 5 supported fan controller paths,
Only the last one exists on my system: [1]

Does this matter, that I don't have all pwm paths? If there's some
other tests we have to do, just let us know!

Reply to this email directly, view it on GitHub[2], or unsubscribe[3].

You are receiving this because you are subscribed to this
thread.Message ID: @.***>

----- Fim da mensagem de Rens Oliemans @.***> -----

Ligações:

[1]
https://user-images.githubusercontent.com/16014817/161032744-2fd81add-4560-40fd-ac4b-c608584a2651.png [2] https://github.com/tuxd3v/ats/issues/30#issuecomment-1084376451 [3]
https://github.com/notifications/unsubscribe-auth/ABPFUJYIY7MNK4J2C5E3R4LVCV3Z5ANCNFSM5RMJBJSQ

tuxd3v commented 2 years ago

Mithrandir2k18, right now, I can't help with arch Linux :/ My main rockpro64 broke down about 1 year ago, and I can't debug now. and Pine64 didn't sent me a board to continue improve it :(

tuxd3v commented 2 years ago

Hello Mithrandir2k18,

At this moment I don't have a rockpro64 any more...it just broke :(

For what I understand arch does have its libraries and lua
configurations in a different way..

Also I believe they only have lua5.4 right?

well that will be difficult without any board to test :(

----- Mensagem de Mithrandir2k18 @.***> ---------

Data: Tue, 22 Mar 2022 15:48:24 -0700

De: Mithrandir2k18 @.***>

Assunto: [tuxd3v/ats] Starting service failed on archlinux-arm on
rockpro3399  (Issue #30)

Para: tuxd3v/ats @.***>

Cc: Subscribed @.***>

I tried to install and run using the luarocks command. It installed
and built correctly but starting the service gives an error. Here's
my output:

luarocks build

https://raw.githubusercontent.com/tuxd3v/ats/master/ats-0.2-0.rockspec ats
0.2-0 depends on lua >= 5.3 (5.4-1 provided by VM) 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 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
ATS Tool ..................: ats in /usr/local/sbin Install ATS
Config ................: ats.config in /etc 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.9 in /usr/local/lib/lua/5.3 Create
soname symLink .............: ats.so in /usr/local/lib/lua/5.3
Starting ATS Service..
ats.service - ATS - Active Thermal Service
Loaded: loaded (/usr/lib/systemd/system/ats.service; enabled;
vendor preset: disabled) Active: activating (auto-restart)
(Result: exit-code) since Tue 2022-03-22 21:15:17 UTC; 1s ago
Process: 2266 ExecStart=/usr/local/sbin/ats (code=exited,
status=1/FAILURE) Main PID: 2266 (code=exited, status=1/FAILURE)
CPU: 6ms Mar 22 21:15:17 alarm systemd[1]: ats.service: Main
process exited, code=exited, status=1/FAILURE Mar 22 21:15:17 alarm
systemd[1]: ats.service: Failed with result 'exit-code'. make: ***
[Makefile:119: install] Error 3 Error: Build error: Failed
installing.

Do you support archlinux-arm?

Reply to this email directly, view it on GitHub[1], or unsubscribe[2].

You are receiving this because you are subscribed to this
thread.Message ID: @.***>

----- Fim da mensagem de Mithrandir2k18 @.***> -----

Ligações:

[1] https://github.com/tuxd3v/ats/issues/30 [2]
https://github.com/notifications/unsubscribe-auth/ABPFUJY5Y56YMN44NZNFAQDVBJE3RANCNFSM5RMJBJSQ

dkowis commented 2 years ago

I just ran into this on my rockpro64, using armbian. Can confirm that just editing the path in /etc/ats.conf solves the problem.

Fan scoots, thermals don't get too high :D

hemertje commented 1 year ago

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

containing:

[code] 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" } 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" } } [/code]

how to solve this?

hemertje commented 1 year ago

The script depends on the git:// url. But GitHub does not support the git:// protocol anymore.

https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git

Workaround before running the script:

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