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

bug: hypridle service skipped because of an unmet condition #5407

Closed
2 tasks done
Anomalocaridid opened this issue May 15, 2024 · 2 comments
Closed
2 tasks done

bug: hypridle service skipped because of an unmet condition #5407

Anomalocaridid opened this issue May 15, 2024 · 2 comments
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@Anomalocaridid
Copy link

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

I recently updated my NixOS setup and switched from the hypridle flake module to the one in Home Manager. I noticed that hypridle does not do anything when I try to lock my session with loginctl lock-session. I checked the status of the systemd service with systemctl --user status hypridle.service and got the following output:

○ hypridle.service - hypridle
     Loaded: loaded (/home/anomalocaris/.config/systemd/user/hypridle.service; enabled; preset: enabled)
     Active: inactive (dead)
  Condition: start condition unmet at Tue 2024-05-14 23:10:00 EDT; 5min ago
             └─ ConditionEnvironment=WAYLAND_DISPLAY was not met

May 14 23:10:00 home-pc systemd[3088]: hypridle was skipped because of an unmet condition check (ConditionEnvironment=WAYLAND_DISPLAY).

I am using Hyprland on NixOS unstable. When I manually run systemctl --user start hypridle.service, hypridle works as expected.

Maintainer CC

@khaneliman
@fufexan

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.8.9-xanmod1, NixOS, 24.05 (Uakari), 24.05pre-git`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.22.0`
 - nixpkgs: `/nix/store/vsbi6gfwf2bdamw0d0d9xndb1rrxfnbk-source`
@Anomalocaridid Anomalocaridid added bug triage Issues or feature request that have not been triaged yet labels May 15, 2024
@Anomalocaridid Anomalocaridid changed the title bug: hypridle skipped because of an unmet condition bug: hypridle service skipped because of an unmet condition May 15, 2024
@khaneliman
Copy link
Contributor

khaneliman commented May 15, 2024

WAYLAND_DISPLAY should be set by Hyprland in a graphical session. Are you using the hyprland home-manager module, as well? I believe we do some stuff with passing along the WAYLAND_DISPLAY variable in

systemd = {
enable = lib.mkEnableOption null // {
default = true;
description = ''
Whether to enable {file}`hyprland-session.target` on
hyprland startup. This links to `graphical-session.target`.
Some important environment variables will be imported to systemd
and D-Bus user environment before reaching the target, including
- `DISPLAY`
- `HYPRLAND_INSTANCE_SIGNATURE`
- `WAYLAND_DISPLAY`
- `XDG_CURRENT_DESKTOP`
'';
};

@Anomalocaridid
Copy link
Author

I am using the hyprland home-manager module. However I realized that this is probably not a bug with home-manager. Rather I think it's probably this PR I am using: NixOS/nixpkgs#297434. It apparently causes issues with services that rely on graphical-session.target.

Sorry for missing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

5 participants