Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

JA226

macrumors newbie
Original poster
Dec 23, 2021
11
0
I have an M1 Mac Mini connected to a 27" LG 4K monitor via HDMI. I usually have three other apps apart from Finder open at all times. These are: Mail, Firefox and Telegram messenger. They are always opened to the maximum window size when in use (not full screen mode). Every single time I wake the computer from sleep these three apps are resized and moved to the lower left of the screen in the exact same position, so that if you were to open one over the other, the one in focus would completely hide the others. This has been happening for as long as I have owned the computer (about two years) and I have just put up with it. Lately though, for whatever reason it has been really irritating me, and I've been trying to figure out how to stop this from happening. I have not found much online regarding this issue and a potential solution. Does anyone have any idea why this might be happening and/or how it can be fixed? I have attached a screenshot for reference.
 

Attachments

  • Screen Shot 2023-01-10 at 10.59.33 am.png
    Screen Shot 2023-01-10 at 10.59.33 am.png
    1.2 MB · Views: 545
Last edited:

JA226

macrumors newbie
Original poster
Dec 23, 2021
11
0
Mine is doing this as well.
Unfortunately I have not found much info elsewhere online regarding this issue and as you can see, you are the first person who has replied to this thread in over two weeks. Are you using an LG monitor as well?
 

Jayson A

macrumors 68030
Sep 16, 2014
2,671
1,935
Unfortunately I have not found much info elsewhere online regarding this issue and as you can see, you are the first person who has replied to this thread in over two weeks. Are you using an LG monitor as well?
I’m using an ASUS 27 inch 4K monitor.

Have you tried using any different cables? I'm using a USB-C to DisplayPort cable right now and I also tried HDMI to HDMI and it did the same thing.

One thing to note, it doesn't seem to happen if I don't have the apps hidden when the screen is shut off
 
Last edited:

JA226

macrumors newbie
Original poster
Dec 23, 2021
11
0
I’m using an ASUS 27 inch 4K monitor.
Okay, so it must be a software glitch rather than a hardware issue causing this to happen?

Have you tried using any different cables? I'm using a USB-C to DisplayPort cable right now and I also tried HDMI to HDMI and it did the same thing.
No. I have only ever used HDMI to HDMI. I don't have a USB-C to DisplayPort cable handy. I had been meaning to get one to test, but haven't gotten around to it. If you have tried both then it clearly doesn't seem to matter which port or cable is used.

One thing to note, it doesn't seem to happen if I don't have the apps hidden when the screen is shut off
I actually noticed this the other day as well. I was in the habit of pressing Cmd + H to hide the apps after I'd finished with them. I have started to use Cmd + M to minimise them instead and have noticed that this generally makes them return to full screen.
 

Jayson A

macrumors 68030
Sep 16, 2014
2,671
1,935
Okay, so it must be a software glitch rather than a hardware issue causing this to happen?


No. I have only ever used HDMI to HDMI. I don't have a USB-C to DisplayPort cable handy. I had been meaning to get one to test, but haven't gotten around to it. If you have tried both then it clearly doesn't seem to matter which port or cable is used.


I actually noticed this the other day as well. I was in the habit of pressing Cmd + H to hide the apps after I'd finished with them. I have started to use Cmd + M to minimise them instead and have noticed that this generally makes them return to full screen.
I also noticed that it doesn't matter if you close the Music window (for example). The app stays open, but the window will still be messed up when the screen comes back on.

I wonder if using spaces will fix it. Hmmm

Edit: Having multiple desktop keeps them in place too.
 

JA226

macrumors newbie
Original poster
Dec 23, 2021
11
0
I also noticed that it doesn't matter if you close the Music window (for example). The app stays open, but the window will still be messed up when the screen comes back on.
By close, I'm assuming you mean clicking the red x button in the top left corner of the window, or pressing Cmd + W?

I have noticed this can be hit and miss for me depending on the app. If I do this for the Mail app, it usually always comes back in full screen when I open it again after waking from sleep/screen off. If I do it for the Telegram app, sometimes it comes back full screen, and sometime it comes back with the resized window. I have not tried it for Firefox, as closing the app will make me lose all my tabs.
I wonder if using spaces will fix it. Hmmm

Edit: Having multiple desktop keeps them in place too.
Interesting. I haven't ever tried this.
 

Jayson A

macrumors 68030
Sep 16, 2014
2,671
1,935
By close, I'm assuming you mean clicking the red x button in the top left corner of the window, or pressing Cmd + W?

I have noticed this can be hit and miss for me depending on the app. If I do this for the Mail app, it usually always comes back in full screen when I open it again after waking from sleep/screen off. If I do it for the Telegram app, sometimes it comes back full screen, and sometime it comes back with the resized window. I have not tried it for Firefox, as closing the app will make me lose all my tabs.

Interesting. I haven't ever tried this.
I've come up with a band-aid solution. I wrote an AppleScript that will put the windows back where I want them and I run it using a keyboard command (F19) using an app called FastScripts. Wicked awesome app if you like scripting and attaching commands to them.

I've edited my script to check if the application is running before changing the window size because if not, each app opens.

Just put "if application "Safari" is running then tell application "Safari" to set bounds of front window to...."

By the way, if you want to get the current size and position of a given window, just make an AppleScript that says "tell application "Safari" to get the bounds of the front window" and it will spit out a number in the section of the window below the script.

Hope this helps!
 

Attachments

  • Screenshot 2023-01-26 at 9.53.14 PM.png
    Screenshot 2023-01-26 at 9.53.14 PM.png
    484.9 KB · Views: 125
Last edited:

Jayson A

macrumors 68030
Sep 16, 2014
2,671
1,935
DUDE! If you wake your computer up with a password, the windows stay in place even if they're hidden! WHAT!

As an experiment, hide your apps, then press control-command-Q. Then wait 5 seconds for your screen to shut off. Then log back in and click your apps. BOOM, still perfect!

Edit: It worked twice and now it's back to the usual. Ugh
 

JA226

macrumors newbie
Original poster
Dec 23, 2021
11
0
Edit: It worked twice and now it's back to the usual. Ugh
This never worked for me. Every time I would log in in the morning after the computer was sleeping overnight, the windows would be resized.

I appreciate the info regarding the scripting solution. I will probably just stick to using Cmd + M to minimise the apps rather than hiding them, as this seems to make them return to full screen 90% of the time. I have already started to break my Cmd + H habit over the past few days.
 

Jayson A

macrumors 68030
Sep 16, 2014
2,671
1,935
This never worked for me. Every time I would log in in the morning after the computer was sleeping overnight, the windows would be resized.

I appreciate the info regarding the scripting solution. I will probably just stick to using Cmd + M to minimise the apps rather than hiding them, as this seems to make them return to full screen 90% of the time. I have already started to break my Cmd + H habit over the past few days.
It’s stupid that we need all these workarounds and breaking habits of doing normal macOS functions because their os is broken.
 

JA226

macrumors newbie
Original poster
Dec 23, 2021
11
0
It’s stupid that we need all these workarounds and breaking habits of doing normal macOS functions because their os is broken.
I agree. It's absurd. It seems that quality control for MacOS has really taken a nosedive in recent times.
 

Jayson A

macrumors 68030
Sep 16, 2014
2,671
1,935
I agree. It's absurd. It seems that quality control for MacOS has really taken a nosedive in recent times.
I just tried attaching a display dummy dongle into the HDMI port to see if maybe multiple displays would fix the issue. I thought maybe I could trick the OS into thinking 2 screens were plugged in. It still didn't fix the issue. Why are non-hidden apps not an issue? You would think that if it were a display thing, it would affect all windows whether they're hidden or not.
 

meson

