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-session doesn't trigger hyprlock #115

Open
Joao-Queiroga opened this issue Dec 14, 2024 · 9 comments
Open

lock-session doesn't trigger hyprlock #115

Joao-Queiroga opened this issue Dec 14, 2024 · 9 comments

Comments

@Joao-Queiroga
Copy link

Joao-Queiroga commented Dec 14, 2024

When the listener does the lock-session command, or when its done manually, it doesn't trigger hyprlock.
Here is my config:

general {
  lock_cmd = pidof hyprlock || hyprlock       # avoid starting multiple hyprlock instances.
  before_sleep_cmd = loginctl lock-session    # lock before suspend.
  after_sleep_cmd = hyprctl dispatch dpms on  # to avoid having to press a key twice to turn on the display.
  ignore_dbus_inhibit = false             # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
  ignore_systemd_inhibit = false          # whether to ignore systemd-inhibit --what=idle inhibitors
}

listener {
    timeout = 150                                # 2.5min.
    on-timeout = brightnessctl -s set 10         # set monitor backlight to minimum, avoid 0 on OLED monitor.
    on-resume = brightnessctl -r                 # monitor backlight restore.
}

listener {
    timeout = 300                                 # 5min
    on-timeout = loginctl lock-session            # lock screen when timeout has passed
}

listener {
    timeout = 330                                 # 5.5min
    on-timeout = hyprctl dispatch dpms off        # screen off when timeout has passed
    on-resume = hyprctl dispatch dpms on          # screen on when activity is detected after timeout has fired.
}

I am using hypridle 0.1.5 and Hyprland 0.45.2 on gentoo using openrc

@Joao-Queiroga Joao-Queiroga changed the title lock-session doesn't trigger hyor lock-session doesn't trigger hyprlock Dec 14, 2024
@vaxerski
Copy link
Member

is hypridle spawned from hyprland or a service? If a service, it doesn't share the same environment as hyprland, so hyprlock cannot start because it doesn't know where to start

@Joao-Queiroga
Copy link
Author

Joao-Queiroga commented Dec 15, 2024

its started from hyprland its not systemd.

@Joao-Queiroga
Copy link
Author

Joao-Queiroga commented Dec 16, 2024

I switched to systemd on gentoo to test it and it works. I think its a problem when comunicating to logind or dbus.

@vaxerski
Copy link
Member

your env is somehow not propagating correctly.

@Quasar-0330
Copy link

Does not work in Arch either.

@Quasar-0330
Copy link

Looks like it's already been fixed.
It works in my environment

@vaxerski
Copy link
Member

@Joao-Queiroga ?

@jetm
Copy link

jetm commented Dec 27, 2024

I am using Arch Linux too, and maybe a specific case. I had the same problem. It started working for me after starting using uwsm and enabling hypridle.service; I had my own systemd service.

For the case of Arch Linux, make sure hyrplock is not crashing because of the wrong hyprutils library.

@Joao-Queiroga
Copy link
Author

I actualy went back to arch and it stopped. I think it has something to do with elogind.

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

4 participants