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

SecuritySteve

macrumors 6502a
Jul 6, 2017
948
1,073
California
Thank you for your reply, I appreciate it. I will try this terminal command and also do some tests without using an external monitor and note the results the next time the issue rears its ugly head.


Yes, this is exactly how I have been working around the issue without restarting the mac. I just force kill Windowserver which logs me out. I thought Windowserver using 75% is just 75% of one core though? How is that making the entire system super laggy?


No I don't have any Chromium-based browser installed at all, I use Firefox.


Thank you for your reply, is this column what you are referring to?


I will try your suggestions, thank you so much for your reply. I appreciate it. I already restarted the machine and it's working OK, here's the current ports column. Does it look abnormal to you? What does it mean if so?

The problem usually appears when I wake up the Macbook from sleep to resume working, but it isn't 100% reproducible. It hasn't happened today but it happened twice yesterday.


This is what I'm seeing right now, but I am not experiencing the laggy issue yet


Thank you for your reply, I apprecaite it. I'm a MacOS noob from a lifetime of Windows. Can you please give me more information about this 5fps sampling and compressing limit? Where can I check this setting?



The screen recording was done locally, not through a JumpDesktop connection/session.



Thank you for your reply, I will quit JumpDesktop next time I encounter this lag and see if it helps. But in the video, I didn't have any remote machine connected to the Mac, and OBS wasn't running.
For what it's worth, my wife has the same issue on her M1 Ultra Mac Studio. She has to do a lot of screen recording for her work, and as far as we can tell it comes back inconsistently, and regardless of whatever screen recording software you are using.


We have also identified that this is unique to ARM Macs. My x86 2019 Mac Pro does not have this problem at all.
 
  • Wow
Reactions: _Mitchan1999

boss.king

macrumors 603
Apr 8, 2009
6,346
7,550
For what it's worth, my wife has the same issue on her M1 Ultra Mac Studio. She has to do a lot of screen recording for her work, and as far as we can tell it comes back inconsistently, and regardless of whatever screen recording software you are using.


We have also identified that this is unique to ARM Macs. My x86 2019 Mac Pro does not have this problem at all.
I said it earlier in the thread, but please try turn off auto-brightness if you have it enabled. It's a bug I started facing a few months ago despite having my M2 Air since launch, and this completely fixed it. It would lag randomly regardless of how demanding a task I was doing, and since turning it off it's never happened again.
 

casperes1996

macrumors 604
Jan 26, 2014
7,576
5,753
Horsens, Denmark
For what it's worth, my wife has the same issue on her M1 Ultra Mac Studio. She has to do a lot of screen recording for her work, and as far as we can tell it comes back inconsistently, and regardless of whatever screen recording software you are using.


We have also identified that this is unique to ARM Macs. My x86 2019 Mac Pro does not have this problem at all.
Interesting. I do screen recordings semi regularly (maybe once every three weeks so not that frequent) on my M1 Pro and Max machines. I have no issues.

To boss.king’s point I always have auto brightness off but that is a weird bug if that’s the reason
 
  • Like
Reactions: _Mitchan1999

dummydecoy

macrumors newbie
Original poster
Oct 30, 2021
23
12
Try turning off auto-brightness if you have it on. I was having similar stuttering while using both usb-connected monitors and Airplay, and that fixed it.
I said it earlier in the thread, but please try turn off auto-brightness if you have it enabled. It's a bug I started facing a few months ago despite having my M2 Air since launch, and this completely fixed it. It would lag randomly regardless of how demanding a task I was doing, and since turning it off it's never happened again.

This sounds promising. I've only had this Macbook for over a month and the problem started around the time I turned autobrightness on. I did have autobrightness on in that screen recording. I am turning it off now! Thanks for your advice! Will update this thread if I still encounter the issue, and if two weeks pass without a hitch I'll also update the thread!

If, what kind of peripherals are connected?
A 1080p external monitor, Bluetooth Logitech mouse and an external Samsung SSD

