On Linux, I can get to a ssh or Ctrl-Alt-F1 console and type in a command to restart the window manager.

Is there any equivalent for Mac Mountain Lion?

I tried ssh'ing to a frozen Mac, and I could kill individual processes, but I could not unstuck the machine. Running the command sudo reboot killed my ssh ability, but did not restart the machine.

  • This is probably doable, but it really depends on what's causing the beachballing. Does it happen with any predictability? If you can figure out which process is causing the issue, then killing it should work, unless it's something pretty low-level, or a hardware issue (I had a hard drive that would periodically drop connection, causing an unrecoverable beach ball).
    – robmathers
    May 8, 2013 at 20:45
  • If sudo shutdown -r now fails to kill off the processes and cause a reboot, you will probably need to pull the power or hold the power button pressed to recover.
    – bmike
    May 8, 2013 at 20:58
  • Yep, I had to hold the power button down. "shutdown" only seemed to cut off ssh. The beach ball never stopped. May 8, 2013 at 22:11
  • → Justin: Are you running MacOS X 10.8.3?
    – dan
    May 10, 2013 at 13:58
  • Yes, 10.8.3, latest MBP Retina. May 10, 2013 at 17:58

2 Answers 2


To reply to your question: no there isn't such a function accessible at the window manager level. It is a good suggestion to forward to Apple MacOS X feedback

Is your Mac still up?


ping IP_of_my_mac

Can you access it with ssh?

Can you provide us a copy of the output of a:

top -o cpu


tail -20 /var/log/system.log

If the problem appears once more, could you try to kill the loginwindow like this: connect on your mad Mac with ssh

/usr/bin/sudo /bin/kill `ps ax | grep '[/]loginwindow' | awk '{print $1}'`

This uggly command:

ps ax | grep '[/]loginwindow' | awk '{print $1}'

is a trick to give you the process ID of the loginwindow process with no risk to kill the wrong guy. I'm not sure this will be enough to force a total free and reset of the GPU. Please tell me if this doesn't work so I could remove a useless and dangerous workaround.

  • Top didn't show anything. Here are some log messages: 5/8/13 10:01:16.000 AM kernel[0]: IOVendorGLContext::ReportGPURestart 5/8/13 10:01:16.000 AM kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = GR: SW Notify Error, 5/8/13 10:19:31.913 AM mdworker[62359]: Unable to talk to lsboxd May 8, 2013 at 22:16
  • It looks like you have a GPU hardware of driver problem. I advise you to make copies of these error messages and bring them to an AppleStore.
    – dan
    May 9, 2013 at 16:49
  • Now, no spinning beachball, but 2 more crashes: May 10 00:07:58 JustinMbp.local coreservicesd[29]: SendFlattenedData, got error #268435460 (ipc/send) timed out from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=237 May 10 00:08:08 JustinMbp kernel[0]: NVDA(OpenGL): Channel timeout! May 10 00:08:15 JustinMbp.local sshd[4051]: Accepted keyboard-interactive/pam for justin from port 42150 ssh2 May 10 00:08:15 JustinMbp.local sshd[4051]: USER_PROCESS: 4054 ttys017 May 10 00:08:28 JustinMbp kernel[0]: NVDA(OpenGL): Channel timeout! May 10, 2013 at 10:12
  • May 10 00:08:36 JustinMbp.local fseventsd[43]: SLOWDOWN: client 0x7fb57401a800 (pid 2254) sleeping due to too many errors (num usleeps 11) May 10, 2013 at 10:13
  • Running the last command to kill the login proces results in the plain cursor turning into a spinning beach ball. May 10, 2013 at 10:15

I use this in a shell script called restart-graphical.sh


sudo killall -HUP WindowServer

exit 0

This will NOT give you a chance to save anything.

Note that I have run into a situation where nothing will help except the power plug. This is often when a USB or FireWire device has caused an incurable hang.

  • I'm not sure what advantage this would be over the power switch? Avoid any disk errors maybe? May 10, 2013 at 5:22
  • I tried this and the spinning beach ball disappeared, but nothing else happened. May 10, 2013 at 10:17
  • The advantage is that you can try it in situations when you don't have access to the power switch. And if you can get to the login screen (which is what should happen when you run it) you may be able to do a clean reboot.
    – TJ Luoma
    May 10, 2013 at 16:15
  • No login screen appeared. I had to use the power switch. May 10, 2013 at 17:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .