I've bought iMac 27' in 2017 since the beginning I'm having a very annoying issue with it. On average every two weeks, my mac will freeze to the point where the mouse is still moving, audio continues to play and it even advances to the next songs. Besides the moving mouse and audio in the background, I'm unable to click anything. Usually, it happens when I close an application or when I decide to install updates from apple. Rarely it just happens out of anything.
I've tried a few things like removing programs cache, unused apps, reset SMC and NVRAM but so far nothing fixed the issue. After upgrade from Sierra to High Sierra it became more often but after updates (I remember that WindowServer had memory leaks), it got back to normal so I can live with it but it's still annoying. Also, I've run Apple's diagnostics to check if everything is okay and it's.
The only thing that I've changed in my mac was RAM upgrade so I have 2x4GB (Apple) and 1x16GB (Crucial 16GB DDR4 2400 MT/s (PC4-19200)) so in total, I have 24GB of RAM.
I've MacBook pro as well which has basically the same set of applications installed and even more and it never happened it so far and I have for over 2 years.
The last time it froze was today and I've decided to enable SSH so maybe when it'll happen again I might be still able to SSH and list processes list.
Besides the issue that I just described I have no other issues.
Does anyone have an idea what's going on?
Additionally, bellow is the list of apps that I use:
- Android Studio - PyCharm - Goland - Magnet - VirtualBox - Vagrant - Google Chrome - Minecraft - iTerm - Slack - Discord - Intelliji Idea - Magnet - Clocker
One last thing, after it froze today I've decided to check DiagnosticReports and I've noticed that the last report is about WindowServer and when I checked the date when it happened the last time there was also WindowServer. I'm starting to suspect that it might be a bug in WindowServer but what would I have to do to fix it?