Linux – How to get the CPU fan to stop spinning when idle

fanlinuxlm-sensorstemperature

I have a PC which I built ~3 years ago which had been running smoothly and silently until recently. Now, the CPU fan likes to spin up to 1200-1500 RPM even when it's idle, which is rather annoying. I have not made any recent changes (software-wise or hardware-wise) to it.

The specs:

Motherboard: Gigabyte MA78GM-S2HP
CPU: AMD Athlon(tm) Dual Core Processor 4850e
Case: Antec Minuet 350 MicroATX
OS: Ubuntu 10.04, Linux 2.6.38-10-generic

I installed the lm-sensors and hddtemp packages (via apt-get) and configured them. Here's a typical output at steady-state, where the computer's been idle for a while and the fans have been spinning for the same while:

$ sensors
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:  +29.0°C                                    
Core0 Temp:  +32.0°C                                    
Core1 Temp:  +27.0°C                                    
Core1 Temp:  +22.0°C                                    

it8718-isa-0228
Adapter: ISA adapter
in0:         +0.99 V  (min =  +0.00 V, max =  +4.08 V)   
in1:         +1.94 V  (min =  +0.00 V, max =  +4.08 V)   
in2:         +3.38 V  (min =  +0.00 V, max =  +4.08 V)   
+5V:         +2.94 V  (min =  +0.00 V, max =  +4.08 V)   
in4:         +3.04 V  (min =  +0.00 V, max =  +4.08 V)   
in5:         +3.25 V  (min =  +0.00 V, max =  +4.08 V)   
in6:         +4.08 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
in7:         +0.03 V  (min =  +0.00 V, max =  +4.08 V)   
Vbat:        +3.34 V
fan1:       1366 RPM  (min =    0 RPM)
fan2:          0 RPM  (min =    0 RPM)
fan3:          0 RPM  (min =    0 RPM)
fan4:          0 RPM  (min =    0 RPM)
temp1:       +35.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:       +28.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermal diode
temp3:       +34.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
cpu0_vid:   +1.100 V

$ sudo hddtemp /dev/sda
/dev/sda: WDC WD5000AACS-00ZUB0: 35°C

These all seem fairly normal to me, so I'm perplexed as to why the fan continues to run at such a high RPM. What does the ALARM that's reported for in6 mean? Is it important? A forum post I found via Google says probably not.

I've been playing around with the fancontrol daemon, trying to see if I could get better results than with the default fan management. Using the pwmconfig utility, I generated the following /etc/fancontrol file:

# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon0=devices/pci0000:00/0000:00:18.3 hwmon1=devices/platform/it87.552
DEVNAME=hwmon0=k8temp hwmon1=it8718
FCTEMPS= hwmon1/device/pwm1=hwmon0/device/temp1_input
FCFANS= hwmon1/device/pwm1=hwmon1/device/fan1_input
MINTEMP= hwmon1/device/pwm1=35
MAXTEMP= hwmon1/device/pwm1=60
MINSTART= hwmon1/device/pwm1=180
MINSTOP= hwmon1/device/pwm1=100

This only sort of works—as soon as I enable the fancontrol daemon, the fan shuts off at first (good), but the temperatures of the 7 different sensors slowly rise, even when everything is idle. Eventually, when the Core0 Temp sensors goes past 35°, the fan comes back on, and then it alternates from being on and off at around 500-700 RPM, as the temperature goes back and forth across the boundary. It's certainly much more pleasant than 1200-1500 RPM, but it's still far from desirable.

Here's an example of the sensors output in that situation:

$ sensors
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:  +36.0°C                                    
Core0 Temp:  +38.0°C                                    
Core1 Temp:  +34.0°C                                    
Core1 Temp:  +30.0°C                                    

it8718-isa-0228
Adapter: ISA adapter
in0:         +0.99 V  (min =  +0.00 V, max =  +4.08 V)   
in1:         +1.94 V  (min =  +0.00 V, max =  +4.08 V)   
in2:         +3.38 V  (min =  +0.00 V, max =  +4.08 V)   
+5V:         +2.94 V  (min =  +0.00 V, max =  +4.08 V)   
in4:         +3.04 V  (min =  +0.00 V, max =  +4.08 V)   
in5:         +3.25 V  (min =  +0.00 V, max =  +4.08 V)   
in6:         +4.08 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
in7:         +0.03 V  (min =  +0.00 V, max =  +4.08 V)   
Vbat:        +3.34 V
fan1:        585 RPM  (min =    0 RPM)
fan2:          0 RPM  (min =    0 RPM)
fan3:          0 RPM  (min =    0 RPM)
fan4:          0 RPM  (min =    0 RPM)
temp1:       +40.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:       +34.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermal diode
temp3:       +42.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
cpu0_vid:   +1.100 V

I opened up the case, and the CPU heat sink felt warm but not excessively hot. I tried taking off the heat sink, cleaning off the thermal paste, putting on new thermal paste, and putting the heat sink back on, but that didn't seem to have much of an effect, if any.

The two other heat sinks—one on the built-in AMD 780G graphics chipset and the other on the AMD SB700 southbridge—felt noticeably hotter than the CPU heat sink.


SO, my question is this: What should I do to get this computer back to the state where the fan is off when it's idle? Can I solve this with a smarter fancontrol configuration? Do I need to change the hardware somehow? Any other advice?


UPDATE

I cleaned out the heat sink and fan as best I could with compressed air (there wasn't a whole lot of dust, but I got rid of what I could), but still no dice. Rebooting into the BIOS configuration gives me the same results—the fan still runs at 1100-1200 RPM, and the system and CPU temperatures are reported as 40-44°C.

Should I add another fan? The integrated GPU and the SB heatsinks felt significantly warmer to the tough than the CPU heatsink. The BIOS reports a system fan speed and NB fan speed of 0 rpm (since I don't have more than one fan).

Best Answer

Sounds like you need to open the system, clean the HSF unit, ensure all air intakes are clear of contamination, remove the HSF and clean off the old thermal paste (carefully) from both the CPU & HSF and apply a new layer of thermal paste.

Over time, contamination such as dust will reduce the heatsink efficiency, and should be periodically cleaned - use air duster or similar. Also, over extended heating and cooling cycles a phenomena known as "thermal pump-out" forces the thermal paste to migrate from the centre of the CPU Die towards the edges, reducing the contact area between the HSF and CPU, which reduces its efficiency.

This should help ensure your system runs as desired.

Regarding your lmsensors output, take those temperature values with a pinch of salt - the scaling factors can be off by a large margin. Check the temperatures in your BIOS and you'll likely find them higher than shown by lmsensors.

Related Question