I had this problem when I’m trying to connect my Macbook Pro to an external monitor or projector: the Macbook wouldn’t recognise the new device until I issued a restart while connected. The fact that I had to do that gave some Windows fanboys the perfect opportunity to make fun of me and tell me that Macs don’t “just work”.
To avoid having this conversation in the future, I did some research, and, as it turns out, this problem is caused by the fact that the Macbook has two GPUs and switches dynamically between them to preserve battery life and the problem is caused by the batery friendly integrated GPU. Luckily I have found an app – gfx.io – that allows me to pick which GPU I want to use. If you’re experiencing the same problem, just install the app and select the “discrete” setting and the external projector / monitor will work as expected.