Changes

Jump to navigation Jump to search

XScript

835 bytes added, 18:14, 14 June 2023
If reboot fails, please force shutdown or power off and restart
''' PWM fan control''' (This is optional)
You can ignore this step if you don't use the 3-Pin PWM fan to cool the CM4, in fact, the [[C235]] heatsink can provide enough cooling capacity, and you can also avoid the trouble of fan noise
python3 /home/pi/xscript/fan-rpi.py&
 
'''Test safe shutdown'''
xoff
* Please run 'xoff' to shut down or press the on-board button switch to shut down. <span style="color:red;">DON'T run the 'shutdown' linux command to shut down, otherwise the power of device will not be shut down.</span>
* press button switch `1-2` seconds to reboot
* press button switch `3` seconds to safe shutdown,
* press `7-8` seconds to force shutdown.
 
'''uninstall'''
<pre>
sudo rm /usr/local/bin/softsd.sh -f
sudo rm /etc/pwr.sh -f
 
sudo sed -i '/pwr.sh/d' /etc/rc.local
sudo sed -i '/softsd.sh/d' ~/.bashrc
</pre>

Navigation menu