Mac WindowServer randomly starts hogging CPU
I have a 2017 Macbook running Monterrey 12.5 (cant update because it's a company laptop) connected to 4 external monitors.
Usually it runs well but randomly it will suddenly slow down to a crawl and my cursor becomes beachballs as if a background process kicked off and took all the CPU. Running "top" shows WindowServer shot up to 50% or more CPU.
WindowServer usually consumes low CPU so I can't figure out why the WindowServer process decides to suddenly up the CPU usage when no new tabs/processes have started. How can I find what triggers WindowServer to spike cpu usage randomly? I've run "log stream --predicate '(process == "WindowServer")' --debug" but what I see ("surface is not detached, CoreDisplay is detached") shows up regardless of whether the CPU is being hogged or not.
How can I troubleshoot further why WindowServer randomly kicks in and hogs the CPU?
MacBook (2017)