Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock event resumes all listeners #108

Open
rmsc opened this issue Nov 7, 2024 · 3 comments
Open

Lock event resumes all listeners #108

rmsc opened this issue Nov 7, 2024 · 3 comments

Comments

@rmsc
Copy link

rmsc commented Nov 7, 2024

When a listener is triggered Lock event is received, it seems to resume all listeners. Not sure if this happens by design, but it's not what I would expect.

With the test config bellow, the screen dims, then turns off, and then comes back on again after locking. I believe it should stay off even when locking is happening:

general {
    lock_cmd = pidof hyprlock || hyprlock
    before_sleep_cmd = loginctl lock-session
    # turn on screen after sleep
    after_sleep_cmd = hyprctl dispatch dpms on
}

# Reduce monitor brightness on early idle
listener {
    timeout = 5
    on-timeout = light -O && light -S 2
    on-resume = light -I
}
listener {
    timeout = 10
    on-timeout = hyprctl dispatch dpms off
    on-resume = hyprctl dispatch dpms on
}
listener {
    timeout = 15
    on-timeout = loginctl lock-session
}

Here's the relevant log output:

(...)
[LOG] found 3 rules
[LOG] wayland done, registering dbus
[LOG] Using dbus path /org/freedesktop/login1/session/_31
[LOG] Idled: rule 55a4dbb10050
[LOG] Running light -O && light -S 2
[LOG] Executing light -O && light -S 2
[LOG] Process Created with pid 195944
[LOG] Idled: rule 55a4dbb10098
[LOG] Running hyprctl dispatch dpms off
[LOG] Executing hyprctl dispatch dpms off
[LOG] Process Created with pid 195953
ok
[LOG] Idled: rule 55a4dbb100e0
[LOG] Running loginctl lock-session
[LOG] Executing loginctl lock-session
[LOG] Process Created with pid 195958
[LOG] Got dbus .Session
[LOG] Got Lock from dbus
[LOG] Locking with pidof hyprlock || hyprlock
[LOG] Executing pidof hyprlock || hyprlock
[LOG] Process Created with pid 195965
[LOG] Resumed: rule 55a4dbb10050
[LOG] Running light -I
[LOG] Executing light -I
[LOG] Process Created with pid 195988
[LOG] Resumed: rule 55a4dbb10098
[LOG] Running hyprctl dispatch dpms on
[LOG] Executing hyprctl dispatch dpms on
[LOG] Process Created with pid 195990
[LOG] Resumed: rule 55a4dbb100e0
[LOG] Ignoring, onRestore is empty.
ok
(...)

This also happens when we switch the order to dim->lock->dpms, which is arguably the most common use case. When the lock event comes, the screen lights up and stays that way until the dpms listener gets triggered.

@vaxerski
Copy link
Member

vaxerski commented Nov 7, 2024

IIRC this is fixed in hyprland-git, what is your hyprland version?

@rmsc
Copy link
Author

rmsc commented Nov 8, 2024

This is with hypridle-0.1.4, hyprland-0.42.0.

I just noticed there's a new 0.1.5 release, does it include the fix? Thanks!

@vaxerski
Copy link
Member

vaxerski commented Nov 8, 2024

hyprland release. 0.42.0 is very, very outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants