MacBook Air memory leaks following the Sonoma Update

Any updates on when Apple will address the MAJOR issue of memory leaks ( AGAIN, this happened in Montery also ) on MacOS Sonoma, I have had nothing but crashes caused by memory leaks since upgrading and have several clients with BRAND NEW iMAC's and MACBook Air units with the same issues. This is CRAZY and Apple should have nevre released an OS with this BUG, especially since this is NOT the first time this has been an issue. Is anyone at Apple testing thigns anymore ?


[Re-Titled By Moderator]

MacBook Air (M1, 2020)

Posted on Oct 17, 2023 11:41 AM

Reply
Question marked as Top-ranking reply

Posted on May 23, 2024 4:23 PM

I've found a reliable way to reproduce this issue. I was working with Metal 3 to port my game engine to macOS, and noticed major memory leaks while resizing the application window. After hours of debugging I figured I might just revisit the "Hello Triangle" example directly from Apple. That leaked memory too.


So, for anyone with the will to reproduce this issue:

  • Obtain the official "Hello Triangle" Metal example from using_a_render_pipeline_to_render_primitives
  • Use a MacBook (maybe a Mac Studio is also affected?) with external monitors.
  • Resize the "Hello Triangle" window on an external monitor.


A few notes:

It does not happen when resizing the application on the built-in monitor.

My monitors are both 4K@240Hz (32GS95UE-B), which may be another factor important for this?

I am using HDMI 2.1 on one and DP 1.4 on the other, and both suffer from this issue.

The issue disappears if I comment out the `presentDrawable` call in the "Hello Triangle" example.


I would also like to make clear that I have resized the official "Hello Triangle" example application so much, that it ended up locking up my system (making my cursor stutter, music choppy, and inevitably freezing forcing me to do a full restart).


Hopefully this information allows for a prompt fix. I also own a Mac Studio with an M2 Ultra, which I will be testing this on shortly, so I might edit or follow up to specify if this is a laptop-specific issue.

33 replies

Mar 5, 2024 4:10 AM in response to Luis Sequeira1

I would sooo much like to find the culprit.

I'm also connecting my Mac to a TB4 dock using a TB4 cable.

I've done the test to connect it directly to the monitor (6K DELL U3224K) using that TB4 cable, and that doesn't change anything.

I wonder if using an HDMI cable or DV would change something.

The issue really exhibits when playing full screen videos (using VLC, QuickTime, ...) on external monitor. You can literally see the WindowServer process eating more & more RAM in real time :/

Mar 5, 2024 3:46 AM in response to matherman

matherman wrote:

I have a pretty new mac 2023 MacBook pro with m3max chip and 36gb of memory, I've been noticing with about 10 safari tabs open and iMessages it will start swapping after running for a day or so. Reboot and it's back to using about 12gb of memory. There is definitely something off, that needs to be fixed.
https://discussions.apple.com/content/attachment/35876691-ae1f-4b34-8b84-fc99f7016613


There is nothing abnormal in the image you showed.

By design, macOS will try to use as much memory as is available. Unused memory serves no purpose. Keeping cached files, or compressing memory of currently not in use applications, is what the OS does. A small portion of swap space is ok. (Of course it would not be ok to have several GB of swap). A very useful indicatio is that memory pressure: low and green is good.

Mar 5, 2024 4:36 AM in response to fred-nbs

fred-nbs wrote:

I would sooo much like to find the culprit.
I'm also connecting my Mac to a TB4 dock using a TB4 cable.
I've done the test to connect it directly to the monitor (6K DELL U3224K) using that TB4 cable, and that doesn't change anything.
I wonder if using an HDMI cable or DV would change something.
The issue really exhibits when playing full screen videos (using VLC, QuickTime, ...) on external monitor. You can literally see the WindowServer process eating more & more RAM in real time :/

As an additional data point: does this happen only when mirroring the displays, or also when using as extended desktop?

Apr 10, 2024 3:16 PM in response to fred-nbs

I am experiencing this same issue.

Im running Sonoma 14.5 on an M2 Pro MacBook Pro and have my lid closed while connected to two external Dell U3219Qs.

After maybe 10 minutes of work the system is using swapped memory and the machine is unusable. However without the monitors and the lid open, this issue doesn't arise.

Mar 5, 2024 7:54 AM in response to fred-nbs

fred-nbs wrote:

Exact same issue with a proper HDMI cable directly connected to monitor.
I'm convinced this is an OS issue


Very possibly. By the way, most people seem to suffer this more with mirroring than extending, so I was kind of hoping that switching would alleviate the problem.

FWIW, I have not seen this in my Mac (Intel 16" MBP), whether mirroring or extending.

I have access to an M1 Max at the office. It has only one display. I did test it extending to my MBP using Airplay, and it too worked without issue, though.


These issues that affect some but not others are harder to trace. I hope this gets resolved soon..

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.

MacBook Air memory leaks following the Sonoma Update

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