Closed niksingh710 closed 9 months ago
I can confirm that this is an issue! was trying to figure out why it wasn't working, nice catch!
Also, out of curiosity, why the "sleep 1" before dpms? Do you notice any benefits in having dpms on on resume, over just not having anything (as everything turns on by itself after I move something)?
Maybe you were trying to use hyprctl in a terminal, and noticed it didn't work without sleep 1? That would be due to you pressing enter and that counting as an input, I believe
Edit: nvm I only now notice that misc:mouse_move_enables_dpms
and misc:key_press_enables_dpms
are false by default, and I had turned them on
Also, out of curiosity, why the "sleep 1" before dpms? Do you notice any benefits in having dpms on on resume, over just not having anything (as everything turns on by itself after I move something)?
yep, sleep and hyprctl dpms is not required there. Was porting my swayidle config to hypridle and hypridle wasn't working, so putted there. 😅
seems to be working for me just fine, your config
seems to be working for me just fine, your config
yep, just rebooted the system and it is working as expected. I guess either this need xdph working in bg or my system needed an reboot. Closing this.
Nop, the issue is there.
just updated hyprland-git
and rebooted.
hypridle won't kick in after first lock screen as mentioned in above logs.
I guess here's my config, but I really doubt there's anything wrong with it
Same issue, here's my config. I'm using latest hyprlang and hypridle
general {
lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
unlock_cmd = notify-send "unlock!" # same as above, but unlock
before_sleep_cmd = notify-send "Zzz" # command ran before sleep
after_sleep_cmd = notify-send "Awake!" # command ran after sleep
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
}
listener {
timeout = 300 # in seconds
on-timeout = hyprctl dispatch dpms off # command to run when timeout has passed
on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
}
listener {
timeout = 600 # in seconds
on-timeout = swaylock -c 000000 # command to run when timeout has passed
on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
}
what if you set ignore dbus inhibit to true
Didn't fix it for me
[LOG] Registered timeout rule for 10s:
on-timeout: hyprctl dispatch dpms off
on-resume: notify-send "Welcome back!"
[LOG] Registered timeout rule for 600s:
on-timeout: swaylock -c 000000
on-resume: notify-send "Welcome back!"
[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 v5
[LOG] | got iface: wl_seat v8
[LOG] > Bound to wl_seat v8
[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 2 rules
[LOG] wayland done, registering dbus
[LOG] Using dbus path /org/freedesktop/login1/session/_35
[ERR] Failed registering for /org/freedesktop/ScreenSaver, perhaps taken?
err: [org.freedesktop.DBus.Error.FileNotFound] Failed to open bus (No such file or directory)
After loginctl lock-session
:
[LOG] Got dbus .Session
[LOG] Got Lock from dbus
[LOG] Locking with notify-send "lock!"
[LOG] Executing notify-send "lock!"
[LOG] Process Created with pid 26257
After the timeout:
[LOG] Idled: rule 56dfe59de030
[LOG] Running hyprctl dispatch dpms off
[LOG] Executing hyprctl dispatch dpms off
[LOG] Process Created with pid 26682
ok
[LOG] Resumed: rule 56dfe59de030
[LOG] Running notify-send "Welcome back!"
[LOG] Executing notify-send "Welcome back!"
[LOG] Process Created with pid 26684
Config:
general {
lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
unlock_cmd = notify-send "unlock!" # same as above, but unlock
before_sleep_cmd = notify-send "Zzz" # command ran before sleep
after_sleep_cmd = notify-send "Awake!" # command ran after sleep
ignore_dbus_inhibit = true # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
}
listener {
timeout = 10 # in seconds
on-timeout = hyprctl dispatch dpms off # command to run when timeout has passed
on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
}
listener {
timeout = 600 # in seconds
on-timeout = swaylock -c 000000 # command to run when timeout has passed
on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
}
@JCMaxwell12 pretty sure you already had hypridle running when you sent this but ok ahah
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:
m_sEventLoopInternals.loopSignal.wait(lk, [this] { return m_sEventLoopInternals.shouldProcess == true; }); // wait for events
which appears to be blocking until the manual lock-session occurs.
Fixed it for me too
For those who don't want to patch code, I found that it is enough to run it like that:
(hypridle &) && loginctl unlock-session
For those who don't want to patch code, I found that it is enough to run it like that:
(hypridle &) && loginctl unlock-session @DonPiotr
Or just use the latest version with the fix lol
Config
Logs
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
The logs add these few lines.
after this when i unlock everything works fine as expected.