You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Linux/Wayland (niri): "only when desktop is away" suppresses all mobile pushes; powerMonitor reports active/0 while logind says LockedHint=yes #41341
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
Pair the iPhone; enable agent notifications; leave "Only when desktop is away" on.
Lock the session.
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:
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
AmethystLiang commentedon Nov 12, 2026
Triage: assigning to Jinwoo: this is about desktop-away detection for mobile push, which Jinwoo owns (relay/push, desktop-away-state).