Desktop arrangement lost after waking from sleep

MacOS Monterey 12.2.1 / MacBook Pro (16-inch, 2021) / Apple M1 Pro


I have two additional monitors (BenQ PD2725U Displays) and the multiple display setup works fine.

On display #3 there are three "Desktops" each devoted to a different app.


After the system wakes from sleep, the Desktops from #3 all switch to display #2, and all the application windows on display #3 migrate to display #1.


It's disruptive and time-wasting to have to re-set my workflow configuration every time. I've resorted to disabling all the energy saving features. Can anyone recommend a fix?



MacBook Pro

Posted on Mar 5, 2022 5:46 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 20, 2022 4:40 AM

Looks like I have a fix, after 1h call with support and some experimenting.

Step 1: create different local user and check if problem occurs again. For me, it didn't.

Option with new user is nor really good for me, as it means another onboarding process with my corporate, means new device ID, certificates, blahblah.

Step 2: shut down Mac, ten tap and hold power button for Startup options, choose options -> disk utility, and check Macintosh HD for errors -> "health check". For me, it didn't find anything.

Step 3: (being logged into your user) Finder -> Go-> Library -> LaunchAgents, delete everything inside, not the folder itself.

Step 4: go to Macintosh HD -> Library -> LaunchDaemons, delete everything inside, not the folder itself.

Restart Mac.

Now sleeping and waking, unplugging and plugging back - all app windows are back where I left off. Finally.


Similar questions

121 replies

Jun 17, 2022 10:00 PM in response to pixpi

Then the problem in the macOS is that it doesn't re-arrange when the "new" monitor comes back into display. The previous arrangement when that monitor was on must be remembered. And when that monitor comes back to display, that arrangement must be applied. Otherwise it is quite annoying when displays swap making unable to draw the mouse pointer across and worse when direction (horizontal/vertical) was getting messed up due to this issue.


We have been struggling with this issue for decades and still unable to see light -- its so much a critical issue that needs fixing. Removing plugs and replacing or having different monitors isn't the answer. This definitely has a software/OS level fix to it.


  1. https://apple.stackexchange.com/questions/367259/dual-identical-monitors-swap-settings-after-displays-turn-off
  2. https://forums.macrumors.com/threads/external-displays-swapping-arrangement-not-remembered.2320211/
  3. Much google results: apple monitors swap after sleep


Jul 7, 2022 8:27 PM in response to civettare

That’s right. This issue has been running for a while. It just seems that two conflicting interests in the driver in Mac that cause this issue. One being the order of connecting monitors (including waking up from a sleep or shut down) and the other is already existing monitors order.


I believe this all boils down to driver using the monitor brand name instead of the serial number or something unique to that monitor. And ideally then the driver should set the position based on previously persisted location user set for each monitor as the monitors come to power on. While doing that same algorithms that make sure content is synced appropriately can be applied.


Its a simple fix as I see. Just that it’s not appropriately understood as a priority and not thought through well enough.


Result is a massive issue running for years that’s hidden beneath covers….





Aug 24, 2022 2:38 PM in response to tomgiebel

My configuration is a Mac Studio, Studio Display, and my second monitor is a Thunderbolt Display.


I contacted Apple today after trying the Stay app (which, like people reported, helped somewhat but not enough) and they told me that they are aware of the issue, getting lots of requests for a solution and are currently working on it.


I was also told to call back in 3 - 4 days or look for either a firmware update or an operating system update.


I guess we'll see.

Aug 26, 2022 12:02 PM in response to tomgiebel

My experience is intermittent. If the monitors wake quickly enough it tends to not occur.


