Argon One V3 script for LineageOS

Hello

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

One more tidbit I figured I would share as this took some time to understand to get working.

If you want to also control LineageOS with the IR receiver included in the V3 case, do the following:

  • Create a unix file (Not with windows line endings) called rc_keymap.txt with the following data:
# table argon, type: NEC
0x9c KEY_POWER
0xca KEY_UP
0xd2 KEY_DOWN
0x99 KEY_LEFT
0xc1 KEY_RIGHT
0x80 KEY_VOLUMEUP
0x81 KEY_VOLUMEDOWN
0xce KEY_KPENTER
0xcb KEY_HOME
0x9d KEY_MENU
0x90 KEY_BACK
  • Boot into recovery mode
  • 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)
  • Reboot

What would the home button be for V2? Every other button works except for KEY_HOME.

Try KEY_F1 insread of KEY_HOME.

1 Like

Works great! Thank you so much!