swaylock icon indicating copy to clipboard operation
swaylock copied to clipboard

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

Open crocket opened this issue 4 years ago • 17 comments

  • 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?

crocket avatar Jun 06 '21 05:06 crocket

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

mindrunner avatar Jun 22 '21 19:06 mindrunner

[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

crocket avatar Jun 23 '21 06:06 crocket

happening without any display manager too with systemd

isshin1 avatar Jun 23 '21 07:06 isshin1

elogind is a part of systemd.

crocket avatar Jun 23 '21 12:06 crocket

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

emersion avatar Jun 23 '21 12:06 emersion

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

crocket avatar Jun 23 '21 13:06 crocket

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.

kennylevinsen avatar Jun 23 '21 14:06 kennylevinsen

The cause is the input reconfigure during DPMS on. You can try my patch from here: https://github.com/swaywm/sway/issues/5757#issuecomment-882028355

adee avatar Sep 09 '21 13:09 adee

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

edit : nvm, ublock was the problem

isshin1 avatar Sep 10 '21 05:09 isshin1

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.

pielgrzym avatar Apr 05 '23 11:04 pielgrzym

Exatly this!!

Workaround:

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

mindrunner avatar Apr 08 '23 10:04 mindrunner

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

pielgrzym avatar Apr 08 '23 14:04 pielgrzym

This might be related to this issue: https://github.com/swaywm/sway/issues/7112

pielgrzym avatar Apr 19 '23 13:04 pielgrzym