This post describes how to enable automatic proportional fan speed control that auto-runs when the RaspBMC media centre OS is launched on your Pi.

Although the Pi doesn't get particularly hot when running RaspBMC, this might still be a useful feature to have if your Pi is running in a hot environment, or inside a media centre case with other hardware that generates heat, ie, a mechanical hard drive. The script is written to give temperature vs speed trip-points of 50, 60, 70, 80°C for 25, 50, 75, 100% fan speeds respectively, but details are given at the end of this post to modify this relationship if you so choose.

The easiest way to access your Pi whilst running RaspBMC is via a remote PC using PuTTY for which you will need to know your Pi's IP address. Other methods are available, but this guide assumes that you will be taking this route.

Procedure

Launch PuTTY and log in to your Pi. The standard login and password will be "pi" and "raspberry" unless you've changed them.

The 'speed=" line of the bash script determines the relationship between temperature and fan speed. Modifying the "/10000-3))" part of this line is all that's required. A few examples of alternative temperature vs speed relationships are shown in the table below.