HeartbeatHocusFocusFilesMacHyperTile
Guide

loginwindow, the process that signs you in and then keeps the books

The process behind the sign in screen, the out of memory dialog and the session's app bookkeeping. Measured: 30 MB of memory, two minutes of CPU a day, runs as you.

By Chethan Kumar S N · Updated

You have stared at this process more than any other on your Mac. The screen with your picture and the password box, the Apple menu’s Sleep and Restart and Shut Down, the force quit panel that appears when nothing else will answer: all of it is loginwindow’s work, drawn before you are anyone and kept running the whole time you are.

This page is a measurement of it on a Mac running macOS 27.0.1 with 29 and a half days of uptime, 10 cores, 32 GB of memory. Every fact below was read off the system, nothing installed, nothing killed.

No manual page at all

Start where the series always starts, the manual:

$ man loginwindow
No manual entry for loginwindow

WindowServer, kernel_task, SystemUIServer, the daemons this series has covered so far, all of them get at least a line or two. The process that guards the front door of every Mac shipped gets zero. Apple’s own user guide is happy to name the login window as a place: “You can turn on certain accessibility options in the login window to make it easier to log in to your Mac”, says the Lock Screen page, which also promises “the options you turn on are enabled in the login window for all users of your Mac.” The window is documented everywhere. The process that draws it is documented nowhere.

An app with a daemon’s birth certificate

The launch file sits in /System/Library/LaunchDaemons, the root-level folder, but reads like nothing else there:

Label            => com.apple.loginwindow
MachServices     => { "com.apple.loginwindow" => true }
MultipleInstances => true
POSIXSpawnType   => App
ProgramArguments => [ .../loginwindow, "console" ]
RunningBoard     => { "VariableEUID" => true }

MultipleInstances is the interesting key. Most daemons are singletons. This one is a mould: launchd keeps the service registered but unspawned, and casts a fresh instance for each login session. The report on the service itself reads state = not running, runs = 0, last exit code = never exited, while a second report on the instance, named com.apple.loginwindow followed by a UUID, reads state = running, runs = 1, pid = 498, immediate reason = ipc (mach), forks = 151. One Mac, one mould, one casting per session, and a second casting would appear the moment someone fast user switched, which is exactly what the key is for. The binary’s own strings name that machinery: SACSwitchToUser, fastUserSwitchingEnabled, and _sessionStartedByScreenSharing, because a screen sharing login creates a session too.

VariableEUID explains the strangest column in Activity Monitor. loginwindow appears to run as you, not root: the ps user field on this Mac says chethankumar, parent pid 1, alive 29 days 15 hours, same age as the uptime, one unbroken run. A process launched from the system daemon folder, wearing your name. The effective UID is variable on purpose: it runs as whoever is sitting at the screen.

The registrar

What does it do all day while you work? The log answers. A 20 minute window, 4 in the morning, nothing running, and the process logged steadily. Every line was the same kind of line:

-[PersistentAppsSupport applicationQuit:] | for app:Accessibility Services
-[ApplicationManager handleCASEvent:withData:] | CAS notification for appDeath
   for com.apple.accessibility.AXVisualSupportAgent
-[PersistentAppsSupport applicationLaunched:] | enter. clearing logout
   in progress and last logout time

The accessibility zoom agent on this Mac cycles about once a minute, so once a minute loginwindow wrote down that it died and wrote down that it came back. Scale that up: every app you open, every app that crashes, every background agent that blinks, gets an entry. loginwindow is the session’s registrar, the clerk who keeps the list of what is running, and the list has a purpose you have met. It is the reopen windows when logging back in feature. The strings call the machinery TAL, and the file RestartTALWarning holds the dialog that guards it, verbatim:

You shut down your computer because of a problem. If you want to open the applications that were open when you shut down, click Open. If you do nothing, the computer will continue the login in 1 minute.

That is the dialog everyone photographs after a kernel panic, and the decision to show it is made inside this process, from a panic preference and a time delta. The debug strings say so out loud: previousStartupWasAPanicOrHardRestart, then “Last panic was < timeout, setting return to YES”, then the warning goes up. The crash dialog is not a mystery process. It is this one, reading a note left by the previous boot.

