Jump to content

JackR

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Sorry I didn't visit for a long time ... I used the heat sink of the chipset of an old PC that I cut to the right size and I made the holes for the screws. It's mounted with thermal past.
  2. @hinkley : surprising as my nanopi M4V2 is running under buster server, last version (I last update 2 days ago). As explained at the beginning of the script I posted on Oct. 7th, some subfolders are created by the script if they don't exist. May be check again, also the link I gave to Carlos Gomes git (see my post from Sept 29th).
  3. I was to quick to report, although after 13 days The nanopi has crash twice this week end with the setup shown in my previous post. So definitively a problem when frequency changes. I'll switch back to a fix frequency setup until some progress is made or a workaround found
  4. I have tested another configuration, min frequency = 408 MHz on all kernels, max = 1512 on LITTLE and max = 2016 on big, but with governor set as conservative. It's running since 13 days, no crash # cat /sys/devices/system/cpu/cpufreq/policy{0,4}/scaling_governor conservative conservative # cat /sys/devices/system/cpu/cpufreq/policy{0,4}/cpuinfo_{min,max}_freq 408000 1512000 408000 2016000 # cat /sys/devices/system/cpu/cpufreq/policy{0,4}/conservative/sampling_rate 10000 10000 # uname -a Linux nanoNas 5.8.16-rockchip64 #20.08.14 SMP PREEMPT Tue Oct 20 22:37:51 CEST 2020 aarch64 GNU/Linux
  5. Those interested to have the fan speed (pwm duty) regulated by cpu and disks temperatures may adapt the script from this post: https://forum.armbian.com/topic/11086-pwm-fan-on-nanopi-m4/?do=findComment&comment=110117
  6. Welcome to Armbian 20.08.14 Buster with Linux 5.8.16-rockchip64 System load: 2% Up time: 4 days 11:57 Memory usage: 8% of 3.71G IP: 192.168.0.59 CPU temp: 49°C Usage of /: 52% of 3.5G # cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq 1512000 # cat /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq 2016000 # cat /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq 1512000 # cat /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq 2016000 With this config, it is now 4,5 days that my nanopi M4V2 is running full speed (LITTLE at 1512, big at 2016 MHz) without a single crash. So it seems to confirm that the instability is not linked to the frequency but happens when the frequency changes. As hev mentionned, it doesn't happens on the nanopi M4V1: and the only difference between V1 and V2 is the memory type, DDR3 for V1 and DDR4 for V2. As the observed crashes are memory errors on any of the cores and whatever the max frequency is set, it really looks like desynchronisation between the cores and memory when the frequency is changed by the governor. I am not expert enough to go deeper in this analysis but I hope someone more skilled can start from here and write a patch.
  7. I don't think it is linked with the max frequency as I already had the probleme although the max frequency was set at 1.6 GHz. As Pedro Lamas noticed, setting min and max frequency at 1.2 GHz my nanopi run 3 days without bug. From what I have observed, it might be a probleme of memory when the frequence change, may be some kind of desynchronisation ? It happens with any of the core, big or LITTLE. I upgrade to the last version (5.8.16-rockchip64 #20.08.14 SMP PREEMPT Tue Oct 20 22:37:51), but the bug is still there In order to see if it depends on frequency or if it is linked with the change of frequency I have set min and max at 2 GHz and will let it run like that for some time ...
  8. See this post <https://forum.armbian.com/topic/11086-pwm-fan-on-nanopi-m4/?do=findComment&comment=110117> for a working solution under Armbian 20.08.9 Buster with Linux 5.8.13-rockchip64 (12 V fan with variable speed (pwm) on sataHat and nanoPi M4V2). As the pwm signal is transmitted via pin23 of the GPIO2 connector, I guess it will also work with the NVME hat. But I don't have this hat, so it will be useful if someone can test and report here I also found the temperature of the sataHat chip was too high. After exchanging the original heat sink by a much bigger one, temperature seems acceptable (finger measurement ) I also looked for the sataHat chip temperature measurement, but could not find it. If someone can provide the information if it does exist and how to get it, I will be happy to include it in the script to drive the fan pwm.
  9. I've got the very same message during the night, although I set the maximum frequence at 1600: # cat /etc/default/cpufrequtils ENABLE=true MIN_SPEED=408000 MAX_SPEED=1608000 GOVERNOR=ondemand The output of dmesg is also very similar to the one of yesterday evening I am ready to make some testing if it can help to solve the issue. Just let me know what.
  10. Good evening My nanoPi M4V2 also suffers from frequent errors, both with 1800 and 2000 max frequency. Minimum is 408 and governor is set onDemand. This is the message I got on terminal (ssh connection) some minutes ago: Message from syslogd@nanoNas at Oct 9 19:35:18 ... kernel:[ 4724.003648] Internal error: Oops: 96000004 [#1] PREEMPT SMP Message from syslogd@nanoNas at Oct 9 19:35:18 ... kernel:[ 4724.024320] Code: 9b355f82 91002060 8b02031b d503201f (f9401321) Luckily enough, it did not brake the ssh connection and I could recover some trace (end of dmesg) And this is the version of Armbian I use: Welcome to Armbian 20.08.9 Buster with Linux 5.8.13-rockchip64 I just copy the error part of dmesg but if necessary, I can provide the full output. Hope it helps
  11. @i5Js Sorry, I forgot to mention that I use a nanoPi M4V2, with the massive heat sink, 4 ports sataHat and emmc 32 GB from FriendlyArm. As mentionned in my 1st post I exchanged the standart sataHat small heat sink by a much bigger one, and the whole homemade case is cooled by a 12 cm, 12 V 2.2 W fan plugged on the sataHat fan socket and driven by the pwm script.
  12. I improve the script, so now cpu and gpu as well as the 4 disks temperatures are taken into account to drive the fan speed. Also if the fan is idle, it will always first start full speed and then adjust, to ensure it really turns. Otherwise with low duty, it may stay blocked due to mechanical friction. Because of the use of smartctl to read disk temperature, it must works with elevated privileges, else only cpu and gpu temperatures are considered. The "-n standby" option avoid to spin up a disk if it is stopped. In which case, anyway, it does not need to be cooled Of course smartctl must be installed. But who is crazy enough to run a nas without it #!/bin/bash ########################################################################### # A simple bash script to run and control the NanoPi M4 SATA hat PWM1 fan # ########################################################################### # Modified from mar0ni's script: # https://forum.armbian.com/topic/11086-pwm-fan-on-nanopi-m4/?tab=comments#comment-95180 # Export pwmchip1 that controls the SATA hat fan if it hasn't been done yet # This will create a 'pwm0' subfolder that allows us to control various properties of the fan if [ ! -d /sys/class/pwm/pwmchip1/pwm0 ]; then echo 0 > /sys/class/pwm/pwmchip1/export fi sleep 1 while [ ! -d /sys/class/pwm/pwmchip1/pwm0 ]; do sleep 1 done # Set default period (40000ns = 25kHz) echo 40000 > /sys/class/pwm/pwmchip1/pwm0/period # The default polarity is inversed. Set it to 'normal' instead. echo normal > /sys/class/pwm/pwmchip1/pwm0/polarity # CPU, GPU and disks temperatures to monitor declare -a CpuTemps=(75000 68000 60000 50000 40000) declare -a DiskTemps=(55 50 45 40 35) # Duty cycle for each temperature range declare -a DutyCycles=(40000 9000 3500 2200 2050) # Change the following if you want the script to change the fan speed more/less frequently timeStep=5 # Run fan at full speed for some seconds when the script starts, then keep running at calculated speed echo ${DutyCycles[0]} > /sys/class/pwm/pwmchip1/pwm0/duty_cycle echo 1 > /sys/class/pwm/pwmchip1/pwm0/enable sleep $timeStep # Main loop to monitor cpu (zone0) and gpu (zone1) temperatures, as well as NAS hard disks temperatures # and assign duty cycles accordingly. Disks device name must be adapted to your own case (/dev/sdX). # The -n option of smartctl avoid to spin up a disk if it has stopped while true do temp0=$(cat /sys/class/thermal/thermal_zone0/temp) temp1=$(cat /sys/class/thermal/thermal_zone1/temp) test $temp0 -gt $temp1 && tempU=$temp0 || tempU=$temp1 tempD=0 temp2=`/usr/sbin/smartctl -l scttempsts -d sat -n standby /dev/sda | grep -m 1 Temperature | awk '{print $3}'` if [ -n "$temp2" ]; then tempD=$temp2 fi temp3=`/usr/sbin/smartctl -l scttempsts -d sat -n standby /dev/sdb | grep -m 1 Temperature | awk '{print $3}'` if [ -n "$temp3" ]; then test $temp3 -gt $tempD && tempD=$temp3 fi temp4=`/usr/sbin/smartctl -l scttempsts -d sat -n standby /dev/sdc | grep -m 1 Temperature | awk '{print $3}'` if [ -n "$temp4" ]; then test $temp4 -gt $tempD && tempD=$temp4 fi temp5=`/usr/sbin/smartctl -l scttempsts -d sat -n standby /dev/sdd | grep -m 1 Temperature | awk '{print $3}'` if [ -n "$temp5" ]; then test $temp5 -gt $tempD && tempD=$temp5 fi duty0=$(cat /sys/class/pwm/pwmchip1/pwm0/duty_cycle) DUTY=0 # If you changed the length of $CpuTemps and $DutyCycles, then change the following length, too for i in 0 1 2 3 4; do # add some hysteresis when the fan speeds down to avoid continuous stop and go test $duty0 -ge ${DutyCycles[$i]} && j=2 || j=0 if [ $tempU -gt $((${CpuTemps[$i]}-$j*1000)) ] || [ $tempD -gt $((${DiskTemps[$i]}-$j)) ]; then # if the fan is stopped, first full speed to ensure it really starts test $duty0 -eq 0 && DUTY=${DutyCycles[0]} || DUTY=${DutyCycles[$i]} # To test the script, uncomment the following line: # echo "i: $i, j: $j, cpu: $temp0, gpu: $temp1, target: ${CpuTemps[$i]}; d1: $temp2, d2: $temp3, d3: $temp4, d4: $temp5, target: ${DiskTemps[$i]}, duty: $DUTY" break fi done echo $DUTY > "/sys/class/pwm/pwmchip1/pwm0/duty_cycle"; sleep $timeStep; done exit 0 I also write a small script to display temperatures and duty at a will. It too must be run with sudo in order to be able to see disk temperature. #! /bin/bash # NAS temperatures monitoring temp0=$(cat /sys/class/thermal/thermal_zone0/temp) temp1=$(cat /sys/class/thermal/thermal_zone1/temp) temp2=`/usr/sbin/smartctl -l scttempsts -d sat -n standby /dev/sda | grep -m 1 Temperature | awk '{print $3}'` temp3=`/usr/sbin/smartctl -l scttempsts -d sat -n standby /dev/sdb | grep -m 1 Temperature | awk '{print $3}'` temp4=`/usr/sbin/smartctl -l scttempsts -d sat -n standby /dev/sdc | grep -m 1 Temperature | awk '{print $3}'` temp5=`/usr/sbin/smartctl -l scttempsts -d sat -n standby /dev/sdd | grep -m 1 Temperature | awk '{print $3}'` duty0=$(cat /sys/class/pwm/pwmchip1/pwm0/duty_cycle) echo "cpu: $temp0, gpu: $temp1; d1: $temp2, d2: $temp3, d3: $temp4, d4: $temp5, duty: $duty0 " Enjoy
  13. My post was edited while I was modifying it (thanks Werner for the readability), but then I couldn't save :-( So some adds-on here. I change the set points to adapt to my fan: ... # declare -a CpuTemps=(75000 65000 55000 40000 25000 0) declare -a CpuTemps=(75000 68000 60000 50000 40000 0) # Duty cycle for each CPU temp range # declare -a DutyCycles=(40000 6000 3000 2000 1500 0) declare -a DutyCycles=(40000 30000 20000 12000 8000 0) ... After modifying the script, don't forget to restart the service: # systemctl restart pwm-fan.service When starting, the fan will run for 10 s, which shows the service is working. Then it will stop and restart only if the temperature is above the lower temperature threshold and the corresponding duty cycle high enough to allow the fan to start. This may need some trials to find the correct values, as each fan reacts differently. I exchanged the radiator provided with the sataHat by a bigger one, as the original was getting very hot (cannot keep a finger on it), even when the system was idle. Now temperatures of both the radiators of nanoPi and sataHat are similar (finger feeling again ;-) It would be nice also to include temperature of the sataHat in the script, but I cannot find it. Is it measured and if yes, where is it available ?
  14. Hello Just using Carlos Gomes git (https://cgomesu.com/blog/Nanopi-m4-mini-nas/) I have the fan working with pwm on the latest version of armbian, with kernel 5.8: $ uname -a $ Linux nanoNas 5.8.11-rockchip64 #20.08.4 SMP PREEMPT Wed Sep 23 17:51:13 CEST 2020 aarch64 GNU/Linux I slightly modify the script to add some hysteresis when the fan slow down, in order to avoid continuous stop and go when the nas is idle. ... while true do temp0=$(cat /sys/class/thermal/thermal_zone1/temp) duty0=$(cat /sys/class/pwm/pwmchip1/pwm0/duty_cycle) # If you changed the length of $CpuTemps and $DutyCycles, then change the following length, too for i in 0 1 2 3 4 5; do # add some hysteresis when the fan speeds down to avoid continuous stop and go if [ $duty0 -eq ${DutyCycles[$i]} ]; then j=2 else j=0 fi if [ $temp0 -gt ${CpuTemps[$i]}-$j ]; then DUTY=${DutyCycles[$i]} ... I use a simple 12cm, 2 pins fan to cool down the 4 disks, 3.5", 4TB each. Supply is provided by a 12 V, 6 A module. The sata hat is missing a function (available on my previous Netgear ReadyNas) to start the disks in sequence, so I added a timer to let the nanopi start, then 2 disks, then the 2 last ones. Otherwise, when switching on, the nanoPi detects a brownout on the 5 V line and stop everything.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines