There doesn’t seem to be a viable standard solution for the problem of controlling the fans’ speeds on most linux notebooks, including the version I have, the ASUS ux31a.
After some digging and hacking I came up with a “solution”. It’s not ideal and it might be dangerous when implemented incorrectly, but hey, it works.
Some of the work was done by an anonymous user on pastebin. He calls his hack “dirty”, and it certainly isn’t the standard way his program goes, but is there really such a thing as a dirty hack? Any hack that works is a good one, I think …
However, before you use this on your system, let me warn you:
If you are uncomfortable with a little tinkering, I recommend you don’t use any of the following. If you don’t have a clue what the programs described do, stay away. If you do anyway, and your new notebook goes up in flames, burns down your house and ruins your life, I’ll be the guy saying to you what I say now: YOU HAVE BEEN WARNED!
how to use:
First, download this code
compile it, run it and see if it works.
If it does, the following sh-script will read out the current temperature of your CPU and pass it on to the above program, setting the fan speed accordingly.
I have set minimum temperature for fan activity to 50 degrees Celsius, the max for a full blast to 70, and a minimum fan speed of 25 percent. Feel free to change the values as you like (for example, in the script below, set “$min” to 0, if you want the fan to completely stop at low temperatures).
You have to have “sensors” installed for the script to work.
Then go like this: copy the following script, save it and run it with “sudo sh [program path + program name]“. For having it run in the background, you may install “screen” (“sudo apt-get install screen”) and type “screen” and hit return before typing “sudo sh [program path + programname]”. Put the screen into background with “Ctrl+a+d” and the program will run in the background continuously.
If you want to stop the program: Resume the screen with “screen -r” (and see what it has done), and “ctrl+c” out of it. Type “exit” to close the screen (if any).
This is a little update on the script controlling the fan speed on my Asus ultrabook. With the original one, the fans are a little too jumpy for my taste, so I added in some element of “inertia”: the fan speed is now set according to the last two measurements of CPU-temperature instead of just the current one (which means less jumping up and down for the rpms of the fan). Also, the script logs what it does – if you do not want a log, simply edit the relevant lines (remove ” >> /var/log/fanc.log”).
Here it is:
#!/bin/sh
## you need to specify where the compiled version of fancntrl.c is
## mine is in “/home/nathan/skripte” and is called “fanc”. Edit the lines with “/home/nathan/skripte/fanc” accordingly.
## also, you need to have sensors installed, test them with “sensors” in your bash
## if you don’t know what I am talking about, DO NOT USE this script!
dummy=0
xx=0
yy=0
zz=0
# minimum of fan activity in percent
min=25
# initial temperature, to be careful set to 60 (doesn’t need to be changed!)
temp2=60
ff=0
gg=0
echo “as long as not exited with ctrl-c, I will now control your fans ”
echo “depending on the current temperature prevailing …”
echo “if exited, don’t forget to set control back to auto!”
echo
sleep 2
while [ $dummy -lt 1 ]
do
temp=$(sensors | grep ‘Physical’ | cut -c18-19)
echo “temperature is $temp °C” >> /var/log/fanc.log
yy=$(($temp-50))
yy=$(($yy*5))
ff=$(($temp2-50))
ff=$(($ff*5))
yy=$((yy+ff))
yy=$((yy/2))
echo “the mean of the 2 last temp’s in percent of the critical distance between 50 and 70 degrees: $yy” >> /var/log/fanc.log
xx=$(($yy * 255 / 100))
zz=$(($min * 255 / 100))
echo “in ascii: $xx” >> /var/log/fanc.log
if [ $yy -gt 20 ]
then
if [ $xx -gt 254 ]
then
/home/nathan/skripte/fanc 255
echo “set fanspeed to maximum” >> /var/log/fanc.log
else
/home/nathan/skripte/fanc $xx
echo “set fanspeed to $yy percent” >> /var/log/fanc.log
fi
else
/home/nathan/skripte/fanc $zz
echo “set fanspeed to minimum ($min%)” >> /var/log/fanc.log
fi
echo
temp2=$temp
sleep 4
done

Update Link doesn’t work!
Where can I find the updated version of this script?
update link works now …