Recover from a stuck screen after log in

Jul 29, '09 07:30:01AM

Contributed by: Anonymous

Playing with Skype and iChat, my Mac froze and I had to force shut down. At the login window prompt, I typed my username and password and pressed Enter as usual, yet only the Time Machine Desktop screen (the one with the galaxy-like picture and stars of Mac OS X 10.5 Leopard) showed. It stayed like that forever. Eventually I found that pressing Command-Option-Esc and waiting some 30 seconds returned me to the login screen. From there, the story repeats.

Yet that was handy to reboot or shut down without forcing shut down. Repairing disk and permissions, running DiskWarrior, resetting PRAM, etc. did not help. I even trashed the preferences for Finder, Desktop and Dock. Even replaced the full Library and Desktop folders inside the user account suffering the issue from the latest Time Machine backup. Resetting the login password (after booting from the Mac OS X DVD) did not help either. The issue remained, but amazingly only on the standard booting account, but not on another extra account created for troubleshooting. In such a case, the Mac booted fine. Weird!

Logging in with the troubleshooting account, I found that right at the time of the failed login from the standard account, Console said something about Keychain. Indeed, some caches were corrupt, but Cocktail could not fix them.

Here's how I fixed the problem...

  1. Cold boot or reboot, and after the booting chime, press Command-S to enter single-user mode (command line interface).
  2. Wait until the prompt shows, then type the following line and press the Return key.
    /sbin/fsck -fy
    Make sure to type the line exactly as shown -- you're running as the root user, and any mistakes may cause big problems. This repairs disk permissions. Run it until you see a message stating that no problems were found.
  3. Type and the following lines, pressing Return after each, and making sure to type them exactly as shown.
    $ /sbin/mount -uw /
    $ cd /Library/Preferences
    $ rm com.apple.loginwindow.plist
    $ rm com.apple.windowserver.plist
    $ cd /Library/Caches
    $ rm -r *
    $ cd /System/Library
    $ rm Extensions.mkext
    $ cd /System/Library/Caches
    $ rm -r *
    $ reboot
Amazingly, the Mac should reboot and login now like a charm. Once rebooted, run Disk Utility and repair permissions on the boot disk.

Note: the single-user mode used here defaults to the USA keyboard. To type properly using non-USA keyboards, go to System Preferences » » International » Input Menu and make sure that Show the Input Menu in Menu Bar is ticked (the keyboard language flag should show on the main Finder menu).

Use said menu and an application like KeyViewer to find the appropriate keys to type the codes above. For instance, on the 'Spanish ISO' Apple Pro keyboard: [robg adds: I haven't tested this one. Note that we've run separate hints on the past about removing the windowserver.plist and deleting the Extensions.mkext file to solve other problems.]

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20090729055230625