I have a Dell Inspiron 17R SE laptop with ubuntu 12.04. I have set it to "do nothing" when I close the lid, which in reality means that the screen is locked. The problem is that sometimes, when I open it again, I get the black lock screen with date and time, and no password prompt. Key strokes and touchpad movement has no effect, which means that no matter what I do, I can't log back in to the desktop. I can use Ctrl+Alt+F* to get a text terminal, but the desktop remains inaccessible.
I believe there is an increased risk of this if I close the lid and then open it immediately.
How can I fix this?