I use my MacBook at work and at home. Whenever I switch between work and home, every now and again I get bug whereby the Mac thinks an external monitor is still plugged in, even if it's not.

This means when I go to plug in either my work or home monitors, one of them doesn't work as OS X still thinks there is a different monitor plugged in.

The only way I've been able to fix this is to restart, but I was hoping there was a quick way to fix this through a terminal command or something.

Note that System Preferences > Displays > Option + Detect Displays does not work.

  • 1
    The same thing keeps happening to me. In my case, I use a MBP and an HP thunderbolt display. I haven't been able to confirm, but I think, that I can reproduce this by either A) quickly closing the lid and unplugging the laptop (from power, the external display, and usb hub), or B) -- the inverse -- unplugging the laptop and quickly closing the lid. – sanscore Aug 8 '16 at 16:05
  • My suspicion is that OS X, in either case, it starts a coroutine to go from two displays to one, but when the power supply is cut off and the lid is closed, then it is forced into hibernation and interrupting display reconfiguration routine. (I, accidentally, submitted my comment prematurely and I've missed the edit window.) – sanscore Aug 8 '16 at 16:13

Go into System Preferences->Displays and when there (doesn't matter which tab) press the 'Option/ALT' key and you'll see 'Detect Displays' where the 'Gather Windows' button is (on 10.13.x) or simply in the lower right on 10.14.x (as this page doesn't have a 'Gather Windows' button.)

  • 4
    This is exactly what the OP said he/she already tried, without success. – radiaph Jan 8 '20 at 15:37
  • Goops! Missed that in his last line! – Mark A. Donohoe Jan 8 '20 at 15:46
  • 1
    Ah a hidden feature! In my case clicking "Detect Displays" locked up the computer - mouse wouldn't move, nothing. Had to reboot 🤦‍♂️ There's something very flaky with the display support – Anentropic May 15 '20 at 11:07

Since at least OS X El Capitan (Version 11.x), you can force Detect Displays using Command-IncreaseBrightness (Cmd-F2 key on MacBook Pro, or Cmd-fn-F2 if you have function keys turned on).

I had a similar problem with my 13" MBP, where when I disconnected an external display it didn't detect that it should switch to the single, built-in display – regardless of whether the machine was already sleeping or the lid were quickly closed. Cmd-F2 worked for forcing the machine to detect that the only available display was the built-in one.

As a bonus, you can also toggle Display Mirroring using Cmd-DecreaseBrightness (Cmd-F1...). Hit it again to toggle back.

Hope this helps!

  • 1
    slight caveat: new macbook pro doesn't have an F2 button... – Axel Polleres Aug 4 '17 at 5:57
  • Yes, but it also works with Touch Bar icons. – Hrvoje Zlatar Mar 20 '18 at 7:48
  • 3
    Does not work with my Touch Bar icons, High Sierra 10.13.4. Sure, the FN keys are visible, but no combination of special keys and Touch Bar settings will allow me to invoke Detect Displays. However, using an external keyboard, everything works as expected. – ken Aug 6 '18 at 20:02
  • 1
    Is there a solution for this yet? Can't get cmd-f2 to work on 10.15.6 (16"mbp 2019). My MB thinks it's connected to the DELL (24" from the office, not the 34" LG it's actually connected to, resulting in 2 very big bars on either side of the screen). Rebooting fixed this in the past, but rebooting sucks, so i'd love a command line option. – BlkPengu Oct 3 '20 at 17:47

I'm so glad to have found this thread !

I have the same issue, and in fact with the exact same configuration BlkPengu has: a MacBook Pro 16" (2019) and an LG 34" widescreen. (A great combination, BTW.)

I deliver a lot of presentations and courses, connecting various projectors and screens to my MacBook. And back at home, not always but e.g. once in 3 to 4 times, the system still thinks the earlier display is still connected. My LG is also detected but at the resolution of the former !

The SwitchResX tool helped me discover that in such an instance, there are in fact THREE displays (falsely) being detected: the MacBook's built-in, an earlier connected display like a projector or presentation screen, and the physically connected LG, showing up as a 'ghost' display. So the system is strangely still aware of the recently connected projector with a certain resolution, while the LG is also detected but getting the signal and resolution of the assumed other external display.

Using the plain Display Preference panel (or with special option-invoked settings) won't work. Even the most drastic Rotate setting doesn't do the trick. The only solution is to completely Restart.

Below two samples of a settings panel in SwitchResX:

a 'ghost' EPSON Projector

a 'ghost' BenQ Projector

I expected that it might be possible to 'kick' the system's display sensing routine, but SwitchResX's developer Stépahne Madrau investigated the issue last week, and said this isn't something a user can fix with available tools or user-friendly hacks. It's definitely a system bug or flaw, which needs to be addressed by a system update.

With this information, I'm going to ask Apple what I need to do with this. I'll notify you all ASAP when I get some response.

  • This is not an answer, but it’s too big for a comment. I suspect it would be useful to edit the original question to add some of this detail. – WGroleau Mar 20 at 4:16
  • Thank you for the read on this @WGroleau I can see this helping people. I propose we let the editing and voting process work to sort and refine answers with differing opinions or strategies to approach a complex topic such as this. – bmike Mar 20 at 10:02
  • Thanks for chiming in :-) I'm a newbie here, and although I've tried to familiarize myself with the way how this platform works, I agree my 'answer' is nothing more than another (big) step in a lengthy discussion to find a proper solution for this problem... – Petertje Mar 21 at 21:34
  • I agree that it’s helpful, but it nevertheless does not answer the question. – WGroleau Mar 25 at 5:03

You must log in to answer this question.

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