macrumors 6502
Apr 29, 2014
487
479
I just tried attaching a display dummy dongle into the HDMI port to see if maybe multiple displays would fix the issue. I thought maybe I could trick the OS into thinking 2 screens were plugged in. It still didn't fix the issue. Why are non-hidden apps not an issue? You would think that if it were a display thing, it would affect all windows whether they're hidden or not.
I would guess that the OS treats a minimized window and a hidden window as two separate states and that something in the code fails trigger the window original size and location of the hidden windows to be written to the ssd when the ram is purged to save the previous state before sleep/shutdown. When it restores the data, the machine knows these windows were open, but doesn't know where to put them and at what size, so you get a default size/location.

It's likely a minor bug in the OS code, and I would hazard a guess that using hidden windows on a regular basis puts you in a significant minority of MacOS users. We are long past the days where getting rid of desktop icons and minimized windows could help save enough ram resources to keep your Mac happy.

File a bug report with Apple, and hopefully they will get around to fixing it. I would suspect it is low hanging fruit for them, but likely not a priority.
 

Jayson A

macrumors 68030
Sep 16, 2014
2,671
1,935
I would guess that the OS treats a minimized window and a hidden window as two separate states and that something in the code fails trigger the window original size and location of the hidden windows to be written to the ssd when the ram is purged to save the previous state before sleep/shutdown. When it restores the data, the machine knows these windows were open, but doesn't know where to put them and at what size, so you get a default size/location.

It's likely a minor bug in the OS code, and I would hazard a guess that using hidden windows on a regular basis puts you in a significant minority of MacOS users. We are long past the days where getting rid of desktop icons and minimized windows could help save enough ram resources to keep your Mac happy.

File a bug report with Apple, and hopefully they will get around to fixing it. I would suspect it is low hanging fruit for them, but likely not a priority.
You mean to tell me that other people don't hide their apps to keep their screen free of clutter?
 

HobeSoundDarryl

macrumors G5
A new guess: maybe your monitors drop their resolution down on sleep, then- on wake- is at the lower resolution and quickly returns to their fuller resolution? If so, the windows may be sizing for the very temporary lower resolution and then hold there when the screen adjusts? I would think this would create that effect with them in the TOP left instead of bottom left, but I'm simply trying a new guess here.

A test: Put your windows where you want them. Then open preferences, displays and choose a lower resolution. Then switch it back again. If I'm not mistaken, fully-open windows will then shrink to a smaller size and reposition to fit within the lower resolution. When you switch it back again, they won't auto-resize to full size or their original location. I wonder if this is happening when your monitor goes to sleep.

I can see a similar effect in ANOTHER way when working with files between desktops and laptops. Work and save it on a laptop's lower resolution screen, then open on a higher resolution screen and it will open at the laptop screen size. Or hook a laptop to a second, bigger screen and drag the open app window from the larger screen to the laptop screen and it will shrink down to fit the laptop screen. Drag it back again and it arrives shrunk until manually resized to fit the larger screen.

Another test (to rule out your machine or maybe some configuration on your machine): take it to an Apple store and hook it up to a Studio Display. Sleep. Wake. Did it repeat the problem? If so, there must be a configuration thing. Ask Apple people there to help you figure it out. If no, perhaps there is a monitor setting option on your own monitor to always wake at full resolution vs. perhaps a default that opens at low or lowest resolution and then quickly switches to "last used" resolution?

Again, just guessing but at least it gives you something else to test/try.
 

Jayson A

macrumors 68030
Sep 16, 2014
2,671
1,935
A new guess: maybe your monitors drop their resolution down on sleep, then- on wake- is at the lower resolution and quickly returns to their fuller resolution? If so, the windows may be sizing for the very temporary lower resolution and then hold there when the screen adjusts? I would think this would create that effect with them in the TOP left instead of bottom left, but I'm simply trying a new guess here.

A test: Put your windows where you want them. Then open preferences, displays and choose a lower resolution. Then switch it back again. If I'm not mistaken, fully-open windows will then shrink to a smaller size and reposition to fit within the lower resolution. When you switch it back again, they won't auto-resize to full size or their original location. I wonder if this is happening when your monitor goes to sleep.

