Thursday, April 10, 2008

Don't throw your Macbook Air out just yet, let there be silence

I've been waiting for my personal Macbook Air for around two weeks and could not wait to get hold of that machine extraordinaire. I expected to receive a notebook that is well-manufactured and manages to combine a minimalistic and elegant design with a solid level of performance.
I loved my new main computer - my Air - from the very beginning (yes, m-a-i-n computer, I know I'm crazy ;) ). Unfortunately, my enthusiasm faded after 1 hour of working with the default OS X installation. A Macbook Air is a beautiful machine, but I also expected it to be beautifully silent during "normal use". Well, much to my regret, it was not! Whenever the CPU load increased moderately (e.g. due to watching a YouTube video) and lasted for longer periods of time, the Air increased the fan speed to the factory maximum of 6200 rpm. At 6200, the buzz of the Air's fan can be incredibly annoying, particularly if you're sensitive to fan noise. At 2500 rpm, the fan is practically unnoticeable - the Air's pretty aggressive about cooling though, so, these low levels are rare in the non-idle-case.

My research lead me to believe that this NOT an issue affecting my Air in particular, it's behavior by design. Lots of Air owners seem to be annoyed by the fan noise, none of them have found satisfying workarounds and some even returned their Airs or got them replaced in hope for a "working" unit.

Rather than returning the Air or requesting a replacement to fix the issue, I investigated further and tried various ways to bring silence to the otherwise flawless and fascinating Air experience. I experimented with different energy saving configurations, software for controlling the fan rpm minimum as well as CPU voltage and frequency and also changed OS X kernel module configurations to alter the fan behavior. While all of these had noticeable effects on the situation, none of them prevented the fan controller from increasing revolutions to the maximum of 6200.
The fan is controlled by the so-called System Management Controller (SMC). Software allows you to modify the rpm minimum, that however could not solve the issue. Apple now provides an SMC firmware update that affects fan control. According to the release notes, this update could potentially worsen the situation because it apparently tries to lower CPU temperature further to avoid hangs and unexpected shutdown (of a single core and/or the whole system). I tried the update, it didn't have any noticeable effect in either direction.

Despite the 6200 rpm targeted by SMC, CPU temperature levels remain in a perfectly safe region (60 - 70 °C) at all times. So, knowing that the rpm increase is unjustified in respect to temperature levels, I changed the rpm minimum to 4500 and 6200. In respect to CPU temperature at 100% CPU utilization, the temperature diff between 4500 (maximum acceptable level that can be considered comfortable) and 6200 rpm is pretty much insignificant. Knowing that, my goal was to redefine the rpm maximum to fully address the issue at stake. I was unable to find any way to do that during the first round of research. Most utilities, including SMC Fan Control, merely allow you to change the minimum. As it turns out though, that software package provides a console application smc that can be used to changed all writable SMC parameters, not just the rpm minimum. With the help of the source of a Linux kernel driver controlling the fan via SMC, I identified the key representing the SMC parameter controlling the rpm maximum and gave the new maximum a try by executing smc as follows:

smc -k F0Mx -w $(python -c 'print hex(4500 << 2)[2:]')

Additionally, I reset the minimum to 1500 to conserve the fan at CPU idle levels:

smc -k F0Mn -w $(python -c 'print hex(1500 << 2)[2:]')

These commands only change minimum and maximum, revolutions still remain in control of SMC. The results have been fantastic, the Air has been quiet and cool ever since enforcing the new limits. Execute these commands in a startup item to make changes permanent (for the sleep / wakeup case, use SleepWatcher).


Now, I can finally say that it is a real pleasure to work with this elegant and capable notebook, I enjoy every minute of doing so. I strongly encourage you to give this workaround a try before throwing the Air out (at your own risk), you definitely miss something!

21 comments:

Akuma said...

Hello

Happy to hear you found a way to get rid of this incredible noise.

You mention a command line util "smc".
I am unable to find it. can you tell me where you got it?

Thanks
Sebastian

Horst Reiterer said...

The utility smc is part of smcFanControl. Install the application and you're one step away from a usable "Air" that you don't want to get rid of... :)

Hope this helps.

Anonymous said...

There are two bugs in your command line:
first the key must not be prefixed by a '-'
second the python command should end with
[2:] otherwise the first two characters (0x) of the hex-string would be used

Thanks alot for this tip and the utility reference.

Michael

Horst Reiterer said...

Thanks Michael, I updated the post accordingly. Sometimes, copy/paste IS a good idea ;)

Anonymous said...

Very helpful, thanks much. I have installed smcFanControl. However, when I issue the commands from the terminal, it complains that smc: command not found. What am I doing wrong?

Safari geek said...

Hi,

At first I couldn't find the command 'smc' either. It turns out that it's inside the smcFanControl application package, to which you have to navigate in the terminal window.

For example, I copied the smcFanControl application to the /Application folder. So this is what I had to do.

cd /Applications/smcFanControl.app/Contents/Resources/

./smc -k F0Mx -w $(python -c 'print hex(4500 << 2)[2:]')

Or alternatively, I could have added the absolute path in front of 'smc' command to get rid of the 'cd' command.

I too suffer from the damn fan in my Macbook Air running at max 6200 rpm most of the time, even though I am not doing anything CPU intensive. I even tried opening the thing up and re-applying the thermal paste, but it was only marginally effective. I think there is a fundamental design flaw with MacBook Air.

