Why sleep scrambles windows
To macOS, a display that stops responding is a display that's gone. Many monitors enter a deep power-saving state when the Mac sleeps, and many USB-C and Thunderbolt docks briefly drop their video connection while asleep or waking up. If that happens, macOS does what it always does when a display disappears: it moves that display's windows onto one that's still there. By the time you sit down, the monitor is back, but your windows aren't.
It tends to happen more with:
- Docks and adapters, especially ones that drive more than one monitor
- Monitors that take a few seconds to wake, like many 4K and 5K displays
- Long sleeps, such as overnight, rather than a few minutes away
- Setups with identical monitors, where the Mac can also swap which one is which
How to fix it
- Update macOS. Apple regularly fixes display wake issues. Open Apple menu › System Settings › General › Software Update.
- Update your dock or adapter's firmware. Most dock makers publish firmware updaters. Wake and disconnect bugs are among the most common fixes.
- Try a direct connection. Connect the monitor straight to the Mac with a good USB-C, Thunderbolt or HDMI cable for a day. If the problem goes away, the dock or adapter is the cause.
- Keep ports consistent. Plug each monitor into the same port every time so the Mac sees the same arrangement when it wakes.
- Check the arrangement after waking. In System Settings › Displays, click Arrange and make sure the displays and menu bar are where you expect. If the Mac swapped two identical monitors, drag them back.
- Get your windows back quickly. Drag each window back, or let a layout app restore them. If you use macOS Sequoia or later, tiling shortcuts like Fn Control Left Arrow help resize a window once it's on the right screen.
Quick diagnosis
| What you see | Likely cause | Try first |
|---|---|---|
| Everything on the laptop screen after waking | The monitor or dock disconnected during sleep | Dock firmware update; direct cable test |
| Windows on the other external monitor | Two identical monitors swapped identities | Same ports every time; check Arrange |
| Only after long sleeps | Deep power saving on the monitor or dock | Check the monitor's own power-saving menu |
| Monitor shows no picture after wake | The connection didn't renegotiate | Unplug and replug the cable, or try another port |
Is my Mac broken?
Almost certainly not. Windows moving after sleep is a side effect of how displays connect and disconnect, not a hardware fault. If a monitor regularly fails to show a picture at all after waking, though, test with another cable and port, and contact the monitor or dock maker if it continues.