The dialog drawer

Open the app’s Resources folder and the fame continues. Alongside 42 locale folders, each dialog the login screen can raise ships as its own translation table, 41 locales per file:

File on diskThe dialog it holds
LowMemoryPanel“Your system has run out of application memory.”
ForceQuitPanel“Force Quit Applications”
RestartTALWarning“You shut down your computer because of a problem.”
ConnectedUsers“There is a user sharing this computer. If you shut down they will be disconnected.”
LogoutInterruptCancel, Force Quit, Try Again
LoginKeychainUIthe keychain password prompts at sign in
BrokenLoginKeychainUIthe repair flow when that keychain will not open

The out of memory dialog, the one people screenshot as proof their Mac has a leak, is a loginwindow resource. So are the six button icons sitting in the same folder as plain image files: Sleep.tiff, Restart.tiff, ShutDown.tiff, Lock.tiff, LogOut.tiff, keys.tiff. The Apple menu’s shutdown options, the ones you have clicked thousands of times, are drawn by this process from those files. There is even a 204 KB helper binary named LWAnalytics parked in Resources, instrumentation wearing a filename.

Secure input, explained

One search family deserves its own section: loginwindow secure input. Secure Input is a macOS mode that tells the system to stop delivering keystrokes to anything except the focused password field. When the sign in screen or the lock screen takes your password, something has to switch that mode on, and the binary carries the call by name: _setSecureInput, on the class LWDefaultScreenLockUI, with 274 strings in the binary devoted to the lock screen UI. This is the process that darkens the screen and locks the keyboard path while you type.

It is protective, and the only time you will read its name in anger is when a password manager complains that Secure Input is still on after an unlock. The mode is meant to drop when the field closes. When a process hangs onto it, logging out and back in clears the state, which restarts exactly the process that owns the switch.

The bill

Two ps readings taken minutes apart:

ReadingValue
Memory (RSS)30,336 KB, then 30,320 KB
Virtual size489,127,168 KB, about 466 GB
Processor time63 minutes 25 seconds across 29d 15h
Per dayabout 2 minutes 8 seconds, 0.15% of one core
CPU right now0.0%
Runs1, never exited, same age as the uptime

The 466 GB virtual size is the number that alarms people in Activity Monitor’s Real Mem versus Virtual Mem columns. It is reserved address space, not held RAM, the same pattern the audio daemon audiomxd showed in this series, and launchd caps the real thing with a soft jetsam limit of 550 MB active or inactive.

Two minutes of CPU a day for the registrar, the sign in screen, the lock screen, the crash dialog and the out of memory dialog together is cheap. When the column does climb, the cause is almost always volume: an app crash loop generating a registrar entry a second, a screen sharing session that started a second loginwindow casting, or a Mac where fast user switching has several sessions alive. The fix is never the process. It is whatever is feeding the ledger.

The neighbours

The LaunchDaemons folder holds the rest of the sign in crew, and the names tell the story: com.apple.efilogin-helper, the FileVault unlock before the desktop exists, com.apple.security.agent.login, com.apple.LocalAuthentication.UIAgent.login, com.apple.AppSSOAgent.login, a UserEventAgent and a UserNotificationCenterAgent both tagged LoginWindow, and com.apple.loginwindow.LWWeeklyMessageTracer, a weekly job that sweeps the message drawer. Note what is not on the list: logind, which sounds like the same thing and is not. That one tracks keyboards and sessions at a lower layer, and is a different daemon entirely.

The 311 byte ledger

One last file, because it is the kind of thing a measurement should admit exists. /Library/Preferences/com.apple.loginwindow.plist is 311 bytes, world readable, root owned, and it holds the front desk’s own notebook: lastUserName with the account that logged in most recently, lastUser set to loggedIn, RecentUsers, MaximumUsers, GuestEnabled false on this Mac. Nothing in it is secret, and it is Apple’s file, present on every Mac. But if you ever wondered how the sign in screen knows to prefill your name and picture after a restart, that is the file it read.

