Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.8: A fix for slow shutdown times System 10.8
At first my MacBook Air would shut down in one or two seconds. A year or so ago it started taking thirty seconds or more. Annoying but hardly fatal. Anyway, I found a trick that helped me:
  • Shut down with Reopen windows when logging back in CHECKED.
  • Turn the computer back on.
  • Shut down with Reopen windows when logging back in UNCHECKED.
This returned the Mac to an almost instantaneous shutdown.

[crarko adds: This makes sense, and if you have a lot of open window states to be saved that would obviously impact the shutdown time. Still, sometimes the obvious is worth pointing out. This tip should probably apply to 10.7 as well.

Hello again, I'm filling in once more this week while Kirk is otherwise occupied -- Craig A.]
    •    
  • Currently 1.76 / 5
  You rated: 1 / 5 (17 votes cast)
 
[24,592 views]  

10.8: A fix for slow shutdown times | 11 comments | Create New Account
Click here to return to the '10.8: A fix for slow shutdown times' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.8: A fix for slow shutdown times
Authored by: benwiggy on Apr 08, '13 09:54:29AM

So, does this mean you can turn the checkbox back ON, and still have faster shutdowns? Or is it just that saving window states takes longer?



[ Reply to This | # ]
Missing information
Authored by: sr105 on Apr 08, '13 10:50:36AM

What's the point of steps 1 and 2? Do you have to do those first?



[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: hughescr on Apr 08, '13 11:54:56AM

Nope, still takes forever for my retina MBP to shut down, even after cycling "reopen windows" on then back off. When "reopen windows" is on, it takes slightly longer to quit apps and get rid of the finder screen and go to the blank grey screen, but then blank grey sits there for 20-30 seconds. With "reopen windows" off, it goes almost instantly to the blank grey screen, then still sits there for 20-30 seconds before powering off.

I wish Steve Jobs were still alive.



[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: Mr. H on Apr 08, '13 04:55:24PM
If you boot up in verbose mode (hold down "command" and "v" keys at beginning of boot), when you subsequently shut down you might see some messages that help to track down the cause of your slow shutdown. Otherwise I'd have a look in the system logs via the console app to see if there's any hints in there.

[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: hughescr on Apr 08, '13 05:45:46PM
There's nothing in system.log and cmd-v doesn't show anything during shutdown either. When I select "Shut Down" from the apple menu while holding opt (so no "relaunch?" dialog) at 17:36:36, I get a bunch of messages in system.log about various apps and background processes existing, then:

blahblahblah
Apr  8 17:36:37 squinty.internal.trickplay.com shutdown[580]: halt by craig:
Apr  8 17:36:37 squinty.internal.trickplay.com shutdown[580]: SHUTDOWN_TIME: 1365467797 473580
Apr  8 17:37:06 localhost bootlog[0]: BOOT_TIME 1365467826 0
blahblahblah
At 17:36:37 (about 1 second after I told it to shut down), the screen goes grey (finder desktop image disappears). The mouse cursor hangs around for 15-20 seconds (and can still be moved), then it disappears and screen stays grey for another 10-15 seconds. Once screen went black, I rebooted right away and that logged the BOOT_TIME message shortly thereafter. So it's basically taking about 30 seconds or so to shutdown after it's apparently already shut everything down, and presumably that "halt" message means the kernel has already unmounted everything, turned off swap, etc, etc and now it's actually halting.

[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: hughescr on Apr 08, '13 05:50:58PM
Digging around in Console.app, I found com.apple.launchd logs, including launchd-shutdown.system.log which has some interesting lines in it like:

20008301 com.apple.launchd                1        com.apple.launchd        1         System: Userspace shutdown finished at: Mon Apr  8 17:36:57 2013
20008307 com.apple.launchd                1        com.apple.launchd        1         System: Userspace shutdown took approximately 20 seconds.
and a bit before that:

20008122 com.apple.launchd                1        com.apple.coreservices.appleevents 96        Dispatching kevent callback.
20008125 com.apple.launchd                1        com.apple.coreservices.appleevents 96        EVFILT_PROC event for job.
20008127 com.apple.launchd                1        com.apple.coreservices.appleevents 96        Reaping
20008150 com.apple.launchd                1        com.apple.coreservices.appleevents 96        Exited 20.001060 seconds after the first signal was sent
20008157 com.apple.launchd                1        com.apple.coreservices.appleevents 0         Exited while shutdown in progress. Processes remaining: 0/1
20008170 com.apple.launchd                1        com.apple.coreservices.appleevents 0         Job was last to exit during shutdown of: System.
20008173 com.apple.launchd                1        com.apple.coreservices.appleevents 0         Job is useless. Removing.
20008176 com.apple.launchd                1        com.apple.coreservices.appleevents 0         Closing receive right for com.apple.coreservices.appleevents
20008183 com.apple.launchd                1        com.apple.coreservices.appleevents 0         Mach service deleted: com.apple.coreservices.appleevents
20008188 com.apple.launchd                1        com.apple.coreservices.appleevents 0         Removed
I'll dig around there some more and see if I can figure out what exactly it is that's getting stuck for 20 seconds before timing out and allowing shutdown to proceed...

[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: hughescr on Apr 08, '13 05:59:07PM
Some googling of messages in the launchd shutdown log like "Exit timeout elapsed (20 seconds). Killing" led me to this thread which seems to be on point.

[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: baltwo on Apr 08, '13 05:57:05PM

The solution, if the option is checked, is for Apple to program the OS so it maintains a current state and, when it shuts down, use that. The issue is that the OS is crippled and has to do all that saved state stuff during the shutdown. incidentally, that's what also extends the boot time, along with fscking all mounted volumes from what it is when booting Snow Leopard.



[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: ebow on Apr 09, '13 05:49:43AM

Are you sure that's how it works? Early on with Lion, the computer hung in the middle of doing something, rebooted, and brought me right back to where I was. It was a one-time thing, though, so it may not reflect the way it typically works.



[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: baltwo on Apr 09, '13 12:49:07PM

I know nothing to the contrary. Booting into Lion or ML is painfully slow (a minute or two); whereas, booting into SL takes less than 25 seconds on my 27" i7 iMac w/12 GB RAM.



[ Reply to This | # ]
10.8: A fix for slow shutdown times
Authored by: benwiggy on Apr 09, '13 01:23:38AM
I've seen the following Terminal commands cited as fixing the problem. However, I don't know what side-effects there may be.

sudo defaults write /System/Library/LaunchDaemons/com.apple.coreservices.appleevents ExitTimeOut -int 1

sudo defaults write /System/Library/LaunchDaemons/com.apple.securityd ExitTimeOut -int 1

sudo defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder ExitTimeOut -int 1

sudo defaults write /System/Library/LaunchDaemons/com.apple.diskarbitrationd ExitTimeOut -int 1

sudo defaults write /System/Library/LaunchAgents/com.apple.coreservices.appleid.authentication ExitTimeOut -int 1



[ Reply to This | # ]