Mac desktops (Spaces) move to the wrong monitor after lock

1 November 2026 · Martín Acuña Lledó · Applies to macOS 13 Ventura through macOS 27

You keep a desktop per task, maybe a full-screen app on each monitor. You lock the Mac, come back, and the desktops are on other monitors: the full-screen editor is now on the laptop, Mission Control shows desktops in the wrong strip, and switching with Control-arrow lands you on the wrong screen. With three monitors it gets worse. This page explains why Spaces move, how to check your settings, what fixes it, and the part that no app can fix on current macOS.

Why desktops move

Windows that are not full screen move too, but that is a separate problem with its own fixes: see Mac loses window positions when you lock it.

Check your Spaces settings

Both settings are in System Settings → Desktop & Dock → Mission Control. You can also read them in Terminal:

defaults read com.apple.spaces spans-displays

This prints 1 when "Displays have separate Spaces" is off (one set of desktops across all displays) and 0 when it is on.

defaults read com.apple.dock mru-spaces

This prints 0 when "Automatically rearrange Spaces based on most recent use" is off and 1 when it is on.

Fixes without an app

More options are in every fix for windows moving after sleep.

What no app can fix

Since macOS 14.5, Apple blocks moving another app's windows to a different desktop (Space) unless System Integrity Protection is disabled. The private methods that window tools used to rely on do not work on macOS 26. In practice this means no app can take a window that macOS put on the wrong desktop and send it back to the right one. Turning off "Displays have separate Spaces" avoids most of the problem, because then the desktop never changes, only the display.

How Many Displays handles it

Many Displays remembers which desktop each window was on, along with its display, position and size, and it restores windows on every desktop, not only the one on screen. When the Mac wakes, unlocks or the monitors reconnect, it waits until the displays have been stable for a few seconds, puts the arrangement and the main display back, and returns every window to its display, position and size.

Because of the macOS 14.5 limit above, it cannot move a window from one desktop to another, so it restores display, position and size but not the desktop. If you turn off "Displays have separate Spaces", that is all there is to restore, and everything comes back.

Download the free trial How it works

Questions

Why do my desktops move to another monitor after I lock my Mac?

With Displays have separate Spaces turned on, each monitor has its own desktops. When a monitor sleeps after the lock and drops its link, macOS moves its desktops and full-screen apps to a display that is still there. When the monitor comes back, macOS does not always put them back where they were.

Should I turn off Displays have separate Spaces?

If desktops landing on the wrong monitor bothers you more than having one set of desktops for all screens, yes. With it off, a desktop spans every display, so sleep can only change which display a window is on, not which desktop it is on. It takes effect after you log out and back in.

Can an app move windows back to the right desktop?

Not reliably on current macOS. Since macOS 14.5 Apple blocks moving another app's windows to a different Space unless System Integrity Protection is disabled. Apps can still put windows back on the right display, at the right position and size.

How do I check my Spaces settings from Terminal?

defaults read com.apple.spaces spans-displays prints 1 when Displays have separate Spaces is off and 0 when it is on. defaults read com.apple.dock mru-spaces prints 0 when Automatically rearrange Spaces based on most recent use is off.