What is WindowServer on a Mac, and why is it using CPU?

WindowServer is the part of macOS that draws everything you see on screen: every window, the menu bar, the Dock, the pointer and every animation between them. It uses more of the processor when there is more to draw, so it gets busy with many windows, several displays, high resolutions, video, transparency and animation. Some use is normal. If it stays high, the fix is to give it less to draw. Ending it logs you out, so do not try to.

What WindowServer does

Apps do not put pixels on the screen themselves. Each one hands its window to WindowServer, which combines them all, in the right order, with shadows and transparency, and sends the result to the display many times a second. When you drag a window, switch spaces, open Mission Control or play a video in a window, WindowServer is doing the work of keeping it smooth.

In Foreman it appears as “Window Server”, with the real name in grey beside it. Foreman’s description is: draws every window and everything else on screen, busy when many windows, displays or animations are active.

What counts as normal

On a Mac that is doing ordinary things, WindowServer rises and falls. It will climb while you drag windows, scroll through a busy page or watch a video, and fall back when the screen is still. That is it working, not a fault. Compare it with the rest of the list: if one app is using ten times as much as WindowServer, the app is your problem.

Worry about it only if it stays high while nothing on the screen is changing, or if the Mac feels sluggish to drag windows around. There is a broader guide to deciding what counts in high CPU usage on a Mac: what counts as high and what to do.

Why it gets busy

These are the usual reasons.

  • Lots of windows. Each open window is something to draw and combine, even ones partly hidden. Dozens of windows across a few spaces add up.
  • More than one display, or a large one. A 4K or 5K display has many more pixels than a laptop panel, and a second or third screen multiplies the work.
  • Video and animation. A video playing in a window, a web page with moving ads, a live wallpaper, or an app that redraws constantly all keep WindowServer busy.
  • Transparency and motion effects. macOS draws blurred, see-through bars and window backgrounds, which take more work than solid ones.
  • An app that redraws without need. A badly written app can ask for the screen to be redrawn all the time, even when nothing changes. WindowServer pays for that.
  • Screen recording and screen sharing. Capturing the screen means WindowServer has to prepare each frame for the recorder as well.
  • A scaled resolution. When a display is set to a size other than its own, macOS draws a larger picture and shrinks it to fit, which is extra work on every frame.

How to calm it down

Start with the cheapest changes, and stop when it improves.

  1. Find the app that is making it redraw. Open Foreman with Control-Shift-Escape and sort the Processes page by CPU. If WindowServer is high, look at the apps near it. Quit the ones that are animating, playing video or constantly updating, or put the ones you need open into Efficiency Mode. Foreman shows each app’s CPU and GPU use, which helps spot the one that is keeping the screen busy. The post how to find which app is using your Mac’s GPU covers that.
  2. Close windows and tabs you are not using. Fewer windows, less to draw. Quit apps instead of leaving them open with a window each.
  3. Reduce transparency. In System Settings, choose Accessibility, then Display, and turn on Reduce transparency. It makes menus and sidebars solid and cuts some of the effort. Reduce motion in the same place cuts animations such as the slide between spaces.
  4. Try a different resolution or refresh rate. In System Settings, choose Displays. A setting with larger text means fewer pixels to draw. If your display offers a Refresh rate menu, a lower rate can ease the load, at the cost of smoothness.
  5. Simplify the wallpaper and widgets. A moving wallpaper and desktop widgets add work. A still picture gives it less to do.
  6. Restart the Mac. If it has been running for weeks, a restart clears state that builds up. It is a dull answer and often a good one.

On a laptop, calming WindowServer also helps battery life and heat, which is why it appears in the advice on how to find which app is draining your MacBook battery.

Why you must not end it

It is possible to end WindowServer from Terminal or a task list, and doing so has one result: every window disappears, the screen goes to the login window, and everything you had open is closed without a chance to save. macOS starts a new WindowServer for the login window, but your session is gone. It logs you out, so any unsaved work in your open apps is lost.

For that reason Foreman warns before it will end WindowServer, or loginwindow, and says that you will be logged out. It will ask for an administrator password as well, because the process belongs to macOS. Use that warning as a reason to stop, not a button to press. If the screen itself is frozen, see what to do when your whole Mac freezes, which covers it with the right steps.

A note on a frozen picture

Sometimes the screen stops updating while the pointer still moves. That can look like a WindowServer fault. Usually it is one app that has stopped responding in front. Press Option-Command-Escape to open the Force Quit window and force that app to quit. If the whole screen stays frozen, hold the power button until the Mac turns off, then turn it on again. That is the last resort.

When it stays high with nothing happening

If WindowServer is using a lot of CPU on a quiet desktop, try these in turn.

  • Disconnect external displays and see if it drops, then reconnect them one at a time. A faulty cable or dock can be the cause.
  • Start the Mac in a clean state by restarting with “Reopen windows when logging back in” unticked and opening nothing, then open your usual apps one by one and watch which one makes it rise.
  • Check that macOS is up to date. Updates fix drawing bugs, and an older version may have one that is fixed. Open System Settings, then General, then Software Update.

If it still sits high on a plain desktop with nothing else running, that suggests a problem outside your apps, and it is worth contacting Apple Support.

In short

WindowServer draws everything on screen, so it works harder when you give it more windows, displays and motion. Reduce what it has to draw and it settles. Do not end it, because that logs you out. Foreman, $12 once and free for 24 hours, helps you find the app behind a busy screen and lets you set it to Efficiency Mode, or end it with End Task, instead of guessing.