Changes

Jump to navigation Jump to search

XScript

1,369 bytes removed, 20 March
no edit summary
After your system boots, then you need to open <code>Terminal</code> prpgram, then type the following command to complete the installation of the script
'''[NOTE]'''
 
If you are a new user, please ignore this '''NOTE'''
 
If you are using the latest Raspberry Pi OS bookworm version or have updated the OS kernel to the latest version 6.6, then you get the following error after running the <code>xoff</code> command:
<pre>
/usr/local/bin/x-c1-softsd.sh: line 5: echo: writing error: Invalid argument
/usr/local/bin/x-c1-softsd.sh: line 6: /sys/class/gpio/gpio27/direction: No such file or directory
/usr/local/bin/x-c1-softsd.sh: line 7: /sys/class/gpio/gpio27/value: No such file or directory
Your device will shutting down in 4 seconds...
/usr/local/bin/x-c1-softsd.sh: line 19: /sys/class/gpio/gpio27/value: No such file or directory
</pre>
The cause of this error is due to a kernel update, please perform the following update to solve the issue;
 
1. First go back to the directory where you installed xscript and you will see the ''xscript'' folder.
 
2. Then run the following command:
<pre>
cd xscript
rm x-c1-softsd.sh x-c1-pwr.sh -f
git pull origin
chmod +x *.sh
sudo cp -f . /x-c1-softsd.sh /usr/local/bin/
sudo cp -f . /x-c1-pwr.sh /usr/local/bin/
sudo reboot
</pre>
==OS that has been tested==
* Raspbian
sudo reboot
==Clone Download the script==
<pre>
git clone https://github.com/geekworm-com/xscript
==Create the x-c1-fan service==
<span class="tb_red_bold"> Note: If your device does not support pwm fans or you are not using pwm, you can skip this step</span>
<pre>sudo cp -f ./x-c1-Run the following command to install fan.sh /usr/local/bin/service script;sudo cp -f ./xinstall-c1fan-fanservice.service /lib/systemd/systemsudo systemctl daemon-reloadsudo systemctl enable x-c1-fansudo systemctl start x-c1-fan</pre>sh
Then the pwm fan starts running.
==Create the x-c1-pwr service==
If you are using <prespan class="tb_red">ubuntu verson 23.04</span> or more high version, please run the following command:sudo cp -f ./xinstall-c1pwr-service-pwrubuntu.sh /usr/local/bin/sudo cp -f x-c1-pwrOR run the following command to install power management script; .service /lib/systemd/systemsudo systemctl daemon-reloadsudo systemctl enable x-c1install-pwrsudo systemctl start x-c1-pwr</pre>service.sh
==Prepair software shutdown script==
If you are using <span class="tb_red">ubuntu verson 23.04</span> or more high version, please run the following command: sudo cp -f ./xinstall-c1sss-softsdubuntu.sh /usr/local/binOR, Run the following command to install software shutdown script (sss), ./install-sss.sh Create a alias After the installation is complete, an <code>xoff</code> command will be created to execute shut down the software shutdown<pre>echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrcsource ~/.bashrc</pre>Then you can run <code>xoff</code> to execute software shutdown.
==Test safe shutdown==
==Uninstall==
Uninstall <code>x-c1-fan.service</code>: sudo systemctl stop x-c1-fan sudo systemctl disable x-c1-fanUninstall <code>x-c1-pwr.service</code>: sudo systemctl stop x-c1-pwr sudo systemctl disable x-c1-pwr Remove Run the <code>xoff</code> allias on following command to uninstall all.bashrc file sudo sed -i '/xoff/d' ~/.bashrc source ~/uninstall.bashrcsh
==Support==

Navigation menu