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):
- macOS 27.2 (26B123), WindowServer killed by the system watchdog, session logged out: https://github.com/jm2/kisakcod/issues/997
- macOS 27.0.1, WindowServer stuck on a Screen Recording permission check, then killed: https://github.com/byrencheema/airstats/issues/25
- The same loginwindow lines with no WindowServer report, macOS 26.5.1: https://github.com/lwouis/alt-tab-macos/issues/5786
Questions
- Is anyone else seeing directLogoutReason:WindowServerExited on macOS 27.2, especially on an unattended Mac?
- Where does macOS record why WindowServer exited (a watchdog, a memory kill, a permission-check hang)? I found nothing.
- Is there a setting that restarts the user session after WindowServerExited without a reboot?
- Does macOS 27.2.1 or 27.3 address this?
I’ll post anything further I find here.