Lion hangs on shutdown or restart.

Discussion in 'Mac OS X Lion (10.7)' started by JP123, Jan 2, 2012.

  1. JP123 macrumors newbie

    Aug 13, 2011
    Hey guys,

    I have the latest model 13" i7 Air with 10.7.2

    Every time I want to shut down/restart, all apps close, the screen will go white with the tile spinning wheel and proceed to do absolutely nothing.
    It seems to happen when I have multiple apps open and the "reopen windows" box selected and try to shutdown/restart etc.

    I tried a search and thought I would find something... sorry if this has been addressed previously.

    Thanks for your help.
  2. MarkMS macrumors 6502a

    Aug 30, 2006
    How long do you let the spinning wheel spin for? If you don't let it spin for a few minutes, there might be an app that's still making connections or is crashing when it's forced to quit because of a restart/shutdown.

    I've had this happen a few times. Most resolved by letting the wheel spin for two minutes or so until it fully closed all the apps. Then I'd perform the whole process again with the same apps. I'd restart again and it would go faster the second time.
  3. JP123 thread starter macrumors newbie

    Aug 13, 2011
    Thanks for the reply.

    I've let it spin for ages and nothing ever happens. Dead.
    Once I shut it down, walked away and forgot about it. 30 mins later and the wheel was still spinning.

    If I close all the programs myself and un check the "reopen" button it shuts immediately. If I do the same and the "reopen" button is checked (which it is by default) it hangs.

    When I have multiple apps open it's only Safari, Mail & iTunes. Nothing out of the ordinary and no fan control apps running etc.

  4. tug macrumors 6502

    Feb 3, 2010
    loughborough. u.k.
    do you have any third party apps running?

    reason for asking is that i had a similar thing happen, i had an app running, candy bar i think, anyway i hadn't updated it to run with lion, causing it to not shut down properly.

    after updating the problem went away.
  5. JP123 thread starter macrumors newbie

    Aug 13, 2011
    Thanks for the reply Tug.

    I don't believe there is any third party apps running.

    I boot the machine
    Open Safari, Mail, Itunes (or something similar)
    Then if I manually close these same apps and un-check the "reopen" tab on shutdown it's fine
    If I shutdown/restart and let the computer close them it hangs.



    If the computer is left on for a longer period of time (overnight) it hangs not matter what I do.

  6. tug macrumors 6502

    Feb 3, 2010
    loughborough. u.k.
    i still think one of your apps needs updating. your problem is so like the one i had.

    have you tried just running one app at a time then see if the problem persists.

    this way it will eliminate the good ones from the bad.
  7. JP123 thread starter macrumors newbie

    Aug 13, 2011

    Thanks tug,
    iTunes seems to be the culprit... where to from here?
  8. tug macrumors 6502

    Feb 3, 2010
    loughborough. u.k.
    which iTunes have you got? the latest update is 10.5.2.
  9. JP123 thread starter macrumors newbie

    Aug 13, 2011
  10. tug macrumors 6502

    Feb 3, 2010
    loughborough. u.k.
    hmmm, at this point my similar problem was resolved.
    you say that iTunes is the app that causes the prob. i wonder if there is something running within iTunes like say a download/purchase or even an album that refuses to quit.

    at this point I admit i would be a little lost in the same way as yourself.
  11. JP123 thread starter macrumors newbie

    Aug 13, 2011
    Thanks for your efforts tug.

    Anytime I open itunes, it will hang on shut/restart. Even if I close it myself!

    Anyone have ideas of where I can go from here?

  12. Soulstorm macrumors 68000


    Feb 1, 2005
    Have you run maintenance tools? Repaired permissions? If not, repair permissions and then run Onyx for advanced maintenance tools. If this fails, reset your PRAM. If the problem persists, then there might be a daemon running in the background that prevents your computer from shutting down.

    So, if all else fails, please report back with a list of the contents of your /System/Library/LaunchAgents, /System/Library/LaunchDaemons, ~/System/Library/LaunchAgents and ~/System/Library/LaunchDaemons .
  13. xgman macrumors 601


    Aug 6, 2007
    Turn off all your login items etc (places noted in post above) and add them back one at a time to see what is causing this.
  14. JP123 thread starter macrumors newbie

    Aug 13, 2011
    HD/Library/LaunchAgents =

    HD/Library/LaunchDaemons =

    HD/System/Library/LaunchAgents =

    HD/System/Library/LaunchDaemons =

    Is that what you were after MarkMS?
    I appreciate your help.

    I have reset PRAM and performed repair permissions and no help.

    If I boot the computer and open and then close iTunes and try a restart it will hang all the time. I believe it did it when I opened Parallels as well but am not 100%.

    If I don't open iTunes it seems fine but we are talking in the span of less than 5 minutes and not a full working day.



    Thanks xgman.

    I could remove the Daemons but now the OS won't let me. If I try and drag them out it only performs a copy and not remove whereas previously say 2 weeks ago when I tried to test this theory it would let me remove them from the original folders...

    Is this a setting error on my part perhaps?

  15. Soulstorm macrumors 68000


    Feb 1, 2005
    OK, let's see if this has anything to do with Launch Thingies... :)

    On LaunchAgents and LaunchDaemons, in the same folder (NOT inside it, but next to it) create a folder called "LaunchAgents (disabled)". Same goes for LaunchDaemons. Do it for every folder like that. Drag everything non-apple inside. Especially things like Amavis, Parallels, and Adobe. The OS may ask you for your user name and password while creating the folders or copying files.

    You got that right that you can't move the files, as they are automatically copied when messing with things that are owned by the OS. So, just copy them to their respective folders (that you just created) and then delete them from the original location. Mac OS X will ask you for your password while deleting the files.

    Do this for every folder you mentioned in your post, on both the System libraries and in your User Library.

    You need to restart for the changes to take effect. So when you shut down immediately after moving the files, you may still have a problem, that's normal. After you restart once, attempt to shut down the computer to see if problems persist.

    Note that since you are moving stuff like Parallels Launch Daemons out of the way, you may be unable to run certain programs like Parallels, so don't be afraid. When you spot the problem, you can move the files that are OK inside their previews folders again.
  16. tobychur macrumors newbie

    Jan 15, 2012
    Ive got this problem, (running iToons causes Lion to hang at the the last stage of shutdown).
    Did you arrive at a solution?
  17. JP123 thread starter macrumors newbie

    Aug 13, 2011
    No not yet Toby.

    As you can see a couple of guys have been very helpful tho.

    @ Soulstorm, thanks for your help mate.

    I've moved the LaunchAgents & Daemons out and rebooted.
    Then shutdown no prob....

    Rebooted and opened iTunes, closed iTunes, tried to restart and it hung.

    It really does seem to revolve around iTunes.
    I now have another iTunes issue on the mac pro where the volume auto mutes.

  18. Soulstorm macrumors 68000


    Feb 1, 2005
    First things first, let's look at the problem with iTunes.

    Open your computer. Make sure every external accessory is disconnected from the computer, no matter what accessory that is. Then open iTunes. Close iTunes. Then, before you restart your computer, open 'Activity Monitor'. It resides in /Applications/Utilities. On the top right tab, change the value to "All Processes". Search in the text field for 'iTunes' and see if you see any component of iTunes that is still running in the background (like iTunesHelper or something similar). Look for anything suspicious surrounding iTunes overall. If you do find anything suspicious, kill it with the red button on the top of the window. Then restart.

    If the problem persists, post back here. We will try to reinstall iTunes from fresh, while keeping a backup of your iTunes library, as we will be deleting that, too! (this program is intended for ages 17+, so don't let your kid watch this! :) )
  19. mjtant macrumors newbie

    Jan 17, 2012

    I have had exactly the same problem with my Macbook Pro and have spent hours talking to Applecare with no resolution. I have tried everything including erasing the disk and reinstalling Lion and it still happens! I think that it has something to do with items in the iTunes library that haven't been purchased from iTunes Store affecting the preferences (I don't really know what I am talking about!) as deleting the iTunes plists temporarily resolves the issue until you start playing tracks again!

    I know this is no help at all but at least you know you are not alone.
  20. Soulstorm macrumors 68000


    Feb 1, 2005
    I don't think it has anything to do with purchased items. My father had this problem and he overcame it by installing the latest snow leopard Combo update. There is also one for Lion. Not the incremental one. You can also try this and see what happens.

    Reinstalling your system won't help, as long as you transfer via Time Machine your old data from your old installation of iTunes.

    If that doesn't help, I will guide you on how to completely reinstall iTunes Library and Preferences and have 'virgin' iTunes components, and then we'll see what happens.
  21. mjtant macrumors newbie

    Jan 17, 2012

    Thanks for the reply, I did also reinstall everything from scratch, not a back up, but as soon as I added any none-itunes stuff to the library and played it the same issue happened.
  22. dknightd macrumors 6502

    Mar 7, 2004
    My guess is that you are using a third party iTunes addon, or plugin, that lion does not like.

    Do you have anything in ~/library/iTunes/iTunes Plug-ins
  23. johnhurley macrumors 6502a


    Aug 29, 2011
    Pretty much same config as me ... it seems like you have it pinned down to something iTunes related.

    Are you using iCloud perhaps? ( I am staying well away from that ).
  24. JP123 thread starter macrumors newbie

    Aug 13, 2011
    Hi mate, how is Athens today?:)

    Well there was an iTunes helper still running, killed it and it still hung.
    I tried that twice.

    This was in the iTunes plug-ins folder:
    Quartz Composer Visualizer.bundle

    back at you again:)


    got this in there:
    Quartz Composer Visualizer.bundle

    Any help?
  25. tobychur macrumors newbie

    Jan 15, 2012
    iTunes Helper was still running, so I deleted it at /Applications/ Package Contents/Contents/MacOS/
    That didn't help.

    OK, all my toons are backed up, let's do the virgin thing.
    Let me guess, you want me to trash every single Spotlight occurrence of iTunes (including invisible), and re-install iTunes (from Apple website???).

    When trashing, I can't empty my Trash (too much useful stuff in there). I assume I will want to put it 'beyond the reach' of the OS, so I created a folder called iTunesX and trashed it.
    When full of junk iTunes stuff, Get Info > Lock the folder! Probably unnecessary, but Lion is an unusual animal ...

    I'm ready, let's get started.

Share This Page