Sway: Swaylock (sometimes, seemingly) does not accept correct password

Created on 2 Oct 2018  Â·  13Comments  Â·  Source: swaywm/sway

Most of the time, when this happens, it occurs at the same time as: https://github.com/swaywm/sway/issues/2706... however...

To address that issue, I had actually removed swayidle's ability to do any DPMS, it should've only been invoking swaylock. Today I went to grab some coffee, came back, and swaylock had activated. While I was able to type normally, it was very clearly not accepting my valid password. (I checked caps lock, there's nothing else that should've been interfering).

(I mitigated by switching to another TTY and issuing pkill swaylock.)

Please note, I'm using a pre-release 1.0 build using HEAD of sway/wlroots from about 12 hours ago.

I'm mostly trying to figure out how I can give additional debug data. Should I patch swaylock and have it log keystrokes to try and see what's going on?

All 13 comments

(My swaylock command is simple: swaylock -c 000000.)

dpms will probably do the same thing as #2706 ; you can add a keylogger or run with WAYLAND_DEBUG=1 and check if you get multiple key events when that happens.

If it's the same, the solution is the same as well: make it so it only listens to each seat once.

I may have misunderstood, but my swayidle command looks like this, so I wouldn't have expected dpms to be the culprit? exec swayidle timeout 300 'swaylock -c 000000'.

If we think dpms is still involved, or want to resolve the other issue first, we can put this Issue on hold and I can provide more data after Issue #2706 is closed and I pull latest.

Ah, sorry I had misunderstood your first message. If you have nothing that would make logind take input devices off I'm not sure what it would be, feel free to have a look at logs with WAYLAND_DEBUG=1 to confirm if you have the same problem (you should see multiple wl_seat@*.get_keyboard() and then wl_keyboard@*.key will be printed for each of the new keyboards)

I can confirm the issue. I noticed "enter" key events (key code 28) during typing the password. It seems that only a part of the password is evaluated.

Yes. I meant to mention it as well... When it gets into this failure state,
the interface acts almost like it's verifying (and quickly rejecting) the
password after each keystroke? It's quite strange. If I don't find any
information with the debugging options, I'll try to take a shaky cam video
at least.

On Mon, Oct 1, 2018, 10:23 PM Hendrik Schröter notifications@github.com
wrote:

I can confirm the issue. I noticed "enter" key events (key code 28) during
typing the password. It seems that only a part of the password is evaluated.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/swaywm/sway/issues/2743#issuecomment-426152572, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAT9dOY6RH7LOPxAukayv1UtW2VOinZsks5ugvg6gaJpZM4XDNc9
.

It repro'd again, but I didn't have debug enabled. I did get a video though: https://photos.app.goo.gl/mxRM2TiHjUgVm8ZP9

13s - 22s demonstrates the problem I've described. Input slows, and then circle interior flashes red very quickly as if it's validating and rejecting the password after each keystroke. As you can see, in this instance, it was only doing it part of the time, you can see after 23s that it seems to go back to taking the keystrokes normally.

Can confirm, this bug has been affecting me over the past week or so. I have, in my .config/sway/config:

exec swayidle before-sleep 'swaylock -c 102020 -i /some/picture.jpg'

Note: Pretty sure this never happens when I explicitly activate swaylock (with shortcut key). Only when swayidle invokes it.

This hasn't always been broken, right? How about a bisect?

@colemickens @DawidLoubser Can you please check if #2771 resolves this?

I've updated to 5d21c33f13f34ed592388512cc092986324c8f35 and am setting WAYLAND_DEBUG now. I'll update if I see it again.

Please note that you're literally writing your password one letter at a time to wherever you log swaylock's output, so we cannot recommend to leave WAYLAND_DEBUG set for normal use - remember to purge old logs when you're confident this works

Closing this as it was likely fixed by the PR mentioned a few comments back. If it occurs again then please create a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jakubn551 picture jakubn551  Â·  4Comments

Olie440 picture Olie440  Â·  4Comments

J0nnyMak0 picture J0nnyMak0  Â·  3Comments

cauebs picture cauebs  Â·  3Comments

marcoms picture marcoms  Â·  3Comments