Mac main display switches to the other monitor after sleep

28 November 2026 · Martín Acuña Lledó · Applies to macOS 13 Ventura through macOS 27

Your monitors are in the right order after a wake, but the menu bar is on the wrong one. New windows open there, and with "Displays have separate Spaces" off the Dock goes there too. You drag the menu bar back in System Settings, and the next morning it has moved again. This page explains why macOS changes the main display, how to check it, how to pin it without my app, and what my app does.

Why the main display changes

The main display is the one with the menu bar. macOS remembers which monitor that is, like it remembers the arrangement and resolution. When a DisplayPort, USB-C or Thunderbolt monitor sleeps, it usually drops its link, and when it comes back macOS has to recognise it again.

With two monitors of the same model that report the same serial number, macOS cannot always tell which is which. Usually that swaps their positions. Sometimes the positions survive and only the main-display role moves. A BetterDisplay user described exactly that in March 2025: with layout protection on, two identical monitors stayed on the correct side, "but now my main display swaps between the two". Background on identical monitors is in two identical monitors swap places after sleep.

On a Mac mini or Mac Studio, the main display also decides where every window piles up after a wake. That case is covered in every window on the main display after wake.

Check and set the main display

In Terminal, this lists your displays and marks the main one:

system_profiler SPDisplaysDataType | grep -E "Main Display|Online"

Run it before the Mac sleeps and after it wakes. If "Main Display: Yes" moved to another monitor, macOS changed it during the wake.

To set it back, open System Settings → Displays. Apple's Displays settings page says the "Use as" option chooses whether a display mirrors, extends or acts as your main display. You can also drag the white menu bar onto the monitor you want in the arrangement.

Fixes without my app

What those fixes do not cover

How Many Displays handles it

Many Displays keeps one layout per combination of displays, including which one is main. When the Mac wakes, unlocks or the monitors reconnect and the displays have been stable for a few seconds, it checks what macOS changed. If the main display or the arrangement are not what they were, it puts them back first, then the resolution, rotation and HDR, and then every window to its display, position and size.

It tells identical monitors apart by system UUID, then by the physical port on Apple silicon, then by the EDID manufacture date, and only then by position, so it does not depend on IDs that change between sleeps.

Where it does not help:

The free trial lasts 14 days, with no account and no card.

Download the free trial How it works

Questions

Why does my main display change after sleep?

Monitors that drop their link during sleep have to be recognised again when they come back. If two monitors are identical and report the same serial, macOS can mix them up and give the main-display role to the wrong one, even when their left and right positions are right.

How do I see which display is main?

Run system_profiler SPDisplaysDataType | grep -E "Main Display|Online" in Terminal. The display marked Main Display: Yes is the one with the menu bar.

How do I set the main display back?

In System Settings → Displays, select the monitor and use the Use as menu, or drag the white menu bar onto it in the arrangement. The free tool displayplacer sets it from a command: the screen placed at origin (0,0) becomes the main display.

Does Many Displays fix the main display?

Yes. If macOS changed the main display after a wake, unlock or reconnect, it puts it back along with the arrangement, before moving windows. With two identical monitors from the same batch behind one dock it may have nothing to tell them apart except position.