Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

metamatic

macrumors newbie
Jun 25, 2013
2
0
Thanks for your efforts, but unfortunately it doesn't work for me.
I'm on a Retina MBPro with 10.8.4 and it still takes about 20 seconds to shutdown.
 

3rd Rock

macrumors 6502
Aug 10, 2012
459
1
Over here
Shutdown issue seems to be fixed - I'm not kidding. Please note that with the small exception of one year, Apple's fix for this issue came ahead of schedule.

Just to be clear, are you saying the 10.8.5 beta fixed the shut down issue or did the OP's app fix it ? Thanks
 

Ddyracer

macrumors 68000
Nov 24, 2009
1,786
31
Shutdown issue seems to be fixed - I'm not kidding. Please note that with the small exception of one year, Apple's fix for this issue came ahead of schedule.

What about booting up and waking from sleep and login? is that faster too?
 

53kyle

macrumors 65816
Original poster
Mar 27, 2012
1,282
111
Sebastopol, CA
What about booting up and waking from sleep and login? is that faster too?

From what I have experienced, and at least in my case, my MBP logged in really slowly on mountain lion but in mavericks it is much faster now. Waking from sleep is instant now too. I assume 10.8.5 is like that too.
 

ultraspiracle

macrumors member
Sep 21, 2012
93
4
Booting is just as fast in 10.8.5. Waking from sleep is not a problem on machines I've seen, but what I have noticed is that it takes longer for 10.8.5 to turn on an external display after waking from sleep than 10.8.4. Mavericks 10.9 beta2 is exactly the same in this regard...

Maybe they use the same graphics drivers for Nvidia 650?

Overall, no complains about 10.8.5 beta2. But Mavericks will be awesome once the bugs are sorted. I'm actually considering using Safari as the default browser, if only there was a really foolproof way to sync bookmarks between it and Chrome.
 

ultraspiracle

macrumors member
Sep 21, 2012
93
4
Slow shutdown returns in 12f20

10.8.5 12f20 is just as bad as the first beta, which makes me think it was something unique to the system under examination. Sorry fellas. Let's carry on with the investigation. I'm doing a ton of troubleshooting with per user and app settings and will post the results here (and I'll have someone file a bug report - which will probably be closed as a duplicate.):mad:
 

ZBoater

macrumors G3
Jul 2, 2007
8,498
1,325
Sunny Florida
I threw together an app that should fix 20-30 second shutdown times. Feedback is appreciated, here it is:

https://www.dropbox.com/s/54k6yodqgdfp1i6/OS X Shutdown Fix.dmg

Important: go to system preferences > security & privacy > turn on downloads from anywhere

Tip: also disable internet sharing, that slows down shutdown time a lot.

UPDATE 6/11: Download the new version using the above link. It takes longer but it will at least work now and may speed up your entire system!

UPDATE 7/4: Download version 1.2 using the link above. There is a new button for if you decide that you want to wait to shut down your mac :p

Thank you. I ran this on my 2013 MBA with OS X 10.8.4 and it worked. I was getting 20-30 second shutdowns, and now it is less than 5.

A couple of comments,

When I ran the app, the progress bar hung about 75% of the way through, and I thought it had locked up. I was patient and it completed, but I was worried there for a minute.

After it was done, the app did not close. I think it tried to do a reboot of my machine but it failed. I had to force quit it and reboot manually. That first shutdown was long, so I was thinking the app had failed.

After I restarted, I repaired and verified the disk. Just in case.

From then on out, the shut down is quick (I use the CleanShutdown little app).

Thank you.
 

larry918

macrumors regular
Jun 29, 2013
128
0
OP, you are amazing! I was having 30+ sec shutdowns before, now I can shut down in less than 3 seconds :D Thank you so much :)
 

crjackson2134

macrumors 601
Mar 6, 2013
4,847
1,957
Charlotte, NC
Okay, I like to be very cautious about modifying OS system defaults so could you answer a question for me?

Are there any circumstances where your final solution would cause problems (i.e. data corruption)? For instance, I have an operation running in the background that's performing disk I/O, and I forget about it and click shutdown. I know this could potentially cause problems regardless of settings, but would it be a substantially greater risk if using this fast shutdown solution?

As a side note, I have similar slow shutdown issues running under Linux on various machines and I also wrote a modified shutdown script for near instant shutdowns and it works very well there.

My current 10.8.4. Shutdowns take 11 seconds. I don't really have a need to enhance from there, but 3 seconds would be much snappier.
 

53kyle

macrumors 65816
Original poster
Mar 27, 2012
1,282
111
Sebastopol, CA
Okay, I like to be very cautious about modifying OS system defaults so could you answer a question for me?

Are there any circumstances where your final solution would cause problems (i.e. data corruption)? For instance, I have an operation running in the background that's performing disk I/O, and I forget about it and click shutdown. I know this could potentially cause problems regardless of settings, but would it be a substantially greater risk if using this fast shutdown solution?

As a side note, I have similar slow shutdown issues running under Linux on various machines and I also wrote a modified shutdown script for near instant shutdowns and it works very well there.

My current 10.8.4. Shutdowns take 11 seconds. I don't really have a need to enhance from there, but 3 seconds would be much snappier.

