Fan noise and MacBook Pros
Last night, my MacBook Pro started making an insane fan noise. The whole laptop was shaking the fan was running so fast. I tried several different fan control softwares, but nothing seemed to slow it down. After looking at “top” for a few minutes, I realized that idle, my CPU was at 40-55%, and my average load was up over 15. I rebooted two times, and on log in, each time, the fan would start whining, reaching speeds of 5k rpm or more. Since the machine wasn’t doing anything, this didn’t make any since. I didn’t even have any applications open, other than terminal. Turns out, mdworker was taking up all the CPU.
After looking on the Apple forums for a few minutes, I stumbled upon an interesting post. Several users claimed that there were two known causes for the fan suddenly spiking up in speed, even after rebooting the system multiple times. The first was a corrupted Dashboard widget, which was accessing the CPU and fans for stats. I ignored this, since I rarely use Dashboard widgets, and I haven’t installed a new one in 6-8 months. Next, they suggested that the file permissions on the disk were wrong. I thought about this for a minute, and it hit me. What does mdworker do? It indexes files/directories/etc for Finder. It’s running all the time. What would happen if it suddenly hit a file or group of files that it couldn’t read properly? Well, turns out, what happens is the CPU goes crazy, and so does the fan. I opened up Disk Utility, and told it to fix the permissions on the file system. It found almost 800 files with the wrong permissions. The really funny part, was as I watched the list of files go by, the moment it hit the Adobe Flash plugin, and fixed its permissions, the fan went quite and the CPU dropped back down to normal.
As a side note, for the last couple of weeks, every time I opened iTunes, a warning message would pop up asking me if I wanted to allow incoming connections to iTunes. This started with the last security update from Apple. I always clicked “Allow”, but it seemed strange that I kept getting this message on every iTunes launch. After a couple of minutes in the Apple forums, I found the solution to this problem too. Turns out, in /Library/Prefences, there were two copies of com.apple.alf.plist. A version marked orig and a new version created on the date I did the security update. After deleting these two files, and restarting iTunes, a new version was created, and it no longer asks the Firewall question.

Flash for the lose, yet again. That reminds me…off to fix permissions.