Skip to content

hyprlock hangs and does not terminate when using fingerprint. #1053

Description

@ronasimi

Regression?

Yes

Hyprlock Info and Version

0.96
The issue is introduced by the architectural changes made to how hyprlock handles asynchronous D-Bus background polling for the fingerprint reader.

Specifically, the commit responsible for modifying this behavior between version 0.9.5 and 0.9.6 is:

Commit Hash / PR: b67022a / PR #1029

Commit Message: core: move dbus connection from fprint to it's own thing

Why this commit causes the hang:
This patch refactored the asynchronous D-Bus client out of the main block into its own dedicated handling structure using sdbus-cpp. While intended to isolate the listener, it introduced a thread destruction lifecycle bug during program teardown: when hyprlock reaches main() termination, the asynchronous D-Bus event loop running in the background thread blocks waiting for socket activity or cleanup confirmation, causing the main thread to deadlock in an interruptible sleep (Sl) state rather than exiting cleanly.

general {
    hide_cursor = true
}

auth {
    fingerprint:enabled = true
}

background {
    monitor =
    path = screenshot   # only png supported for now
    color = rgba(1d1d1de6)

    # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
    blur_passes = 3 # 0 disables blurring
    blur_size = 3
    noise = 0.0234
}

image {
    monitor =
    path = /home/ron/.face
    size = 256 # lesser side if not 1:1 ratio
    rounding = -1 # negative values mean circle
    border_size = 0
    position = 0, 128
    halign = center
    valign = center
}

input-field {
    monitor =
    size = 256, 48
    outline_thickness = 0
    dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
    dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
    dots_center = false
    dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
    outer_color = rgba(13131388)
    inner_color = rgba(13131388)
    font_color = rgb(7f7f7f)
    fade_on_empty = true
    fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
    placeholder_text = <i>Input password for $USER</i> # Text rendered in the input box when it's empty.
    hide_input = false
    rounding = 9 # -1 means complete rounding (circle/oval)
    check_color = rgb(272727)
    fail_color =  rgb(ac4142) # if authentication failed, changes outer_color and fail message color
    fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
    capslock_color = rgb(ac4142)
    numlock_color = rgb(ac4142)
    bothlock_color = rgb(ac4142) # when both locks are active. -1 means don't change outer color (same for above)
    invert_numlock = false # change color if numlock is off

    position = 0, -164
    halign = center
    valign = center
}

label {
    monitor =
    text = 󰈷
    color = rgb(7f7f7f)
    font_size = 72
    font_family = SF Pro Display, Material Design Icons
    position = 0, -72
    halign = center
    valign = center
}

# Consolidated Time/Date
# Note: $TIME is a built-in variable and is zero-cost. 
# Keep it separate for positioning as defined in your original layout.
label {
    monitor =
    text = $TIME
    color = rgb(7f7f7f)
    font_size = 72
    font_family = SF Pro Display
    position = 32, 96
    halign = left
    valign = bottom
}

label {
    monitor =
    text = cmd[update:600000] date +"%A, %B %d %Y"
    color = rgb(7f7f7f)
    font_size = 32
    font_family = SF Pro Display
    position = 32, 32
    halign = left
    valign = bottom
}

# Optimized Battery & Network Labels
label {
    monitor =
    text = cmd[update:30000] ~/.config/hypr/scripts/battlock.sh
    color = rgb(7f7f7f)
    font_size = 24
    font_family = SF Pro Display, Material Design Icons
    position = -32, 32
    halign = right
    valign = bottom
}

label {
    monitor = 
    text = cmd[update:30000] ~/.config/hypr/scripts/netlock.sh
    color = rgb(7f7f7f)
    font_size = 16
    font_family = SF Pro Display, Material Design Icons
    text_align = right
    halign = right
    valign = top
    position = -32, -32
}

Compositor Info and Version

System/Version info
<Paste the output of the command here>

Description

hyprlock is not closing when unlocking with fingerprint enabled

How to reproduce

Enable fingerprint unlock in the config, lock and unlock

Crash reports, logs, images, videos