My setup:

  • M1 MacBook Pro 16"
  • 1x CalDigit TS3 Plus - Thunderbolt 3 Dock
  • 2x LG 27" 4K monitors Model: 27UD88-W - Both operating at standard 4K resolution. Both are configured to not put themselves into power-saving modes.
    • 1 via USB-C HDMI adapter (I had previously attempted to drive via USB-C but it didn't work reliably)
    • 1 via DisplayPort.
  • Mission Control is enabled.


The monitor attached via DisplayPort is also the primary - hosting the dock. Its spaces never get rearranged.


Typically what I see occurring is that the Mission Control Desktops from the HDMI-attached monitor are moved to the MacBook's Display and the spaces from the MacBook display are moved to the HDMI-attached monitor. Additionally, all the Chrome windows on both displays and all the VS Code windows on either of those two displays are dispersed often at random. Sometimes they'll be moved to the Primary DisplayPort-attached monitor in a random Desktop. Sometimes they'll be all on the MacBook Display. Sometimes they'll be on the HDMI-attached monitor.


I have 12 total Desktops in Mission Control. They are distributed as such:

  • 5 on the HDMI-Attached Monitor
  • 5 on the DisplayPort-Attached Monitor
  • 2 on the MacBook's Display


Since the 5 on the DisplayPort monitor are 1-5 they don't ever seem to be affected.


---


Note, I also have issues with a Blue Yeti microphone connected to this M1 Mac and I don't have issues with that device on any other computers. (even connected via the same USB Switch) It just randomly cuts out meanwhile a 4K camera operating through the same USB device continues to operate fine.


Personally, I believe there are issues with the Thunderbolt bus on these M1 MBPs.

Nov 23, 2022 10:29 AM in response to Blazejos

Thank you for this post, do we have any ideal what specific LaunchAgents or Deamons could be the culprit? I had severel from Microsoft (updates, teams, etc.), Adobe (which I rarely use), and Western Digital which I don't have. I left Microsoft, restarted and tested sleep a few times, both locked and unlocked. The windows stick to their display and desktop now, however I've had this happen before, they stick around for a bit then they don't. I saw a similar reaction below from another user.


I've created a feedback ticket with Apple and linked to this thread. I'm wondering if this still a thing for people in Ventura on Apple M1 iMacs? I'm using a Thunderbolt to MiniHdmi cable to a wide format Dell monitor in a horizontal position. I've got several desktops defined with apps in preset positions and for a couple of days the computer would retain those positions, then it won't. I'll wake the computer and find all of the windows on the iMac display (main display) all on the first desktop.


If someone finds a more current thread LMK, I'll duplicate, this needs attention.

Mar 17, 2023 8:25 AM in response to tomgiebel

I had a 16 inch MacBook Pro, its Intel based with two side monitors (BenQ PD2720U Displays) and the multiple display setup works fine except the constant shuffling of the arrangements of those monitors. Last week I upgraded the laptop to a 14 inch M2 max, and the problem remains.


I've switched thunderbolt cables and input plugs in the monitors, I've replaced cables and even switched the monitors physically, and yet the system manages to put them in the incorrect order every single time on startup like there's a ghost in the machine!


It's running across systems, as when I upgraded, it makes no difference, I'm currently running Ventura.


Either the system has a way of measuring the physical distance from left to right through the cables, or there is a preference that left some kind of sleeping trace in my system and needs to be removed for a reset...


Is it worth reinstalling a fresh system?

Mar 5, 2022 10:54 AM in response to tomgiebel

tomgiebel wrote:

MacOS Monterey 12.2.1 / MacBook Pro (16-inch, 2021) / Apple M1 Pro

I have two additional monitors (BenQ PD2725U Displays) and the multiple display setup works fine.
On display #3 there are three "Desktops" each devoted to a different app.

After the system wakes from sleep, the Desktops from #3 all switch to display #2, and all the application windows on display #3 migrate to display #1.

It's disruptive and time-wasting to have to re-set my workflow configuration every time. I've resorted to disabling all the energy saving features. Can anyone recommend a fix?




you can submit your Apple Feedback Product Feedback - Apple


Mar 15, 2022 11:49 PM in response to tomgiebel

I just got the new Macbook Pro M1 MAX and this is so ANNOYING. Every time I turn my computer on or wake it up, reboot it, whatever all my screens have a mind of their own and swap around on my desktops and screens and randomly too. Sometimes they split up on the same monitor but different desktops. Sometimes they mostly go to the other monitor. Then at times just 1 or 2 are randomly off...


This has NEVER happened before to me in all the years using MAC. It's one of the Magic things Apple does that Windows will never do. Re-open windows EXACTLY where they were. How is this not getting fixed???


Crazy!!! Takes so much time every time I wake my MacBook Pro M1 MAX and have to re-org my screens.


PLEASE FIX


Apr 19, 2022 2:08 AM in response to tomgiebel

I have the exact same problem. MacBook Pro 16" 2021 M1 Pro. I previously had the MacBook Pro 2015 15". I have a Samsung G9 49" monitor using a split screen config, which I was using with my old MacBook with zero issues.


Every time now, whether from a fresh reboot or wake, I have issues with the display arrangement switching around and apps moving to a different screen and I also find it extremely annoying.


I wish I had known about this issue before I upgraded because there was nothing wrong with my old MacBook I just wanted to benefit from the 'amazing' M1 chip.


I might have to make use of the 30-day return if I can't get a solution to this before then. It's been 2 weeks of the same frustration.

Aug 17, 2022 9:57 AM in response to excrispy

This has got to be a MacOS problem that--according to all the posts--has been going on for many years. I've got a new Studio Ultra and a pair of new Studio Displays. They are connected directly to each other using the default resolutions and I don't do anything complicated--just one desktop for each display with the same basic windows in the same positions day after day. Yet every time it wakes from sleep, the windows get shuffled around.


I never had this problem in Windows and when I switched to a Mac Pro with a pair of Cinema Displays in 2012 there was no problem, either. But things went south with an iMacPro with the LG 5K display several years ago and scrambling the windows wasn't the worst problem.


But now with over $10K of new all Apple stuff, they can't get this fixed?

Aug 18, 2022 2:49 PM in response to jmswingle

In my case with a new Studio Ultra, it has 6 Thunderbolt ports and each one is on its own bus. So each Studio display is connected to one of those 6 ports and I have a RAID Time Machine on one of the others. There are no external switches, hubs, or docking stations. I still have three unused Thunderbolt ports available. And since this is a desktop-only setup, nothing changes as it would with a docked MacBook.


That’s why I believe that this proves it is simply an inherent MacOS problem and has nothing to do with how you have your particular displays connected or whether they are using Thunderbolt, USB 3, or HDMI or even a mixture like you have

Sep 4, 2022 11:39 PM in response to madu007

Hey madu007!


I like your idea of collaboration. However, if this is a long standing bug in the OS, as many say, then it maybe a better idea to call Apple directly to let them investigate in order to find the root problem, even if this leads them to the fault of themselves, third party software and/or hardware, at least then people may know finally what to look out for and what to avoid. 🙂. Who knows, this could be a wide issue that could easily be fixed by a software update, but only if they know about it. Otherwise, a particular external monitor, hub, adapter, program, software version, configuration maybe found to not work well together, and either Apple, or the third party can work to fix it.

Sep 18, 2022 5:35 AM in response to betaclone

For me, NOT having separate spaces is a nightmare. You end up with only one menu bar spread across both displays. So if you are working with an app on the RH display, its menu bar is on the far side of the LH display. Any notifications will pop up on the far right side of the RH display--I prefer to that they pop up on the LH display which is roughly in the middle of my workspace. You also lose the ability to make any window full screen on just one display. That's a big negative for me.


The only possible advantage is that you can straddle a window across screens (like in Windows) but I don't use it because of the display screen frames separate the two pieces. Sometimes I move an idle window partially off screen to view something else and I don't want part of it showing up on the other display.

Nov 17, 2022 4:00 PM in response to ks_bne

Yes, I found that did work when I was using my iMacPro with one external (LG 5K) display. But, alas, my physical arrangement had the iMacPro on the right hand side and I strongly preferred having the external display designated as the main because the notification pop-ups would be toward the middle of the two displays and not all the way to the right hand edge.


But now that I'm using the Studio with a pair of identical Studio Displays there is no "internal" display. And I'm faced with the same configuration problem as before. I want the LH display to be the "main" one because of the notification pop-ups. I also keep a tabbed Finder window open on the RH (extended) display and for some unknown reason a Finder window ALWAYS OPENS ON THE MAIN SCREEN. It's been that way for 10 years. So I've given up hoping for a fix from Apple and just prevent my Mac Studio from going to sleep. Then everything stays put until I need to re-start it for some reason.

Nov 23, 2022 10:57 AM in response to Jason Golden

I upgraded to a Studio Ultra last May with a pair of Studio Displays connected with Apple-supplied TB4 cables which was also upgraded to Ventura on Day 1. My two display windows occasionally do keep their prior arrangement after rebooting or waking but most of the time an open multi-tabbed Finder window opens on the primary display and not the extended display where I always keep it. All the other open windows stay put with some rare exceptions like ForkLift jumping to the primary display. This behavior was present from the beginning with the Studio on Monterey.


Nothing changed with the Ventura update.


The current behavior is what I experienced with an iMacPro with an LG 4K 27″ when I configured the LG to be the primary display and the built-in iMacPro display to be the extended.


The first time I experienced this behavior was when I replaced an old Apple Cinema QHD non-TB display with the LG in mid 2019 on the iMacPro running macOS 10.14 Mojave. The iMacPro also suffered major problems just waking from sleep that Apple support was never able to resolve.


I have also read many other posts that claim that Finder always opens on the primary display--but never any reason for this behavior.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Desktop arrangement lost after waking from sleep

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.