I upgraded my Ubuntu 13.04 to the kernel 3.10 (so I can use a new USB 5Ghz WIFI card). As a consequence my computer no longer seemed to go into the «ondemand» mode and the fan was running all the time. The problem is that the Linux people has decided to relay on the intel_pstate system for power management and the old tools no longer work. You can find an explanation about the change here:
Of all the possible solutions this is the one that worked for me: