Mac moves all windows to one monitor after sleep: every fix that exists
Updated 13 October 2026 · Applies to macOS 13 Ventura through macOS 27
You come back from lunch, wake the Mac, and every window is piled on one screen. Or your two identical monitors have swapped sides again. People have been reporting this to Apple since 2011; the biggest Apple Community thread has over 800 "Me too" votes, and it still happens on macOS 26 and 27. Below is every workaround we found while researching this problem across Apple Community, Reddit, MacRumors, Hacker News and the issue trackers of a dozen window tools, with an honest note on what each one does and does not fix.
"For something like 14 years(!), this has driven me up a wall."
peterjmag, Hacker News
"It's disruptive and time-wasting to have to re-set my workflow configuration every time."
tomgiebel, Apple Community, 847 "Me too"
"Why is this so hard to get right Apple?"
speleding, Hacker News
"I've had to make a bunch of Hammerspoon hacks for myself to make macOS remember where windows should be."
Ezhik, Hacker News
Apple's answer to the bug report, as quoted by the person who filed it: "This issue behaves as intended." So nobody is coming. Here is what you can do yourself.
Why it happens
Three separate macOS behaviours combine to make the mess:
- Display sleep is a disconnect. When the Mac sleeps, the screen locks, or the monitor itself goes to sleep, a DisplayPort or Thunderbolt monitor drops its link. To macOS that is the same as pulling the cable. It immediately moves the windows that were on that display to whichever display is still present, usually the built-in screen or the first monitor to come back. When the monitor returns, macOS does nothing to move them back.
- Identical monitors look identical. macOS identifies a display by its EDID: vendor, model and serial number. Many manufacturers ship every unit with the same serial (0, 1 or 01010101 are common). Two identical monitors are therefore the same display to macOS, and whichever one reconnects first gets the "left" or "main" slot. Arrangement, main display, rotation and sometimes resolution follow it.
- Monitors wake slowly, and at different speeds. macOS resumes in under a second; monitors take two to ten seconds, and often one wakes before the other. macOS lays windows out on whatever exists at each moment, so even distinguishable monitors can end up with windows on the wrong one.
Apple has not fixed any of this. The macOS 15, 26 and 27 release notes contain nothing about window placement after sleep; macOS 27 only fixes a case where the second of two identical displays stayed black.
1. macOS settings people try
Turn off "Displays have separate Spaces"
System Settings → Desktop & Dock → Mission Control. With separate Spaces on, every display has its own set of desktops and a window that lands on another display also lands on another desktop, which no tool can undo. With it off, a desktop spans all displays and sleep only changes a window's display, not its desktop. Fixes: windows ending up on the wrong desktop. Does not fix: windows moving between displays, or identical monitors swapping. Worth doing anyway: it is the setting that lets restore tools put everything back.
Turn off "Automatically rearrange Spaces based on most recent use"
Same pane. Stops desktops reordering themselves, which several people confused with the display bug. Harmless and recommended, but unrelated to the window pile-up.
Stop the display from sleeping; use a screen saver instead
System Settings → Lock Screen → "Turn display off when inactive: Never", then set a screen saver and lock with the screen saver. If the display never sleeps, the monitor never disconnects, so nothing moves. Fixes: the lock and idle cases, reliably. Does not fix: actual sleep, closing the lid, unplugging the dock, or the monitor's own power saving kicking in. Also leaves the monitors on all day.
Prevent sleep while on power
System Settings → Energy → "Prevent automatic sleeping on power adapter when the display is off", or sudo pmset -c sleep 0. Same idea one level deeper: the Mac stays awake, so only the monitors go to sleep. Combined with the previous one it avoids most daily occurrences on a desk-bound Mac. Still breaks the moment you close the lid or unplug.
Turn off "Automatically adjust brightness" and True Tone on the monitors
Suggested in a few threads for monitors that flicker in and out of sleep. It reduces spurious reconnects on some panels but does nothing for a normal sleep cycle.
Reset NVRAM, SMC, or reinstall macOS
Recommended by Apple Support in nearly every thread. Nobody in the threads we read reported it helping for more than one sleep cycle. The behaviour is by design, not corruption.
2. Monitor and cable settings
Disable "DisplayPort deep sleep" or "Deep sleep" in the monitor's menu
Many Dell, LG and BenQ monitors have a setting (often under Power or Others) that cuts the DisplayPort link completely when the monitor sleeps. Turning it off keeps the link alive in standby, so macOS does not see a disconnect. Fixes: windows moving when the monitor sleeps, on monitors that have the option. Does not fix: Mac sleep, lid close, dock unplug. Not every monitor has it, and some docks drop the link regardless.
Use HDMI instead of DisplayPort or USB-C
HDMI monitors generally stay "connected" while asleep, DisplayPort ones usually do not. Several people solved the daily pile-up by switching cables. The costs: HDMI on many Macs caps at 4K60, no daisy-chaining, and some HDMI monitors do disconnect anyway.
Keep each monitor on the same port
If you ever swap cables, macOS and every tool will see the monitors as swapped. Pick a port per monitor and leave it. On Apple Silicon the physical port is the only thing that reliably tells two identical monitors apart, which is what Many Displays uses.
Update dock firmware; try a different dock
CalDigit, OWC and Plugable all have knowledge-base articles on monitors not waking or coming back in the wrong order. Firmware updates fix some of the "one monitor never wakes" cases, which matter because a monitor that wakes late is a monitor whose windows have already moved.
3. Dummy plugs and hardware tricks
HDMI dummy plug (headless adapter)
A $10 plug that pretends to be a monitor that never sleeps. People use it so the Mac always has one stable display to fall back on, or, in clamshell mode, so the Mac never thinks it has zero displays. Fixes: some clamshell and single-monitor wake problems. Does not fix: windows still move to the dummy display, which you cannot see, so for the multi-monitor case it often makes things worse.
Wake the monitors before the Mac
Press a key on the monitor or move the mouse, wait for both monitors to show a picture, then unlock. Because macOS lays windows out on whatever is present at each moment, giving the monitors a head start reduces the shuffle. Works surprisingly often, and is exactly what a restore tool automates by waiting for the displays to be stable before touching anything.
Power the monitors from a switched strip
Turning the monitors fully off and on in a fixed order makes them reconnect in a predictable sequence, which keeps identical monitors on the same side more often. Tedious, and it still does not put windows back.
4. Fixes for identical monitors swapping
EDID override to give each monitor a different serial number
The root cause is that both monitors report the same serial. You can override the EDID macOS reads with a plist in /Library/Displays/Contents/Resources/Overrides/ (tools like SwitchResX and BetterDisplay can write it). On Intel Macs this worked well. On Apple Silicon, EDID overrides are mostly ignored since macOS 11, and on macOS 13 and later they require disabling System Integrity Protection. Fixes: the swap on Intel Macs. Does not fix: windows moving; and it is impractical on modern Macs.
BetterDisplay's display arrangement protection
BetterDisplay Pro can save an arrangement and re-apply it when the displays reconnect, and since 2024 can tell identical displays apart by the port they are plugged into. Fixes: left/right swap and main display. Does not fix: window positions; BetterDisplay does not move windows. Its issue tracker has a long list of reports of windows still being messed up after sleep.
Lunar's "swap monitors" shortcut
Lunar, a brightness tool, added a hotkey that swaps the two displays' positions after they have swapped. Quick to use, but manual, and again only the arrangement.
Buy two different monitors
The most common advice in the Apple Community threads, and it does work: if the EDIDs differ, macOS keeps the arrangement. It does not stop windows moving when the monitors sleep.
5. Scripts: displayplacer, Hammerspoon, Keyboard Maestro
displayplacer
A free command-line tool that saves and re-applies display arrangement, resolution, rotation and main display. Run displayplacer list to get the command for your current layout, then run that command after wake. It cannot move windows, and with identical monitors its persistent IDs change between sleeps, which its own issue tracker documents at length.
Hammerspoon
A Lua scripting environment for macOS with hs.screen.watcher and hs.caffeinate.watcher. People write scripts that record window frames every minute and restore them on wake. It works until the moment the Mac sleeps mid-shuffle and the script records the pile-up as the layout; the same problem that sinks most home-made solutions. Also needs Accessibility and a fair amount of Lua.
Keyboard Maestro or sleepwatcher
Trigger a macro on wake that waits 10 to 30 seconds, runs displayplacer, then re-applies saved window positions through Keyboard Maestro's window actions. Several MacRumors users run this. It is a chain of three tools and still has to be re-recorded whenever you change your layout.
6. Window restore apps
These are the tools that actually move windows back, which is the only thing that fully solves the daily problem. What they differ on is when they save, whether they handle identical monitors, and whether they touch windows on other desktops.
Stay (Cordless Dog)
The classic, free since 2025. Saves "stored windows" per display set and restores them when the set reconnects. Reviews and threads mention windows restored to the wrong desktop, wrong sizes, and apps with many windows. Barely maintained, and it relies on Accessibility queries to every app, which hang when an app is busy.
Display Maid
Mac App Store, $5.99, last updated 2023. Manual or automatic restore per display configuration; no Spaces support. Users report needing the restore hotkey twice after sleep.
Moom, Rectangle Pro, Magnet, Lasso, Mosaic
Window managers with saved layouts. Moom 4 and Rectangle Pro can apply a saved layout when displays connect or the Mac wakes. They put windows into the positions you defined in the layout, not where they actually were, so they suit fixed workflows and not a desk you rearrange during the day.
Putback, Snapset, Layoutish, ShiftPlus, NeoTiler
Newer paid indie tools (2024 to 2026) that take snapshots and restore on wake. Most handle the visible desktop only and none of them address identical monitors swapping; they restore windows onto whichever display macOS calls "display 1". Prices range from $10 to $30 a year or $12 to $79 one-time.
Memmon, Tsubame, DéjàView (open source)
Free GitHub projects doing the same thing. Memmon's own issue tracker explains why it fails after sleep: it saves on a timer and often records the pile-up. The lesson every one of these tools learns is that saving must stop the instant the Mac locks or a display disconnects.
Many Displays
This site's app, built after trying everything above with two identical LG monitors. What it does differently:
- Saves continuously as you move windows (event-driven, within about 1.5 seconds), and freezes the moment the Mac locks, sleeps or a display disconnects, so the mess is never recorded.
- Tells identical monitors apart by their system UUID and then by the physical port, then fixes the arrangement, main display, resolution, refresh rate, rotation, HDR and mirroring before moving windows.
- Reads the window server's own list instead of asking every app through Accessibility, so it takes around 20 ms and never hangs on a busy app.
- Waits for the displays to be stable, then restores in several quick passes, because macOS keeps nudging windows for a while after wake.
- Keeps one layout per combination of displays, so home, office and laptop-alone are remembered separately.
It needs the Accessibility permission, like every tool that moves other apps' windows, and it cannot move windows between desktops, like every tool since macOS 14.5 (see below). 14-day free trial, one-time purchase, MIT-licensed source.
Download the free trial How it works
What nothing can fix
- Moving windows between desktops (Spaces). Since macOS 14.5 Apple blocks moving another app's windows to a different Space unless System Integrity Protection is disabled. The private methods tools used to rely on were verified not to work on macOS 26. Turning off "Displays have separate Spaces" avoids the problem in practice, because then sleep only changes a window's display, which can be restored.
- A monitor that does not wake at all. That is a dock, cable or monitor firmware issue; no software on the Mac can turn on a monitor that is not reporting itself.
- macOS moving the windows in the first place. Only Apple can change that. Everything above either prevents the disconnect or cleans up afterwards.
Questions
Why does macOS move all my windows to one monitor after sleep?
Because a sleeping DisplayPort or Thunderbolt monitor disconnects, and macOS treats a disconnected display as unplugged: its windows are moved to a display that still exists, and never moved back.
Why do my two identical monitors swap places after sleep?
They report the same serial number in their EDID, so macOS cannot tell them apart. Whichever reconnects first takes the first slot. Only tools that identify monitors by the physical port (on Apple Silicon) can tell them apart reliably.
Has Apple fixed this in macOS 26 or 27?
No. As of October 2026 there is nothing in the release notes about window placement or arrangement after sleep. macOS 27 only fixes a second identical display not lighting up.
Does turning off "Displays have separate Spaces" stop windows moving?
It stops them changing desktop, not display. It is still the single most useful setting, because it is what makes a full restore possible.
What is the quickest thing to try first?
Turn off deep sleep in the monitor's menu and set the Mac to never turn the display off while on power. That removes the daily lock-screen case on many desks. For sleep, lid close and docks you need a restore tool.
Sources: Apple Community threads 253718328, 253787680, 253313547 and 253803495; Reddit r/mac 11evhk0 and r/MacOS tis7kq; the 16-page MacRumors thread "External displays swapping / arrangement not remembered"; Hacker News "Weird monitor bugs" and "Multiple Displays on a Mac Sucks"; issue trackers of BetterDisplay, displayplacer, Rectangle, Amethyst, yabai, AeroSpace, Hammerspoon and Memmon; Apple developer forum threads 805556, 814201 and 651131; Plugable and CalDigit knowledge bases. Collected October 2026.