Macos – Mac: window manager frozen, have ssh access

debugfreezemacososx lion

I have a Mac which regularly runs into a problem. The user interface stops reponding, showing a "frozen" user interface. The mouse is still moving but clicking does not trigger anything. This happens about once a week. Solution so far is to force switch-off the Mac and reboot it.

I have ssh root access to the Mac. Killing (kill -9) the active application has no visible impact on what is shown on the screen.

Any ideas on how to diagnose this?

Is there a way to restart the window manager from the ssh shell? Killing /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer seems not to be possible.

The Mac is an early 2008 iMac and runs Lion with latest updates. /Library/Logs/DiagnosticReports is empty.

Update:

Problem stays after update to Mountain Lion.

The WindowServer process is in "uninterruptible wait" state ("U" flag in ps output set):

imac:~ root# ps ax|awk "NR==1|| /WindowServer/"|grep -v awk
  PID   TT  STAT      TIME COMMAND
   86   ??  Us    50:51.69 /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer -daemon

Any idea for diagnosing what blocks the process?

Any idea for "waking up" the process?

Best Answer

Your log message seems barely related to the problem.

The command to restart the window server is the following, with HUP being a special signal. It's more or less equivalent to logging out from the graphical environment. Beware that all apps are quit immediately.

sudo killall -HUP WindowServer

Of course, this will only cure the symptoms, not the actual cause of the problem. I'd suggest to continue investigating logs of some sort, or trying with another user profile to see if the problem persists (if not, then simply migrate your profile to the new one).

Related Question