Difference between revisions of "X735-script"

From Geekworm Wiki
Jump to navigation Jump to search
Line 85: Line 85:
 
  sudo nano x735-fan.sh
 
  sudo nano x735-fan.sh
 
Change the <code>PWM_CHIP_PATH</code> to <code>/sys/class/pwm/'''pwmchip2'''</code> on line 7
 
Change the <code>PWM_CHIP_PATH</code> to <code>/sys/class/pwm/'''pwmchip2'''</code> on line 7
 +
 +
Then
  
 
Press Ctrl-O, then enter, to write the change to the file.
 
Press Ctrl-O, then enter, to write the change to the file.

Revision as of 16:54, 25 March 2024

Overview

This is script installation tutorial for X735 v2.5 & v3.0, it will replace X735 Software installation tutorial, although X735 Software installation tutorial is still available, but we strongly recommend that you use this script tutorial, which simplifies the installation process and reduces dependencies on third-party python libraries.


The core shell script of X735-script comes from from pimlie/geekworm-x-c1, pimlie implements the pwm fan shell script, which does not depend on third-party python libraries at all. Thanks to pimlie.


Now we think you have successfully flashed the OS Image into Micro SD and and power on the device, and you have also completed the operations such as creating new user required in some OS. You need to perform the following operations in Terminal.


[update]

1. Use gpiod instead of obsolete interface, and suuports ubuntu 23.04 also


2. The script now supports the Raspberry Pi OS BOOKWORM version. You just need to uninstall the original script and reinstall it. Please refer to the following:

Open ternimal window, then run the following command:

mv x735-script x735-script-old
git clone https://github.com/geekworm-com/x735-script
cd x735-script
chmod +x *.sh
./uninstall.sh

Then just follow the installation process below.


3. Fix fan not working on Raspberry Pi 5 hardware

If you are using it on a Raspberry Pi 5, make the following changes:

  • Be sure to update the kernel to version 6.6.22.
sudo apt update
sudo apt full-upgrade
sudo rpi-update
  • Change the PWM_CHIP_PATH to /sys/class/pwm/pwmchip2 on line 7 of x735fan.sh

OS that has been tested

  • Raspbian
  • DietPi
  • Manjaro
  • Ubuntu
  • myNode
  • Umbrel
  • Volumio
  • RetroPie
  • Twister

Install

Preconfigured config.txt

To install pwm fan, first add dtoverlay=pwm-2chan,pin2=13,func2=4 to /boot/firmware/config.txt under [all] or the end of file and reboot:

sudo nano /boot/firmware/config.txt

Save & exit.

sudo reboot

Install gpiod package

sudo apt install -y gpiod

Clone the script

Clone pruduct software script

git clone https://github.com/geekworm-com/x735-script
cd x735-script
chmod +x *.sh

PS: For some OS such as Raspberry Pi OS Lite, the git tool is not installed by default, if you get an error like error: -bash: git: command not found, please run the following command to install the git tool.

sudo apt install -y git

Create the x735-fan service

x735-fan service is for pwm fan, the pwm fan will automatically adjust the runing speed according to the temperature of the cpu after the service is started.

Run the following command to install fan service script;

./install-fan-service.sh

Then the pwm fan starts running.

PS for Pi 5:

  • Change the PWM_CHIP_PATH to /sys/class/pwm/pwmchip2 on line 7 of x735fan.sh if you use it on Raspberry Pi 5 hardware, refer to the following command:
sudo nano x735-fan.sh

Change the PWM_CHIP_PATH to /sys/class/pwm/pwmchip2 on line 7

Then

Press Ctrl-O, then enter, to write the change to the file.

Press Ctrl-X to exit nano (the editor).

  • Copy the modified file to the /usr/local/bin directory
sudo cp -f x735-fan.sh /usr/local/bin
  • Restart x735-fan service
sudo systemctl restart x735-fan.service

Fan starts working

Create the x735-pwr service

./install-pwr-service.sh

Prepair software shutdown script

Run the following command to install software shutdown script (sss)

./install-sss.sh

After the installation is complete, an x735xoff command will be created to shut down the software.Then you can run x735xoff to execute software shutdown.

Uninstall

Run the following command to uninstall all.

./uninstall.sh

Test

Test safe shutdown

Software safe shutdown command:

x735off

DON'T run the 'shutdown' linux command to shut down, otherwise the power of x735 shield will not be shut down.

Hardware safe shutdown operation:

You can verify the safety switch through the onboard switch, press and hold the switch for 3 seconds, then the blue LED will flash slowly and the shutdown is going then all LEDs will be off until the device is completely powered off.

  • press on-board button switch 1-2 seconds to reboot
  • press button switch 3 seconds to safe shutdown,
  • press 7-8 seconds to force shutdown.

Read fan speed

read_fan_speed.py is a sample python file on how to read the speed of the pwm fan. Run the following command to get the speed of the fan:

cd ~x735-script
sudo python3 read_fan_speed.py

This `read_fan_speed.py` python file depends on the third-party python library `Rpi.GPIO`. In the official Raspberry Pi OS and most third-party OS, this library is installed by default. If you run this file and get some errors, try to run the following command to install the Rpi.GPIOy library.

sudo apt-get install -y python3-smbus python3-rpi.gpio

Or you can refer to How to Install RPi.GPIO Python Library

Other

pwm_fan_control.py is no longer used, and are reserved here for research and use by python lovers only.

Support

If you have some questions or suggestions, please contact to support@geekworm.com

FAQ

Q: How to login volumio via SSH?

1. Enable SSH:

Visit http://volumio.local/dev/, then click ENABLE SSH button

2. URL connection is IP address, and the default user name is volumio, default password is volumio

