Scripts and systemd services for fan control, CPU activity LED, and power button handling on the Radxa Cubie A7A.
Temperature-based fan speed control monitoring CPU, GPU, NPU, and DDR thermal zones.
- Copy files to the system:
sudo cp fan-control.sh /usr/local/bin/fan-control.sh
sudo chmod 755 /usr/local/bin/fan-control.sh
sudo cp fan-control.service /etc/systemd/system/fan-control.service- Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable fan-control.service
sudo systemctl start fan-control.service- Verify:
systemctl status fan-control.service
cat /sys/class/thermal/cooling_device2/cur_stateBlinks the blue user LED based on real CPU utilization (faster blinks = higher load).
- Set LED to manual control:
sudo sh -c 'echo none > /sys/class/leds/radxa:blue:user/trigger'- Copy files to the system:
sudo cp cpu-led.sh /usr/local/bin/cpu-led.sh
sudo chmod 755 /usr/local/bin/cpu-led.sh
sudo cp cpu-led.service /etc/systemd/system/cpu-led.service- Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable cpu-led.service
sudo systemctl start cpu-led.service- Verify:
systemctl status cpu-led.serviceBy default, systemd-logind handles the power button and will shut down the system. These instructions configure acpid to handle the power button instead, triggering a graceful reboot.
- Install acpid:
sudo apt install -y acpid- Tell systemd-logind to ignore the power button:
sudo sed -i 's/#HandlePowerKey=.*/HandlePowerKey=ignore/' /etc/systemd/logind.conf
grep -q "^HandlePowerKey" /etc/systemd/logind.conf || echo "HandlePowerKey=ignore" | sudo tee -a /etc/systemd/logind.conf
sudo systemctl restart systemd-logind- Copy files to the system:
sudo cp power-button.sh /etc/acpi/power-button.sh
sudo chmod 755 /etc/acpi/power-button.sh
sudo cp power-button-event /etc/acpi/events/power-button- Enable and restart acpid:
sudo systemctl enable acpid
sudo systemctl restart acpid- Test by pressing the power button - system should reboot (not shutdown).
Note: To shutdown instead of reboot, use SSH:
sudo shutdown -h now