Getting that pesky 3D acceleration error/warning when you try running your VMs in VMware Workstation / Player on Linux but all your other 3D apps/games work fine?

This issue was giving me gray hairs the past few months after suddenly appearing when I did a random system update (pacman -Syu , yes I know it’s stupid to blindly update on Arch but still…), could not find anything related to the problem on Arch forums or anywhere else, except for several years old forum threads leading to nothing that would fix my problems (believe me I tried a lot of them), until I for some reason stumbled upon this info and fix that I had not found earlier šŸ˜€
(I suppose my google-fu is getting rusty)

For some reason it seems VMware blacklists the Mesa drivers, so especially everyone running a laptop with Optimus graphics (using Bumblebee with optirun / primusrun) will have issues with this it seems as we pipe all 3D through Mesa and then let it and bumblebee(optirunĀ /Ā primusrun) decide whereĀ to renderĀ (Intel or Nvidia graphics) depending on how we start the program.

The fix however was quite easy (tho some might say, a bit ugly).
You simply enable VMware to allow the use of blacklisted drivers, this does however give you a warning in VMware that it may cause instability, but you can silence that alarm if it proves stable for you.

Given that you got proper hardware acceleration working on anything else 3D in Linux already, you simply add the following to ither ‘$home/.vmware/preferences’ or in the ‘.vmx’ for every vm you want 3D support in and restart VMware Workstation / Player (ofc, if you edit the .vmx files you could just close/remove and then open/re-add them i suppose, but I like being safe):

mks.gl.allowBlacklistedDrivers = TRUEĀ 

At least that was all that I needed for my ASUS UX32VD running Arch Linux and seems to work for at least Workstation 9 / 10 and Player 5 / 6.

 

Update 2015-03-14: This seems to be needed for my X220 running intel graphics only as well now.