No Chrome installed, I quit Chrome couple years back when they removed "don't be evil."
Using Firefox/Floorp exclusively.

For what it's worth, my wife has the same issue on her M1 Ultra Mac Studio. She has to do a lot of screen recording for her work, and as far as we can tell it comes back inconsistently, and regardless of whatever screen recording software you are using.


We have also identified that this is unique to ARM Macs. My x86 2019 Mac Pro does not have this problem at all.
Thank you for sharing, it sucks it's also happening on your wife's powerful machine. If I schedule an online remote help session with Apple Care, do you think they can figure out a permanent fix?
 
Last edited:

T'hain Esh Kelch

macrumors 603
Aug 5, 2001
6,387
7,292
Denmark
Be sure to check disk activity, because full disk activity can cause the exact behavior you are seeing. Doubtfull, because of your SSD speed, but possible.

It is clearly not a CPU or RAM problem.
 

Slartibart

macrumors 68040
Aug 19, 2020
3,123
2,794
Beside the already mentioned auto-brightness setting, check without the monitor and the mouse disconnected. You use Logitech’s Options+ software for the mouse? Deinstall and check.
 
  • Like
Reactions: neuralengine

dummydecoy

macrumors newbie
Original poster
Oct 30, 2021
23
12
Issue is back
Alternative VIMEO link, Imgur's compression is blurry

So the issue is back, can you guys please watch the video? I recorded it off screen so as not to use any extra software. Made sure to capture %GPU and Ports in Activity Monitor.

I quit all 3rd party apps as well except for notepad so I can copy paste LinMac's code into Terminal, should be visible on the left. Autobrightness is off since yesterday, no external screen connected. Only a bluetooth Logitech mouse, no 3rd party Logi Options+ app installed ever since.

Be sure to check disk activity, because full disk activity can cause the exact behavior you are seeing. Doubtfull, because of your SSD speed, but possible.

It is clearly not a CPU or RAM problem.
Thank you for your reply, I still have 360 GB of free space according to Disk Utility.
 

Amazing Iceman

macrumors 603
Nov 8, 2008
5,731
4,525
Florida, U.S.A.
Issue is back
Alternative VIMEO link, Imgur's compression is blurry

So the issue is back, can you guys please watch the video? I recorded it off screen so as not to use any extra software. Made sure to capture %GPU and Ports in Activity Monitor.

I quit all 3rd party apps as well except for notepad so I can copy paste LinMac's code into Terminal, should be visible on the left. Autobrightness is off since yesterday, no external screen connected. Only a bluetooth Logitech mouse, no 3rd party Logi Options+ app installed ever since.


Thank you for your reply, I still have 360 GB of free space according to Disk Utility.

OK, so you don't have a CPU issue with high utilization. Your problem is with the macOS GUI.

• Instead of rebooting, try to shutdown your Mac, close the lid for 30+ seconds, then reboot as normal.

• Is your Macbook siting on top of a tablecloth or a surface that would retain heat? Either way, try raising it from the surface about 1 inch using anything you can get (example: 4 shot glasses, etc).

If problem continues:
• Are all monitors are affected by this issue?
• Try changing the monitor(s)'s resolution to be Native (More Space).
If you get a message below that says: "Using a scaled resolution may affect performance.", then you are using the wrong resolution.
• Is High Dynamic Range enabled? Try toggling it to the opposite setting.

Above you mentioned that a utility reported that you have 5700 ports open. Could you please elaborate a little more?
If it's referring to TCP/UDP Ports, it wouldn't be normal.
What Antivirus/Anti-malware are you running if any?
What system services are you sharing? (Go to System Settings -> General -> Sharing)

• Run MalwareBytes from Malwarebytes.org.

• Have you received a job offer over Apple Messages and had to install a meeting app or any other app for the "interview"? If yes, then you may have been infected by Malware and worse than that.
 
  • Like
Reactions: _Mitchan1999

ipaqrat

macrumors 6502
Mar 28, 2017
373
409
Just a couple more little things to check... Not making a prediction or advice, per se, just suggesting data points. Sorry if I've missed and repeat any of these tips on the thread so far.

Thinking back to a known problem that should only have affected Intel Macs with an older OS... See what happens when you switch monitor color profiles. Back in the day, I confirmed that Apple's and certain other vendor color profiles cause crazy-stupid performance issues. (It didn't affect just video, either, it ruined everything.) I switched mine to plain, old, untuned, Generic RGB, and performance returned to normal.

Maybe test display extending vs. mirroring vs. running lid closed??

Also, maybe swap cables, or test one of the systems with a brand new shielded cable?? Ordinarily shielding isn't a problem, but some electronics leak massively, which causes issues for peripherals not unlike ethernet back in the day. USB, thunderbolt, and HDMI are essentially digital network links, so perhaps an [old, damaged, cheap] cable or hub might allowing degradation?

Speaking of which, how is performance when the systems are completely OFF the network. What about using cabled network vs wifi (I guess you'd need an ethernet dongle.)
 

dummydecoy

macrumors newbie
Original poster
Oct 30, 2021
23
12
OK, so you don't have a CPU issue with high utilization. Your problem is with the macOS GUI.

• Instead of rebooting, try to shutdown your Mac, close the lid for 30+ seconds, then reboot as normal.

• Is your Macbook siting on top of a tablecloth or a surface that would retain heat? Either way, try raising it from the surface about 1 inch using anything you can get (example: 4 shot glasses, etc).

If problem continues:
• Are all monitors are affected by this issue?
• Try changing the monitor(s)'s resolution to be Native (More Space).
If you get a message below that says: "Using a scaled resolution may affect performance.", then you are using the wrong resolution.
• Is High Dynamic Range enabled? Try toggling it to the opposite setting.

Above you mentioned that a utility reported that you have 5700 ports open. Could you please elaborate a little more?
If it's referring to TCP/UDP Ports, it wouldn't be normal.
What Antivirus/Anti-malware are you running if any?
What system services are you sharing? (Go to System Settings -> General -> Sharing)

• Run MalwareBytes from Malwarebytes.org.

• Have you received a job offer over Apple Messages and had to install a meeting app or any other app for the "interview"? If yes, then you may have been infected by Malware and worse than that.
Thank you! I appreciate you taking the time to reply. I have iStat Menus and TGPro and I'm always monitoring temps. The macbook is just on a hard wooden surface.

In the first video I posted, the mac was connected to an external display. In the most recent one however, I have been using it without an external display, only a bluetooth mouse was connected to it, and the magsafe charger. The resolution I've been using ever since I got this mac = 1728x1117 / "More Space". Do you see something wrong with my display settings? How do I disable HDR? Searching for it in the Settings app search bar just points me back to Displays settings with no HDR toggle.

Finally, I installed a free trial of Malwarebytes and the scan showed 0 threats. I also ran a scan of KnockKnock and got a "0 threats found by VirusTotal". I also ran Onyx's maintenance feature.

When the issue comes back, I'm going to test your advice of killing WIFI and making the Mac radio silent to see if it improves the issue.
 

boss.king

macrumors 603
Apr 8, 2009
6,346
7,550
Thank you! I appreciate you taking the time to reply. I have iStat Menus and TGPro and I'm always monitoring temps. The macbook is just on a hard wooden surface.

In the first video I posted, the mac was connected to an external display. In the most recent one however, I have been using it without an external display, only a bluetooth mouse was connected to it, and the magsafe charger. The resolution I've been using ever since I got this mac = 1728x1117 / "More Space". Do you see something wrong with my display settings? How do I disable HDR? Searching for it in the Settings app search bar just points me back to Displays settings with no HDR toggle.

Finally, I installed a free trial of Malwarebytes and the scan showed 0 threats. I also ran a scan of KnockKnock and got a "0 threats found by VirusTotal". I also ran Onyx's maintenance feature.

When the issue comes back, I'm going to test your advice of killing WIFI and making the Mac radio silent to see if it improves the issue.
This may be a overly blunt option, but have you tried a simple repair install of the OS? I've skimmed through the thread and haven't seen it mentioned but if it's something you've already tried then just ignore me. It won't touch your apps or data or anything, but probably best to back up first anyway.

Detailed instructions here:
https://support.apple.com/en-us/102655
 
  • Like
Reactions: Amazing Iceman

dummydecoy

macrumors newbie
Original poster
Oct 30, 2021
23
12
This may be a overly blunt option, but have you tried a simple repair install of the OS? I've skimmed through the thread and haven't seen it mentioned but if it's something you've already tried then just ignore me. It won't touch your apps or data or anything, but probably best to back up first anyway.

Detailed instructions here:
https://support.apple.com/en-us/102655
Thank you, I haven't thought of reinstalling but I'm already getting tired of the slowdowns, I'm gonna perform a repair install this weekend. Thank you for the helpful URL.

I am not talking about free space, but disk activity.
Gotcha, my bad. I'll switch to the disk column in Activity Monitor next time, thank you for your advice!
 
  • Like
Reactions: boss.king

galad

macrumors 6502a
Apr 22, 2022
575
471
Do you have "Displays have separate spaces" unchecked? If so try to enable it.
 

bogdanw

macrumors 603
Mar 10, 2009
6,026
2,947
In the first video I posted, the mac was connected to an external display. In the most recent one however, I have been using it without an external display, only a bluetooth mouse was connected to it, and the magsafe charger. The resolution I've been using ever since I got this mac = 1728x1117
Suggestion from another thread, delete Windowserver preferences and reboot
Have you tried deleting the Windowserver pref files?:

1) Delete /Library/Preferences/com.apple.windowserver.displays.plist

