Home > Uncategorized > How to control the fan speed on the Odroid U3

How to control the fan speed on the Odroid U3

I noticed the (optional) fan on my Odroid U3 frequently spinning up only to shut down again 1 second later. This appeared rather buggy to me so I looked into how to control the fan. This is what I found:

You can switch the fan into ‘auto’ or ‘manual’ mode:

echo auto > /sys/devices/platform/odroidu2-fan/fan_mode
echo manual > /sys/devices/platform/odroidu2-fan/fan_mode

Note: The ‘odroidu2’ part of the path is not a typo! Strangely enough the U3 uses the same device path as the U2.

Once you’ve switched the fan into manual mode, you can set the speed of the fan by echo-ing a value between 0 (0%) to 255 (100%) to the fan controller:

echo 0 > /sys/devices/platform/odroidu2-fan/pwm_duty (fan off)
echo 255 > /sys/devices/platform/odroidu2-fan/pwm_duty (fan on full speed)

Fun fact: You can get into an argument with the automatic fan controller by setting the fan speed while in auto mode. The fan will respond to your command but the automatic controller will shut it down after noticing what you did. 🙂

While playing with the fan use the following command to read the CPU temperature:

cat /sys/devices/virtual/thermal/thermal_zone0/temp

And to run a CPU stress-test that utilizes all 4 cores use this command:

sudo openssl speed -multi 4

User xana (among others) has posted a script on the odroid u3 forum that uses the commands described above to periodically set the fan speed based on CPU temperature: http://forum.odroid.com/viewtopic.php?f=83&t=6275

If you have the latest version of the kernel it gets even simpler. You can set the temperature above which the fan should be used to cool down the SoC:

echo 60 > /sys/bus/platform/devices/odroidu2-fan/start_temp

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: