If someone have problems with not working RGB Fans / GPIO Fans, i found a decision
If you have these logs in fan_control
25/06/21 22:12:38.318 [ERROR] GPIO Fan init error: 'GPIO busy'
25/06/21 22:12:38.319 [WARNING] GPIO Fan init failed, disable gpio_fan control
You can create a service that will reserve the necessary fan pins before launching the pironman5 service, so they will work for you, but you will not be able to control them. But at least the cooling will work.
sudo apt install python3-lgpio
sudo nano /usr/local/bin/hold_gpio6.py
- Then write this script inside file
#!/usr/bin/python3
import lgpio, time
h = lgpio.gpiochip_open(0)
lgpio.gpio_claim_output(h, 6)
lgpio.gpio_write(h, 6, 1)
try:
while True:
time.sleep(3600)
except KeyboardInterrupt:
pass
- Press
ctrl+x, Y, enter
sudo chmod +x /usr/local/bin/hold_gpio6.py
sudo nano /etc/systemd/system/hold-gpio6.service
- Write this in file
[Unit]
Description=Hold GPIO6 high via lgpio
Before=pironman5.service
After=multi-user.target
[Service]
ExecStart=/usr/local/bin/hold_gpio6.py
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now hold-gpio6.service
Then you need reboot your Raspberry Pi 5
I hope this helps you.))
it took me 5 hours to figure out how to do this…