Q: How to login to Umbrel via SSH? A: ssh umbrel@umbrel.local (or ssh umbrel@). the default user name is umbrel, default password is moneyprintergobrrr
Q: How to login to myNode via SSH? A: URL connection is IP address, and the default user name is admin, default password is bolt
Q: How to login to DietPi via SSH? A: URL connection is IP address, and the default user name is root, default password is dietpi
Q: Is LibreELEC supported? A: TODO

Return to X735

Add your comment
Geekworm Wiki welcomes all comments. If you do not want to be anonymous, register or log in. It is free.


Anonymous user #15

one day 15 hours 56 minutes ago
Score 0++
Any way to configure PWM in Home Assistant OS since it does not have apt, wget, etc?

Anonymous user #14

10 days ago
Score 0++

Hi, running the steps to install fan, pwr and sss the fan doesn't start. The os version is new one:OS Version: Raspberry OS 6.6.26-v8+ With the new gpiolib the script read_fan_speed.py starts successful but "0 RPM" is not what i want to see :-) Before i use the new documentation to install i try to install everything with the deprecated tutorial, may be this can be the problem ... It would be great if you could help.

Lars

Harry

10 days ago
Score 0++

First of all you really need to read our wiki tutorial carefully and then carefully step by step, try not to type in the commands, you should copy our commands from the wiki page. If you can read linux shell scripts, reading them directly is the best way to go. One thing to note is that it requires you to re-git the new script after deleting the old x735-script first. If you still can't get the board to work, please provide the results of the following commands via email for us to troubleshoot:

cat ~/.bashrc
sudo systemctl status x735-pwr
sudo systemctl status x735-fan
history

Anonymous user #10

one month ago
Score 0++

Hello Support under RPI OS Linux 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux I get now these Error File "/home/pi/x735-v2.5/./read_fan_speed_once.py", line 29, in <module> GPIO.add_event_detect(TACH, GPIO.FALLING, fell) RuntimeError: Failed to add edge detection

How can I solve this?

Anonymous user #11

one month ago
Score 0++
I have the same Problem! At the beginning was all fine, but now i have to run the fan at full speed without the jumper! I have done all the installation processes again and the shutdown "x735off" still works but the auto-fan-speed doesn't. The x735-fan.sh script is already in use and under htop visible!

Harry

one month ago
Score 0++

Refer to https://gith...lsd-gpiod.py

Please use ```libgpiod``` library and don't use RPi.GPIO anymore.

https://gith.../issues/6037

Anonymous user #12

26 days ago
Score 0++

me too,

need help

Anonymous user #13

26 days ago
Score 0++

I have the same problem

Traceback (most recent call last): File "/home/pi/x735-script/read_fan_speed.py", line 29, in <module> GPIO.add_event_detect(TACH, GPIO.FALLING, fell)

RuntimeError: Failed to add edge detection

Anonymous user #9

2 months ago
Score 0++
Hi, I've followed through the instructions but even after keying in the command "sudo systemctl start x735-fan" the pwm fan is not turning on. Please help

Walker

2 months ago
Score 0++
May I ask which version of X735 you are using?Can you provide your order number easily? You can contact us by email: support@geekworm.com

Anonymous user #8

3 months ago
Score 0++

Hi, have the same issue like user #7: just received everything including the X735 v3.0 I installed umbrel latest version 0.5.4 I used the script (that installed with no errors) the fan starts after reboot for 4 seconds and then stops. CPU Temp. is 54°C. What temp. the fan should run? Need help.

Do you have any suggestion?

Walker

3 months ago
Score 0++
Hi, X735 V3.0 after installing the script, it is controlling the RPM by temperature, this default temperature will be reflected in the script, you can check the script

Anonymous user #7

3 months ago
Score 0++

Hi, just received everything including the X735 v3.0 I installed umbrel latest version 0.5.4 I used the script (that installed with no errors) but the fan are not running at all.

Do you have any suggestion?

Walker

3 months ago
Score 0++
Hi, we have tested Umbrel OS, if the pwm fan script is installed without errors, the fan is working fine, could you please provide us with more information? (e.g. video, your procedure), you can contact our tech support at support@geekworm.com '(by the way provide us your order number)

Anonymous user #6

3 months ago
Score 0++
fan still not working. ran this on a new x735 v3.0

Walker

3 months ago
Score 0++
Hello, please provide your order number, then you can send it to our email: support@geekworm.com , we will solve the problem for you!

Anonymous user #5

7 months ago
Score 0++

I was wondering if it was possible to remove the reboot option in the script. I want to only have safe shutdown and force shutdown. what lines should I change in the script?

thank you

Anonymous user #4

7 months ago
Score 0++

You'll have to excuse the newbie if this is a dumb question, but....

entered everything correctly, and everything on the x735 works, except when powered by 12v input system will not come up from shutdown. Button held 2-3 sec causes blue light to flicker, but that's all. Via USB-C, everything works as it should. Thoughts?

Walker

6 months ago
Score 0++
Hello, you can contact us via our email: support@geekworm.com we will do our best to solve your problem

Anonymous user #3

7 months ago
Score 0++
This is going to sound dumb but I know it states that you cant use the shutdown command but is the reboot command still safe to use.

Walker

7 months ago
Score 0++

Hello, X735 can implement shutdown command. For details, you can refer here:

software shutdown script

Anonymous user #1

9 months ago
Score 0++

After I type x735off I get sudo: /usr/local/bin/x735-softsd.sh: command not found

If I navigate to /usr/local/bin/ and type x735-softsd.sh I get a few permission denied errors.

Anonymous user #2

9 months ago
Score 0++

sudo cp -f ./x735-softsd.sh /usr/local/bin/ Do you sure that you run this line command?

You should run x735off NOT x735-softsd.sh, or you can run sudo x735-softsd.sh

Please read the tutorial carefully.