All Work and No Play Makes a Quiet MacBook Pro

March 13th, 2006

This post is part of the MacBook Pro Complaints series. Instead of (or in addition to) linking directly to this post, consider linking to the series link, which includes a summary of all findings to date and direct links to the pertinent downloads that users may find useful. Thanks for reading!

I’m the (mostly) happy owner of a MacBook Pro (MBP). Like every other MBP owner, I’m excited and happy to have at my portable fingertips unprecedented Mac computing power. Also like every other owner, I’m slowly going insane from the now infamous “hissing/whining” processor noise.

As annoying as this noise is, it’s nothing new to me. I suffered a nearly identical noise on my Dual PowerMac G5, until I discovered through the folk wisdom of the Internet that “disabling CPU napping” would alleviate the problem. Ah – sweet silence! Since that day, I have been flagrantly wasting CPU energy on my Mac by way of the “disable napping” script that runs every time the computer boots. The script relies on extra software provided by Apple’s CHUD tools, and on the rare occasion when my computer has ended up temporarily without those tools, I’ve noticed almost immediately that my brain was once again being bored into by little audio termites.

The problem on the MacBook Pro is generating a lot of discussion on the web. I think it’s worse now because the laptop sits closer to and relatively level to your ears, while the G5 tower often rests somewhere around the corner of your desk and closer to the floor. Annoying whine from an Apple product? No problem, I’ll just pull the ol’ “disable napping” trick. Ha ha! I’m so good at this. What? The Pentium M doesn’t support napping? Sure enough, typing the magical “hwprefs cpu_nap=false” command at the command line returns the very unhelpful “nap not supported by this processor type.”

Over the past few weeks, a number of data points have emerged on the web about what may or may not cause the hissing noise, and what may or may not quell it. Among the most prominent is the observation that “using the built-in iSight” causes the noise to disappear. I tried this the way most people try it, by launching the bundled Photo Booth program. Sure enough. No more noise. But how could that be? I had a hard time believing that there was some magical link between the video circuitry and the “annoying noise” circuitry.

Spotting a link to discussions about the problem in Rentzsch‘s del.icio.us feed, I was reminded to look into the problem more carefully. Personally, though running the Photo Booth application does quiet the noise, it’s not something I feel comfortable doing with my extremely powerful, top-of-the-line Mac notebook!

I sat down at my MBP, intent on getting to the bottom of the problem. I planned to try different things and see what made the noise change or go away. But what’s this? No noise? Try as I might, I couldn’t get irritation to occur. Aha, I noticed at last. I’m plugged in. With the MBP plugged in and charging, apparently the computer doesn’t produce the noise. I was becoming more and more convinced that the problem lay in the CPUs. I disconnected the extremely cool magnetic power connector, and the noises immediately started occurring. If it’s a CPU issue, then perhaps disabling one of the cores will alleviate the problem. Yes, on my machine it certainly did. This is all consistent with the Dual G5 noise problem: when the lazy core has nothing to do, it makes a whining “I’m bored” noise.

It make sense that a video-intensive program like Photo Booth would alleviate the problem. Not because it’s using the built-in iSight, but because it’s furiously processing video data and undoubtedly making the most of that dual-core Pentium chip. Fine – but that means if I’m running Photo Booth I’m taking power away from other programs, like my compiler, that could really make better use of it. Also – the green glow of the iSight camera’s activity LED doesn’t exactly fade into the background. Isn’t there some other program that could keep the CPU just busy enough to stay quiet?

I’m not sure if there is such a program, so I made my own. It turns out that writing an extremely asinine program designed to spin the CPU endlessly does silence the problem. My program simply loops forever comparing the same byte of a string to a character value which it will never be. Pretty stupid, huh? At first I just let it take over the whole CPU, to confirm that the noise would stop, but then I got curious about how much I could yield and still keep the computer quiet. During my experiments, I added a call to usleep() and played with different settings to see at what threshold the noise would come back. In my extremely unscientific tests, the tool has to use around 8% of the (a?) CPU to keep the noise from happening. Arranging for less aggressive use of the CPU resulted in variations on the hissing noise’s rhythm and perceived pitch. I am willing to part with 8% of the CPU if I must, but is there a better way?

