Tuesday, 1 April 2008

Slow shutdown with Leopard - Possible Solution?

I was just playing around with this again and remembered that in the past, having external drives connected could cause the computer to shutdown slowly, one of the things that didnt occur to me until now though, was that my Windows Bootcamp partition may be an external drive of sorts, or at the least, may be affecting the shutdown cycle.

So I ejected it and then tried shutting down. The computer now shuts off in 15 seconds or less as opposed to almost a minute before, it still doesnt seem as fast as a new install of Leopard but its definitely a big improvement.

The question now though is why or what is it doing with the Windows partition before it shuts down? It also possibly invalidates the earlier line of research I was following with the menu applets, so clearly I need to look into this some more but its the first definite improvement I have seen.

If you try this and it improves your shutdown speed please let me know, it will be interesting to compare.


Bob said...

This slowdown thing just started happening to my MacBook a couple of weeks ago, but given the solution (so far so good) it should have started happening a long time ago.

sudo pmset -a hibernatemode 0
sudo nvram "use-nvramrc?"=false
sudo rm /private/var/vm/sleepimage

I travel a lot and am constantly (and have been for a long time) changing between sleep only, hibernate only, sleep & hibernate, etc. using these kinds of commands (from a macosxhints.com entry). I think there is something wrong with hibernate. The into and outof of hibernate speeds vary a lot from about 10 seconds to over 30. I just tuned it all off on a whim last night and now I have shutdown times of right around 10 seconds, instead of about 1 minute.


Andrew Proudlove said...

Hi Bob,
Thanks for the comment, thats really useful and I will give it a try.
Have you heard about a utility called smartsleep? I wrote about it earlier in my blog but it may also be useful for you base don the fact that you travel a lot.

Thanks again for the info - will give it a try now

Bob said...

I didn't notice smartsleep. Thanks!

Well...this "fix" kinda works. When I went home last night (after several successful shutdowns while at the office -- just to see it do it quickly :)) it took about 30-40 seconds to shutdown at home, but not anywhere near a minute. Rats. Now I'm wondering if it has something to do with Airport (maybe an also, because hibernate is definitely flakey). When I shut it down with Airport on it took a long time. When I started it back up, turned off Airport and then shut it down it shut down quickly again. At work I use a network cable, so usually have Airport turned off. I only tried it that once.

Andrew Proudlove said...

Good point, I confess I havent tried disabling the airport connection either.

Unfortunately for me, smartsleep also worked quite well the first couple of times but then the shutdown was slow as ever but I cant remember if I had airport on or not.

Just closing the lid of the mbp for it to sleep though has always been a big improvement since I installed smartsleep as its not paging out the contents of ram (4gb) every time now.

I also tried your suggestion and my mbp shutdown really, really quickly, so now Im trying to understand what the correlation is between that and the windows drive as unmounting that also makes it shutdown quickly.

Ill post your tips up on the main blog though as I think its useful info for others too.