I’m trying to install fan script for konstakang’s lineage based Android TV image.
Could anybody help? trying to “adb shell sh argon1.sh” But not working do I need libreelec one or does neither work. image is on nvme ssd and works but fan never starts and chip throttles.
You are going to have to use a script to monitor the fan.
First install Magisk so that you can add scripts to startup. Then boot into normal mode, goto settings - system - developer options and enable adb. Once enabled connect through adb with root access and put the script below in /data/adb/service.d/argon_fan.sh
argon_fan.sh
#!/system/bin/sh
sleeptime=120
while true
do
cputemp=$(cat /sys/class/thermal/thermal_zone0/temp)
if [[ $cputemp -lt 55000 ]]; then
fanspeed="0x00"
elif [ $cputemp -ge 55000 -a $cputemp -lt 60000 ]; then
fanspeed="0x10"
elif [ $cputemp -ge 60000 -a $cputemp -lt 65000 ]; then
fanspeed="0x32"
elif [ $cputemp -ge 65000 ]; then
fanspeed="0x64"
fi
i2cset -y 1 0x01a 0x80 $fanspeed i
sleep $sleeptime
done
Copy over the rc_keymap.txt file to /boot/rc_keymap.txt
Reboot into normal mode
Goto settings - system - developer options and enable adb
Connect through adb with root access
Edit the config.txt (nano /boot/config.txt) and change dtoverlay=gpio-ir,gpio_pin= from 18 to 23.
Save and exit
Run ‘ir-keytable -r /boot/rc_keymap.txt’ (If you get an error on formatting line one, it is likely not a unix file. If using Windows it can be created with notepad++ with line endings switched to unix)