The HDD of my iMac (24-inch, Mid 2007) crashed and I had to get a new one. After I changed the HDD, the fan started to run at full speed. The noisy fan was very irritating. I am running Mac OS X Yosemite 10.10.5 (14F27).
Figuring Out The Fan Speed
I tried the in-built spin dump to check at what speed the fan was running.
$ sudo spindump
Sampling all processes for 10 seconds with 10 milliseconds of run time between samples
Sampling completed, processing symbols...
Spindump analysis written to file /tmp/spindump.txt
$ cat /tmp/spindump.txt | grep "Fan speed"
Fan speed: 698 rpm
This seemed too low to cause a noisy flag. Maybe it was some other fan. I googled around for more tools and came across smcFanControl.
Compiling Needed Tools
However, I could not compile smcFanControl. I had to install Make. Once installed, I got following error:
gcc -mmacosx-version-min=10.4 -Wall -g -framework IOKit -o smc smc.o
ld: warning: object file (smc.o) was built for newer OSX version (10.10) than being linked (10.4)
Undefined symbols for architecture x86_64:
"_main", referenced from:
__start in crt1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [smc] Error 1
Since I am running Mac OS X Yosemite instead of Mac OS X El Capitan, I could not get the latest Xcode. I thought of upgrading to El Capitan, but reviews on App Store pointed out that Xcode + El Capitan on 4 GB RAM is a disaster.
Finally after googling on Yahoo (I know!) using keywords ‘imac noisy fan’, I came across Macs Fan Control. They had a free and usable version of the software.
It showed me that there we 3 fans on my system:
This was first useful information. I tried setting limits on fan speed of each and soon realised it was the CPU fan that was the noisy one. The default sensor was pointing to the HDD. My guess is there is no heat sensor in the HDD I installed. So I chose another sensor.
And finally … fan was silent!
Thanks to folks at Crystal Idea (@crystalidea).