Skip to content

[Bug]: Linux/Wayland (niri): "only when desktop is away" suppresses all mobile pushes; powerMonitor reports active/0 while logind says LockedHint=yes #41341

Open

Description

@Mel-SRK

Setup

  • Orca 1.4.256 desktop on Arch Linux, niri 26.04 (Wayland), Noctalia lock.
  • iPhone paired; push registration is valid and has onlyWhenDesktopAway: true in ~/.config/orca/orca-devices.json.
  • Orca's Electron: 43.8.6 / Chromium 150.0.7871.250.
  • Checked main on 2026-11-12: src/main/notifications/desktop-away-state.ts and the lock-screen subscriptions are unchanged.

Observed

With "Only when desktop is away" enabled, the phone receives no push for agent-finished or needs-input events, even while the session is locked. Turning the setting off makes pushes arrive immediately.

Repro

  1. Pair the iPhone; enable agent notifications; leave "Only when desktop is away" on.
  2. Lock the session.
  3. Let an agent finish or wait for input.

No mobile push arrives.

Cause

src/main/notifications/desktop-away-state.ts computes away from powerMonitor.getSystemIdleState(180) / getSystemIdleTime(). src/main/startup/main-process-observers.ts also subscribes to powerMonitor.on('lock-screen'/'unlock-screen'), but those events are macOS/Windows only.

While loginctl show-session $XDG_SESSION_ID -p LockedHint reports yes, a minimal probe using the same Electron 43.8.6 runtime returns:

PROBE electron=43.8.6 chrome=150.0.7871.250 t0 {"state":"active","time":0}
PROBE electron=43.8.6 chrome=150.0.7871.250 t6 {"state":"active","time":0}

So readDesktopAwayState() returns false, the presence reporter sends away: false, and allowsMobilePushDelivery drops the push.

The documented "3 minutes idle" fallback is also broken: idle time never leaves 0. niri advertises ext_idle_notifier_v1 v2 and a C probe receives idled, but Electron 43.8.6 still returns 0.

Chromium's Linux lock detection normally uses D-Bus org.freedesktop.ScreenSaver.GetActive / ActiveChanged. niri owns that name but only implements Inhibit / UnInhibit; GetActive returns Unknown method (niri-wm/niri#4753). niri does set logind's LockedHint=yes, so the state is available without that D-Bus method.

PR #31956 says: "Lock events are macOS/Windows; on Linux, the idle check's locked state covers it." That is not true on niri/Wayland.

Ask

Add a Linux fallback for presence: read org.freedesktop.login1.Session.LockedHint for the current session (and IdleHint / IdleSinceHint when the compositor sets them), and report away when locked. This works today on niri and does not depend on Electron's powerMonitor lock/idle support. Alternatively, wait for niri #4753 and an Electron fix, but that leaves mobile push disabled for Linux Wayland users in the meantime.

Also consider not promising "or when locked" in the mobile UI on Linux until detection works, and exposing the last reported presence for debugging.

Workaround

Turn off "Only when desktop is away" in the iPhone app's notification delivery settings.

Activity

  1. AmethystLiang commented on Nov 12, 2026

    @AmethystLiang
    Contributor

    Triage: assigning to Jinwoo: this is about desktop-away detection for mobile push, which Jinwoo owns (relay/push, desktop-away-state).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions