DeskPi-Team / deskpi

DeskPi Pro is the Ultimate Case Kit for Raspberry Pi 4 with Full Size HDMI/2.5 Hard Disk Support and Safe Power Button, It has QC 3.0 Power Supply inside and New ICE Tower Cooler inside.
GNU General Public License v3.0
143 stars 46 forks source link

Services are not getting activated #158

Closed aravindjaimon closed 4 months ago

aravindjaimon commented 11 months ago

The app is getting installed with the docs provided in https://wiki.deskpi.com/deskpipro/. But after restart the fans are not getting persisted. When checking the status of the services, both services related to deskpi is on an activating state.

aj@nas:~ $ sudo systemctl status deskpi
● deskpi.service - DeskPi Fan Control Service
     Loaded: loaded (/lib/systemd/system/deskpi.service; enabled; vendor preset: enabled)
     Active: activating (start) since Sun 2023-10-15 21:21:18 IST; 4min 33s ago
   Main PID: 3217 (pwmFanControl64)
      Tasks: 1 (limit: 8755)
        CPU: 106ms
     CGroup: /system.slice/deskpi.service
             └─3217 /usr/bin/pwmFanControl64 &
aj@nas:~ $ sudo systemctl status deskpi-cut-off-power.service
● deskpi-cut-off-power.service - DeskPi-cut-off-power service
     Loaded: loaded (/lib/systemd/system/deskpi-cut-off-power.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
aj@nas:~ $ sudo systemctl start deskpi-cut-off-power.service
^C
aj@nas:~ $ sudo systemctl status deskpi-cut-off-power.service
● deskpi-cut-off-power.service - DeskPi-cut-off-power service
     Loaded: loaded (/lib/systemd/system/deskpi-cut-off-power.service; enabled; vendor preset: enabled)
     Active: activating (start) since Sun 2023-10-15 21:26:27 IST; 15s ago
   Main PID: 3517 (safecutoffpower)
      Tasks: 1 (limit: 8755)
        CPU: 243ms
     CGroup: /system.slice/deskpi-cut-off-power.service
             └─3517 /usr/bin/safecutoffpower64

While trying to start the services the commands are not giving any feedback and is continuously running, Thus need to terminate it.

paulwratt commented 11 months ago

did you try:

sudo systemctl restart deskpi-cut-off-power.service

I have just been play with disabling a buck of services, and deskpi-cut-off-power.service is installed & enabled, but was not in the systemd-analyze blame list.

Its likely that power service does not get started until a power-off state (halt, poweroff, reboot) is initiated by SystemD

yoyojacky commented 4 months ago

did you try:

sudo systemctl restart deskpi-cut-off-power.service

I have just been play with disabling a buck of services, and deskpi-cut-off-power.service is installed & enabled, but was not in the systemd-analyze blame list.

Its likely that power service does not get started until a power-off state (halt, poweroff, reboot) is initiated by SystemD

Yes, that's right, once you initializing the shutdown sequnces, it will trigger the cut-off-power serivce to send "power_off" signal to /dev/ttyUSB0 which is listening by MCU on daughter board, and once the MCU get the "power_off" singal, it will cut off the power, and then, the blue light will turn red on power buttom.