Open AbheetChaudhary opened 1 year ago
On one of my machines every time my machine wakes from suspend there appears to be a single character already typed.
I'm using swaylock version 1.7.2
swaylock -f;systemctl suspend
consistently reproduces this for me.
I'd be happy to debug this, I'm just not sure how. Not sure if it makes it easier to debug given it's consistent in how it manifests for me.
If you run sudo libinput debug-events --show-keycodes
in the background while testing you would be able to see what keyboard events appear and from what keyboard device. Note that this also shows every key you press, including your password.
I ran the libinput
command and parsed the output. There were no registered input events between the screen locking and me entering my password, and it did still not recognize my password. Double-checking, there is one "garbage" character entered before my password.
Basically, the screen locks, 5 seconds later, the screen is turned off via the swaylock command (referenced below). When the screen is dark, I return and either wiggle the mouse to wake the screen up, or I just start typing my password. If I do that and press backspace
, ONE character will be removed and then the message "Cleared" is shown. If I type the first letter of my password and then press backspace
, it will not say "cleared", as the garbage character is still there.
And, as per the libinput
test, there is no event associated with this character, so it must come from elsewhere. I don't know from where, however. I'm not super-convinced it's from swaylock, but it could be. The input could also be coming from my swayidle/swaylock command itself (which does not trigger libinput, since it's not coming from any input device).
My swaylock entry in config
:
exec swayidle -w \
timeout 600 'swaylock -f -c 000000' \
timeout 605 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'
I have noticed it happen multiple times that after waking up from sleep, before I type my password I have to first hold backspace to clear some garbage value that is already typed there. It can be anything from 2-3 characters to 2-3 words size garbage.
I am currently using swaylock version v1.6.11. This is the script I am using to lock screen and I have mapped it to a keybinging in sway config file.
Since I do not know how to approach debugging this issue so this is the best I can provide now, but I am happy to share any info or log that might be needed to fix this.