I enabled pam_tally2 to lock a user after several password attempts. It works well at the TTY, login screen and ssh.
However, I usually lock the screen when leaving the computer. You can type as many wrong passwords as you want at the unlocking screen, while the account won't be locked like pam_tally2.
Is there any way to lock the user after several wrong attempts when unlocking the screen?