Black screen, perhaps from login/lock system, after 'closing the clam' I make use of the rather clumsy 'closed clam' mode of operation. I close up my macbook pro, bring it to work, and plug in a USB keyboard and a monitor.

80% of the time, all is well.

The other 20% of the time, things proceed as follows:


Unlock box appears on external monitor
Enter password
System unlocks
30 second later ...
Go to black screen with mouse cursor


It looks just like the 'unlock' environment, only, of course, missing the unlock dialog box.

I've also seen the system momentarily display the unlock dialog box. If the system was idle long enough to power-save the display, but not to go into lock, wiggling the mouse will sometimes result in my desktop reappearing with the unlock password box appearing, as well, and then disappearing.

Any ideas?
I'll take a stab at how to collect the data needed to come up with an answer as to what and why the system isn't waking up properly. The new unibody MacBook Pro have much more sophisticated modes of clamshell mode so I'll assume you have one of those for now.

The best place to see what is happening after the event happens is the console application (or logging into the mac remotely with ssh to tail the logs as you are debugging this issue).

Sleep / wake events get a lot of log messages and you will want to look over a normal sleep wake to get familiar with all the messages that happen in which specific order and what normal times to begin and end the wake from sleep take.

A lot happens when the machine wakes as it needs to detect what is connected, if the display is shut, which graphics mode to wake up - what the display options and layout are. Then it transmits that info to all the running apps and has to put it's stuff together.

One thing to simplify things would be to disable all sorts of screen savers, display time outs and such. I've seen my mac get confused and wake from sleep just to engage a screen saver which went missing because I didn't change it and don't normally use it.

There have been several firmware updates in the last two years to tighten up this process as there were (and potentially are still) situations when the system doesn't respond in time or at all correctly. 

Lastly - a poor display cable contact or impending hardware failure could be a cause of this. Not likely, but worth checking if you really want to nail this down.