Hyprlock version v0.9.6
�[1;32mDEBUG �[0m]: | got iface: wl_seat v9
�[1;32mDEBUG �[0m]: > Bound to wl_seat v9
�[1;32mDEBUG �[0m]: | got iface: wl_data_device_manager v3
�[1;32mDEBUG �[0m]: | got iface: wl_compositor v6
�[1;32mDEBUG �[0m]: > Bound to wl_compositor v6
�[1;32mDEBUG �[0m]: | got iface: wl_subcompositor v1
�[1;32mDEBUG �[0m]: | got iface: wl_shm v2
�[1;32mDEBUG �[0m]: > Bound to wl_shm v2
�[1;32mDEBUG �[0m]: | got iface: wp_viewporter v1
�[1;32mDEBUG �[0m]: > Bound to wp_viewporter v1
�[1;32mDEBUG �[0m]: | got iface: wp_tearing_control_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: wp_fractional_scale_manager_v1 v1
�[1;32mDEBUG �[0m]: > Bound to wp_fractional_scale_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zxdg_output_manager_v1 v3
�[1;32mDEBUG �[0m]: | got iface: wp_cursor_shape_manager_v1 v2
�[1;32mDEBUG �[0m]: > Bound to wp_cursor_shape_manager_v1 v2
�[1;32mDEBUG �[0m]: | got iface: zwp_idle_inhibit_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zwp_relative_pointer_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zxdg_decoration_manager_v1 v2
�[1;32mDEBUG �[0m]: | got iface: wp_alpha_modifier_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zwlr_gamma_control_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: ext_foreign_toplevel_list_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zwp_pointer_gestures_v1 v3
�[1;32mDEBUG �[0m]: | got iface: zwlr_foreign_toplevel_manager_v1 v3
�[1;32mDEBUG �[0m]: | got iface: zwp_keyboard_shortcuts_inhibit_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zwp_text_input_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zwp_text_input_manager_v3 v1
�[1;32mDEBUG �[0m]: | got iface: zwp_pointer_constraints_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zwlr_output_power_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: xdg_activation_v1 v1
�[1;32mDEBUG �[0m]: | got iface: ext_idle_notifier_v1 v2
�[1;32mDEBUG �[0m]: | got iface: hyprland_lock_notifier_v1 v1
�[1;32mDEBUG �[0m]: | got iface: ext_session_lock_manager_v1 v1
�[1;32mDEBUG �[0m]: > Bound to ext_session_lock_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zwp_input_method_manager_v2 v1
�[1;32mDEBUG �[0m]: | got iface: zwp_virtual_keyboard_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zwlr_virtual_pointer_manager_v1 v2
�[1;32mDEBUG �[0m]: | got iface: zwlr_output_manager_v1 v4
�[1;32mDEBUG �[0m]: | got iface: org_kde_kwin_server_decoration_manager v1
�[1;32mDEBUG �[0m]: | got iface: hyprland_focus_grab_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zwp_tablet_manager_v2 v1
�[1;32mDEBUG �[0m]: | got iface: zwlr_layer_shell_v1 v5
�[1;32mDEBUG �[0m]: | got iface: wp_presentation v2
�[1;32mDEBUG �[0m]: | got iface: xdg_wm_base v7
�[1;32mDEBUG �[0m]: | got iface: zwlr_data_control_manager_v1 v2
�[1;32mDEBUG �[0m]: | got iface: zwp_primary_selection_device_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: xwayland_shell_v1 v1
�[1;32mDEBUG �[0m]: | got iface: hyprland_toplevel_mapping_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: hyprland_global_shortcuts_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: xdg_wm_dialog_v1 v1
�[1;32mDEBUG �[0m]: | got iface: wp_single_pixel_buffer_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: wp_security_context_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: hyprland_ctm_control_manager_v1 v2
�[1;32mDEBUG �[0m]: | got iface: hyprland_input_capture_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: hyprland_surface_manager_v1 v2
�[1;32mDEBUG �[0m]: | got iface: wp_content_type_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: xdg_toplevel_tag_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: xdg_system_bell_v1 v1
�[1;32mDEBUG �[0m]: | got iface: vicinae_hotkey_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: ext_workspace_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: ext_data_control_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: wp_pointer_warp_v1 v1
�[1;32mDEBUG �[0m]: | got iface: wp_fifo_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zxdg_exporter_v2 v1
�[1;32mDEBUG �[0m]: | got iface: zxdg_importer_v2 v1
�[1;32mDEBUG �[0m]: | got iface: ext_background_effect_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: wp_commit_timing_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: zwlr_screencopy_manager_v1 v3
�[1;32mDEBUG �[0m]: > Bound to zwlr_screencopy_manager_v1 v3
�[1;32mDEBUG �[0m]: | got iface: hyprland_toplevel_export_manager_v1 v2
�[1;32mDEBUG �[0m]: | got iface: ext_output_image_capture_source_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: ext_foreign_toplevel_image_capture_source_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: ext_image_copy_capture_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: wp_color_manager_v1 v3
�[1;32mDEBUG �[0m]: | got iface: wp_drm_lease_device_v1 v1
�[1;32mDEBUG �[0m]: | got iface: wp_linux_drm_syncobj_manager_v1 v1
�[1;32mDEBUG �[0m]: | got iface: wl_drm v2
�[1;32mDEBUG �[0m]: | got iface: zwp_linux_dmabuf_v1 v5
�[1;32mDEBUG �[0m]: > Bound to zwp_linux_dmabuf_v1 v5
�[1;32mDEBUG �[0m]: | got iface: wl_output v4
�[1;32mDEBUG �[0m]: > Bound to wl_output v4
�[1;32mDEBUG �[0m]: Exposed seat name: Hyprland
�[1;32mDEBUG �[0m]: [core] dmabufFeedbackMainDevice
�[1;32mDEBUG �[0m]: output eDP-1 name eDP-1
�[1;32mDEBUG �[0m]: output 71 description Lenovo Group Limited 0x40AD (eDP-1)
�[1;32mDEBUG �[0m]: output 71 make Lenovo Group Limited model 0x40AD
�[1;32mDEBUG �[0m]: output 71 done
�[1;32mDEBUG �[0m]: Running on Hyprland
�[1;32mDEBUG �[0m]: eglQueryDmaBufModifiersEXT found 10 mods
�[1;32mDEBUG �[0m]: [bo] has 2 plane(s)
�[1;32mDEBUG �[0m]: [bo] chose modifier 20000044051ba01
�[1;32mDEBUG �[0m]: Got dma frame with size [Vector2D: x: 1920, y: 1080]
�[1;32mDEBUG �[0m]: Gathered all screencopy frames - removing dmabuf listeners
�[1;32mDEBUG �[0m]: PAMPROMPT: Password:
�[1;32mDEBUG �[0m]: Resources gathered after 130 milliseconds
�[1;32mDEBUG �[0m]: Locking session
�[1;32mDEBUG �[0m]: Starting fade in
�[1;32mDEBUG �[0m]: fprint: using device path /net/reactivated/Fprint/Device/0
�[1;32mDEBUG �[0m]: Got fractional scale: 100.0%
�[1;32mDEBUG �[0m]: configure with serial 24189
�[1;32mDEBUG �[0m]: Configuring surface for logical [Vector2D: x: 1920, y: 1080] and pixel [Vector2D: x: 1920, y: 1080]
�[1;32mDEBUG �[0m]: Updating placeholder text: Input password for ron
�[1;32mDEBUG �[0m]: onLockLocked called
�[1;32mDEBUG �[0m]: fprint: claimed device
�[1;32mDEBUG �[0m]: fprint: started verifying
�[1;32mDEBUG �[0m]: fprint: finger selected: any
�[1;32mDEBUG �[0m]: fprint: handling status verify-match
�[1;32mDEBUG �[0m]: fprint: stopped verification
�[1;32mDEBUG �[0m]: Unlocking session
�[1;32mDEBUG �[0m]: Unlocked, exiting!
�[1;32mDEBUG �[0m]: PAMPROMPT: Password:
�[1;31mERR �[0m]: auth: pam_authenticate failed for hyprlock
�[1;32mDEBUG �[0m]: fprint: released device
�[1;32mDEBUG �[0m]: Reached the end, exiting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions