WindowServer memory leak

Looks like this problem is coming back in High Sierra.


I have a late 2013 MacBook Pro Retina, freshly installed High Sierra after resetting SMC, PRAM, at most 6 apps open at the same time, after 16 hours, this WindowServer process is taking almost 1GB RAM! Notice how much has been compressed. Several days ago, I have been using the High Sierra GM for about a week without rebooting/logging out, and I noticed this WindowServer process took 8GB RAM!


User uploaded file

MacBook Pro with Retina display, OS X El Capitan (10.11)

Posted on Sep 27, 2017 8:50 AM

Reply
53 replies

Oct 3, 2017 10:30 AM in response to welsonsun

Well, looks like the current consensus of the bug is that for retina display with Intel graphics card, if the resolution is set to the "scaled max", you will get the WindowServer memory leak. Other resolutions seem to be fine.

No, in my case it happens with the "middle" scaled option (doubled 1680x1050), so the 10.13.1 finding is definitely a good sign.

Oct 12, 2017 7:46 AM in response to welsonsun

Hopefully 10.13.1 will fix things as I'm having the same issue.


On my system (2012 MacBook Pro Retina 8Gb) it gets to the point where the mouse starts to glitch and the whole system freezes. Safari is one of the main culprits, though many other apps do it as well. For my case, I used an external monitor (4K Dell with the macbook cover down) as well as trying scaled and un-scaled resolutions without having an external monitor present.


Using the 4K monitor, the issue takes about 4-6 hours to reach a "critical" state, where the whole system freezes until windowserver is restarted. Using a "more space" scaled resolution, it takes roughy 12-18 hours and using the default resolution requires a daily or every-other-day restart. So it's clear that the issue worsens with resolution increase, but all tested resolutions do show the issue, at least in my case.


I've seen the issue from day 2 after installing High Sierra and tried safe-mode boots, SMC and PRAM resets and even re-installed the whole OS to make sure it wasn't an in-proper install or 3rd party software.

Oct 29, 2017 11:58 PM in response to welsonsun

I can confirm this on a 15" 2015 MBP. When running scaled resolution WindowServer starts to consume in excess of 20GB after a while. (I'm running the latest version of MacOS High Sierra, 10.13.1?)


I have no additional monitors connected.


Disabling scaled resolution tames WindowServer memory consumption but this is not a viable solution as I need the screen Realestate for my design work.

Oct 31, 2017 2:37 AM in response to Luis Sequeira1

I can confirm too.

I have MBP mid-2012 1200x800 and when I connect external monitor in clone mode and use calling to internal monitor then I have 5GB WindowServer memory usage in 4-6 hours.

This memory can be released after logout or reboot only.

If I don't connect external monitor then there is no memory leak (no scaling on internal monitor).

If I connect external monitor and arrange external and internal side by side without scaling on any of them then memory leak don't occur.

If memory leak occur and I change monitor arrangement and disable monitor scaling, them memory leak stops but memory already leaked won't be released - need to logout or reboot.

Nov 1, 2017 3:31 AM in response to KitsuneNoBaka

10.13.1 didn't fix a thing for me. With any of Apple's display settings the graphics stutter and a re sluggish.


What did "fix" things was a command line utility called screen-resolution-switcher where I could set the screen's resolution of my 15" MBP to 2048x1280. With this, everything is smooth again and windowserver's memory use is kept in check. The only thing that's not quite there is that fonts look a tiny bit nicer with Apple's resolutions, but that's a cheap price to pay.

Nov 6, 2017 12:26 PM in response to welsonsun

I noticed this issue when my MPB started to slow down ... WindowServer was using 38GB of RAM on my MBP (2.2 GHz Intel Core i7, 16 GB 1600 MHz DDR3). I enrolled in the beta program and while the problem is not as significant (some memory is reclaimed) it still exists on 10.13.2 Beta, but is nothing in comparison to before. It currently peaks at 168.3MB and then reclaims a few MB down to ~164MB and repeats.

Nov 7, 2017 3:42 AM in response to Kudose

Kudose wrote:


I noticed this issue when my MPB started to slow down ... WindowServer was using 38GB of RAM on my MBP (2.2 GHz Intel Core i7, 16 GB 1600 MHz DDR3). I enrolled in the beta program and while the problem is not as significant (some memory is reclaimed) it still exists on 10.13.2 Beta, but is nothing in comparison to before. It currently peaks at 168.3MB and then reclaims a few MB down to ~164MB and repeats.


If the memory usage of Window Server stays, as you say, within 164-169MB then it's probably fixed. That is a pretty reasonable amount of RAM.

Nov 20, 2017 11:10 AM in response to welsonsun

Having same windowserver issue.

High Sierra 10.13.1 (17B48)

MacBook Pro (Retina, 15-inch, Late 2013)

2.6 GHz Intel Core i7

16 GB 1600 MHz DDR3

NVIDIA GeForce GT 750M 2 GB

Intel Iris Pro 1536 MB


With an Apple Thunderbolt display hooked up. No scaling on either Macbook or Thunderbolt display. However, when I turn on scaling, then turn it back off, the issue goes away for a while until it builds up again and makes the mac stutter it's so slow.

Nov 27, 2017 8:55 AM in response to welsonsun

I've got a late 2014 Mini, 10.13.1, 16gb ram.


The windowsserver process hovers at 70mb used and 87mb real mem. Been up over a week. The ram isn't the issue here, its flooding the logs with


(com.apple.preference.displays.MirrorDisplays): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.


Messages, anyone else seeing and/or fixed this?


thanks

Nov 27, 2017 9:37 AM in response to skivvie

No, mine is in a server room getting prepped to run a small intranet so I've turned off all the sleep options except for the display is set to 15 minutes.


I only saw this issue while looking through the logs trying to get a ssl cert installed (still unsuccessful)


I just disconnected the monitor (as its not needed 99% of the time) and restarted the mini. No errors since booting but its only been a few minutes.

Nov 29, 2017 1:16 AM in response to welsonsun

I was seeing thousands of these messages in the logs as well, even after updating to latest beta:

com.apple.xpc.launchd[1] (com.apple.preference.displays.MirrorDisplays): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.


and noticed that they went away for me when I disabled the third party utility (SwitchresX) I was using to manage my external monitor's resolution and rebooted. My current config is:


Macbook Pro (Retina 15-inch, Late 2013)

10.13.2 Beta (17C83a)

16GB RAM

Automatic graphics switching UNchecked in Energy Saver pref pane

Clamshell mode with external Samsung U28E590 - Resolution: 3200 x 1800 @ 60 Hz, connected from thunderbolt port to Display port of monitor (not hdmi)

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.

WindowServer memory leak

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