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

keystrokes entered while DPMS is off aren't recognized properly. #188

Open
crocket opened this issue Jun 6, 2021 · 17 comments
Open

keystrokes entered while DPMS is off aren't recognized properly. #188

crocket opened this issue Jun 6, 2021 · 17 comments

Comments

@crocket
Copy link

crocket commented Jun 6, 2021

  • swayidle-1.6
  • swaylock-1.5
  • sway-1.6
  • wlroots-0.13.0

I start typing password while DPMS is off. DPMS turns on while I type password.
Somehow, keys entered while DPMS is off aren't recognized properly.
I have to enter the password again.

This doesn't happen on my desktop, but it happens on my laptop.

My laptop doesn't have elogind. It uses seatd.
My desktop computer uses seatd but has elogind because elogind is required by other programs.
Perhaps, it is related to elogind?

How can I debug this issue?

@mindrunner
Copy link

Same boat here. Not sure if I am using seatd or elogind. Using sddm as a display manager.

@crocket
Copy link
Author

crocket commented Jun 23, 2021

[unix_chkpwd] password check failed for user (xxx)
[swaylock] pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=xxx

@quack-o
Copy link

quack-o commented Jun 23, 2021

happening without any display manager too with systemd

@crocket
Copy link
Author

crocket commented Jun 23, 2021

elogind is a part of systemd.

@emersion
Copy link
Member

That is incorrect, elogind is a fork of systemd with everything removed except logind.

@crocket
Copy link
Author

crocket commented Jun 23, 2021

I mean elogind is almost the same as logind from systemd. They are meant to be compatible.

@kennylevinsen
Copy link
Member

I very much doubt this would have anything to do with seat management of any kind.

I'm more inclined to think it might be a focus handling corner case when outputs are off/re-enable. Or maybe lost input events as sway stalls during output configuration.

@adee
Copy link

adee commented Sep 9, 2021

The cause is the input reconfigure during DPMS on.
You can try my patch from here: swaywm/sway#5757 (comment)

@quack-o
Copy link

quack-o commented Sep 10, 2021

@adee pastebin link doesnt work anymore, can you please share a gist instead

edit : nvm, ublock was the problem

@pielgrzym
Copy link

pielgrzym commented Apr 5, 2023

Sorry for necro-bumping :)

I have a similar problem - when I lock with swayidle I make dpms kick in immediately and turn off the monitor. When I start typing when screen is still off I won't be able to log in. Here is the twist: I just typed one letter while screen was off. It turned on the screen and displayed swaylock. When I was pressing backspace I notice it actually typed 4 letters - this is why the password was wrong on first try.
Can anyone confirm this behavior?

EDIT: on every typed characted I have to enter backspace twice to reach 'no input' indicator, so the first letter is only doubled when it's typed while screen is off.

EDIT2: no login manager here - launching sway from tty0. I think it's related to multiple monitors somehow - the stationery monitor takes much more time to wake up in comparison to the laptop one - maybe this is somehow causing the issue.

@mindrunner
Copy link

Exatly this!!

Workaround:

Type <ESC>[password]<ENTER> to unlock

@pielgrzym
Copy link

Yeah, I'm getting used to hitting 'Ctrl' before I start typing 🤣

@pielgrzym
Copy link

This might be related to this issue: swaywm/sway#7112

@hramrach
Copy link

Swaylock could somewhat alleviate this by indicating how many characters are typed, eg. making the width of the colored part of the ring that's shown in response to keypress fraction of the circle proportional to number of characters typed rather than fixed.

@kennylevinsen
Copy link
Member

Swaylock could somewhat alleviate this by indicating how many characters are typed

The whole point of swaylock and i3lock's randomized circular typing animation is to not reveal how many characters have been typed at any point, so that someone looking over your should won't easily be able to see your password length.

@hramrach
Copy link

And with the proposed change they still won't so long as your password is not 5 characters long. The point is to make the initial few characters easy to distinguish so the error of having unexpectedly many at the start is avoided but not make the number typed so far obvious once more than a few are typed.

@laktak
Copy link

laktak commented Dec 20, 2024

The whole point of swaylock and i3lock's randomized circular typing animation is to not reveal how many characters have been typed at any point,

@kennylevinsen it could show that the buffer is empty though

also see #132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

9 participants