How To Control Fan Speeds in Ubuntu
First, you need some cpu temperature monitor software. For Ubuntu you need to install a package called lm-sensors. It's available in Ubuntu's main repository. All the commands listed in this howto should be executed from the terminal.
Then you need to run sensors-detect.
and just follow the prompts. Add the recommended lines to /etc/modules.
Now, if you don't want to reboot, you'll have to manually activate the modules.
where module1 etc. = the module names provided from sensors-detect.
Next, you need to create your fancontrol file. The easiest way is to run pwmconfig.
and work your way through the instructions there.
Finally, run sensors -s to make your fan configuration take effect.
Now, you can check your temps.
Now to run fan control, type:
To have fancontrol run on startup, follow the instructions on the Ubuntu Forums. Note: This step is no longer required in 9.10 Karmic Koala. The fancontrol script is already included in the build. It will start automatically the next time you boot.
To monitor temps and speeds, I like gkrellm. To get it:
Here's a screenshot of Gkrellm.






Thanks for your nice little how-to. Everytime i install a new copy of ubuntu i alway stop in her to grab the lines for fancontrol =)
[...] This is probably not necessary for most people, but if your fans are annoyingly loud, you may be able to set up automatic can control. [...]
Might be suave to show how to disable this in case somebody does something that will stop their fan. I ran "sudo gnome-system-monitor" then went to the process tab and ended fancontrol. I think it can be permanently disabled by deleting "/etc/fancontrol" file.
Also, if you have two cores, is there a way to make the fan run based on whichever core is hotter?
Thanks.
Doesn't work for me. I get a 'sorry, no sensors were detected' What shall I do next?
Not all motherboards have the sensors required for fan control. Your motherboard may also have sensors, but lm_sensors doesn't know how to talk to them. It may be that you're just out of luck on this one. Usually there will be a screen in your BIOS setup that will display the current temperatures if you do have sensors. That's perhaps the best way to know if you even have a chance of getting this to work.
One of my computers has a cheap Chaintech motherboard with no sensors. I ended up buying a manual fan controller that fits in a 3.5" bay to quiet the fans down.
Is a noisy fan not caused by a wrong swap setting (swapiness) ?
Noisy fans are usually caused by a high CPU/system temperature, or a system that doesn't regulate the fan speed based on temperature. It could also be caused by bad bearings in the fan itself.
I've never hear of swappiness causing fan noise. I guess it could cause some increased CPU load which could lead to increased fan speed on a regulated system. IDK
Thank you for the tutorial!
I am having problems. You Say "Add the recommended lines to /etc/modules." My recommended module is k10temp which is not included in my kernel as of yet. Kernel version 2.6.32
On the http://www.lm-sensors.org/wiki/Devices website to downloading the k10temp module they give me a kernel mode file - k10temp.c
Here is the problem: What do I do with it? Just place the file into a directory? Which directory? And do I have to include the full path into /etc/modules or merely k10temp? Please explain the process in some detail. Thank you ever so much!
Soenke
Soenke
Thank you for this great tutorial!
I am running into problems though. The module is not part of my kernel. I have to install it - k10temp.c
I can download the file but what do I do with it? How do I reference it correctly in /etc/modules? Do I have to add the full path or just k10temp?
I never have worked with kernel mode files yet. Please explain a little bit on what to do. Thank you ever so much!
Cheers
I'm pretty sure the file you downloaded is a source file for the module. That means you would have to compile a new kernel that includes this. That's well beyond the scope of what I've done before. Try opening the k10temp.c file in a text editor. If the file is readable in a text editor, then it is indeed a source file and you'll need to compile a new kernel that includes it. This page should be of some help for compiling. https://help.ubuntu.com/community/Kernel/Compile
OK, I just found something better. You can try adding the kernel team's PPA to your system and they currently have the 2.6.35 kernel available which should contain the module you need. You can add the PPA to your system from the terminal with
sudo apt-get update
You can then install a new kernel through synaptic, or at the time of this writing: