Ok, here's the guide to get vmware workstation working with nvidia acceleration.
ASSUMING: vmware workstation 9.0.1 or 8.0.5, ubuntu 12.10, optimus, working bumblebee config, x86_64 os.
If you don't have bumblebee set up yet, there are numerous tutorials to help you. Follow them.
1. sudo apt-add-repository ppa:zhurikhin/primus
2. sudo apt-get update; sudo apt-get install primus primus-libs primus-libs:i386
3. Check that primus works. Try primusrun glxspheres.
4. If you don't have vmware installed, install it now.
5. sudo chmod a+s /usr/lib/x86_64-linux-gnu/primus/libGL.so.1
6. sudo ln -s /usr/lib/nvidia-current/tls/libnvidia-tls.so.304.43 /usr/lib/x86_64-linux-gnu/sudo ln -s /usr/lib/nvidia-current/libnvidia-glcore.so.304.43 /usr/lib/x86_64-linux-gnu/sudo ldconfig
7. sudo /etc/init.d/vmware stop
sudo mv /usr/lib/vmware/bin/vmware-vmx /usr/lib/vmware/bin/vmware-vmx.real8. sudo gedit /usr/lib/vmware/bin/vmware-vmx(paste in the following)
#!/bin/bashLD_PRELOAD=/usr/lib/x86_64-linux-gnu/primus/libGL.so.1 exec primusrun /usr/lib/vmware/bin/vmware-vmx.real "$@"9. sudo chmod u+s,a+x /usr/lib/vmware/bin/vmware-vmxsudo /etc/init.d/vmware start10. Run vmware, AS ROOT (sudo vmware)11. Enjoy 3d acceleration.So far, no crashes, decent performance. Of course it's nowhere near an ideal solution, but it's the best I've been able to come up with at this point, and I'm really, really happy to have hardware acceleration.
The solution by cmillersp worked only once in Mint 14. After rebooting the VM it keeps says "Error: Virtual machine is busy" at launch, this is the errors i get in the shell:
Logging to /tmp/vmware-root/vmware-modconfig-1351.log
license: GPL v2
description: VMware Virtual Machine Monitor.
author: VMware, Inc.
vermagic: 3.7.0-7-generic SMP mod_unload modversions
connect: No such file or directory
primus: fatal: failure contacting Bumblebee daemon
when i try to start the bumblebeed i get this:
[ERROR]Invalid configuration: no driver configured.
Anyway the problem is solved reversing the 7th step:
sudo mv /usr/lib/vmware/bin/vmware-vmx /usr/lib/vmware/bin/vmware-vmx.real
of course this implies no 3D in the virtual machine. Anyone have this problem? Anyone have an idea about it? could be a problem with Bumblebee?
These instructions worked great for my new Lenovoa T430 running Kubuntu 12.10, Thank you!
I thought I could add a bit as well: since I'm kind of a battery runtime nut, I want to be able to only run VMware under the Nvidia driver sometimes, so I scripted it with intelligence. Full writeup, and the script, are here: http://www.totalnetsolutions.net/2012/12/08/bumblebee-primus-and-vmware-workstation-nvidia-optimus-graphics-on-ubuntu/
I'm hoping to add in the SuSE notes from this thread, perhaps tomorrow morning, and am actively interested in feedback, to make it maybe the first useful thing I've added to this community I've so far taken so much from.
Thanks again, cmillersp!
Unfortunately, the script in the link posted doesn't work for latest Ubuntu version as they have deprecated nvidia-current. I have uploaded the updated script attached to this Dropbox link here (Extract the zip file). Once extracted, run the following commands on Terminal:
sudo ./bumblebee-vmware.sh --install
Make sure you have install primusrun and nvidia-319-updates before running the script. If you're using other nvidia driver versions, open the script as gedit and go to line 110, replacing export PRIMUS_libGLa='/usr/lib/nvidia-319-updates/libGL.so.1' with export PRIMUS_libGLa='/usr/lib/[NVIDIA DRIVER PACKAGE NAME HERE]/libGL.so.1'
You must always run the script as sudo if you want to get 3D acceleration from your Nvidia card and this script also detects if the laptop is plugged in or not. If you want to get 3D acceleration when you're on battery add the -y flag at the end of the command after install. The bug Xlib: extension "NV-GLX" missing on display ":0.0". still persists on the Terminal log however.
This script is tested on VMWare Workstation 10 on Ubuntu 13.10 (64 bit) with nvidia-319-updates driver.
Credits to docsmooth for providing the original script.
Hey, JeeKTan, thanks for the update - I'm going through it right now, but it looks like I hadn't updated by blog post as often as I had my own copy. I moved the code into github. I'm running through your changes compared to mine, but I've moved up to v1.3, and your edits are against 1.1.
What appears to be the main difference is on line 110 and 111 and 198 to 199, right? I have them commented out right now, and things *are* working on my 13.10 box, so I'm not sure if they're still required in other cases? I only have the 1 test machine.
I've also updated to the 13.10 acpi paths for my version, but there's a lot I'd like to do to this to make it more workable for others. I'd love your input, just send a pull request.
Hey docsmooth - I've been playing with this for a while and still not quite there. The notebook I am working on is running Ubuntu GNOME 14.04 amd64 with an Intel HD4000 and NVIDIA GeForce 635m. I have the xorg edgers repo ppa:xorg-edgers/ppa updated with nvidia-337 libcuda1-337 nvidia-opencl-icd-337 bumblebee bumblebee-nvidia and primus installed. I just did a fresh install of VMware Workstation 10.0.3 64 bit and I also edited your current script from github and replaced 304 with 337. I ran it as sudo and this was my result:
user@x:~$ sudo sh /home/user/Downloads/vmware-bumblebee-master/vmware --yes
forcing 3d on
/home/user/Downloads/vmware-bumblebee-master/vmware: 287: /home/user/Downloads/vmware-bumblebee-master/vmware: -k: not found
Any ideas? I have 3 of these notebooks to get working. I used to get optirun to work with Workstation when running it as root from the terminal (which was screwing up all kinds of permissions), but now that doesn't work either.
What results should I get when checking openGL support on the guest vm? The following is what I get on vmware workstation preview edition 2015. I tried the preview as it stated openGL 3.3 support. The out put remains the same whether running it prior to your script, with optirun from cli or without anything.
djerk@djerk-W540:~/bin$ optirun glxinfo | grep -i openGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro K1100M/PCIe/SSE2
OpenGL core profile version string: 4.3.0 NVIDIA 340.76
OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.4.0 NVIDIA 340.76
OpenGL shading language version string: 4.40 NVIDIA via Cg compiler
OpenGL context flags: (none)
OpenGL profile mask: (none)