I remembered that this is UNIX, and one nice thing about UNIX is the “nice” function call, which sets your priority either lower or higher than the “standard priority.” Apparently nice() has been obsoleted by a newer “setpriority()” call, so if you want your code to be correct you should use that instead. I like using nice() because this is a hack, it works, and I like the way it sounds. Here is my complete “dumbcpu” command-line tool, which should silence your MBP:

main()
{
   char* dummy = "blastedPentiumM";

   // Give this process the lowest possible priority
   (void) nice(20);

   // "Use" that CPU
   while (dummy[0] != 'l')
   {
      // Give the CPU a rest. Use a lower value if it's still noisy.
      usleep(100);
   }
}

For my less programming-minded readers, this is the source code to a complete command line tool that, when compiled, can be run from the Terminal application. If you’re not up for all that, just download the compiled binary, which also includes the source file. [Update: Check out the 1.1 version here, sorry no source for this one]. You should also be able to add the compiled binary to your “Login Items” in order to have the tool run (and your noise silenced) every time you log in to your account. (Update: This wasn’t true at first, but is now that I have changed the binary distribution to a simple application instead of a command-line tool).

How important is it to run this command-line tool instead of Photo Booth? To confirm my suspicions that running Photo Booth was robbing me of valuable processing time, I picked the closest project at hand and timed a clean build of it from the command line with xcodebuild. On my 1GB RAM MBP running full-bore, with annoying whining noises and all it takes almost 8 seconds exactly to complete this build from start to finish. Next I launched Photo Booth and ran the test again. This time it took almost 9 seconds. So Photo Booth is robbing me of 1 out of every 9 seconds. Unacceptable.

Running the above-linked tool quiets my MacBook Pro, yet allows compiles and any other ordinary tasks that want to harness my MBP’s power to complete at full-speed. Observing the behavior of all involved tasks with the “top” command line tool, it’s easy to see how the “dumbcpu” tool drops to nearly 0% CPU use when other, more important tasks are being run.

Does this problem suck? Yes. Does it need to be addressed by Apple before the world goes insane from humming/hissing disease? Yes. Does this little tool work around the problem in a more acceptable way than any other proposal I’ve seen? I humbly suggest that it does.

Update: Smart people like Kevin Ballard and Chris Liscio quickly observed that this tool takes up 100% of the CPU when the machine is idling, which sort of sucks. So to alleviate this, I put back a usleep() call in the while loop. On my MBP usleep(100) seems to cause about an 8% CPU usage, which is still half of what Photo Booth takes, and keeps the CPU quiet. The downloadable binary has also been updated with this change. Thanks Kevin & Chris for pointing this out.

Update 2: I notice a noise still persists when I run the tool, though it’s much less noticeable. I think it’s the “sound of one chip napping” or whatever. I suppose that altering the tool so that it spawned a thread to keep both CPUs busy might seriously silence the MBP. I’ll leave that as an exercise for the concerned reader.

