Why does secondary screen turns black when selecting "Mirror Display" I have a MacBook Retina.

Whenever I attach a secondary screen, projector or monitor and select the "Mirror Displays" option, the secondary screen turns all black.

It does not matter what connection I use. I've tried the following, and they all have problems:


MiniDisplay port to a Cinema Display
HDMI to HDTV
MiniDisplay -> VGA/DVI converter -> projector


It does not matter what resolution I use.

It all started after connecting it to a projector, where all other presenters using PC was having similar problems.
I solved the problem by resetting NVRAM / PRAM:


Shut down your Mac.
Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
Turn on the computer.
Press and hold the Command-Option-P-R keys before the gray screen
appears.
Hold the keys down until the computer restarts and you hear the startup sound for the second time.
Release the keys.