As you can see It installed scripts for the pwr-button (wich works like charm) and some other files.
One of them is a "argonone-config" file and the "argonone.conf" file. The first one ist the one i have to use to make changes to the fan behavior. So to start it i use
./argonone-config. This shows me whats written in the script e.g
argon_create_file $configscript
# Config Script
echo '#!/bin/bash' >> $configscript
echo 'daemonconfigfile='$daemonconfigfile >> $configscript
echo 'echo "--------------------------------------"' >> $configscript
echo 'echo "Argon One Fan Speed Configuration Tool"' >> $configscript
echo 'echo "--------------------------------------"' >> $configscript
echo 'echo "WARNING: This will remove existing configuration."' >> $configscript
echo 'echo -n "Press Y to continue:"' >> $configscript
echo 'read -n 1 confirm' >> $configscript
echo 'echo' >> $configscript
echo 'if [ "$confirm" = "y" ]' >> $configscript
echo 'then' >> $configscript
echo ' confirm="Y"' >> $configscript
echo 'fi' >> $configscript
echo '' >> $configscript
echo 'if [ "$confirm" != "Y" ]' >> $configscript
echo 'then' >> $configscript
echo ' echo "Cancelled"' >> $configscript
echo ' exit' >> $configscript
echo 'fi' >> $configscript
echo 'echo "Thank you."' >> $configscript
echo 'echo -n "Press Y if you want the fan to be always on:"' >> $configscript
echo 'read -n 1 confirm' >> $configscript
echo 'echo' >> $configscript
echo 'if [ "$confirm" = "y" ]' >> $configscript
echo 'then' >> $configscript
echo ' confirm="Y"' >> $configscript
echo 'fi' >> $configscript
echo '' >> $configscript
echo 'echo "#" > $daemonconfigfile' >> $configscript
echo 'echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile' >> $configscript
echo 'echo "#" >> $daemonconfigfile' >> $configscript
echo 'echo "# Min Temp=Fan Speed" >> $daemonconfigfile' >> $configscript
echo 'if [ "$confirm" != "Y" ]' >> $configscript
echo 'then' >> $configscript
echo ' echo 90"="100 >> $daemonconfigfile' >> $configscript
echo ' echo "Fan off."' >> $configscript
echo 'else' >> $configscript
echo ' echo 1"="100 >> $daemonconfigfile' >> $configscript
echo ' echo "Fan always on."' >> $configscript
echo 'fi' >> $configscript
echo 'systemctl restart '$daemonname'.service' >> $configscript
Display More
So as you can see, this script just offers me two options. Either "Fan off" ( so it sets the parameters in the argonone.conf to 90°=100%)
or "Fan always on" (which results in 1°=100% in the argonone.conf).
On other distributions ( for example raspbian). It should offer me 4 options
- 1. Always On
- 2. Adjust to temperature
- 3. Customize behavior
- 4. Cancelto change the fan behavior.
This can easily be checked by looking in the raspbian argon1.sh (setup-script) Here is the code:
argon_create_file $configscript
# Config Script
echo '#!/bin/bash' >> $configscript
echo 'daemonconfigfile=/etc/'$daemonname'.conf' >> $configscript
echo 'echo "--------------------------------------"' >> $configscript
echo 'echo "Argon One Fan Speed Configuration Tool"' >> $configscript
echo 'echo "--------------------------------------"' >> $configscript
echo 'echo "WARNING: This will remove existing configuration."' >> $configscript
echo 'echo -n "Press Y to continue:"' >> $configscript
echo 'read -n 1 confirm' >> $configscript
echo 'echo' >> $configscript
echo 'if [ "$confirm" = "y" ]' >> $configscript
echo 'then' >> $configscript
echo ' confirm="Y"' >> $configscript
echo 'fi' >> $configscript
echo '' >> $configscript
echo 'if [ "$confirm" != "Y" ]' >> $configscript
echo 'then' >> $configscript
echo ' echo "Cancelled"' >> $configscript
echo ' exit' >> $configscript
echo 'fi' >> $configscript
echo 'echo "Thank you."' >> $configscript
echo 'get_number () {' >> $configscript
echo ' read curnumber' >> $configscript
echo ' re="^[0-9]+$"' >> $configscript
echo ' if [ -z "$curnumber" ]' >> $configscript
echo ' then' >> $configscript
echo ' echo "-2"' >> $configscript
echo ' return' >> $configscript
echo ' elif [[ $curnumber =~ ^[+-]?[0-9]+$ ]]' >> $configscript
echo ' then' >> $configscript
echo ' if [ $curnumber -lt 0 ]' >> $configscript
echo ' then' >> $configscript
echo ' echo "-1"' >> $configscript
echo ' return' >> $configscript
echo ' elif [ $curnumber -gt 100 ]' >> $configscript
echo ' then' >> $configscript
echo ' echo "-1"' >> $configscript
echo ' return' >> $configscript
echo ' fi ' >> $configscript
echo ' echo $curnumber' >> $configscript
echo ' return' >> $configscript
echo ' fi' >> $configscript
echo ' echo "-1"' >> $configscript
echo ' return' >> $configscript
echo '}' >> $configscript
echo '' >> $configscript
echo 'loopflag=1' >> $configscript
echo 'while [ $loopflag -eq 1 ]' >> $configscript
echo 'do' >> $configscript
echo ' echo' >> $configscript
echo ' echo "Select fan mode:"' >> $configscript
echo ' echo " 1. Always on"' >> $configscript
echo ' echo " 2. Adjust to temperatures (55C, 60C, and 65C)"' >> $configscript
echo ' echo " 3. Customize behavior"' >> $configscript
echo ' echo " 4. Cancel"' >> $configscript
echo ' echo "NOTE: You can also edit $daemonconfigfile directly"' >> $configscript
echo ' echo -n "Enter Number (1-4):"' >> $configscript
echo ' newmode=$( get_number )' >> $configscript
echo ' if [[ $newmode -ge 1 && $newmode -le 4 ]]' >> $configscript
echo ' then' >> $configscript
echo ' loopflag=0' >> $configscript
echo ' fi' >> $configscript
echo 'done' >> $configscript
echo 'echo' >> $configscript
echo 'if [ $newmode -eq 4 ]' >> $configscript
echo 'then' >> $configscript
echo ' echo "Cancelled"' >> $configscript
echo ' exit' >> $configscript
echo 'elif [ $newmode -eq 1 ]' >> $configscript
echo 'then' >> $configscript
echo ' echo "#" > $daemonconfigfile' >> $configscript
echo ' echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile' >> $configscript
echo ' echo "#" >> $daemonconfigfile' >> $configscript
echo ' echo "# Min Temp=Fan Speed" >> $daemonconfigfile' >> $configscript
echo ' echo 1"="100 >> $daemonconfigfile' >> $configscript
echo ' sudo systemctl restart '$daemonname'.service' >> $configscript
echo ' echo "Fan always on."' >> $configscript
echo ' exit' >> $configscript
echo 'elif [ $newmode -eq 2 ]' >> $configscript
echo 'then' >> $configscript
echo ' echo "Please provide fan speeds for the following temperatures:"' >> $configscript
echo ' echo "#" > $daemonconfigfile' >> $configscript
echo ' echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile' >> $configscript
echo ' echo "#" >> $daemonconfigfile' >> $configscript
echo ' echo "# Min Temp=Fan Speed" >> $daemonconfigfile' >> $configscript
echo ' curtemp=55' >> $configscript
echo ' while [ $curtemp -lt 70 ]' >> $configscript
echo ' do' >> $configscript
echo ' errorfanflag=1' >> $configscript
echo ' while [ $errorfanflag -eq 1 ]' >> $configscript
echo ' do' >> $configscript
echo ' echo -n ""$curtemp"C (0-100 only):"' >> $configscript
echo ' curfan=$( get_number )' >> $configscript
echo ' if [ $curfan -ge 0 ]' >> $configscript
echo ' then' >> $configscript
echo ' errorfanflag=0' >> $configscript
echo ' fi' >> $configscript
echo ' done' >> $configscript
echo ' echo $curtemp"="$curfan >> $daemonconfigfile' >> $configscript
echo ' curtemp=$((curtemp+5))' >> $configscript
echo ' done' >> $configscript
echo ' sudo systemctl restart '$daemonname'.service' >> $configscript
echo ' echo "Configuration updated."' >> $configscript
echo ' exit' >> $configscript
echo 'fi' >> $configscript
echo 'echo "Please provide fan speeds and temperature pairs"' >> $configscript
echo 'echo' >> $configscript
echo 'loopflag=1' >> $configscript
echo 'paircounter=0' >> $configscript
echo 'while [ $loopflag -eq 1 ]' >> $configscript
echo 'do' >> $configscript
echo ' errortempflag=1' >> $configscript
echo ' errorfanflag=1' >> $configscript
echo ' while [ $errortempflag -eq 1 ]' >> $configscript
echo ' do' >> $configscript
echo ' echo -n "Provide minimum temperature (in Celsius) then [ENTER]:"' >> $configscript
echo ' curtemp=$( get_number )' >> $configscript
echo ' if [ $curtemp -ge 0 ]' >> $configscript
echo ' then' >> $configscript
echo ' errortempflag=0' >> $configscript
echo ' elif [ $curtemp -eq -2 ]' >> $configscript
echo ' then' >> $configscript
echo ' errortempflag=0' >> $configscript
echo ' errorfanflag=0' >> $configscript
echo ' loopflag=0' >> $configscript
echo ' fi' >> $configscript
echo ' done' >> $configscript
echo ' while [ $errorfanflag -eq 1 ]' >> $configscript
echo ' do' >> $configscript
echo ' echo -n "Provide fan speed for "$curtemp"C (0-100) then [ENTER]:"' >> $configscript
echo ' curfan=$( get_number )' >> $configscript
echo ' if [ $curfan -ge 0 ]' >> $configscript
echo ' then' >> $configscript
echo ' errorfanflag=0' >> $configscript
echo ' elif [ $curfan -eq -2 ]' >> $configscript
echo ' then' >> $configscript
echo ' errortempflag=0' >> $configscript
echo ' errorfanflag=0' >> $configscript
echo ' loopflag=0' >> $configscript
echo ' fi' >> $configscript
echo ' done' >> $configscript
echo ' if [ $loopflag -eq 1 ]' >> $configscript
echo ' then' >> $configscript
echo ' if [ $paircounter -eq 0 ]' >> $configscript
echo ' then' >> $configscript
echo ' echo "#" > $daemonconfigfile' >> $configscript
echo ' echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile' >> $configscript
echo ' echo "#" >> $daemonconfigfile' >> $configscript
echo ' echo "# Min Temp=Fan Speed" >> $daemonconfigfile' >> $configscript
echo ' fi' >> $configscript
echo ' echo $curtemp"="$curfan >> $daemonconfigfile' >> $configscript
echo ' ' >> $configscript
echo ' paircounter=$((paircounter+1))' >> $configscript
echo ' ' >> $configscript
echo ' echo "* Fan speed will be set to "$curfan" once temperature reaches "$curtemp" C"' >> $configscript
echo ' echo' >> $configscript
echo ' fi' >> $configscript
echo 'done' >> $configscript
echo '' >> $configscript
echo 'echo' >> $configscript
echo 'if [ $paircounter -gt 0 ]' >> $configscript
echo 'then' >> $configscript
echo ' echo "Thank you! We saved "$paircounter" pairs."' >> $configscript
echo ' sudo systemctl restart '$daemonname'.service' >> $configscript
echo ' echo "Changes should take effect now."' >> $configscript
echo 'else' >> $configscript
echo ' echo "Cancelled, no data saved."' >> $configscript
echo 'fi' >> $configscript
Display More
So imo there is not such a thing like a option "menu" with 4 options for the LibreElec scripts. Like they forgot to write down the code for the LibreElec Version.
Here are the original installscripts for you to check yourself:
[....]
By the way: I have installed another 5V Fan to my Case an it is way more silent thant the original one! So thats a must do for people who like it silent.
Display More
I have had the same problem.
Shutdown Script is working fine. Fan control was just 0 or 100.
Your posting set me on the right track to fix the problem.
The raspian script has more options.
The reason is that there is one line with a regular expression check in there.
libreelec does use another shell and this line does not work there.
the rest is working fine.
i guess someone ported it, it did not work and they just discarded all the other options instead of fixing them.
so i took the liberty to copy the raspian code to my libreelec and edit that line to make it work.
(system calls, filenames and storeagepath are also different)
i also added a fourth option to set the speed to a fixed value other than 100%
this is the content of my new libreelec "argonone-config" file.
#!/bin/bash
daemonconfigfile=/storage/argononed.conf
echo "--------------------------------------"
echo "Argon One Fan Speed Configuration Tool"
echo "--------------------------------------"
echo "WARNING: This will remove existing configuration."
echo -n "Press Y to continue:"
read -n 1 confirm
echo
if [ "$confirm" = "y" ]
then
confirm="Y"
fi
if [ "$confirm" != "Y" ]
then
echo "Cancelled"
exit
fi
echo "Thank you."
get_number () {
read curnumber
re="^[0-9]+$"
if [ -z "$curnumber" ]
then
echo "-2"
return
else
if [ $curnumber -lt 0 ]
then
echo "-1"
return
elif [ $curnumber -gt 100 ]
then
echo "-1"
return
fi
echo $curnumber
return
fi
echo "-1"
return
}
loopflag=1
while [ $loopflag -eq 1 ]
do
echo
echo "Select fan mode:"
echo " 1. Always on"
echo " 2. Adjust to temperatures (55C, 60C, and 65C)"
echo " 3. Customize behavior"
echo " 4. Fixed Speed"
echo " 5. Cancel"
echo "NOTE: You can also edit argononed.conf directly"
echo -n "Enter Number (1-5):"
newmode=$( get_number )
if [[ $newmode -ge 1 && $newmode -le 5 ]]
then
loopflag=0
fi
done
echo
if [ $newmode -eq 5 ]
then
echo "Cancelled"
exit
elif [ $newmode -eq 1 ]
then
echo "#" > $daemonconfigfile
echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile
echo "#" >> $daemonconfigfile
echo "# Min Temp=Fan Speed" >> $daemonconfigfile
echo 1"="100 >> $daemonconfigfile
systemctl restart argononed.service
echo "Fan always on."
exit
elif [ $newmode -eq 4 ]
then
echo "Please provide fan speed:"
echo "#" > $daemonconfigfile
echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile
echo "#" >> $daemonconfigfile
echo "# Min Temp=Fan Speed" >> $daemonconfigfile
echo -n "Speed (0-100 only):"
curfan=$( get_number )
echo 1"="$curfan >> $daemonconfigfile
systemctl restart argononed.service
echo "Fan set to "$curfan
exit
elif [ $newmode -eq 2 ]
then
echo "Please provide fan speeds for the following temperatures:"
echo "#" > $daemonconfigfile
echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile
echo "#" >> $daemonconfigfile
echo "# Min Temp=Fan Speed" >> $daemonconfigfile
curtemp=55
while [ $curtemp -lt 70 ]
do
errorfanflag=1
while [ $errorfanflag -eq 1 ]
do
echo -n ""$curtemp"C (0-100 only):"
curfan=$( get_number )
if [ $curfan -ge 0 ]
then
errorfanflag=0
fi
done
echo $curtemp"="$curfan >> $daemonconfigfile
curtemp=$((curtemp+5))
done
systemctl restart argononed.service
echo "Configuration updated."
exit
fi
echo "Please provide fan speeds and temperature pairs"
echo
loopflag=1
paircounter=0
while [ $loopflag -eq 1 ]
do
errortempflag=1
errorfanflag=1
while [ $errortempflag -eq 1 ]
do
echo -n "Provide minimum temperature (in Celsius) then [ENTER]:"
curtemp=$( get_number )
if [ $curtemp -ge 0 ]
then
errortempflag=0
elif [ $curtemp -eq -2 ]
then
errortempflag=0
errorfanflag=0
loopflag=0
fi
done
while [ $errorfanflag -eq 1 ]
do
echo -n "Provide fan speed for "$curtemp"C (0-100) then [ENTER]:"
curfan=$( get_number )
if [ $curfan -ge 0 ]
then
errorfanflag=0
elif [ $curfan -eq -2 ]
then
errortempflag=0
errorfanflag=0
loopflag=0
fi
done
if [ $loopflag -eq 1 ]
then
if [ $paircounter -eq 0 ]
then
echo "#" > $daemonconfigfile
echo "# Argon One Fan Speed Configuration" >> $daemonconfigfile
echo "#" >> $daemonconfigfile
echo "# Min Temp=Fan Speed" >> $daemonconfigfile
fi
echo $curtemp"="$curfan >> $daemonconfigfile
paircounter=$((paircounter+1))
echo "* Fan speed will be set to "$curfan" once temperature reaches "$curtemp" C"
echo
fi
done
echo
if [ $paircounter -gt 0 ]
then
echo "Thank you! We saved "$paircounter" pairs."
systemctl restart argononed.service
echo "Changes should take effect now."
else
echo "Cancelled, no data saved."
fi
Display More
and yes, that default Fan is the worst. even at 10% it is annoying.
going to replace it.