80 Responses to “All Work and No Play Makes a Quiet MacBook Pro”

  1. malakye Says:

    photobooth trick works but if you start up iChat the whine comes right back then you have to do it all over again. pain in the ass lol

  2. me Says:

    I really think this is a power draw problem. And the actual sound comes from the speaker, not from the CPU itself. When the CPU is idling, there is a surplus of electrical power that leaks onto the left speaker line. Disabling the CPU seems to actually cut the power supply altogether. Launching photo booth in my opinion does nothing more than to turn on iSight which draws power and takes away from the excess. Running the CPU on a tight loop draws power because the CPU is working. Another symptom some users seem to mention is that an HDD spinning up will cause the sound to momentarily go away – because again, the spin up draws power.
    Unplugged cables, battery supply, disabled CPUs… all smells like electrical insulation.
    Honestly: spinning the CPU in tight loops is ridiculous, it achieves nothing but making you think you very smart.

  3. garv Says:

    I used that loop thing which also worked but your right, its obviously not great if its using power and the battery life depleats faster (even tho i think the performence and batt life are still great). the photobooth trick from $h4g has saved me from madness, however it doesnt work on my MBP unless i delete the thmbnail and then hit apple-Q. now i can get on and enjoy all the amazing benefits of my new MBP. thankyou

  4. stone Says:

    I don’t know anything about coding. But, I am an audio engineer. This reminds me of the problem older dell laptops had; they weren’t grounded/insulated well. Ring any bells for anyone?

  5. Ed Says:

    $h4g – I tried your method, let me know if I did anything wrong. I opened Photo Booth, took a picture and clicked on it, then I quit the app and the noice reappeared? Did I do something wrong? Please assist. I just picked up my MacBook Pro 1.83 and it also has this issue.

  6. Dora Says:

    Opening photobooth, clicking a previusly taken photo than quiting the application worked for me in the first few days, but now after i installed all of the updates and used my mbp for a while, it stopped working now i have to use quitembp and it steals %6 of my cpu..

  7. Jason Pratt Says:

    Just updated the SMC firmware using the released-today Software Update and WOW…my MBP is now silent.

    Just last night the thing started buzzing and whining on me…so I was beginning to get nervous, but this seems to have fixed it…Glory Be!

    You might all try downloading and installing the Macbook Pro SMC Firmware Update 1.0…so far (10 minutes in) my MBP is quiet as a church mouse

  8. Daniel Jalkut Says:

    Great news Jason, but I must say I’m skeptical. I installed the firmware update and experienced no such miracle. I wonder if you’re just not listening carefully enough, or are in a slightly noisy environment.

  9. Sepp Pellmueller Says:

    I also got the feeling that my MPB is more quite after installing SMC Firmware Update – but only as long as the power cord is connected. Without power connection it is the same old story; and even worse: now the Photo Booth trick does not work any more.

    Apple is not responding to my complains at this time.

  10. mezza Says:

    Does anyone know why the light on the charger wont turn green when its fully charged 100%, even when my mbp is off and charger been all nite long its still orange? sorry its not about the noise but still….can anyone help plz?

  11. Phil Says:

    To those not hearing the whine when using WinXP via BootCamp: A likely explanation was posted to the apple forums: http://discussions.apple.com/message.jspa?messageID=1785849#2360391

    ‘Another interesting information about the whine and why it, for some of the users who have a whining 15″ MBP, didn’t occur on WinXP SP2:

    MS KB918005 “Battery power may drain more quickly than you expect on a Windows XP SP2-based portable computer” ( http://support.microsoft.com/kb/918005/en-us )

    After applying this fix, which fix a power drain due to bad power management in WinXP SP2, a user reported on onmac.net forum ( http://forum.onmac.net/showthread.php?t=1214 ) that his 15″ MacBook Pro started to whine on WinXP.
    This confirm what said the former intel engineer who posted on this forum at the beginning of the talks about this issue. This fix will also likely make other notebook PCs whine.’

  12. Andrew Says:

    I’ve found the perfect solution for this problem for me that requires no additional software – my new bluetooth mouse! My Macbook Pro has the whining issue – using Quiet Macbook Pro works fine on it.

    I recently bought a Bluetake BT 500+ and now I find that if I have it paired there is NO whine whatsoever – I checked my CPU stats and they’re very very low, so somehow the mouse is taking away idle cycles from the CPU without having to force it through a busywaiting program! Following the scientific method, when I turn my mouse off, the CPU whine returns the instant the “Connection Lost” icon flashes on the screen. I turn the mouse back on, mouse control returns, and the whine is gone.

    Your mileage may vary on your BT mouse, but for me this works great. Good luck!

  13. Josh Says:

    I have a suggestion for all you who dont like the noise, myself included. Try listening to lound music, it drowns out the other sounds, and after a while you will go deaf so that high pitch noise will be inaudible :), Problem solved!

  14. Andrew Says:

    Just got a 17″ MBP that has the whine problem as well – my first apple, pretty dissapointing. QuietMBP works great though, thanks loads.

  15. Tom Says:

    Hi!

    I noticed the powersupply had different noise on each side. One side sound more right with a deep tone you could say, but the other side sounds more like if it´s melting(yes), or if some tiny person is frying something with a lid on.
    I wonder what this is?
    This is also a strange thing, the powersupply frying noise is either transfered to the MacBook or vice versa in some way. I really have no clue, but it sucks, and i am afraid that sooner or later my comp will fail because of this.
    Apple, what the hell is going on with MacBook and MacBook Pro´s?!
    Is the powersupply dying, or is my MacBook dying, or both? :/
    This is tacky shit i say.
    I could expect it from some shit brand, but not Apple really.
    I seriously hope it´s harmless even if it does not sound so, and that it is just something that can be fixed with either a firmware update or a Mac OS X.
    Apple really needs to speak out now what the deal is for us users now!
    Can it be fixed, or is this faulty machines?
    If it is faulty hardware i am going to demand a new box!
    I also just out of curiousity installed BootCamp to just see how Windows XP would run on a Mac.
    The creepy thing is this..the noise from my MacBook is all gone!!!! :O
    Only the powersupply still have the frying sound, but it´s much much less noticable on it.
    I also noticed that my headphone in red optical light is now on too. :O
    It´s not on in OS X at all.
    Why is this?
    So, i started to think about this, and i think the MacBook must be ok then, right?
    Why is it quiet in windows?
    Really weird!
    Maybe the powersupplies are faulty and give wrong current or something?
    I wonder if more users have found out the same things as me about their MacBooks/MacBook Pro´s?
    Let me know, and please, if you know more then me as of what to do whit these dissapointments send me a mail.
    I need answers from Apple, and from more tech oriented Mac users then me that might have answers too.
    i got a white MacBook 2Ghz, and it was delivered June 12.
    The only possibility for me was to buy online as i live to far from a certified reseller. Don´t i have a right to get a new machine all togeather?
    The highpitched noise is really bothering and not at all ok. It should not be there..period!
    Will our logicboards and powersupplies crack, and will chpis and other circuits melt to later on?
    Damn!
    This is really not cool!
    I won´t accept to send it back and forth to service because i really don´t need all that hassle.
    Being a musician makes it all worse too.
    Apple, you better impress us all, and comfort us loyal supporting customers with answers, or taking the machines back!
    Some people online say users are whining with to much complaints, but i say it´s justified as this is Apple products, and supposed to have very high quality.
    Well, enough of me now as i´m all stressed out by this and worrying too as it really took away the excitement of using a Mac.
    Take care all!

    T

    Tom

  16. Tom Says:

    Forgot my mail does not show here! ;)
    I´m shit nervous about my MacBook guys.

    catman10@mac.com

    let us all celibrate in iChat with iSight on, and a nice cold beer in our hands when this shit is finally solved!

    Take care!

    T

  17. Spiky Says:

    Tom,
    Try listening to other power supplies. For completely unrelated products. You may be frightened.

    If you can hear the crackling or whatever from across the room, go to an Apple store for a replacement. If you have to hold it to your ear to hear it, don’t worry for now.

  18. Se5easy Says:

    Is it possible to start QuietMBP in background mode? Is there a command in mac os?

  19. Daniel Jalkut Says:

    Se5easy: the best you can do is to set it as a login item for your account with the “Hide” checkbox selected. This is from System Preferences.

    I suggest asking Apple about getting a replacement logic board to fix the whine.

  20. OneMoreVerse » Blog Archive » Where did I go… Says:

    […] Reinstall and Boot Camp I wanted to install BootCamp onto my MacBookPro but ran into problems. I ended up having to wipe everything clean and reinstall my life back onto this whiny laptop. I can now run Windows XP on my mac. I feel like a heretic but I know I’ll be thankful once school starts back up and I don’t have to spend half my life in a lab writing assembly language or programming Middle Earth Battle Station. […]

  21. JR Says:

    Thanks very much for your thoughtful solution to this problem, Daniel. Worked perfectly for me, and stopped the twitch I was developing when using my MBP in low-noise situations!
    Cheers.

  22. Real Says:

    Actually, according to my experience, most laptops with intel processors (and I don’t just mean macs but also others like toshiba pcs and asus not sure about sony) tend to have the same symptoms (annoying noise) when the brightness of the LCD isn’t full. That would explain the reason why, when unplugging the cord, the noise starts since it reduces the brightness in order to improve battery life. By the way these symptoms are also usually present not only on core duo processors but also on the centrino ones. Not sure about Core Uno processors tho… anyhow… i just wanted to leave this here so someone can investigate :P

  23. brad Says:

    hey,

    i thinking about buying a MBP with the 2.16 intel core 2 duo processor, does anybody know if these machines have the same noise problems??? thanks.

  24. Christoph Kretschmer Says:

    I Had the same problem some years ago with a Sony Vaio Subnotebook AND a Compaq Pressario…

    It appeared when I inserted a pcmcia wlan card.

    Can someone check if the sound disappears when you disable wlan?

  25. Torgeir Says:

    Whining dissapears for a short time when I activate bluetooth on my 15″ 2,16 GHz Core Duo MacBook Pro. Wlan has no effect. The noise is stronger when connected to power than running on battery. My motherboard has already been changed once. The noise became less loud after the change, but is still there.

  26. Peter Says:

    My brand new Mac Book Pro – five days after it arrived – started screeching like a banshee! Yikes it’s so INSANELY LOUD that the entire computer is completly USELESS!

    When I called Apple tech support to return it they didn’t believe me until I turned on the MBP and left it on during the rest of the call! After a while they said “Oh, that’s annoying” and I said “Yeah, and that’s on your end of the phone, imagine how loud it is here!”.

    OH, and did I mention that the AUDIO DOES NOT WORK at all! Yup, no audio!!! OTHER than the SCREECHING! No soundtracks for videos! No music! No beeps! Nada. I guess dissonance is in at Apple or their suppliers.

    I managed to watch two movies before the screeching started: Tron and Immortal Ad Vitam. They were awesome on the MBP.

    NONE of the methods of calming the beastie have worked!

    The only thing that seems to work temporarily is to put the computer to sleep mode and then wake it up again! Ah, quiet! Until you do anything that plays a sound of any kind! Then the banshee is out blasting FULL VOLUME. Yeah, the volume controls don’t make a difference either.

    There is also no screeching when running the hardware test untility. Hmmm…

    Your QuietMBP program didn’t work.

    Sigh, back to Apple goes the MBP! Hopefully the next one actually works.

    Oh, and I should point out that this was my first Macintosh computer in over fifteen years! So far the switch from the – ick – PC isn’t going well. Dead Mac in five days of it simply sitting on my desk. Not a good sign – do you hear that Steve Jobs? Get your quality control up to snuff; you can do it, otherwise… iHeaven help Apple.

    Apple has a VERY BIG QUALITY PROBLEM THAT IS TURNING OFF BUYERS. I almost returned the MBP and everything else as a result of this and their “run around” tech support people. They get ONE more chance, and then DELL or Lenovo (aka ThinkPad) get another call.

    All the best,

    Peter

    ps. Good luck and don’t accept a schreeching MBP or any low quality “DEFECTIVE” product like that from Apple Inc.. Insist on a return for a new computer or a refund. Oh yeah, don’t accept a run around from their people either! DEMAND a functioning computer – after all that’s what they advertise, isn’t it?

  27. Peter William Lount Says:

    Hi,

    After obtainting the RMA number and shipping the MacBook Pro computer back to Apple on Monday a new MBP arrived Friday morning! Excellent, Apple!

    The new MBP seems to be working fine. The MBP is still much hotter than my ThinkPad which had a heat problem until I put raised legs under it. I’ll be adding 1/4 inch stubby feet (from Radio Shack) to the bottom of the MBP to keep it cool by allowing the heat from it’s underside more space to escape.

    Oh, it’s really nice to have a quite computer to work with. Thanks Apple.

    All the best,

    Peter

  28. John Roach Says:

    Thanks for the QuietMBP applicaiton. It worked great!

    john

  29. Red Sweater Blog - MacBook Still A Whiner? Says:

    […] I’m really afraid of a repeat of last year’s MacBook Pro Whine fiasco. I have been seeing a lot less complaints, and hearing more stories of […]

  30. David Says:

    Many thanks for the QuietMBP app – I just installed this and it works!

Comments are closed.

Follow the Conversation

Stay up-to-date by subscribing to the Comments RSS Feed for this entry.