Black screen issues with MacBook Pro on wake from sleep
Since I bought my new MacBook Pro around 6 months ago, I've suffered with an intermittent issue where, on waking from sleep, I would be presented with nothing but a black screen and a visible cursor.
Despite much googling, I struggled to find references to other people having this issue. I turned up numerous search results regarding a "black screen of death" issue dating back several years but this doesn't appear to be the same problem.
The screen is on, the MacBook is awake (I can VNC and SSH into the machine), and there is a cursor, I just can't see the desktop. The screensaver kicks in just fine (and is visible). Connecting and reconnecting to an external display didn't fix the issue.
I've always had to hard reset, potentially losing any work I may have been in the middle of, until today, when I decided to ask on Twitter if anybody else had suffered with this problem. I had several affirmative replies but no fixes other than rebooting, until I received this tweet from @BorrOs:
@lukeredpath I always get that black screen. I simply type my password to unlock and I have my session back!
And it worked! He went on to explain that what appears to be happening is that OSX is asking for my password to unlock the screen after going to sleep, but the dialog box is hidden due to some unknown bug. The text field is focussed, you just can't see it, hence the above workaround.
Now, I'm not entirely sure under what circumstances this bug is triggered. I use NetworkLocation to turn on the screensaver password only when I'm outside of my home (usually, when I'm working on a client site) and it's possible that it could be related to that (e.g. I put my MBP to sleep by closing it when leaving my client's site and re-open it when I get home).
Whatever the cause, I struggled to find much information about this so I hopefully this post should be of some help to others in the future.