Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] i3lock doesn't seem to register the first couple of keypresses of password #354

Closed
ShadowStar019 opened this issue Apr 19, 2024 · 6 comments

Comments

@ShadowStar019
Copy link

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Other (Please describe in detail)

Current Behavior

Sometimes, i3lock seems to skip the first couple of keypresses of my password after I close my laptop lid, wait an extended period of time (10 - 40 min), and then open my laptop lid. The green circle animation doesn't appear until after I make about 1-3 keypresses, and password verification fails.

Expected Behavior

Keypresses would register immediately when I start typing, the green circle animation would appear at the first keypress, and password verification would succeed if I type my password correctly.

Reproduction Instructions

  1. Run i3lock from the terminal
  2. Close laptop lid
  3. Wait 10 - 40 min
  4. Open laptop lid
  5. Try typing in password

Environment

Output of i3lock --version:

i3lock: version 2.14.1 © 2010 Michael Stapelberg

i3 config: None; I just type i3lock in the terminal and hit enter every time I want to lock my laptop
System: Arch Linux x86_64

@orestisfl
Copy link
Member

orestisfl commented Apr 19, 2024 via email

@ShadowStar019
Copy link
Author

Everything gets registered in the terminal after closing, waiting and opening the laptop lid.
One thing I noticed when i3lock misses keypresses is that on the first registered keypress, all of the arcs from the missed keypresses appear in rapid succession before the arc from the first registered keypress. For example, when the first registered keypress is the third keypress made, three green arcs appear in rapid succession around the center circle.

@stapelberg
Copy link
Member

Can you try the following:

  1. Start i3lock from terminal as usual.
  2. Enter a few key presses to make sure i3lock has fully started and is processing key presses
  3. Then close the lid, re-open, check if key presses are lost / delayed

Once i3lock enters its event loop, it’s up to X11 to deliver keypress events. If there are delays, that usually means something else is happening on the X11 level (e.g. monitor re-detection / configuration), but even so, keypresses should never get lost.

Also run i3lock --debug (but be sure to redact your password from the output), perhaps that gives us a hint as to what might be happening.

@stapelberg
Copy link
Member

Oh, and also, can you try if slock (https://tools.suckless.org/slock/) or xsecurelock (https://github.com/google/xsecurelock) exhibit the same problem on your machine?

@ShadowStar019
Copy link
Author

For some reason, I couldn't reproduce the issue since the last comment. I regularly update and install pacman packages, so it could have been a buggy package related to the keyboard input or laptop lid.

Now, no keypresses are lost / delayed and everything works as expected.
I tested slock on my machine and it works perfectly fine.

@orestisfl
Copy link
Member

Thank you for letting us know. I'll close this until something newer comes up.

@orestisfl orestisfl closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants