First password often wrong when unlocking computer

I have a laptop with Ubuntu 14.04, when I lock my computer and try to unlock it after some time has passed (not if I do it immediately) the first time I try to unlock it, it will tell me that my password is wrong. When I enter my password a second time it unlocks as it should.

The first few times I though that I just typed my password wrong, but since then I've tried to type it very slowly and carefully. So I am 100% sure that the password I enter is correct.

I've also checked if the first key isn't recognized, but even pressing space a few times and deleting every character after that has the same result.

Any idea why?


Solution 1:

It happens because when you press the first key of your password the computer comes out of screen saver/sleep mode if it has been lying unused for sometime. So the first key press actually works kind of awakening the pc. And your second key actually gets typed in as first key. This also happens to me on Windows platform as well. So what I suggest is press space key or some other key (space is better because it is less confusing) and when password box appears start typing. PS:- Sometime you might need to press power key of your laptop to bring it out of sleep mode.