Linux Tweaks, HowTo's and Reviews

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.

sudo apt-get install lm-sensors

Then you need to run sensors-detect.

sudo 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.

sudo modprobe module1 module2

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.

sudo pwmconfig

and work your way through the instructions there.

Finally, run sensors -s to make your fan configuration take effect.

sudo sensors -s

Now, you can check your temps.

sensors

Now to run fan control, type:

sudo /usr/sbin/fancontrol &

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.

20 Comments

when i try to run the command "modprobe module1 module2"
it doesn't look like it's doning anithing it just tell me "FATAL: Module Module1 not found".
i gave up and rebooted but the next command says that there is no pwm-sensors capable sensors modules installed.

I have the same problem. Currently running Linux Mint 16 on MacBook Pro mid 2012. I've made several attempts. 'New to Linux here and need lots of help. Thanks in advance.

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

Will be running through this in a few minutes. My purpose is actually not that the fan is too loud...it's a Dell D630 and the BIOS does not seem to factor the GPU temps into when it spins the fan up. SpeedFan under Win7 works great keeping the chip from roasting again, but I prefer to keep all my systems dual-boot. This should solve it 😉

I just made a $800 computer and the CPU fan will run for about a second during the time that it shows the motherboard logo and then it stops and doesn't run at all, ever. what do I do to change that. if someone can answer this than I will be able to use it.

Many motherboards have fan control built into the BIOS or EFI. It's usually given a name like Smart Fan or something similar. If your BIOS does a good job controlling the temp of your CPU, there's no reason to try to control the fan speeds from the OS. If the built-in fan control is not working well, try disabling it in the BIOS and then try following the instructions here.

Thank you for your work!
My DellM90 Precision run Ubuntu 10.10, 2.6.35-22 kernel.
Fun speed is always at the max value and this is boring...
the "sensor-detect" return the following:

To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!

Do you want to add these lines automatically to /etc/modules? (yes/NO)y
Successful!

Monitoring programs won't work until the needed modules are
loaded. You may want to run '/etc/init.d/module-init-tools start'
to load them.

Unloading i2c-dev... OK
Unloading i2c-i801... OK

root@connardoia:~# /etc/init.d/module-init-tools start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service module-init-tools start

now I don't know what I have to do...
what are the needed modules that I have to load?

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 add-apt-repository ppa:kernel-ppa
sudo apt-get update

You can then install a new kernel through synaptic, or at the time of this writing:

thank you for your outstanding feedback. I was thinking to wait until the next release of ubuntu, which comes with a kernel version that should include the module. As you correctly assumed, it is indeed a text-readable file. I'd rather prefer getting experience in kernel compiling on a non-essential system 😉

Thank you again for pointing towards the PPA kernel - never about its existence (fairly new to this part of reality ). Also I found a correlating discussion going regarding variances in reported temperatures based on kernel version on the ubuntu forums. Cf. http://ubuntuforums.org/showthread.php?t=1569161

info update: the kernel installed flawlessly. However, the fglrx driver failed to work resulting in sluggish desktop performance. Thus, I wait until 10.10 release and will report on the k10temp module again.

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!

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.

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?