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

Dec 6, 2022 9:10 AM in response to NezihSavaskan

At this point I don't even bother with the community threads. Apple may be spread to thin. I just go directly to Feedback assistant, creating timestamped, diagnostic logs with images, video, and text. Many of the issues I've reported through Feedback Assistant (already on your Mac) have been addressed through updates. So it works, even if they don't respond to every ticket.


I'd highly recommend doing the same. I suspect they need it.


often I'll attached links to threads like this to point to the scale of the problem, again, more context.

Aug 13, 2022 3:45 AM in response to tistos

It was typical launch daemons: dropbox, onedrive, ms update, don’t remember what else.

Drop and onedrive fixed itself upon re-login, I had to reinstall MS Update. Problem with windows rearrangement is gone for me and hasn’t reappeared.

I’m still puzzled how those things are even connected, macos should have better grip on apps.

Nov 7, 2022 11:55 AM in response to tomgiebel

I upgraded to macOS Ventura 13.0 (22A380). For most part this issue now resolved (This time I gave a few days before replying as its always look all well and fine after a new solution). However there is one sleep scenario (short sleep) remaining that still swap the windows around. With Ventura, the sluggishness of screen re-arranging (drag and move screens) is smoother even for 4k monitors, good job Apple teams on that one! One little step to close this matter off at-least in the new OS. But I think this fix needs to be rolled down to previous OSs too where people can't upgrade to the new.

Jul 24, 2022 2:28 PM in response to Blazejos

@Blazejos thanks!

The step you said to clear the LaunchDaemons worked so far for me. ie: deleting all under the folder

Macintosh HD -> Library -> LaunchDaemons.


One thing I did extra is to backup everything in there before deleting (tar -zcvf ~/Desktop/LaunchDeamonBackup.tgz /Library/LaunchDaemons).


I haven't restored anything yet but I notice Microsoft Office Update started complaining about this cleanup.

Aug 26, 2022 4:45 AM in response to pwalberg

I'm also using a Mac Studio and 2 Studio Displays with MacOS 12.5.1.


I just stumbled on a work-around. If I press the Shift key to wake it up and don't release the Shift Key until all the windows are displayed on the two screens, then when I finally let go of the Shift Key all the mis-placed windows jump back into their original (desired) locations on both screens. If even put an open Finder window back on a non-primary display!!!

Sep 8, 2022 2:27 PM in response to tomgiebel

I have a Macbook Pro M1 Pro, and like all of you, I have the same issue. I have two external monitors, and I keep the lid closed on the Macbook. After waking from sleep, sometimes the monitors are swapped from the original configuration. Normally, I would have to go into System Preferences > Displays and swap the configuration. Annoying. I found a simple solution that is working for me. Not sure if it will work for everyone though. When the computer awakes, and the monitors are swapped, I just hit the ESC button, and then they swap back to the original configuration. Curious if it will work for anyone else. Hope this helps!

Sep 17, 2022 6:30 PM in response to madu007

Today I couldn't tolerate my fancy Studio Ultra with two Studio displays messing up my open Finder window after every time it wakes from sleep. Not only do I have to move it back to my secondary display, but the Finder window frequently gets really messed up and I can't even open any of my documents without restarting. So I turned off sleeping altogether and just let it turn the screens off after 15 minutes. Now everything stays put and Finder is OK. That also solves the other problem about it NOT going to sleep as expected because some little process like Adobe Creative Cloud is doing something in the background.


You'd expect a brand new $10K 100% Apple set up to not have stupid problems like this lingering on and on for years.

Oct 25, 2022 5:09 AM in response to RDMii

Maybe I wrote too soon. With Ventura 13.0 my displays are now opening as they were!! Maybe not 100% of the time, but certainly most of the ~10 times since I upgraded the OS. It's clearly better than Monterrey.


Note that this is a Studio desktop with permanently connected Studio displays--not a Laptop (formerly called a MacBook) with an external display connected by various means.

Feb 5, 2023 11:56 AM in response to tomgiebel

Occurring for me also since installing MacOS 12.6.2 update. I have 4 displays connected, all 4K displays. Mac Pro 2019, 384GB RAM, Radeon W5700X GPU.


Display 1: LG Ultra HD display connected via Port 1 Thunderbolt to Dual DisplayPort adapter (Cable Matters) connected to Thunderbolt port on GPU.

Display 2: LG Ultra HD display connected via Port 2 on Thunderbolt to Dual DisplayPort adapter.

Display 3: HS156KC UHD display connected to I/O card USB-C port 1.

Display 4: HS156KC UHD display connected to I/O card USB-C port 2.



AMD Radeon Pro W5700X:

  Chipset Model: AMD Radeon Pro W5700X

  Type: GPU

  Bus: PCIe

  Slot: Slot-1

  PCIe Lane Width: x16

  VRAM (Total): 16 GB

  Vendor: AMD (0x1002)

  Device ID: 0x7310

  Revision ID: 0x0000

  ROM Revision: 113-D1860W-213

  VBIOS Version: 113-D186A2XT-019

  Option ROM Version: 113-D186A2XT-019

  EFI Driver Version: 01.01.200

  Metal Family: Supported, Metal GPUFamily macOS 2

  Displays:


HS156KC:

  Resolution: 3840 x 2160 (2160p/4K UHD 1 - Ultra High Definition)

  UI Looks like: 1920 x 1080 @ 60.00Hz

  Framebuffer Depth: 30-Bit Color (ARGB2101010)

  Display Serial Number: demoset-1 0 

  Mirror: Off

  Online: Yes

  Rotation: Supported

  Connection Type: Thunderbolt/DisplayPort


HS156KC:

  Resolution: 3840 x 2160 (2160p/4K UHD 1 - Ultra High Definition)

  UI Looks like: 1920 x 1080 @ 60.00Hz

  Framebuffer Depth: 30-Bit Color (ARGB2101010)

  Display Serial Number: demoset-1 0 

  Mirror: Off

  Online: Yes

  Rotation: Supported

  Connection Type: Thunderbolt/DisplayPort


LG Ultra HD:

  Resolution: 5120 x 2880 (5K/UHD+ - Ultra High Definition Plus)

  UI Looks like: 2560 x 1440 @ 60.00Hz

  Framebuffer Depth: 30-Bit Color (ARGB2101010)

  Main Display: Yes

  Mirror: Off

  Online: Yes

  Rotation: Supported

  Connection Type: Thunderbolt/DisplayPort


LG Ultra HD:

  Resolution: 5120 x 2880 (5K/UHD+ - Ultra High Definition Plus)

  UI Looks like: 2560 x 1440 @ 60.00Hz

  Framebuffer Depth: 30-Bit Color (ARGB2101010)

  Mirror: Off

  Online: Yes

  Rotation: Supported

  Connection Type: Thunderbolt/DisplayPort


-----


I know for a fact there are no issues with my hardware set up, or the way the displays are connected to my Mac Pro, since this issue did not occur until I installed MacOS 12.6.2 update. There was some regression introduced into the CoreDisplay subsystem with that update that is causing this.


Generally, Display 2 and 3 are exhibiting having their contents swapped after a "wake from sleep".


And before anyone suggests it, I shall graciously decline either (a) creating a new user, (b) reinstalling MacOS, or (c) trying safe mode, since these are time-wasting exercises that detract from the underlying issue of a bug existing in MacOS.


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.