Skip to content
Aqib Javed.
All guides

Mac guide

Why your Mac moves windows to the wrong screen after sleep, and how to stop it

By Aqib Javed · Updated Oct 10, 2026

Many monitors and docks disconnect completely while the Mac sleeps. macOS sees the monitor as unplugged, moves its windows onto the MacBook screen, and doesn't reliably move them back when the monitor wakes. You can reduce it by stopping the monitor's deep sleep, but the dependable fix is an app that remembers your layout and restores it after wake, such as DisplayShift, which puts windows back automatically with an Undo.

Why it happens

To macOS, a monitor that powers down fully during sleep looks the same as one you unplugged. Its windows have to go somewhere, so they move to the screen that's left, usually the MacBook. When the monitor comes back, macOS doesn't always return them, and the order in which displays wake decides where things land.

It's most common with DisplayPort and USB-C monitors that have a deep sleep mode, with docks and hubs, and with DisplayLink adapters.

Settings worth trying

  • In the monitor's own menu, turn off deep sleep, auto power off or auto input switching if it has them, so it stays connected while asleep.
  • Update your dock's firmware, or try a direct cable instead of the dock to see if the dock is the cause.
  • In System Settings, Desktop & Dock, some people find that switching Displays have separate Spaces on or off changes this behaviour. It takes effect after you log out.

None of these is guaranteed, because the monitor and the dock decide whether the connection drops.

Put windows back automatically with DisplayShift

  1. Download DisplayShift from its page, unzip it, and drag it into Applications. It's free for 7 days, then $2.99 once.
  2. Open it and allow Accessibility access, because macOS only lets approved apps move other apps' windows.
  3. Leave Remember my layout and Put back after sleep switched on (Settings, Layouts). DisplayShift keeps the layout for each set of screens.
  4. When the Mac wakes and macOS piles windows on the MacBook, DisplayShift moves them back to where they were, full screen apps included, and shows an Undo in the notch.

Other apps that restore layouts when displays change include Stay and Display Maid.

Questions

Why do all my windows go to the MacBook screen when my monitor sleeps?

Because the monitor disconnects while it sleeps, and macOS moves windows off a display that has gone away. When it reconnects, macOS often leaves them where they are.

Can macOS remember window positions for each monitor?

Not reliably. DisplayShift saves a layout for each combination of screens and restores it when the same screens come back, after unplugging, docking or sleep.

Does it work with full screen apps?

Yes. DisplayShift takes full screen apps out of full screen, moves them back to their display and puts them back into full screen.