safari geek said...

In addition to my comment above...

The fan is not reactive enough to the temperature coming down. When the temperature goes up to 75C or so, the fan starts running at 6200 rpm, which is understandable but when the temp comes down to 50C, the fan continues running at 6200 rpm for a very long time, which I believe is a flaw.

lonboy said...

Mine MBA runs just Safari Geek Has told. When it gets to 6200rpm then it takes very, very long to go down again (maybe two hours). That's annoying even I have modded it with SmcFancontrol and a automator sript to limit fan speed. Is Apple going to do another better thing after de 1.0 update or It's just the thermal paste problem?

Anonymous said...

Excellent information! Thanks!

I have just used the trick to make MBA quiet. On a side note though, the temperature seems to be on the rise afterwards. Have we heard from anyone about toasted CPUs?

--orinoco8

Safari Geek said...

Anyone who is suffering from high CPU temperature, even though you are not doing anything heavy... If you are up to it, I suggest opening the back of MacBook Air and taking off the heat sink to see how the thermal paste has been applied. (This disassembly is actually easier than you think, if you have the right tool. All you need is a tiny Philips screwdriver. Take the back cover off, pull out a couple of connectors near the fan, remove the screws around the heatsink and it comes off)

I read on the Internet that the application of thermal paste on MBA is of substandard and mine was no exception. It looked as if someone just put a big blob of paste in the middle of the CPU and screwed in the heatsink on top of it. Without exaggeration, the thermal paste on my CPU was concentrated only in the centre and it was nearly 2 mm thick! I think it was acting more as insulation than conductor. (You can see the picture of how it looked like here
http://www.flickr.com/photos/30539200@N08/2852181771/
)

I removed the thermal paste completely and re-applied the paste which I bought at an electronic shop.

Now the CPU temp stays around 50-55C for simple webbrowsing and 60-65 for watching YouTube. The fan still occasionally spins up to 6200 rpm and stays there for a long time, so I am using the script above to bring it down to 4500 rpm. I experience no hang ups or core shut down.

I still believe there is a fundamental design flow with MBA. It gets too hot too easily and the tiny fan is not able to cope with it. It doesn't help that the fan isn't responding to the temperature changes quickly enough either - As I said in my comment above, once it spins up to 6200 rpm, it stays there for a long time unnecessarily (but surely this can be fixed with firmware update!).

This is my 4th Mac laptop. Starting from PowerBook 190cs in 1995, I had clamshell iBook (1999), PowerBook G3 (2000), iBook (2001). I am rather disappointed with MacBook Air. Apple thought too much about the look of the machine, without giving enough thought to the practicality.

Krlinhoz said...

I've just bought an Air and I am not a tech savvy person... Can you help me to perform these commands?

Thanks in advance!

Anonymous said...

Horst, greatly appreciate your post on the fan control. I have an intel imac thats 3yrs old that seems to have a bad thermal sensor when i run apples hardware test. Ive tried to reset smc by pulling the power, but still my fan blows full speed. All my temp readings are fine. I found your post on changing the max temp but im not a programmer so could greatly use your help. Ive installed the latest version of smcfancontrol but not sure how i can change the code as you outlined. I dont see a terminal app??? If you could email me some detailed instructions on how to lower my fan speed (not to burn out my cpu) but to a reasonably level, I would be extremely grateful. Apple wants me to send it for logic board repair. Would cost over $500. Seems a bit ridiculous to me. My email is kdecpa@yahoo.com. THANKS! Im sure alot of people with this problem would benefit from your post. : )

Peter said...

Hi there,

Thanks very much for this tread.

Can you please explain me how I can make Terminal do tyhis everytime I start up my Air?

Or is this one time cahnge enough?

spanjorfar/morbror said...

Bright workaround!! Worked seamlessly, this fan noise was really pissing me off.
After all this time since you posted, have you had any issues or aftermath due to the changing of parameters?

Thanks!

Felix said...

is there any way you could mail me a copy of your startup item to autorun the command? i cant figure out how to do that despite alot of googling.. mac newbie :-P
smcfancontrol is located in the applications folder and 4500 max rpm would be perfect!
thanks alot

Patrick said...

Hi!
This trick has worked great for my MBA. However, I now have the same fan noise issue on a 27" imac I just bought. Any chance the terminal script can be modified to fit the imac?

Thanx
/patrick

Solsang said...

This is the best thing that has come for my macbook air, i was about to give up on the computer!

Now i wonder if the command could be coupled with a temperature readout to force the fan down when temperature falls

I use smcfancontrol at 2400rpm and also the machine seems to behave much better after a smc reset:)

(smc reset: press ctrl+alt+cmd+power while the macbook air is turned off and powercable attached)

Anonymous said...

Hello you have To execute command everytime you restart Mac?

Anonymous said...

I wrapped your idea to ready to go , command line tool, http://myunster.com/blog/macosx/55.html


thanks again!

Dunitz Sandrino said...

Mac book seems to be the favourite gadget for many people. The latest MacBook Air price in Dubai is lot cheaper than any other electronic stores outside Dubai.

Abdul Hakam said...

A great fix on MacBook Air. I got my new MacBook Air through online store. After discussing it with my friends as they said MacBook Air price in Dubai is more economical, I got it from Dubai online store. Thanks a lot for the tech tips!