Closed omersi closed 1 year ago
Hi @omersi, what exactly do you mean by "upon restart"? If it's restart of the whole system (i.e. on boot), you're seeing issue #118. Go take a look there for workarounds. A proper fix for it (error-tolerance on startup) is currently in implementation in PR #177. You can also build and test that branch if you want to help.
However, if the problem doesn't occur only on boot, but anytime you execute e.g. systemctl restart thinkfan
, then this is a new issue.
Since #118 appears to become more pressing recently with boot sequence nondeterminism increasing, I've simply merged #177 into the master. So you can go ahead and test with the latest master branch by adding a setting like max_errors: 5
to the affected sensors, e.g.:
# GPU / CPU
- hwmon: /sys/devices/virtual/thermal
indices: [1]
max_errors: 5
@vmatare I meant upon boot. trying the new version.
I installed latest version.
it's failing to start now.
● thinkfan.service - thinkfan 2.0.0
Loaded: loaded (/usr/local/lib/systemd/system/thinkfan.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/thinkfan.service.d
└─default.conf, override.conf
Active: failed (Result: exit-code) since Thu 2022-04-14 09:59:49 IDT; 2min 20s ago
Process: 175207 ExecStart=/usr/local/sbin/thinkfan $THINKFAN_ARGS (code=exited, status=1/FAILURE)
Apr 14 09:59:49 omerl-ilubuntu.ilient-hq.local systemd[1]: Starting thinkfan 2.0.0...
Apr 14 09:59:49 omerl-ilubuntu.ilient-hq.local thinkfan[175207]: ERROR: /run/thinkfan.pid already exists. Either thinkfan is already running, or it was killed by SIGKILL. If you're sure thinkfan is not running, delete /run/thinkfan.pid manually.
Apr 14 09:59:49 omerl-ilubuntu.ilient-hq.local systemd[1]: thinkfan.service: Control process exited, code=exited, status=1/FAILURE
Apr 14 09:59:49 omerl-ilubuntu.ilient-hq.local systemd[1]: thinkfan.service: Failed with result 'exit-code'.
Apr 14 09:59:49 omerl-ilubuntu.ilient-hq.local systemd[1]: Failed to start thinkfan 2.0.0.
/run/thinkfan.pid
doesn't exist
sudo ls /run/thinkfan.pid
ls: cannot access '/run/thinkfan.pid': No such file or directory
That's weird, nothing was changed regarding the PID file. Could you do an strace to see what's actually going on with the PID file and send me the output?
strace -e trace=file ./thinkfan -n |& grep -C10 '\.pid'
If it happens to work with the -n
option, you can try allowing thinkfan to fork and tell strace to follow:
strace -f -e trace=file ./thinkfan |& grep -C10 '\.pid'
Closing due to lack of info. Feel free to open if info comes up.
Hi
I create this
thinkfan.conf
fileupon restart, the deamon faild to initilize itself with exception regarding to the
CPU
/GPU
monitors:only that running
find
command yieldshow do I overcome this issue?