Archive. This is an archive of the Apple Support Community. Discussions are being restored and soon you will be able to read and post here again.

Mac Studio user session logs out after WindowServer exits on macOS 27.2

I’m looking for anyone else seeing this, or any pointer to where macOS records the reason.


Machine: Mac Studio (Mac16,9), Apple M4 Max, 14 CPU cores (10 performance, 4 efficiency), 36 GB memory, macOS 27.2 (26B123). One user with automatic login, FileVault off, one 1920 x 1080 display, nobody at the keyboard. It runs a Python web application with background image analysis (Apple Vision and Core ML) and ffmpeg with VideoToolbox around the clock.


What happens: the logged-in user’s session ends by itself. Every process in it receives SIGTERM, and the Mac stays at the login window until it is restarted, because automatic login only happens at boot.


Timeline


  • Oct 20: updated to macOS 27.0.1.
  • Oct 31, 09:03: updated to macOS 27.2.
  • Nov 3, 22:09:56 EST: session ended.
  • Nov 6, 05:21:55 EST: session ended.
  • Nov 8, 07:24:53 EST: session ended.

The unified log shows the same lines each time (Nov 3 shown, trimmed):



loginwindow: -[LoginApp windowServerExited] | ERROR | Window Server exited, closing down the session immediately
loginwindow: -[SessionLogoutManager startDirectLogout:reason:stopForOtherSessions:] | Enter, logoutType: Logout, directLogoutReason:WindowServerExited
loginwindow: ... | SystemVersion: 27.2, Build: 26B123

The first occurrence I found was three days after the 27.2 update.


What I saw just before the exit: on Nov 8, WindowServer made about 133 (TCC) TCCAccessRequest() IPC calls to com.apple.tccd.system in the 13.5 seconds before it exited, 6 to 8 per second in the final 10 seconds, and the exit came 2 ms after the last one. On Nov 3 I also saw WindowServer making TCCAccessRequest calls in the 36 seconds before the exit. I don’t know which process was asking.


What I’ve checked


  • No WindowServer or panic report is written, in either /Library/Logs/DiagnosticReports or ~/Library/Logs/DiagnosticReports.
  • I now record memory every 5 minutes. WindowServer stayed under 260 MB over three days, swap was 7 MB or less, free memory was 88% just before the Nov 8 loss, and the GPU reset count stayed at 0.
  • Spotlight indexing is off, and sleep is prevented.
  • A static black desktop and Reduce Transparency did not stop it happening again.
  • A watchdog now restarts the Mac when it finds nobody logged in, which gets the service back in about 10 minutes.


A comparison, with caveats: another Mac Studio (Mac17,14, Apple M5 Max, 36 GB) on the same macOS 27.2 (26B123), installed Oct 30 and running a different application, has stayed in one continuous login session since Oct 31. It’s a different chip and a different workload, so I’m not claiming identical conditions.


Similar public reports (not Apple statements):



Questions


  1. Is anyone else seeing directLogoutReason:WindowServerExited on macOS 27.2, especially on an unattended Mac?
  2. Where does macOS record why WindowServer exited (a watchdog, a memory kill, a permission-check hang)? I found nothing.
  3. Is there a setting that restarts the user session after WindowServerExited without a reboot?
  4. Does macOS 27.2.1 or 27.3 address this?


I’ll post anything further I find here.

2 replies

Your Mac may be logging out automatically after inactivity, which would explain the termination of processes on the unattended Mac.


Ensure that your Mac is not set to log out after a period of inactivity. There's a 'hidden' setting that controls that, and macOS updates have recently been known to toggle on settings without user interaction (for example, the Tahoe upgrade toggled on automatic window tiling settings for me that I had never enabled).


Go to System Settings > Privacy & Security > Advanced (button at the bottom), and ensure the setting to Log out automatically after inactivity is OFF.



More info from Apple: Change Privacy & Security Advanced settings on Mac - Apple Support


Regarding your final question about changes in beta versions of macOS, those cannot be discussed here per the terms of the forum and Apple's beta testing agreement.

Thanks for the suggestion. I checked, and it was already off.


[Edited by Moderator]