Two identical monitors swap places after sleep on a Mac
26 October 2026 · Martín Acuña Lledó · Applies to macOS 13 Ventura through macOS 27
I work on a MacBook Pro with two LG HDR 4K monitors side by side, same model, one bought in 2019 and the other in 2022. For a long time, every time the Mac woke up the windows were on the wrong screen and I spent the first minutes of the morning dragging them back. That is the reason Many Displays exists. This page explains why macOS mixes up identical monitors, how to check what your own monitors report, and what can actually tell them apart.
Why macOS mixes them up
Two things happen together:
- macOS recognises a display by its EDID. Every monitor sends a small block of data with its vendor, model and serial number. macOS uses those to remember the arrangement, the main display, the resolution and the rotation of each monitor. Many manufacturers write the same serial into every unit (0, 1 and 01010101 are common), so two identical monitors look like one display seen twice.
- Sleep is a disconnect. When the Mac sleeps, locks, or the monitors go to sleep, DisplayPort and Thunderbolt monitors drop their link, exactly as if you pulled the cable. On wake they come back one at a time, a few seconds apart, and in no fixed order. macOS gives the first slot to whichever arrives first.
Put together: if your monitors share a serial, macOS cannot know which one is the left one, so the arrangement and everything attached to it follow whichever wakes first. Even when the serials differ, the windows that were on a monitor during the disconnect get moved to a display that was still there, and macOS never moves them back. That second part is covered in detail in every fix for windows moving after sleep.
Check what your monitors report
Before trying anything, find out whether your monitors really are identical to macOS. On a Mac with Apple silicon, open Terminal and run:
ioreg -r -c IOMobileFramebufferShim -l -w0 | grep -o '"ProductAttributes"={[^}]*}'
You get one line per external monitor. On my desk it prints:
"ProductAttributes"={"YearOfManufacture"=2019,"ManufacturerID"="GSM","SerialNumber"=333443,"ProductName"="LG HDR 4K","ProductID"=30471,"WeekOfManufacture"=4}
"ProductAttributes"={"YearOfManufacture"=2022,"ManufacturerID"="GSM","SerialNumber"=415816,"ProductName"="LG HDR 4K","ProductID"=30471,"WeekOfManufacture"=4}
Same manufacturer, same product, so the same model. Look at three fields:
- SerialNumber. Different values, as here, mean macOS can tell the two apart by serial. If they are equal, or both 0, it cannot.
- YearOfManufacture and WeekOfManufacture. Two units bought at different times usually differ here even when the serial is the same.
- To see which port of the Mac each monitor is on, run
ioreg -r -c IOMobileFramebufferShim -l -w0 | grep -o '"PortID"=[0-9]*'. Different numbers mean different ports.
What can tell two identical monitors apart
When the serial is the same, there are four other clues, each weaker than the one before:
- The system UUID. macOS gives every display a UUID. For truly identical monitors it is often the same too, but not always.
- The physical port (Apple silicon). A monitor on the left USB-C port stays on the left USB-C port after sleep. This is the most reliable clue, as long as each monitor has its own port on the Mac. Behind one dock both usually arrive through the same Mac port, so it no longer helps.
- The manufacture date in the EDID. Two monitors bought months or years apart carry different weeks or years. Two from the same box usually do not.
- The position on the desk. The last resort. It works until macOS swaps them, which is exactly the moment it is needed, so on its own it cannot detect a swap.
Fixes without an app
- Give each monitor its own port on the Mac instead of chaining them through one dock or one monitor. It does not stop macOS swapping them, but it gives any tool a reliable way to tell them apart.
- Turn off deep sleep in each monitor's menu (often "DisplayPort deep sleep" or "Auto standby"). Fewer disconnects mean fewer chances to swap.
- Override the EDID to give one monitor a different serial. It works, but it is fiddly, needs care on every macOS update, and is not possible on every Mac.
- Fix the arrangement with a script such as displayplacer after each wake. It puts the screens back, but not the windows that macOS already moved.
The full list, with what each one does and does not fix, is in every fix that exists.
How Many Displays handles it
Many Displays tells identical monitors apart in the order above: serial, then system UUID, then physical port, then manufacture date (added in version 1.1.6), and only then position. It keeps one layout per combination of displays. When the Mac wakes, unlocks or the monitors reconnect, it waits until the displays are stable, puts the arrangement, main display, resolution, rotation and HDR back, and then returns every window to the monitor it was on. You do not save anything or press anything.
To see which clue it used on your desk, run /Applications/ManyDisplays.app/Contents/MacOS/ManyDisplays --dump. A plain ID means the serial was enough. Otherwise the ID ends in the first characters of the UUID, or in -port, -made or -pos, depending on the clue it needed. If two monitors still come out as -pos, I would like to see that dump: the support page explains how to send it.
Download the free trial How it works
Questions
Why do two identical monitors swap places after my Mac sleeps?
Because many identical monitors report the same serial number, so macOS sees one display twice, and because DisplayPort and Thunderbolt monitors disconnect during sleep and reconnect in no fixed order. The first one back takes the first slot.
How do I know if my monitors report the same serial number?
Run the ioreg command in the section above. If the SerialNumber values are equal or 0, macOS cannot tell the monitors apart by serial.
Does plugging them into different ports help?
It does not stop macOS from swapping them, but it helps any tool that reads the port, which is the most reliable way to tell identical monitors apart on Apple silicon.
What if both monitors are on the same dock?
Then they usually share the Mac's port, and what is left is the system UUID, the manufacture date and the position. Monitors bought at different times are still told apart by date. Two from the same batch behind one dock are the hardest case.