hypridle: Doesn't work till locked once manually.
Config
general {
lock_cmd = swaylock -f
unlock_cmd = killall -q -s SIGUSR1 swaylock
before_sleep_cmd = loginctl lock-session; sleep 2
ignore_dbus_inhibit = false
}
listener {
timeout = 10
on-timeout = swaylock -f
}
listener {
timeout = 20
on-timeout = sleep 1 && hyprctl dispatch dpms off
on-resume = sleep 1 && hyprctl dispatch dpms on
}
listener {
timeout = 30
on-timeout = systemctl suspend
}
# vim: commentstring=#\ %s
Logs
killall hypridle; hypridle
[LOG] Registered timeout rule for 10s:
on-timeout: swaylock -f
on-resume:
[LOG] Registered timeout rule for 20s:
on-timeout: sleep 1 && hyprctl dispatch dpms off
on-resume: sleep 1 && hyprctl dispatch dpms on
[LOG] Registered timeout rule for 30s:
on-timeout: systemctl suspend
on-resume:
[LOG] | got iface: wl_shm v1
[LOG] | got iface: wl_drm v2
[LOG] | got iface: zwp_linux_dmabuf_v1 v4
[LOG] | got iface: wl_compositor v6
[LOG] | got iface: wl_subcompositor v1
[LOG] | got iface: wl_data_device_manager v3
[LOG] | got iface: zwlr_export_dmabuf_manager_v1 v1
[LOG] | got iface: zwlr_data_control_manager_v1 v2
[LOG] | got iface: zwp_primary_selection_device_manager_v1 v1
[LOG] | got iface: wp_viewporter v1
[LOG] | got iface: zwlr_gamma_control_manager_v1 v1
[LOG] | got iface: zwlr_output_power_manager_v1 v1
[LOG] | got iface: xdg_wm_base v6
[LOG] | got iface: wl_seat v9
[LOG] > Bound to wl_seat v9
[LOG] | got iface: wp_presentation v1
[LOG] | got iface: ext_idle_notifier_v1 v1
[LOG] > Bound to ext_idle_notifier_v1 v1
[LOG] | got iface: zwlr_layer_shell_v1 v4
[LOG] | got iface: org_kde_kwin_server_decoration_manager v1
[LOG] | got iface: zxdg_decoration_manager_v1 v1
[LOG] | got iface: zwlr_output_manager_v1 v4
[LOG] | got iface: zwp_keyboard_shortcuts_inhibit_manager_v1 v1
[LOG] | got iface: zwp_pointer_constraints_v1 v1
[LOG] | got iface: zwp_relative_pointer_manager_v1 v1
[LOG] | got iface: zwp_virtual_keyboard_manager_v1 v1
[LOG] | got iface: zwlr_virtual_pointer_manager_v1 v2
[LOG] | got iface: zwlr_foreign_toplevel_manager_v1 v3
[LOG] | got iface: wp_drm_lease_device_v1 v1
[LOG] | got iface: zwp_tablet_manager_v2 v1
[LOG] | got iface: zwp_idle_inhibit_manager_v1 v1
[LOG] | got iface: zxdg_exporter_v1 v1
[LOG] | got iface: zxdg_importer_v1 v1
[LOG] | got iface: zxdg_exporter_v2 v1
[LOG] | got iface: zxdg_importer_v2 v1
[LOG] | got iface: zwp_pointer_gestures_v1 v3
[LOG] | got iface: zwp_text_input_manager_v3 v1
[LOG] | got iface: zwp_input_method_manager_v2 v1
[LOG] | got iface: xdg_activation_v1 v1
[LOG] | got iface: ext_session_lock_manager_v1 v1
[LOG] | got iface: wp_cursor_shape_manager_v1 v1
[LOG] | got iface: wp_tearing_control_manager_v1 v1
[LOG] | got iface: wp_single_pixel_buffer_manager_v1 v1
[LOG] | got iface: xwayland_shell_v1 v1
[LOG] | got iface: hyprland_toplevel_export_manager_v1 v2
[LOG] | got iface: wp_fractional_scale_manager_v1 v1
[LOG] | got iface: zwp_text_input_manager_v1 v1
[LOG] | got iface: hyprland_global_shortcuts_manager_v1 v1
[LOG] | got iface: zwlr_screencopy_manager_v1 v3
[LOG] | got iface: zxdg_output_manager_v1 v3
[LOG] | got iface: wl_output v4
[LOG] | got iface: wl_output v4
[LOG] found 3 rules
[LOG] wayland done, registering dbus
[LOG] Using dbus path /org/freedesktop/login1/session/_310
This is the log and it keeps like this and nothing happens waited much long enough.
now if i lock the screen manually by issuing the command loginctl lock-session
[LOG] Got dbus .Session
[LOG] Got Lock from dbus
[LOG] Locking with swaylock -f
[LOG] Executing swaylock -f
[LOG] Process Created with pid 1404604
The logs add these few lines.
after this when i unlock everything works fine as expected.
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Reactions: 2
- Comments: 16 (9 by maintainers)
patch.txt try this
seems to be working for me just fine, your config
Or just use the latest version with the fix lol
I can also replicate this issue, the first commit this occurs on is 36d7238afdcbb04487212304fcbfa23e9d7bac27 (adding dbus support).
From my quick testing, I was able to figure out that the while loop in CHypridle::enterEventLoop (the 2nd one, not the one running in the thread) waits at this function call:
which appears to be blocking until the manual lock-session occurs.
Details
Running with this patch, introducing some debug prints:
Here’s the output from
hypridle -v
built with this patch.Letting it run for a while, this was the output::
Now, pretty much immediately after executing
loginctl lock-session
, this was the output:Then, for a while, it ran similarly as before, until the 20s I have configured for my listener have elapsed, after which it now actually processed that and ran the configured command: