OSX Sierra - WindowServer process hangs, high CPU, whole OS freezes
I just updated my 15 inch macbook pro retina 2014 model from OSX El Capitan to Sierra (10.12.2) and have noticed an ugly problem. It appears when I press and hold the F1-F2 (screen light +/-), the F5-F6 (keyboard light +/-) or the F11-F12 (volume +/-), the whole system becomes unresponsive for an amount of time proportional with how much I hold the button pressed. In the activity monitor I can see when it recovers that the WindowServer jumped to 100%+. This used to work perfectly on El Capitan, with normal behaviour(incremented/decremented the values until limits 0-16 bars on screen). I will file a bug report on Apple forum as well.
EDIT: I also posted on Sierra forum here. Dont know where else to report this so Apple engineers can see and fix it.
Wow I accidentally debugged this myself.
It seems after all that my problem was actually a side effect caused by the real issue which was: macOS Sierra changed how it handled defaults write NSGlobalDomain KeyRepeat -int 0
, it no longer supported a zero value, and I had it changed to zero in Yosemite or El Capitan to make the cursor advance faster. To reset it back to normal parameters I changed the keyboard typing delays in the System Preferences > Keyboard
back to fastest (both sliders were dragged to the left sidecheck using $ defaults read NSGlobalDomain
in terminal
, most likely cause I upgraded from El Capitan and something changed in Sierra, and the keyboard was queueing input events as fast as possible, so the WindowServer process hogged the CPU like crazy) and now my initial problem is gone.
Maybe I should change the title of the question so that others can find this solution..
I had the very same problem after upgrading to macOS High Sierra 10.13.6. My 2010 MacBook Pro hangs between 2-5 minutes completely. If MacBook returns to normal, Activity Monitor shows exactly the amount of CPU usage for windowserver process as the hang time.
I changed the keyboard settings to fast (both sliders to the right) and the problem became worse. Then a I did the opposite, (changed both sliders to the left) and the problem was gone.