If your Mac doesn’t work with external monitors with the lid closed, the fix is deceptively simple, even though it’s maddening.
Check your power connector. A Macbook or other portable Mac won’t work in closed-display mode without AC power.
Make your Mac work in closed-display mode again
I run into this problem any time I travel for work, then set my company’s Macbook back up again. The computer just refuses to recognize the external monitors unless I keep the lid open. I don’t want that because it takes up too much room.
The requirements for closed-display mode are one or two monitors, a USB keyboard and a USB mouse plugged in, and AC power. Inevitably what happens is that when I’m plugging those cables in, I knock out the power connector because the video, USB and power connectors are so close together. I want to plug the power in first so the battery starts charging, then work forward toward the front of the machine. That’s easiest. Until I bump the power connector, which has a breakaway magnetic connection. The breakaway connector prevents an expensive repair if you bump the machine hard, but it’s also much more prone to this freak occurrence.
Getting into the habit of plugging the power in last, or at least checking the power connection after plugging everything else back in, will prevent the issue.
If the connection is good on the computer side but you don’t see a green or amber LED, check the wall connection. I know it sounds obvious, but everyone’s made that mistake at least once too. And that’s the fix when your Mac doesn’t work with external monitors with the lid closed.
And on a related note, I have a tip for when a Mac gets stuck on its lock screen.