Authentication failed when trying to log in after suspend
Regression?
No
Hyprlock Info and Version
0.4.1-1 (Pacman)
Hyprlock config
# General
#general {
# grace = 1,
#}
background {
monitor =
#path = screenshot
path = /home/tendan/Pobrane/wallpaperflare.com_wallpaper(2).jpg
#color = $background
blur_passes = 2
contrast = 1
brightness = 0.5
vibrancy = 0.2
vibrancy_darkness = 0.2
}
input-field {
monitor =
size = 250, 60
outline_thickness = 2
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.35 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = false
outer_color = rgba(0, 0, 0, 0)
inner_color = rgba(0, 0, 0, 0.6)
font_color = rgba(255, 255, 255, 0.9)
fade_on_empty = false
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
rounding = -1
check_color = rgb(204, 136, 34)
placeholder_text = <i><span foreground="##cdd6f4">Wprowadź hasło</span></i>
hide_input = false
position = 0, -200
halign = center
valign = center
}
# DATE
label {
monitor =
text = cmd[update:1000] echo "$(date +"%A, %B %d")"
color = rgba(242, 243, 244, 0.75)
font_size = 22
font_family = JetBrains Mono
position = 0, 300
halign = center
valign = center
}
# TIME
label {
monitor =
text = cmd[update:1000] echo "$(date +"%H:%M")"
color = rgba(242, 243, 244, 0.75)
font_size = 95
font_family = JetBrains Mono Extrabold
position = 0, 200
halign = center
valign = center
}
label {
monitor =
text = cmd[update:1000] echo "$(whoami)"
color = $foreground
font_size = 14
font_family = JetBrains Mono
position = 0, -10
halign = center
valign = center
}
Compositor Info and Version
System/Version info
Hyprland, built from branch at commit 0f594732b063a90d44df8c5d402d658f27471dfe (props: bump version to 0.43.0).
Date: Sun Sep 8 16:48:21 2024
Tag: v0.43.0, commits: 5196
flags: (if any)
System Information:
System name: Linux
Node name: MaciejGA503RM
Release: 6.10.10-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Thu, 12 Sep 2024 17:21:02 +0000
GPU information:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2520] (rev a1) (prog-if 00 [VGA controller])
07:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] [1002:1681] (rev c8) (prog-if 00 [VGA controller])
NVRM version: NVIDIA UNIX Open Kernel Module for x86_64 560.35.03 Release Build (archlinux-builder@)
os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
plugins:
Description
So, everything works fine if laptop goes into the lockscreen after a specific period of time when nothing happens (idle). Trying to log in is successful on correct password, as it should.
However the situation is different when trying to do the same thing when waking the device from suspend (lid closing and going to suspend on purpose from command-line/wlogout option). Typing a correct password results in "Authentication failed (
How to reproduce
- Enable Hyprlock on Hyprland
- Suspend your device
- Try to enter your password
Crash reports, logs, images, videos
Hyprlock logs
[ERR] Config has errors:
Config error in file /home/tendan/.config/hypr/hyprlock.conf at line 66: cannot parse "$foreground" as an int.
Proceeding ignoring faulty entries
[LOG] | got iface: wl_seat v9
[LOG] > Bound to wl_seat v9
[LOG] | got iface: wl_data_device_manager v3
[LOG] | got iface: wl_compositor v6
[LOG] > Bound to wl_compositor v6
[LOG] | got iface: wl_subcompositor v1
[LOG] | got iface: wl_shm v1
[LOG] | got iface: wp_viewporter v1
[LOG] > Bound to wp_viewporter v1
[LOG] | got iface: wp_tearing_control_manager_v1 v1
[LOG] | got iface: wp_fractional_scale_manager_v1 v1
[LOG] > Bound to wp_fractional_scale_manager_v1 v1
[LOG] | got iface: zxdg_output_manager_v1 v3
[LOG] | got iface: wp_cursor_shape_manager_v1 v1
[LOG] > Bound to wp_cursor_shape_manager_v1 v1
[LOG] | got iface: zwp_idle_inhibit_manager_v1 v1
[LOG] | got iface: zwp_relative_pointer_manager_v1 v1
[LOG] | got iface: zxdg_decoration_manager_v1 v1
[LOG] | got iface: wp_alpha_modifier_v1 v1
[LOG] | got iface: zwlr_gamma_control_manager_v1 v1
[LOG] | got iface: ext_foreign_toplevel_list_v1 v1
[LOG] | got iface: zwp_pointer_gestures_v1 v3
[LOG] | got iface: zwlr_foreign_toplevel_manager_v1 v3
[LOG] | got iface: zwp_keyboard_shortcuts_inhibit_manager_v1 v1
[LOG] | got iface: zwp_text_input_manager_v1 v1
[LOG] | got iface: zwp_text_input_manager_v3 v1
[LOG] | got iface: zwp_pointer_constraints_v1 v1
[LOG] | got iface: zwlr_output_power_manager_v1 v1
[LOG] | got iface: xdg_activation_v1 v1
[LOG] | got iface: ext_idle_notifier_v1 v1
[LOG] | got iface: ext_session_lock_manager_v1 v1
[LOG] > Bound to ext_session_lock_manager_v1 v1
[LOG] | got iface: zwp_input_method_manager_v2 v1
[LOG] | got iface: zwp_virtual_keyboard_manager_v1 v1
[LOG] | got iface: zwlr_virtual_pointer_manager_v1 v2
[LOG] | got iface: zwlr_output_manager_v1 v4
[LOG] | got iface: org_kde_kwin_server_decoration_manager v1
[LOG] | got iface: hyprland_focus_grab_manager_v1 v1
[LOG] | got iface: zwp_tablet_manager_v2 v1
[LOG] | got iface: zwlr_layer_shell_v1 v5
[LOG] | got iface: wp_presentation v1
[LOG] | got iface: xdg_wm_base v6
[LOG] | got iface: zwlr_data_control_manager_v1 v2
[LOG] | got iface: zwp_primary_selection_device_manager_v1 v1
[LOG] | got iface: xwayland_shell_v1 v1
[LOG] | got iface: zwlr_screencopy_manager_v1 v3
[LOG] > Bound to zwlr_screencopy_manager_v1 v3
[LOG] | got iface: hyprland_toplevel_export_manager_v1 v2
[LOG] | got iface: hyprland_global_shortcuts_manager_v1 v1
[LOG] | got iface: xdg_dialog_v1 v1
[LOG] | got iface: wp_drm_lease_device_v1 v1
[LOG] | got iface: wp_linux_drm_syncobj_manager_v1 v1
[LOG] | got iface: wl_drm v2
[LOG] | got iface: zwp_linux_dmabuf_v1 v5
[LOG] > Bound to zwp_linux_dmabuf_v1 v5
[LOG] | got iface: wl_output v4
[LOG] > Bound to wl_output v4
[LOG] [core] dmabufFeedbackMainDevice
[LOG] output 48 make Chimei Innolux Corporation model 0x1540
[LOG] output 48 name eDP-1
[LOG] output 48 description Chimei Innolux Corporation 0x1540 (eDP-1)
[LOG] output 48 done
[LOG] Running on Hyprland
[LOG] Locking session
[LOG] Got fractional scale: 1
[LOG] Got fractional scale: 1.25
[LOG] configure with serial 9378
[LOG] Configuring surface for logical [Vector2D: x: 2048, y: 1152] and pixel [Vector2D: x: 2560, y: 1440]
[LOG] Got fractional scale: 1.25
[LOG] configure with serial 9378
[LOG] Configuring surface for logical [Vector2D: x: 2048, y: 1152] and pixel [Vector2D: x: 2560, y: 1440]
[LOG] onLockLocked called
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[WARN] Trying to update label, but resource label:100403689862992,time:1727293397191661093 is still pending! Skipping update.
[WARN] Trying to update label, but resource label:100403689863600,time:1727293397191691751 is still pending! Skipping update.
[WARN] Trying to update label, but resource label:100403690417440,time:1727293398192421956 is still pending! Skipping update.
[WARN] Trying to update label, but resource label:100403689862992,time:1727293397191661093 is still pending! Skipping update.
[WARN] Trying to update label, but resource label:100403689863600,time:1727293397191691751 is still pending! Skipping update.
[WARN] Trying to update label, but resource label:100403690417440,time:1727293398192421956 is still pending! Skipping update.
[WARN] Trying to update label, but resource label:100403689862992,time:1727293397191661093 is still pending! Skipping update.
[WARN] Trying to update label, but resource label:100403689863600,time:1727293397191691751 is still pending! Skipping update.
[LOG] output 48 done
[LOG] configure with serial 9383
[LOG] Configuring surface for logical [Vector2D: x: 2048, y: 1152] and pixel [Vector2D: x: 2560, y: 1440]
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[LOG] Authenticating
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[LOG] PAM_PROMPT: Password:
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] auth: Authentication failed for hyprlock
[LOG] Failed attempts: 1
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[LOG] Authenticating
[ERR] Invalid key down event (key already pressed?)
[ERR] Invalid key down event (key already pressed?)
[LOG] PAM_PROMPT: Password:
[ERR] Invalid key down event (stray release event?)
[ERR] Invalid key down event (stray release event?)
[LOG] auth: authenticated for hyprlock
[LOG] Unlocking session
[LOG] Unlocked, exiting!
[LOG] Reached the end, exiting
EDIT: Put hyprlock logs inside details block
Please try hyprlock-git This probably was fixed via #409.
Still happening here. Happens only with my lid switch bind tho
bindl =,switch:Lid Switch,exec, hyprlock ; systemctl suspend
I have to reboot, since sddm also will fail to login
LIkely because you lid switch for some odd reason is sending an inputs to hyprlock and that's why your password is wrong. At least that would make sense. Can you try first clearing the password input and then enter the password after suspend?
in my case was a kernel regression , nothing to do with hypr* it seems
linux-mainline 6.12rc4-1 fixes it for me
I've been dealing with the same issue for the past 6 months, and I haven't been able to find a solution. I'm running Arch Linux with the latest kernel and all HyprWM packages updated to the latest stable versions (not the Git packages).
The problem occurs after resuming from sleep: to enter my password successfully, I need to type and delete 2–3 characters first. If I don't do this, the first password attempt is always incorrect.
@Nj0be I would love to know where those 2-3 chars come from and what they are (Like i mentioned above I guess it's the lid switch). I personally don't have a setup where that happens.
Would you be down to help find the cause? That would involve building hyprlock from source after applying a patch that logs incoming keycodes. That way we might be able to ignore them in hyprlock or track down the cause of this.
@Nj0be I would love to know where those 2-3 chars come from and what they are (Like i mentioned above I guess it's the lid switch). I personally don't have a setup where that happens.
Would you be down to help find the cause? That would involve building hyprlock from source after applying a patch that logs incoming keycodes. That way we might be able to ignore them in hyprlock or track down the cause of this.
Yes, of course. I'm available to help find the cause. How can I build hyprlock with the patch?
git clone https://github.com/hyprwm/hyprlock
cd hyprlock
git switch v0.6.2-b
Download this patch.txt and move it into the hyprlock directory you just cloned.
git apply patch.txt
Now you need to make sure you have all the build deps you need. From the aur PKGBUILD:
sudo pacman -Suy --needed git cmake gcc hyprwayland-scanner wayland-protocols xorgproto
As long as you don't uninstall hyprlock from the repos the runtime deps should already be installed. Now you can build it with
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -S . -B ./build
cmake --build ./build --config Debug
Now you should have ./build/hyprlock and you should be able to run that.
Edit your hypidle config to launch /absolute/path/to/build/hyprlock instead of just hyprlock, restart hypridle and reproduce the problem.
!!!! IT WILL LOG YOUR PASSWORD, SO BEFORE YOU SEND THE HYPRIDLE LOGS, MAKE SURE YOU REMOVE THE LINES THAT LEAK IT. OR TEMPORARILY CHANGE YOUR PASSWORD AND CHANGE IT BACK AFTERWARDS !!!!
Those are the logs taken from running hypridle from the terminal (replacing hyprlock with the patched one):
[LOG] Running: loginctl lock-session
[LOG] Executing loginctl lock-session
[LOG] Process Created with pid 3173
[LOG] Got dbus .Session
[LOG] Got Lock from dbus
[LOG] Locking with pidof /home/benia/dev/lab/hyprlock/build/hyprlock || /home/benia/dev/lab/hyprlock/build/hyprlock
[LOG] Executing pidof /home/benia/dev/lab/hyprlock/build/hyprlock || /home/benia/dev/lab/hyprlock/build/hyprlock
[LOG] Process Created with pid 3181
[LOG] | got iface: wl_seat v9
[LOG] > Bound to wl_seat v9
[LOG] | got iface: wl_data_device_manager v3
[LOG] | got iface: wl_compositor v6
[LOG] > Bound to wl_compositor v6
[LOG] | got iface: wl_subcompositor v1
[LOG] | got iface: wl_shm v1
[LOG] | got iface: wp_viewporter v1
[LOG] > Bound to wp_viewporter v1
[LOG] | got iface: wp_tearing_control_manager_v1 v1
[LOG] | got iface: wp_fractional_scale_manager_v1 v1
[LOG] > Bound to wp_fractional_scale_manager_v1 v1
[LOG] | got iface: zxdg_output_manager_v1 v3
[LOG] | got iface: wp_cursor_shape_manager_v1 v1
[LOG] > Bound to wp_cursor_shape_manager_v1 v1
[LOG] | got iface: zwp_idle_inhibit_manager_v1 v1
[LOG] | got iface: zwp_relative_pointer_manager_v1 v1
[LOG] | got iface: zxdg_decoration_manager_v1 v1
[LOG] | got iface: wp_alpha_modifier_v1 v1
[LOG] | got iface: zwlr_gamma_control_manager_v1 v1
[LOG] | got iface: ext_foreign_toplevel_list_v1 v1
[LOG] | got iface: zwp_pointer_gestures_v1 v3
[LOG] | got iface: zwlr_foreign_toplevel_manager_v1 v3
[LOG] | got iface: zwp_keyboard_shortcuts_inhibit_manager_v1 v1
[LOG] | got iface: zwp_text_input_manager_v1 v1
[LOG] | got iface: zwp_text_input_manager_v3 v1
[LOG] | got iface: zwp_pointer_constraints_v1 v1
[LOG] | got iface: zwlr_output_power_manager_v1 v1
[LOG] | got iface: xdg_activation_v1 v1
[LOG] | got iface: ext_idle_notifier_v1 v1
[LOG] | got iface: hyprland_lock_notifier_v1 v1
[LOG] | got iface: ext_session_lock_manager_v1 v1
[LOG] > Bound to ext_session_lock_manager_v1 v1
[LOG] | got iface: zwp_input_method_manager_v2 v1
[LOG] | got iface: zwp_virtual_keyboard_manager_v1 v1
[LOG] | got iface: zwlr_virtual_pointer_manager_v1 v2
[LOG] | got iface: zwlr_output_manager_v1 v4
[LOG] | got iface: org_kde_kwin_server_decoration_manager v1
[LOG] | got iface: hyprland_focus_grab_manager_v1 v1
[LOG] | got iface: zwp_tablet_manager_v2 v1
[LOG] | got iface: zwlr_layer_shell_v1 v5
[LOG] | got iface: wp_presentation v1
[LOG] | got iface: xdg_wm_base v6
[LOG] | got iface: zwlr_data_control_manager_v1 v2
[LOG] | got iface: zwp_primary_selection_device_manager_v1 v1
[LOG] | got iface: xwayland_shell_v1 v1
[LOG] | got iface: zwlr_screencopy_manager_v1 v3
[LOG] > Bound to zwlr_screencopy_manager_v1 v3
[LOG] | got iface: hyprland_toplevel_export_manager_v1 v2
[LOG] | got iface: hyprland_global_shortcuts_manager_v1 v1
[LOG] | got iface: xdg_dialog_v1 v1
[LOG] | got iface: wp_single_pixel_buffer_manager_v1 v1
[LOG] | got iface: wp_security_context_manager_v1 v1
[LOG] | got iface: hyprland_ctm_control_manager_v1 v1
[LOG] | got iface: hyprland_surface_manager_v1 v2
[LOG] | got iface: wp_drm_lease_device_v1 v1
[LOG] | got iface: wp_linux_drm_syncobj_manager_v1 v1
[LOG] | got iface: wl_drm v2
[LOG] | got iface: zwp_linux_dmabuf_v1 v5
[LOG] > Bound to zwp_linux_dmabuf_v1 v5
[LOG] | got iface: wl_output v4
[LOG] > Bound to wl_output v4
[LOG] Exposed seat name: Hyprland
[LOG] [core] dmabufFeedbackMainDevice
[LOG] output eDP-1 name eDP-1
[LOG] output 53 description Microsoft 0x09FF (eDP-1)
[LOG] output 53 make Microsoft model 0x09FF
[LOG] output 53 done
[LOG] Running on Hyprland
[LOG] Locking session
[LOG] Got fractional scale: 100.0%
[LOG] configure with serial 322
[LOG] Configuring surface for logical [Vector2D: x: 1920, y: 1080] and pixel [Vector2D: x: 1920, y: 1080]
[LOG] onLockLocked called
[LOG] output 53 done
[LOG] output 53 make Microsoft model 0x09FF
[LOG] output 53 done
[LOG] configure with serial 330
[LOG] Configuring surface for logical [Vector2D: x: 1920, y: 1080] and pixel [Vector2D: x: 1920, y: 1080]
[LOG] output 53 done
[LOG] Got PrepareForSleep from dbus with sleep false
[LOG] Running: hyprctl dispatch dpms on
[LOG] Executing hyprctl dispatch dpms on
[LOG] Process Created with pid 3724
[LOG] output 53 make Microsoft model 0x09FF
[LOG] output 53 done
[LOG] configure with serial 331
[LOG] Configuring surface for logical [Vector2D: x: 1920, y: 1080] and pixel [Vector2D: x: 1920, y: 1080]
Couldn't commit output {}
[LOG] output 53 done
[ERR] Invalid key down event (stray release event?)
[LOG] Authenticating
[LOG] PAM_PROMPT: Password:
[ERR] auth: Authentication failed for hyprlock
[LOG] Failed attempts: 1
[LOG] Authenticating
[LOG] PAM_PROMPT: Password:
[LOG] auth: authenticated for hyprlock
[LOG] Unlocking session
[LOG] Unlocked, exiting!
[LOG] Reached the end, exiting
Unfortunately, the password isn't visible in the logs. I haven't touch them... Let me know what to do.
@Nj0be Seems like the patch was not applied?
Check git diff in the hyprlock directory to check if the patch actually applied successfully. (I just added to lines that log key strokes)
You were right, I forgot to apply the patch... Sorry if I wasted your time. Here's the output when writing the word 'TESTING' pressing the shift button
[LOG] Adding to password buffer: t
[LOG] Keycode in hex: 74, is composed: false
[LOG] Adding to password buffer: e
[LOG] Keycode in hex: 65, is composed: false
[LOG] Adding to password buffer: s
[LOG] Keycode in hex: 73, is composed: false
[LOG] Adding to password buffer: t
[LOG] Keycode in hex: 74, is composed: false
[LOG] Adding to password buffer: i
[LOG] Keycode in hex: 69, is composed: false
[LOG] Adding to password buffer: n
[LOG] Keycode in hex: 6e, is composed: false
[LOG] Adding to password buffer: g
[LOG] Keycode in hex: 67, is composed: false
[ERR] Invalid key down event (stray release event?)
[LOG] Authenticating
[LOG] PAM_PROMPT: Password:
[ERR] auth: Authentication failed for hyprlock
The problem is that on the first input the shift button doesn't work. If I use caps locks (on the first attempt) this is the output:
[LOG] Adding to password buffer: T
[LOG] Keycode in hex: 54, is composed: false
[LOG] Adding to password buffer: E
[LOG] Keycode in hex: 45, is composed: false
[LOG] Adding to password buffer: S
[LOG] Keycode in hex: 53, is composed: false
[LOG] Adding to password buffer: T
[LOG] Keycode in hex: 54, is composed: false
[LOG] Adding to password buffer: I
[LOG] Keycode in hex: 49, is composed: false
[LOG] Adding to password buffer: N
[LOG] Keycode in hex: 4e, is composed: false
[LOG] Adding to password buffer: G
[LOG] Keycode in hex: 47, is composed: false
[LOG] Authenticating
[LOG] PAM_PROMPT: Password:
[ERR] auth: Authentication failed for hyprlock
The strange thing is that if I write some characters, like abc and delete them, and only after typing those I press shift, the output is the following:
[LOG] Adding to password buffer: a
[LOG] Keycode in hex: 61, is composed: false
[LOG] Adding to password buffer: b
[LOG] Keycode in hex: 62, is composed: false
[LOG] Adding to password buffer: c
[LOG] Keycode in hex: 63, is composed: false
terminate called without an active exception
And after that there is no more output until the next activation of hyprlock.
I noticed a thing: If i press shift two times without writing anything before, only the second shift press causes the terminate called without an active exception error. There are some strange things is this build, I don't know how to correctly find the problem. This flicker never occurs in the regular build.
By the way there are clearly some problems with the shift button. The first word in my password is uppercase, so it never works on first attempt. If it was only lowercase, I think that the error would never occur.
AHHH That already helps a lot thanks!!! It being related to shift kinda makes sense.
Just to clarify, the terminate called without an active exception does not occur on the regular build???
Also what is the flicker you wrote about?
In the regular build the terminate called without an active exception does not occur.
I was wrong, when the flicker occur (when also the terminate called without an active exception), nothing is shown behind, only a black screen. I can send a video if it helps.
It occurs when the shift button is pressed, but only after any other key is pressed.
So a combination that triggers the event can be:
a b c del del del shift
shift shift
a shift
etc...
When the flicker + terminate called without an active exception occur the current input is discarded. Here's a video.
After the exception (flicker + terminate...) occurs everything works fine.
@Nj0be
Ok the terminate called without an active exception was my bad. The log triggered an exception. The "flicker" you noticed was just hyprlock crashing and restarting itself.
Try again with this patch.txt
Also can you clarify how exactly you wake your system? Do you press a key? And if so which key?
Also are you on nvidia??
Also are you on nvidia??
I'm using a Intel Core i7-1065G7 with the integrated Mesa Intel Iris Plus Graphics. The laptop also has an Nvidia MX330 but it's used only for specific workloads (like games). During normal usage is always off.
Also can you clarify how exactly you wake your system? Do you press a key? And if so which key?
I open up the laptop lid, since I close it to suspend it.
Try again with this patch.txt
This patch apply only on the master branch, not the v0.6.2-b one.
The output is the following:
[LOG] Adding key t - 74
[LOG] Adding key e - 65
[LOG] Adding key s - 73
[LOG] Adding key t - 74
[LOG] Adding key i - 69
[LOG] Adding key n - 6e
[LOG] Adding key g - 67
[ERR] Invalid key down event (stray release event?)
[LOG] Authenticating
[LOG] PAM_PROMPT: Password:
[ERR] auth: Authentication failed for hyprlock
[LOG] Failed attempts: 1
[LOG] Adding key T - 54
[LOG] Adding key E - 45
[LOG] Adding key S - 53
[LOG] Adding key T - 54
[LOG] Adding key I - 49
[LOG] Adding key N - 4e
[LOG] Adding key G - 47
[LOG] Authenticating
[LOG] PAM_PROMPT: Password:
[ERR] auth: Authentication failed for hyprlock
[LOG] Failed attempts: 2
Same issue with the shift button. Both times I was trying to type 'TESTING' while pressing shift.
Apparently, the solution was simply to wait a bit after resuming from suspend. If I wait 5-10 seconds, everything works fine. Otherwise, I encounter problems with the first key presses.
I’m not sure where the problem lies, but after [ERR] Invalid key down event (stray release event?), every input is processed correctly.
I tested logging in immediately after resuming the PC from sleep, without waiting, and it never works.
Here is an example right after waking from sleep:
[LOG] Process Created with pid 395501
Couldn't commit output {}
[LOG] Adding key b - 62
[ERR] Invalid key down event (stray release event?)
[LOG] Adding key e - 65
The first letter should be uppercase, it missed the shift. Repeating the same experiment without pressing shift results in the first character being skipped entirely.
I am having the exact same issue with hyprlock. My first key after resume from suspend (shift in most cases) is ignored and my password doesn't work.
Was this still being worked on?
I’m not sure where the problem lies, but after [ERR] Invalid key down event (stray release event?), every input is processed correctly.
This log is actually a bit wrong. It should be "Invalid key up event (stray release event?)" (it's not a key down event). It happens whenever you start hyprlock in the terminal for example. You hit enter and then the first key hyprlock receives is a key-up event, which is unexpected but in that case totally fine. But here I think the log hints to the problem. If a key event down event get's swallowed somewhere during the wake-up procedure, it would result in such a log.
Was this still being worked on?
The cause is currently unknown. I need to look into what is supposed to happen with the keyboard state before and after suspend. We don't handle suspend in hyprlock. It should just work. Could be, that we do something wrong in hyprlock, but could also be a compositor problem or related to libinput.
Could someone try if the same thing happens when running hyprlock on top of sway?
Just tested on a fresh sway config and the issue does seem to happen there to. after suspend and wake up the first keypress is ignored.
Having issues with this as well. It seems to be that if I use Ctrl+u to clear the password buffer before I enter the password, then I don't have the problem. Perhaps the button presses used to wake up the device are being cached somehow? https://wiki.hypr.land/Hypr-Ecosystem/hyprlock/#keyboard-shortcuts-and-actions
I'm experiencing the same issue both on hyprlock 0.9.2-4 and hyprlock-git.
If I CTRL+U before entering my password then it's totally fine.
Also, it should be noted that if I invoke hyprlock with my lock keybind, the password is "recognised" immediately, while only when suspending I must fail once first. This happens both when closing the laptop lid and when invoking systemctl suspend from a terminal and then pressing any key.