diff --git a/src/platform/linux.rs b/src/platform/linux.rs index 7b52a3571..169e63021 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -2370,10 +2370,17 @@ mod desktop { last } + /// Preserves an active seat0 session's cached identity so the service loop only retries + /// late Wayland display discovery instead of repeating the full seat lookup. pub fn refresh(&mut self) { if !self.sid.is_empty() && is_active_and_seat0(&self.sid) { // Xwayland display and xauth may not be available in a short time after login. - if is_xwayland_running(&self.uid) && !self.is_login_wayland() { + // Avoid scanning processes on X11, where Xwayland discovery cannot provide any + // useful session information. + if self.is_wayland() + && !self.is_login_wayland() + && is_xwayland_running(&self.uid) + { self.get_display_xauth_xwayland(); } else if self.is_wayland() { self.get_display_xauth_wayland();