XU3 fan very loud

Post Reply
Alex-2.5
Posts: 7
Joined: Fri Jan 30, 2015 4:29 am
languages_spoken: english
ODROIDs: U3, XU3
Contact:

XU3 fan very loud

Unread post by Alex-2.5 » Sun Feb 08, 2015 5:09 am

Hello,

i bought the new XU3-Light and love it.
But i have one problem. The fan is too loud. Even with almost 0% CPU the fan goes on and off.

Is there any way to regulate the fan speed?
It is ok for me if the fan is cooling all the time with slow speed, that should be finde too.

I can´t use the XU3-Light in my living-room because of that fan. It is not a mechanical problem, it is the sound ot the airflow.

I hope everybody unstand what my problem is.

Thank you very much

Regards
Alex

User avatar
odroid
Site Admin
Posts: 30028
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: XU3 fan very loud

Unread post by odroid » Sun Feb 08, 2015 2:03 pm

Refer this link to adjust the fan speed.
http://forum.odroid.com/viewtopic.php?f=7&t=1527

Alex-2.5
Posts: 7
Joined: Fri Jan 30, 2015 4:29 am
languages_spoken: english
ODROIDs: U3, XU3
Contact:

Re: XU3 fan very loud

Unread post by Alex-2.5 » Sun Feb 08, 2015 7:23 pm

Thank you very much.

This is not working for Ubuntu Server, sorry i forgot to write.
I can´t find this path from the temperature script:
TMU_PATH="/sys/devices/platform/tmu/temperature"
FAN_PATH="/sys/devices/platform/odroid-fan/pwm_duty"

But anyway, i found the correct files and path with help of that thread :)

Fan Speed is written here, and at the moment only 2 or 130 will be written by default Ubtunut Server 14.04:
/sys/devices/odroid_fan.14/pwm_duty

Here is the actual temperature.
cat /sys/devices/10060000.tmu/temp

So when i check the pwm_duty file, something is writing 130 to speed up the fan. What is doing this? It should be possible to change this script instead of using a new one or?

Other thing is, i think i need to check the highest value of the CPU Temp values. Because there are sensor0 to sensor4 inside the temp file.
sensor0 : 56000
sensor1 : 53000
sensor2 : 55000
sensor3 : 54000
sensor4 : 52000

What should be the best way? New script to overwrite the default settings? Ther will be a conflict when i check every second the temp and set the fan speed with the controlling script which is running right now, correct?

Thank you very much

Alex-2.5
Posts: 7
Joined: Fri Jan 30, 2015 4:29 am
languages_spoken: english
ODROIDs: U3, XU3
Contact:

Re: XU3 fan very loud

Unread post by Alex-2.5 » Mon Feb 09, 2015 2:48 am

I wrote a script now.

It is not a good idea to use it if you have high CPU usage. But if CPU is most time in idle it should work fine.

If fan speed is 130 (loud) script set speed to 60 which is ok for me, i can´t hear it.

Code: Select all

#!/bin/sh
PROBE_EACH_SECOND=1
while true; do
valuetemp=`cat /sys/devices/odroid_fan.14/pwm_duty`
if [ $valuetemp -eq 130 ]
        then
                echo 60 > /sys/devices/odroid_fan.14/pwm_duty
fi
sleep $PROBE_EACH_SECOND
done

nthx
Posts: 21
Joined: Wed Feb 11, 2015 5:08 pm
languages_spoken: english
ODROIDs: xu3 lite
Contact:

Re: XU3 fan very loud

Unread post by nthx » Thu Feb 12, 2015 7:46 am

I very much appreciate whole XU3 board. I'm new user.

But the thing with fan and how it's configured and works by default - cannot use another word as - a disaster :-(

Anyway... here's working bash script that one can run on a system: XU3 Lite + UBUNTU 14.04.1 that will make it more SILENT
No other setup was tested. I'm not responsible for any damage.

Anyhow - script will return to "auto" mode when quit. During my initial testing this works like a charm...

Sources are here.. https://github.com/nthx/odroid-xu3-fan-control
Download, run, have fun without noise from the fan ;-)

Cheers!

Alex-2.5
Posts: 7
Joined: Fri Jan 30, 2015 4:29 am
languages_spoken: english
ODROIDs: U3, XU3
Contact:

Re: XU3 fan very loud

Unread post by Alex-2.5 » Thu Feb 12, 2015 5:46 pm

Thank you very much nthx, that is a much better solution :)

ard
Posts: 72
Joined: Tue Jul 09, 2013 2:12 am
languages_spoken: english, dutch, german
ODROIDs: ODROID-U2
Contact:

Re: XU3 fan very loud

Unread post by ard » Fri Feb 13, 2015 10:58 pm

I would not mess with the original driver setup.
I have just echod a PWM value of 20 and a first temp of 30 to the fan values.
You can't hear the fan when it is running with PWM 20.
root@odroid3:/sys/devices/odroid_fan.14# cat fan_speeds
1 20 71 91
root@odroid3:/sys/devices/odroid_fan.14# cat temp_levels
30 63 68
If the device is colder than 30 it will still stop fanning :-).

nthx
Posts: 21
Joined: Wed Feb 11, 2015 5:08 pm
languages_spoken: english
ODROIDs: xu3 lite
Contact:

Re: XU3 fan very loud

Unread post by nthx » Sat Feb 14, 2015 12:16 am

Was never < 50
That's the issue...

AlexisTM
Posts: 9
Joined: Mon Mar 24, 2014 7:00 pm
languages_spoken: english french
ODROIDs: ODROID U3
Contact:

Re: XU3 fan very loud

Unread post by AlexisTM » Fri Feb 27, 2015 1:56 am

Dear,

I had a similar problem : The ventilator was stopped then start during some seconds at maximum speed then stop.

The problem is : Under 50 PWM, the ventilator is stopped. To start, it have to be at higher PWM. Once started it can stay with lower pwm. (static friction is higher than dynamic friction)

I changed the fan control script to suits better the needs.

Code: Select all

#!/bin/sh
# Shell script to control the fan on Archlinux Odroid XU-3
# Compare every temperatures
TMU_PATH="/sys/devices/10060000.tmu/temp"
# Path of the Duty file used to set the throttle from 0 to 255
FAN_PATH="/sys/devices/odroid_fan.14/pwm_duty"
FAN_MODE="/sys/devices/odroid_fan.14/fan_mode"
# Timer for the infinite while loop
FAN_MIN=60
FAN_MAX=255
FAN_RATIO=5
FAN_OFFSET=140
WAIT_TIME=15
echo 0 > $FAN_MODE
while true;
do
  T=`cat $TMU_PATH | cut -b 11-15 | sort -r | head -n 1`
  T=$(( $T /200  - $FAN_OFFSET ))
  if [ "$T" -gt $FAN_MAX ];
  then
    echo $FAN_MAX > $FAN_PATH
  elif [ "$T" -lt $FAN_MIN ];
  then
    echo $FAN_MIN > $FAN_PATH
  else
    echo "$T" > $FAN_PATH
  fi
  sleep $WAIT_TIME
done
60 is the minimum speed, at 40°C (almost no noise and can start)
255 is the maximum speed, at 80°C (obvious)
Between, I just did a linear interpolation, it avoids the ventilator to stop. (PWM < 50)
Attachments
Capture.JPG
Capture.JPG (33.25 KiB) Viewed 12576 times

nthx
Posts: 21
Joined: Wed Feb 11, 2015 5:08 pm
languages_spoken: english
ODROIDs: xu3 lite
Contact:

Re: XU3 fan very loud

Unread post by nthx » Sat Feb 28, 2015 2:35 am

@AlexisTM .. all right. But please - never, ever release a bash script without a way to safely bring back fan to automatic mode.
In case you have a bug or OS will decide to kill your script, the fan will stay in MANUAL mode forever - bringing a potential fry of CPU/board.

Imagine script stops, fan is at 0 RPM and you do anything CPU intensive. You see what I mean..

See this, and pls adjust and apply:
https://github.com/nthx/odroid-xu3-fan- ... rol.sh#L27

gripped
Posts: 691
Joined: Tue May 21, 2013 11:34 pm
languages_spoken: english
ODROIDs: U2 XU U3 XU3
Contact:

Re: XU3 fan very loud

Unread post by gripped » Sat Feb 28, 2015 5:52 am

IMHO you don't need to worry about frying the CPU.
At 95C (from memory) the CPU throttles down. At some point higher (105?) the board will shutdown.
I run my XU3 with no fan and a big copper heatsink. The in built in throttling is enough to keep the cpu around the 95C mark under heavy load.
I've never had the board shutdown due to excessive heat.

Maybe changing relevant parts of the kernel source can cause damage but I'm not convinced a shell script can.

1coyote
Posts: 6
Joined: Thu Jan 29, 2015 12:08 pm
languages_spoken: english
ODROIDs: ODROID C1
Contact:

Re: XU3 fan very loud

Unread post by 1coyote » Thu Jul 30, 2015 11:40 am

Something outside the control of the script is setting the actual fan speed ("pwm_duty"), perhaps at the kernel level? The script is echo-ing something reasonable and quiet, then there is a burst of 170-180 or so, ruining the peace and moderate silence. :o

Any clues what might be happening here???

karog
Posts: 8
Joined: Fri Oct 09, 2015 3:28 am
languages_spoken: english
ODROIDs: odroid-xu4
Contact:

Re: XU3 fan very loud

Unread post by karog » Fri Oct 09, 2015 4:07 am

nthx wrote:@AlexisTM .. all right. But please - never, ever release a bash script without a way to safely bring back fan to automatic mode.
In case you have a bug or OS will decide to kill your script, the fan will stay in MANUAL mode forever - bringing a potential fry of CPU/board.

Imagine script stops, fan is at 0 RPM and you do anything CPU intensive. You see what I mean..

See this, and pls adjust and apply:
https://github.com/nthx/odroid-xu3-fan- ... rol.sh#L27
I am a big fan of nthx's script.

However, I made some modifications to the while loop that others might find useful. I started this because of the high pitched noise the fan makes when trying to start it with too low a value and the fan fails to start.

1) every trip through the loop every 3 seconds, it writes both fan mode and fan speed even if the values have not changed which floods the journal with messages from the kernel. My mods check for this and do not write values that are already current.

2) some of the speeds are too low for the fan so I removed those below 60.

3) if the fan is starting up and the new speed is below 80, start at 80 for 2 seconds and then reduce to desired speed

4) the lowest temp the fan will come on is now 60000. The prior script would turn the fan off as soon as temp falls below that. So it cycles rapidly. Now the fan will not stop until the max temp falls to 57000 giving some hysteresis for longer on and off periods.

Below is my modified WHILE loop which can be incorporated into nthx's script:

Code: Select all

while [ true ];
do
  # only write new mode if it has changed
  if [[ `cat ${FAN_MODE_FILE}` != "fan_mode manual" ]]; then
    echo 0 > ${FAN_MODE_FILE} #to be sure we can manage fan
  fi

  current_max_temp=`cat ${TEMPERATURE_FILE} | cut -d: -f2 | sort -nr | head -1`
  ${DEBUG} && logger -t $LOGGER_NAME "event: read_max; temp: ${current_max_temp}"

  new_fan_speed=0
  if   (( ${current_max_temp} >= 75000 )); then
    new_fan_speed=255
  elif (( ${current_max_temp} >= 70000 )); then
    new_fan_speed=200
  elif (( ${current_max_temp} >= 68000 )); then
    new_fan_speed=130
  elif (( ${current_max_temp} >= 66000 )); then
    new_fan_speed=70 
  elif (( ${current_max_temp} >= 63000 )); then
    new_fan_speed=65 
  elif (( ${current_max_temp} >= 60000 )); then
    new_fan_speed=60
  else
    new_fan_speed=2
  fi
  ${DEBUG} && logger -t $LOGGER_NAME "event: adjust; speed: ${new_fan_speed}"
  # only write new speed if it has changed
  current_fan_speed=`cat ${FAN_SPEED_FILE}`
  if (( ${current_fan_speed} != ${new_fan_speed} )); then
    # if starting fan (current=2 and new differs per above) and new speed < 80, need 80 to start then reduce
    if (( 2 == ${current_fan_speed} && ${new_fan_speed} < 80 )); then
      echo 80 > ${FAN_SPEED_FILE}
      sleep 2
    fi
    # set new speed if > 2 or temp <= 57000
    if (( 2 < ${new_fan_speed} || ${current_max_temp} <= 57000 )); then
      ${DEBUG} && logger -t $LOGGER_NAME "current max temp ${current_max_temp} new fan speed ${new_fan_speed}"
      echo ${new_fan_speed} > ${FAN_SPEED_FILE}
    fi
  fi

  sleep ${TEST_EVERY}
done

L33thium
Posts: 2
Joined: Sat Feb 27, 2016 5:01 am
languages_spoken: french, english
ODROIDs: XU4
Contact:

Re: XU3 fan very loud

Unread post by L33thium » Sun Feb 28, 2016 10:38 am

Hi, i've written a python script and systemd service file based en yours in this topic.
The fan not run on idle/ponctual load at 50, 60°C (kodi mediacenter on mate under Debian Jessie), start at full speed when hit 85°C and vary temp when down to 55°C
speed down by steps of 5% et speed up by 20% to try to be the more silent possible.
it's here : https://github.com/L33thium/xu4fanctl

It probably needs some adjustement to run on xu3 for example.

OdroidC4
Posts: 3
Joined: Mon Nov 21, 2016 12:14 pm
languages_spoken: english
ODROIDs: XU4, C2, C1+
Location: Colorado Springs, Colorado
Contact:

Re: XU3 fan very loud

Unread post by OdroidC4 » Fri Dec 02, 2016 1:29 pm

Much thanks to posters of this thread and to L33thium. Just want to add that Ameridroid has done testing on different fans and heatsinks for the XU4. Excellent info as you can combine the python script with a heatsink and fan and be so, so happy. The XU4 can now run pretty much full speed on all cores, sustained with the newer heatsink/fan combo and will probably not need the fan to run with the new python script in most cases. It is a big deal to me, so thank you guys! Just look at the info from Ameridroid on testing of different fans, different heatsinks. Basically, you can run with less throttling using their best heatsink without a fan using thermal paste than you can with the stock heatsink with fan at full speed. I am now planning on using the best heatsink, a good fan, and this python script. So, ty!!
FYI - in case many do not know, the XU4 will switch core speeds between 2.0 GHz and I believe 1.2 GHz when temps go up to 90 to 95 decrees Celsius. That is extremely hot, and simply, I want to run at below 70 degrees Celcius to increase it's life, and because of this thread, I now can:)

Cheers

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 3 guests