2) Delete /Users/[username]/Library/Preferences/ByHost/com.apple.windowserver.displays.[UDID].plist (if this file is present)

3) Reboot

4) Reapply any display preferences
https://forums.macrumors.com/threads/windowserver-memory-leak.2381649/post-32399349
 

dummydecoy

macrumors newbie
Original poster
Oct 30, 2021
23
12

Amazing Iceman

macrumors 603
Nov 8, 2008
5,731
4,525
Florida, U.S.A.
I checked, the setting has been on the whole time. Should I try the opposite instead?


Thank you! I just performed this and rebooted. Will report back if the issue comes back or not!
Don't reboot. Do a shutdown, wait 30+ seconds then restart. This will clear settings and give your hardware a new start.
 

dummydecoy

macrumors newbie
Original poster
Oct 30, 2021
23
12
Great!
Any improvement?
I didn't reply for a while because I wanted to wait and see if it comes back. Unfortunately it's back.

I am not talking about free space, but disk activity.
Here's a screenshot of Activity Monitor while I am experiencing the issue, not sure how to show you disk activity so here's arranged by Bytes Written and arranged by Bytes Read

Window server is back to using 5,7K ports in the screenshot attached, also shows %GPU usage.
Memory tab attached as well, shows it is not even taxed enough to use the swap file, using only 83GB of the 128GB RAM.

Next thing left for me to do based on the replies here is to reinstall MacOS, unless someone else has any suggestions I can try to finally get rid of this intermittent problem.
 

Attachments

  • Window Server.png
    Window Server.png
    116.2 KB · Views: 35
  • Memory.png
    Memory.png
    117.4 KB · Views: 31
Last edited:

T'hain Esh Kelch

macrumors 603
Aug 5, 2001
6,387
7,292
Denmark
I didn't reply for a while because I wanted to wait and see if it comes back. Unfortunately it's back.


Here's a screenshot of Activity Monitor while I am experiencing the issue, not sure how to show you disk activity so here's arranged by Bytes Written and arranged by Bytes Read
Select the Disk tab at the top, and try sorting by both Read and Write To see if either is affected.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.