The commands that speed up the shutdown only terminate the same processes that already would have been after the normal 20 seconds, so there won't be any problems :)
 

Ddyracer

macrumors 68000
Nov 24, 2009
1,786
31
your little app seems to hang, i can't get it to work, have to force quit it every time.
 

Mike MA

macrumors 68020
Sep 21, 2012
2,090
1,813
Germany
I threw together an app that should fix 20-30 second shutdown times.

I use the method below for a faster 3 to 4 second shutdown

I was heavily involved in this topic from November last year until April/May this year including providing logs to Apple after been asked for. After some disappointing ML updates (basically 10.8.1 - 10.8.3 if I remember correctly) and no improvements at all I decided to just don't care anymore.

But from 10.8.4 on the slow shutdowns are gone for what reason ever and my SSD Macbook Air returned to approximately 1,0 - 1,5 seconds with applications closed beforehand.

So my basic question here, is the issue still around? On my wife's laptop it also disappeared. One difference might be that we changed the router and now use Apple's Time Capsule, which might be the cause as most pending processes during the slow shutdown were network related.
 

Risco

macrumors 68000
Jul 22, 2010
1,956
313
United Kingdom
Shutdown is certainly pretty instant now on my SSD! I am a little concerned that it is too quick! Could you add options for fast, medium and default? I would be more comfortable that the OS has completed all tasks with a slightly slower shutdown.
 

mag01

macrumors regular
Apr 10, 2011
150
47
about the permissions

"defaults" will change permissions of altered plist files to 600 (and will also change ownership to root if executed as root and the plist file isn't owned by root) which is undesirable in these cases (some system plist files with such permissions will "break" the OS a little).

It's better to use "PlistBuddy":

- adding the ExitTimeOut entry and setting it to 2s:
sudo /usr/libexec/PlistBuddy -c "Add :ExitTimeOut integer 2" /System/Library/LaunchDaemons/com.apple.securityd.plist

- setting the already existing ExitTimeOut entry to 2s:
sudo /usr/libexec/PlistBuddy -c "Set :ExitTimeOut 2" /System/Library/LaunchDaemons/com.apple.securityd.plist

- deleting the ExitTimeOut entry:
sudo /usr/libexec/PlistBuddy -c "Delete :ExitTimeOut" /System/Library/LaunchDaemons/com.apple.securityd.plist

So when doing it this way, no "repair permissions" task should need to be performed afterwards.
 

Risco

macrumors 68000
Jul 22, 2010
1,956
313
United Kingdom
"defaults" will change permissions of altered plist files to 600 (and will also change ownership to root if executed as root and the plist file isn't owned by root) which is undesirable in these cases (some system plist files with such permissions will "break" the OS a little).

It's better to use "PlistBuddy":

- adding the ExitTimeOut entry and setting it to 2s:
sudo /usr/libexec/PlistBuddy -c "Add :ExitTimeOut integer 2" /System/Library/LaunchDaemons/com.apple.securityd.plist

- setting the already existing ExitTimeOut entry to 2s:
sudo /usr/libexec/PlistBuddy -c "Set :ExitTimeOut 2" /System/Library/LaunchDaemons/com.apple.securityd.plist

- deleting the ExitTimeOut entry:
sudo /usr/libexec/PlistBuddy -c "Delete :ExitTimeOut" /System/Library/LaunchDaemons/com.apple.securityd.plist

So when doing it this way, no "repair permissions" task should need to be performed afterwards.

Ok well how do I set these back to defaults?
 

mag01

macrumors regular
Apr 10, 2011
150
47
To return to default state just use the last (Delete) command to delete the ExitTimeOut entry - it doesn't exist by default (which means the time out is effectively 20s).
 

Risco

macrumors 68000
Jul 22, 2010
1,956
313
United Kingdom
To return to default state just use the last (Delete) command to delete the ExitTimeOut entry - it doesn't exist by default (which means the time out is effectively 20s).

Sorry I should clarify, how do I rest the permissions after running the app at the beginning of the thread?
 

mag01

macrumors regular
Apr 10, 2011
150
47
Repair permissions task should be one option, but it's quite lengthy.

Quick fix is to look at the other system plist files located in the same directories (/System/Library/LaunchAgents/ and /System/Library/LaunchDaemons/) and set those you modified to the same permissions (and perhaps ownership - but that might not be needed).
For example terminal command "stat" could be your friend to check ownership and permissions. Or simple "ls".
stat will display permissions in numeric/symbolic format, ls in symbolic.

stat -x /System/Library/LaunchAgents/com.apple.pbs.plist
ls -l /System/Library/LaunchAgents/com.apple.pbs.plist

And you'll most likely get:
0644/-rw--r--r-- - permissions
root wheel - ownership

So then set permissions (and ownership if needed) of those altered plist files to the same:

sudo chmod 0644 /System/Library/LaunchDaemons/com.apple.securityd.plist
(or symbolic alternative: sudo chmod u=rw,go=r /System/Library/LaunchDaemons/com.apple.securityd.plist)
sudo chown root:wheel /System/Library/LaunchDaemons/com.apple.securityd.plist

(I wrote a little longer description in attempt to explain things a little so that you can perhaps learn something useful from it ;-) )
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.