-

CommentStreams:F3324388018fac25a10184eacc3a9798

From Geekworm Wiki
Jump to navigation Jump to search

An other nice (maybe the best?) Solution is to install the PWM fan control as a Service... in this case you are able to restart the Service in case you change some Values for temperature control...

To do this follow this steps:

1st. create a Service file for the x735 ppm service like:

sudo nano /lib/systemd/system/x735.service

into this file copy this:


[Unit] Description=x735 PWM Control Service After=multi-user.target Conflicts=getty@tty1.service

[Service] User=pi Group=pi Type=simple ExecStart=/usr/bin/python /home/pi/x735-v2.5/pwm_fan_control.py StandardInput=tty-force

[Install] WantedBy=multi-user.target

save & close this file:

ctrl+o ctrl+x

reload the systemctrl deamon:

sudo systemctl daemon-reload

Don't forget to remove any entrys in the /home/pi/.bashrc or if you follow my previous post in the boot_script.sh load this script twice or more often will have no effect to the fan but generate more system load...

Take care about your file path to the ppm_fan_control.py file and all the other you use in this case... ;)

after all, reboot your Pi:

sudo reboot

Make sure the fan DONT spin at this moment... If the Fan spin you should check everything twice... Somewhere the script will be loaded at an other place...

If the fan don't spin, it is time to enable the new service:

sudo systemctl enable x735.service

Now you can check if all this stuff will work by using

sudo service x735 start | stop

after reboot the fan should spinning...

If you change some temperature values in the pwm_fan_control.py it will take effect after save the file and restart the x735 service:

sudo service x735 stop sudo service x735 start

that's all... Good Luck! Habe fun!