I can see a similar effect in ANOTHER way when working with files between desktops and laptops. Work and save it on a laptop's lower resolution screen, then open on a higher resolution screen and it will open at the laptop screen size. Or hook a laptop to a second, bigger screen and drag the open app window from the larger screen to the laptop screen and it will shrink down to fit the laptop screen. Drag it back again and it arrives shrunk until manually resized to fit the larger screen.

Another test (to rule out your machine or maybe some configuration on your machine): take it to an Apple store and hook it up to a Studio Display. Sleep. Wake. Did it repeat the problem? If so, there must be a configuration thing. Ask Apple people there to help you figure it out. If no, perhaps there is a monitor setting option on your own monitor to always wake at full resolution vs. perhaps a default that opens at low or lowest resolution and then quickly switches to "last used" resolution?

Again, just guessing but at least it gives you something else to test/try.
Couple things to note. I think it has something to do with the resolution scaling. I have a 4K display and I'm running it at 5K, scaled down to 4K with the look of 1440p (hi-dpi).

I did some experimenting and if I have it on 1080p (hi-dpi) then, the windows do not get shoved to the bottom left of the screen.

I also tried minimizing all my windows before sleep and that mostly works, except that it doesn't work with the Music app for whatever reason.

Right now I've just resorted to just quitting any apps I'm not using before my computer goes to sleep.
 

HobeSoundDarryl

macrumors G5
To confirm the scaling, you might take it OUT of scaling "default for display" mode and then try the same experiments.

I just did for you on mine and dropping out of scaling would make my open windows move to different spots. Dropping resolution as I hypothesized would resize the windows too. However, when I put full size and scaling back as I like it, the Windows popped back to their locations and full size.

Ah well, good try on something new. I hope you figure it out.
 

meson

macrumors 6502
Apr 29, 2014
487
479
You mean to tell me that other people don't hide their apps to keep their screen free of clutter?
I believe most would choose to minimize instead of hide. Minimize is available with one click on the GUI. Hide is buried in a menu, so unless the user seeks out learning keyboard shortcuts, the are not likely to choose to hide.

When the window is minimized to the dock, it’s easy to see what is open. Using hide means that I have to keep track mentally of what files are open in which app. Using minimize, I can see at a glance.

With single displays, a combination of a window snapping tool like Rectangle.app, Spaces are how minimizing extra open windows in an open app are how I deal with clutter. With dual displays I use spaces less often.

My wife and kids open everything in random sizes and locations on the screen and use a combination of clicking on open apps and minimizing windows to navigate clutter.
 

Jayson A

macrumors 68030
Sep 16, 2014
2,671
1,935
I believe most would choose to minimize instead of hide. Minimize is available with one click on the GUI. Hide is buried in a menu, so unless the user seeks out learning keyboard shortcuts, the are not likely to choose to hide.

When the window is minimized to the dock, it’s easy to see what is open. Using hide means that I have to keep track mentally of what files are open in which app. Using minimize, I can see at a glance.

With single displays, a combination of a window snapping tool like Rectangle.app, Spaces are how minimizing extra open windows in an open app are how I deal with clutter. With dual displays I use spaces less often.

My wife and kids open everything in random sizes and locations on the screen and use a combination of clicking on open apps and minimizing windows to navigate clutter.
Interesting. I guess I just got used to hiding apps way back in the day and I still have the habit today.
 

Jayson A

macrumors 68030
Sep 16, 2014
2,671
1,935
Here's my script in action. I just press F19 and presto!

 
Last edited:

JA226

macrumors newbie
Original poster
Dec 23, 2021
11
0
Interesting. I guess I just got used to hiding apps way back in the day and I still have the habit today.
Same here. I'm a big user of keyboard shortcuts in general, so that probably explains it.

One thing that I have noticed now that I have started to get into the habit of minimising my windows rather than hiding them is that when I open Firefox for example after waking from sleep the window opens in the bottom left corner (same size as if it had been hidden) before snapping to full screen.
 

rexbinary

macrumors newbie
Apr 3, 2010
14
8
Texas
I'm seeing the same issue on my M2 Pro Mac mini with a single monitor, but I'm not seeing this issue on my M2 MacBook Air. 🤷‍♂️
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.