WindowServer high on Macbook M1 Pro [closed]

I'm going to just casually mention two educated hypotheses in case these are easy answers, and then follow them with a scientific problem-solving strategy.

  1. Monterey is a new major OS release and these always have bugs. You may be experiencing one such issue that will have to wait for an OS update for a fix.
  2. Chrome is a well-known cause of general system slowness for a number of technical reasons. Even though it is lightly loaded on your machine, it may still be indirectly inducing high CPU utilization in WindowServer. (Perhaps, for instance, due to usage of deprecated API or SPI that bypass standard, performance-optimized frameworks and libraries.) Try rebooting and using your machine without ever opening Chrome.

If neither of those are helpful, then let's get on with a rigorous investigation. An important first step when trying to narrow down the cause of performance issues is to capture a spindump during the slow period. This will allow us to get a sense of where CPU time is being spent. To do this:

  1. Run the following Terminal command to enable kernel symbolication:

     sudo nvram boot-args="keepsyms=1"
    

    Make sure to copy-paste this so that you're entering straight quotes rather than curly/“smart” quotes. (If you get a permission error, you will first need to disable System Integrity Protection. You can re-enable it after you're done with this investigation.)

  2. Reboot your machine and don’t open any apps except for Terminal.

  3. In Terminal, enter the following command, press Return, type in your password, but do not press Return again yet:

     sudo spindump -reveal -noProcessingWhileSampling
    
  4. Perform an operation that you know will be abnormally slow.

  5. As soon as you begin to feel the slowness, go to the Terminal window where you entered your password and press Return so that the command begins to execute. Do not do anything else on the computer while it's running, otherwise you will distort the data collection.

  6. After waiting for >10 seconds to collect a sample and another minute or two to symbolicate and format, you’ll get a file in /tmp/spindump.txt that contains a stackshot of every process.

  7. Upload the file to PasteBin or some equivalent place and add the link to it to your original question. We can take a look at it and come up with next steps for the investigation.