How to stop the OS X VM system log being flooded with WindowServer errors

Last week I started the process of converting my 2012 MacMini into a VMware ESXi host.  I have quite a few tips I hope to find time to post but for now, here is one issue I resolved today that others might find very helpful.

After installing OS X into a VM on ESXi, you have probably seen the system log file flooded multiple times per second with this error message.

WindowServer: _CGXGLDisplayContextForDisplayDevice: No matching context for device (0xdeadbeef) – disabling OpenGL

Despite what I found on other blogs, like the great Infrageeks blog (which was a great help in my journey), it IS possible to stop these error messages.  You simply need to create a syslog filter rule to ignore them.


As root, edit the /etc/asl.conf file.  About 20 lines down, before the rule that saves every message, we want to add our exclusion rule so that it won’t be saved.  So just before this line…

# save everything from emergency to notice

copy and insert the following 2 lines.

# ignore WindowServer messages due to ESXi display device
? [= Sender WindowServer] [= Level 4] [= Facility user] [CA= Message _CGXGLDisplayContextForDisplayDevice] ignore

Save the file and exit your editor.


Now you will need to restart the syslog daemon so it will use the updated rule.  You could reboot the OS X system but it is a lot faster to just manually restart the process.

sudo launchctl unload /System/Library/LauchDaemons/
sudo launchctl load /System/Library/LauchDaemons/

If you monitor the /var/log/system.log file now, you will see a bunch of Configuration Notice: ASL Module messages as the daemon reloads but more importantly, no more WindowServer messages!


Hope this helps.

This entry was posted in Tips, Tricks and Hacks, VMware. Bookmark the permalink.