My Suddenly Slow-Waking MacBook Air
May 31, 2013 02:27

My main work computer is an 11" MacBook Air from early 2011. Even though the CPU was slower than the one in the MacBook Pro it replaced, it felt like a huge performance upgrade for two main reasons: 1) the SSD drive read and wrote data much much faster than the previous machine's 5400RPM hard drive, and 2) it woke from sleep almost instantly.

11-inch MacBook Air with Starshipsstarthere.ca branding

I remember Apple making a big deal about the instant wake-up when they announced these machines. It's one of those things that's easier for Apple to implement than most other computer makers, since they own the hardware, the software and the firmware.

But after I upgraded to Mountain Lion, my MacBook Air wasn't waking as quickly anymore. Opening the lid would show a frozen login screen for a while and then after ten or twenty seconds it would finally wake up and let me log in.

Ten seconds might not seem like a lot, but often when I flip open my computer it's because I'm inspired to write or code or design something. Those extra seconds can be extra frustrating - especially since it wasn't so long ago that it did wake up almost instantly.

Well, I finally figured out the problem: turns out it's a hidden configuration setting that you can adjust from the command line. The OS has a hidden variable for how long it stays in instant-wake 'sleep' mode before it writes the RAM to the SSD for 'standby' mode. Sleep mode will drain the battery in a few days, while standby mode supposedly lets the computer stay charged for as long as a month.

Engineering is all about trade-offs. Weight vs. strength. Speed vs. maneuverability. Expandability vs. stability. This setting is a trade-off between wakeup speed and battery longevity. In Lion, Apple was more in favour of wakeup speed, and set the hibernate cutoff to several hours. In Mountain Lion, Apple wanted to favour battery life and so set the hibernate cutoff to only one hour.

I'm not sure which backwoods explorers or super jet-setters regularly have to go more than a day or so between using or charging their laptop. On the other hand, there are lots of situations when a machine is asleep for more than one hour.

One hour is enough for a morning commute, especially if you stop for breakfast on the way. One hour is enough for going shopping before getting to the cafe. One hour is enough for boarding the plane, taxiing, taking-off, and getting to cruising altitude. But one hour is not enough for feeling like you've been away from your computer for a long time - and it's not enough to make you feel like you should be waiting for your super-fast MacBook Air to wake up.

I really don't want to get into some kind of stupid "this never would have happened if Steve Jobs was still alive" thing, but Steve is on record for caring about startup speed a_lot. I wouldn't be surprised if the instant start-up feature was one of the things he obsessed over at Apple back in mid 2010. Now he's gone, caution and general efficiency seems to have become more important than gee-whiz instant wake-up. (Of course, iOS devices do wake up instantly - and certainly Apple is spending more time worrying about those than their boring old computer hardware).

At least it's a simple command-line fix:

sudo pmset -a standbydelay 86400

Wish it could be a System Preferences thing, though. But, as I've learned from my years of software devleopment, every exposed configuration parameter is a support headache waiting to happen. I've also learned that there's an art to figuring out the best default settings.

Other Blog Posts
This Is Nowhere: Bloomsday Halifax This Is Nowhere: Why an HTML/JavaScript Single-Page App With GPS Is A Bad Idea This Is Nowhere: GPS and Wayfinding and More UX This Is Nowhere: The Single-Button UX This Is Nowhere: Don’t Just Stand There! This Is Nowhere: Finding My Duck Finding Burgers Fast: My DIY Halifax Burger Week Site "This is Nowhere" at PodCamp Halifax 2018 The Diary Diaries: Fixing Remembary's Facebook Connection Special Leap Day Edition of "Some Weird Things About Time" What's Up With Remembary Can't get pg_dump To Work Now That Heroku Has Upgraded Postgresql to 9.4? The Best Thing I Ever Did To Promote My App If You Build It, They WON'T Come #deployaday, My Big Hairy Plan for 2015 Extracting Plain Text from an NSAttributedString My Year of "Hits" Part 2: Remembary Rolling My Year of "Hits" Part 1: Remembary Rises (and Stumbles) Handy Little Test Method to Check for Translations in Rails Apps My Suddenly Slow-Waking MacBook Air Indie App PR: Keeping Control of Your Tone A Quick Note on 'clone' in Rails 3.2 My eBook Apps 2: iOS, JavaScript, and Ruby My eBook Apps 1: Introduction Quick Tip: No Sound on Mountain Lion My Upcoming Talk at PodcampHFX 2012: My Year of "Hits" starshipsstarthere.ca: Building at the Speed of Funny Screencast Tips Remembary's Cool New Picture Support Indie App PR 2: Keeping On Top Of User Feedback Indie App PR 1: How to Handle an App Disaster Giles Bowkett Diary Project 2 Remembary Video Congratulations! Welcome to Your Nightmare! How My iPad App Remembary Took Off Why You Should Have an App in the App Store (Even If You Probably Won't Make Any Money) PodCampHFX Remembary Presentation - Part 3 How I Used MailChimp Autoresponders to Promote Remembary PodCampHFX Remembary Presentation Part 2 PodCampHFX Remembary Presentation Part 1 Why AdWords Ads Don't Work for iPad Apps Remembary is Sponsoring PodcampHFX Why Can't I Resize my Views in Interface Builder? Momento and Remembary Concerning Remembary iPad-Friendly eBooks of Gracian's Art of Worldly Wisdom Project Report: PTOS2 A Quick Note on Encryption We're all LUsers Thoughts on HAML Friday Afternoon Hack - Getting Beyond the Basics Halifax Friday Hack and Back to Basics Quote from Wil Shipley FutureRuby Make Web Not War Busy Week I: Toronto Ruby Job Fair Employment.nil - the Toronto Ruby Job Fair Code Count: Ruby on Rails vs. C#/ASP.NET A Brief Note on Twitter The Hub Halifax and Mobile Tech for Social Change Deep Thoughts on Microsoft From The Accordion Guy The Two Kinds of Defensive Programming Presentation - Fixing Careerious: From C#/.NET to Ruby on Rails Enterprise! Presenting at Ruby on Rails Project Night - May 7th New Name and New Look for Careerious/Clearfit FutureRuby and More From Unspace Health Tips for Programmers This tables meme won't die Careerious - Ruby and Rails vs. C#/.NET Yeah I Use Tables For Layout, So Sue Me The Different Kinds of Done Giles Bowkett's RubyFringe presentation OfficeTime: Great Time-Tracking App for OS X Back With A New Look Non-DRY Feed torontorb Keeping Your Sanity With The Command Design Pattern shindigital Is All Grown Up! (according to the spambots) Startup Stars? I'm so bored! The Magic Words for RMagick Jennifer from Operations You see? Naming is HARD Business Software as Process Documentation Deployment note: 'execve failed' Steve Jobs on Market Research Why Canada Is Better for Entrepreneurs "Program first and blog second" Toronto Tech Collage The MacBook Air Is A Roadster RubyFringe! Quote of the Week: Steve Yegge Starting Up: Cards Great design tool: browsershots.org Starting Up: The Logo Quotes Of The Day: Hedge Fund Interview TSOT Ruby / Rails Presentation Night - Part 1 Moneyworks: Accounting Software for Canadians on OS X Starting Up: The Name Nice logo, but why is your site so bland? Welcome to shindigital.com