I have a Displayport<-->DVI adapter and that thing never works as intended.
Sometimes it won't detect the screen, so I have to unplug and plug it back again. If the screen is off the Macbook thinks there's still a second screen...
I'm tempted to build a little Arduino thing that measures the current to see if it's active and power cycle it. I ended up plugging it into a little USB extension cable so that I could easily plus and unplug it to reset it -- most of the time this will fix the display. It seems to be sleep mode that really messes it up.