Interested how Laravel works under the hood? → Check my Laravel Core Adventures Course

My External Display Turns Black When The Lid Of My MacBook Is Closed

#mac

For years now, I've been using my MacBook with the lid closed. That's my preferred setup, where I only focus on one external display. Two months ago, my external display stopped working when I closed the lid of my MacBook. Here is how I solved this issue.

It turns out I'm not the only one facing this or a similar issue. That's why I want to share everything I know about this one with you.

The Issue

Usually, If you close the lid of your MacBook, your connected, external display becomes the main display. Therefore, if you face the mentioned issue, the external display will turn black the moment you close the lid of your MacBook.

For me, this problem came out of nowhere, and I can't remember loading any OS updates or seeing any errors. However, you can read about others facing the same situation or a similar one on different online forums.

Things To Check

So before I tell you about what helped me, here are a few things for you to check first:

  • Are you running the latest version of macOS? If you do not, update your system.
  • Is the display directly connected to your MacBook? If not, try it.
  • Try to connect the display to a different port on your MacBook.
  • Do you have a different external display that you can try as well? If yes, try that.
  • Do you have a different MacBook that you can try with your display? If yes, try that.
  • Start your Mac in Safe-Mode and check if the issue remains
  • Start your Mac in Recovery-Mode and check if the issue remains. The list showing the recovery options is enough; you don't have to load any backups.

What Fixed It For Me

I can only speak for my case, but I could fix it after spending over an hour with Apple Support. In Safe-Mode, my display was still not working. But in Recovery-Mode (the list showing the recovery options), the display suddenly worked. This was finally a good sign.

Note: Please be aware that I only share what helped me. There is no guarantee it will work for you, and you are responsible if you break something.

Apple Support then told me to:

  • Unplug my external display
  • Delete /Library/Preferences/com.apple.windowserver.plist
  • Delete ~/Library/Preferences/ByHost/com.apple.windowserver.XXXXX.plist
  • Restart

After that, my external display was finally working again, even with the lid of my MacBook closed.

Context

From what I learned, those two files are responsible for window management on your machine. Somehow, there must have been an error, and that is why I was facing the issue. When you delete those files, your Mac will create them from scratch after a reboot. That's what solved the case for me. Hooray!

Do you enjoy my posts?

Sign up for my newsletter to receive updates on my latest content.

You will receive monthly updates on my latest articles and products. I do care about the protection of your data. Read my Privacy Policy.