So no, you cannot quit it, should not kill it, and have never needed to. It signed you in, it wrote down everything you opened, and when you shut the lid tonight it will still be there in the morning, holding the door.

Questions

What is loginwindow on my Mac?

It is the process that draws the screen you type your password into, and then stays alive for the whole session doing the bookkeeping around it. Every app launch and quit on the Mac is noted by it, every lock screen belongs to it, and several of the most famous dialogs in macOS, including Your system has run out of application memory, are loaded from its own resource folder. On the measured Mac it runs as your own account, not root, out of /System/Library/CoreServices/loginwindow.app, and it has been alive for the entire 29 day uptime without a restart. Unlike its neighbour SystemUIServer, which gets two sentences of manual page, this one gets none. The searches that find this page, loginwindow mac, loginwindow process, loginwindow activity monitor, are people who met the name in Activity Monitor and found nobody had ever introduced it.

Why is loginwindow using high CPU or memory?

Mostly because apps are being started, stopped or crashing. loginwindow is the session's registrar: its log lines are app bookkeeping, noting every launch and every exit, and a Mac with an app that crash loops will keep this process busy taking the minutes. A 20 minute log window on the measured Mac, taken at 4 in the morning with nothing running, held nothing but the bookkeeping for the accessibility zoom agent cycling once a minute, and the total came to 63 minutes of processor time across 29 and a half days, about two minutes a day. Memory sits at 30 MB and barely moves. The one number that looks alarming, a virtual size of 466 GB, is address space the process reserved, not RAM it is holding, and its launch file caps the real usage with a soft jetsam limit of 550 MB.

What does loginwindow quit unexpectedly mean?

It means the session itself crashed, and it is rare. loginwindow is not an app you can close, it is the thing your session lives inside, so when it dies the Mac logs you out, your open apps close, and the sign in screen comes back. The dialog text people remember after a bad restart, You shut down your computer because of a problem, is loaded from this very process, from a file called RestartTALWarning, and the binary contains the decision logic with the panic preference and the time delta check spelled out in its own debug strings. A loginwindow crash report after a hard restart is usually a symptom of whatever forced the restart, not a second fault. On the measured Mac it has never exited: launchd's report reads runs = 1, last exit code, never exited.

What is loginwindow secure input?

Secure Input is the macOS mode that stops other software from reading keystrokes while a password field has focus, and loginwindow is one of the processes that switches it on. The binary carries the call by name, _setSecureInput, next to the class that runs the lock screen UI, and it fires around the password field at the sign in screen and the lock screen. That is why password managers sometimes report that Secure Input is stuck on after an unlock: the mode is meant to be released when the field closes, and if a process hangs onto it, the fix is the same as ever, log out and back in, which restarts the very process in question. It is a protective feature misbehaving, not something reading your keyboard.

Can I quit or disable loginwindow?

No, and this is the one process in this series where killall is genuinely bad advice. Killing loginwindow does not refresh anything, it ends your session: every open app closes exactly as if you had chosen Log Out, because that is what just happened. The process lives on the sealed system volume, its launch file is a LaunchDaemon you cannot remove, and launchd holds it to a minimum runtime of 10 seconds so a crash loop is stopped by design. There is nothing to gain anyway. At 30 MB and two minutes of CPU a day it is not the thing making a Mac slow, and the sign in screen it draws is the only way into the session.

Is loginwindow a virus or malware?

No. The genuine binary lives at /System/Library/CoreServices/loginwindow.app on the sealed, read-only system volume, 3.2 MB, owned by root, and signed by Apple as part of the OS, built into build 26A434 on this Mac. It runs as your user account, which is worth knowing: a process with this name running from a downloads folder would be a costume, and the path in Activity Monitor's Sample Process dialog is how you check. There is no malware family that impersonates this name in the wild. One honest note the measurement turned up: the preferences file at /Library/Preferences/com.apple.loginwindow.plist is world readable, 311 bytes, and records the last user who logged in and whether the guest account is on. That is Apple's own file, on every Mac, and it is the closest thing to a privacy surprise in the whole process.

Ready? Buy Ribbon for $15, or read all the guides.