[root@pikvm ~]# rw
nano /etc/modules-load.d/raspberrypi.conf
File contents:
#snd-bcm2835
i2c_dev
ctrl
+ x
, y
, enter
nano /etc/systemd/system/pikvm-poe-plus-fix.service
File contents:
[Unit]
Description=Fix RPi4 (4gb) official RPi POE+ hat fan failure
[Service]
ExecStart=/usr/local/bin/pikvm-bridge-fan-fix.sh
[Install]
WantedBy=multi-user.target
ctrl
+ x
, y
, enter
chmod 644 /etc/systemd/system/pikvm-poe-plus-fix.service
nano /usr/local/bin/pikvm-bridge-fan-fix.sh
File contents:
#!/bin/sh
sleep 30
i2cdetect -y 0
ctrl
+ x
, y
, enter
chmod 755 /usr/local/bin/pikvm-bridge-fan-fix.sh
systemctl daemon-reload
systemctl start pikvm-poe-plus-fix.service
systemctl status pikvm-poe-plus-fix.service
[root@pikvm ~]# systemctl status pikvm-poe-plus-fix.service
* pikvm-poe-plus-fix.service - Fix RPi4 (4gb) official RPi POE+ hat fan failure
Loaded: loaded (/etc/systemd/system/pikvm-poe-plus-fix.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Wed 2021-12-01 03:41:44 MSK; 3 days ago
Process: 349 ExecStart=/usr/local/bin/pikvm-bridge-fan-fix.sh (code=exited, status=0/SUCCESS)
Main PID: 349 (code=exited, status=0/SUCCESS)
CPU: 47ms
Dec 01 03:41:44 pikvm.lab pikvm-bridge-fan-fix.sh[454]: 00: -- -- -- -- -- -- -- --
Dec 01 03:41:44 pikvm.lab pikvm-bridge-fan-fix.sh[454]: 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Dec 01 03:41:44 pikvm.lab pikvm-bridge-fan-fix.sh[454]: 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Dec 01 03:41:44 pikvm.lab pikvm-bridge-fan-fix.sh[454]: 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Dec 01 03:41:44 pikvm.lab pikvm-bridge-fan-fix.sh[454]: 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Dec 01 03:41:44 pikvm.lab pikvm-bridge-fan-fix.sh[454]: 50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
Dec 01 03:41:44 pikvm.lab pikvm-bridge-fan-fix.sh[454]: 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Dec 01 03:41:44 pikvm.lab pikvm-bridge-fan-fix.sh[454]: 70: -- -- -- -- -- -- -- --
Dec 01 03:41:44 pikvm.lab sudo[450]: pam_unix(sudo:session): session closed for user root
Dec 01 03:41:44 pikvm.lab systemd[1]: pikvm-poe-plus-fix.service: Deactivated successfully.
ctrl
+ c
systemctl enable pikvm-poe-plus-fix.service
ro
reboot