desbma / hddfancontrol

Regulate fan speed according to hard drive temperature
GNU General Public License v3.0
137 stars 18 forks source link

Is there a way to get hddfancontrol to work with pipx? #52

Closed TomTheDragon closed 5 months ago

TomTheDragon commented 6 months ago

I recently upgraded a small server to Debian 12 and i noticed that hddfancontrol stopped working, since they recommend you using system packages or isolated installs over pipx "if you can" now days. So i removed all of the remains of the old installation and i installed it back over pipx. I made sure that everything works by running hddfancontrol directly and i also made sure that the new path was updated in the service file. I however noticed that it just errors out when i try to start it as a service and there was just nothing in the service log (journalctl).

desbma commented 6 months ago

I however noticed that it just errors out when i try to start it as a service and there was just nothing in the service log (journalctl).

How do you know it errors out if you have nothing in the systemd journal?

TomTheDragon commented 5 months ago

I do get an error when i check the status.

root@omv:~# systemctl status hddfancontrol.service
× hddfancontrol.service - HDD fan control
     Loaded: loaded (/etc/systemd/system/hddfancontrol.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Fri 2024-05-24 01:55:18 CEST; 3min 40s ago
   Duration: 71ms
    Process: 159763 ExecStart=/root/.local/bin/hddfancontrol $HDDFANCONTROL_ARGS (code=exited, status=203/EXEC)
   Main PID: 159763 (code=exited, status=203/EXEC)
        CPU: 71ms

I am using the default service file and i only changed the location to the binary because of pipx.

It does however run if i run it directly like this:

/root/.local/bin/hddfancontrol -d /dev/sda -p /sys/class/hwmon/hwmon2/pwm2 --pwm-start-value 80 --pwm-stop-value 60 -i 60 --min-temp 35 --max-temp 40 --min-fan-speed-prct 25
desbma commented 5 months ago

Try commenting out ProtectHome=true in /etc/systemd/system/hddfancontrol.service.

TomTheDragon commented 5 months ago

That fixed it. Thanks!