MacBook – System Preferences hangs when trying to open Display settings with an external monitor connected

displaymacbook prosystem-prefsthunderbolt

I've searched all over for this, with no luck. So here goes:

My 2012 MacBook Pro has always played nice with my old Samsung monitor, connected with a Mini DisplayPort > VGA adapter plugged in to the Thunderbolt port. The Samsung monitor is rotated 270 degrees, and OS X has never had a problem with it.

For the last few months, System Preferences has hung every time I try to open Display preferences. The monitor still functions normally, and this hasn't been a problem.

Now I want to rearrange my monitor setup. The vertical monitor is now to the left of my laptop, but it behaves like it's to the right – because I can't change it, because Display settings hang.

I can open the settings perfectly fine when the display isn't connected – but that's fairly useless, as the arrangement tab doesn't show up.

I've tried clearing the settings with this command:

~ ยป defaults -currentHost delete com.apple.windowserver
2015-01-17 11:41:12.766 defaults[946:7994] 
Domain (com.apple.windowserver) not found.
Defaults have not been changed.

Upon a reboot, the problem remains.

Any ideas?

Best Answer

So I figured this out, kind of.

I cloned and built https://github.com/CdLbB/fb-rotate, and flipped the external monitor around a couple times with it. Suddenly everything works, even after a reboot.

The only thing I can think of is that a config file somewhere got corrupted, and this utility rewrote it and fixed it.

Either way, it works now!