Troubleshooting guide

Why Mac windows move after sleep, and how to stop it.

The usual causes, the free things to try, and an automatic fix.

Short answer

When a Mac wakes, its displays have to be detected again. Commonly an external monitor reports in a moment late, macOS briefly sees fewer screens, and gathers windows onto the one it can see. When the other screen returns, the windows often stay where they were moved. The settings below can reduce it, and SnapState fixes it by restoring your layout automatically on wake.

Common causes

Display re-detection on wake

The Mac and each monitor wake on their own timing. If a display is late, macOS may treat it as disconnected for a moment.

Docks, hubs and cable handshakes

Displays behind a USB-C or Thunderbolt dock commonly take longer to come back. See windows rearranging when you dock.

Monitor input switching

Switching a monitor to another input looks like a disconnect to macOS. See switching monitor input.

Arrangement or main display changes

If the main display or arrangement shifts, windows follow. See display arrangement changes.

Lock screen, screensaver, or display sleep

The Mac can stay awake while the display turns off after you lock the screen or the screensaver starts. Many monitors drop their connection then, and windows move the same way. See windows moving after the lock screen.

Spaces

The Mission Control option "Displays have separate Spaces" changes how windows are tied to each screen, so it is worth testing both ways.

Built-in things to try

These help some setups and not others. Try them one at a time.

  • Check System Settings, Displays: confirm the arrangement and which display is main.
  • In Mission Control settings, test "Displays have separate Spaces" on and off.
  • Right click an app in the Dock, Options, and assign it to a desktop.
  • Connect the monitor directly instead of through a hub, if you can.
  • Turn off any monitor setting that powers it fully down or auto-switches inputs.

When settings do not fix it: restore automatically with SnapState

Arrange your windows, capture a workspace from the menu bar, and turn on the wake from sleep and display connect triggers. On wake SnapState puts windows back on the right displays, relaunches missing apps and reopens your browser tabs. You can also press Control-Command-1 to 6 any time. $9.99 one-time, up to three Macs, macOS 15.7 or later.

Fixes by scenario

See SnapState restore a workspace

Frequently asked questions

Why do my windows move to my MacBook screen after sleep?

A common cause is that an external display wakes more slowly than the Mac. For a moment macOS sees fewer screens, moves windows onto the one it can see, and does not always move them back.

How do I stop my Mac from moving windows to the main display when it wakes?

Try keeping the external display on a direct connection, checking your display arrangement and main display, and assigning key apps to desktops. If windows still move, SnapState can restore your saved layout automatically on wake.

Is this a macOS 27 bug?

Reports continue on recent macOS versions. See our macOS 27 guide for what changed and what still happens.

Does clamshell mode make it worse?

It can. Closing the lid changes which displays are active, which commonly triggers the same rearranging. See the clamshell mode guide.

Can I make windows return automatically?

Yes. SnapState can restore a saved workspace on wake from sleep and when a display connects, putting windows, apps and browser tabs back.

Get SnapState for $9.99One-time purchase · up to three Macs · 14-day refund