VMware Communities
Mongo424242
Enthusiast
Enthusiast

Vulkan Support Questions

Hi all,

I have a few questions concerning the installation of Vulkan drivers on an Ubuntu host, and how they translate to the guest.  My video drivers (NVidia v510) are current in my host OS (Ubuntu 20.04), so I am thinking that I only need to install the Vulkan drivers on top of these, correct?  Every place I look for help tells me that I need to re-install the NVidia drivers as well (I really don't want to do this...).  Also, most sites tell me that I need to update the repository (sudo apt update), and then do an upgrade (sudo apt upgrade).  I have been letting the Ubuntu software update handle things, as the last time I did an upgrade from the command line, my video was borked, sending me into panic mode.  Fortunately, I only had to re-install my NVidia drivers, and all was back to normal.  So, my questions are as follows:

1) is the following command line sequence correct for a host with up-to-date NVidia drivers?

- sudo apt update

- sudo apt install vulkan vulakn-utils

and will the following undo the install if things get messed up:

- sudo apt purge vulkan vulkan-utils

2) Is Vulkan support in Workstation Pro 16 subject to the hardware compatibility of the guest?  In other words, one of my VMs (Windows XP) is build at a WS 10.x level.  Will it benefit from Vulkan (i.e will games that allow specifying the 3D renderer be able to "see" the Vulkan on the host)?

Thanks!

 

0 Kudos
6 Replies
bluefirestorm
Champion
Champion

Use of Vulkan on Linux hosts for VM 3D rendering is supported on Turing or newer GPUs for Nvidia GPUs.

I have an Ubuntu 20.04 host, I didn't have to explicitly install Vulkan drivers. My understanding of the way Khronos works is that the OpenGL/Vulkan drivers would be provided by the driver provider (e.g. Vulkan driver of Intel GPUs would come from Intel, Vulkan driver of Nvidia GPUs is an implementation by Nvidia, etc). I could be wrong with this assumption.

If you have Pascal or older Nvidia GPU, VMware Workstation 16.x will use OpenGL 4.6 instead of Vulkan. To force using Vulkan instead OpenGL (I have tried this on a Pascal GPU), add the following line to the vmx

mks.vk.allowUnsupportedDevices = "TRUE"

If the host system has more than one GPU active such as Intel integrated and Nvidia discrete GPU, Workstation will use the first available Vulkan device it sees. To force discrete GPU, add the following to the vmx

mks.forceDiscreteGPU = "TRUE"

You can see which device it uses in the mksSandbox.log file.

<timestamp> In(05) mks Vulkan Renderer: Vulkan Device 2:
<timestamp> In(05) mks Vulkan Renderer: Vendor: 'NVIDIA'
<timestamp> In(05) mks Vulkan Renderer: ID: 0x1e84
<timestamp> In(05) mks Vulkan Renderer: Type: 0x2
<timestamp> In(05) mks Vulkan Renderer: Name: 'NVIDIA GeForce RTX 2070 SUPER'
<timestamp> In(05) mks Vulkan Renderer: GPU chip: Unknown (Unknown)
<timestamp> In(05) mks Vulkan Renderer: GPU type: Discrete
<timestamp> In(05) mks Vulkan Renderer: Driver Name: 'NVIDIA'
<timestamp> In(05) mks Vulkan Renderer: Driver Version: 0x7f924140
<timestamp> In(05) mks Vulkan Renderer: Driver Info: '510.73.05'
<timestamp> In(05) mks Vulkan Renderer: API Version: 1.3.194
<timestamp> In(05) mks Vulkan Renderer: Using device 2 of 3

The line Using device 2 of 3, refers to that VMware saw 3 devices and is using device 2 in this case the Nvidia. The device listing starts at 0 so you will see Vulkan device 0, 1, 2 although here it sees 3 devices.

For Vulkan support inside the VM, since the video driver is provided by VMware (via VMware Tools), the Vulkan implementation is the responsibility of VMware (goes back to the statement above about Vulkan drivers coming the driver provider). It won't be able to see the Vulkan drivers on the host. For an XP VM, it probably only sees DX9. Vulkan came in 2015 and the XP VMware Tools has been frozen at 10.0.12 since 2016.

AFAIK, none of the Windows guests in VMware VMs including Windows 10/11 has any support for Vulkan.

 

0 Kudos
Mongo424242
Enthusiast
Enthusiast

Once again, thank you for your answer bluefirestorm!

If I am understanding you correctly, I already have the Vulkan drivers on my system (they "piggybacked" along with the official NVidia drivers), and there is nothing for me to install.  That being the case, I am confused as to why the "glxinfo" and "glxgears" commands are telling me that the associated tools need to be installed...?  I know my GPU (NVidia GTX 1050Ti) is being utilized, as all of my 3D games in both WinXP and Win7 guests work fine.  Do I just need to install the tools pack "mesa-utils" to validate the host?  My whole confusion stems from page 160 in the Workstation documentation:

The VMware guest operating system OpenGL driver for Windows and Linux supports the OpenGL 3.3 and OpenGL 4.1 core profile only. The compatibility profile is not supported.
Note If you have Workstation 16.2.0 Pro, you can use Vulkan renderer on a Linux host with Intel, Nvidia, or AMD GPUs. Vulkan renderer provides support for Direct3D 11 (and earlier) and OpenGL 4.1 (and earlier) in the guest.
For Workstation 16.2.0 Pro, the Vulkan renderer support is limited to the following GPUs:
 
Intel Skylake and later GPUs (for example, Kaby Lake and Ice Lake)
 
AMD RDNA/NAVI14 and later GPUs (for example, the Radeon RX/Pro 5300 and 5500 series)
Note Presently, for AMD GPUs, use the AMDVLK driver. You can download the AMDVLK driver from here: https://github.com/GPUOpen-Drivers/AMDVLK/releases
 
Nvidia Turing and later GPUs (for example, the RTX series)
Note For pre-Turing GPUs, Workstation uses the legacy OpenGL renderer.


Procedure

1) Upgrade the video drivers on the host system to the latest versions.
ATI Graphics drivers are available from the AMD Web site. NVIDIA drivers are available from the NVIDIA Web site. Intel drivers are available from the Intel Web site.

2) If you have a Linux host system, run commands to test the host for compatibility.

a) Verify that direct rendering is enabled.
glxinfo | grep direct

b) Verify that 3D applications work.
glxgears

Once again, my thanks for your expertise!

0 Kudos
bluefirestorm
Champion
Champion

Yeah, the Vulkan drivers appear to come with the Nvidia proprietary drivers. I didn't have to install any Vulkan package separately. I think the mesa-utils brings the glxinfo and glxgears which are tools used to verify the OpenGL version and verify that OpenGL is working on the host.

So if you want to have Workstation use Vulkan instead of OpenGL with the GTX 1050Ti (this is a Pascal GPU), you do need to add the vmx entry mentioned in my earlier post. I don't know what the advantage/disadvantages of using one over the other.

Another way to confirm that the VM(s) is(are) using the Nvidia GPU is use the nvidia-smi command line tool. You should see mksSandbox process for every VM using the Nvidia GPU.

0 Kudos
Mongo424242
Enthusiast
Enthusiast

Hi bluefirestorm,

That makes sense (I never considered that the Vulkan drivers would have to be utilized via the VMWare tools).  I installed the mesa-utils package, and it seems to confirm that OpenGL is indeed working on the host, but it does not specify the version (I was able to verify v4.6 using the NVidia XServer tool).  When I look in the mkxSandbox.log, I only get one instance of Vulkan, and not what you specified.  Am I missing something?

2022-06-19T19:47:05.770Z In(05) mks GLRenderer: OpenGL Extensions: GL_NV_draw_texture GL_NV_draw_vulkan_image GL_NV_ES1_1_compatibility GL_NV_ES3_1_compatibility

Also, nvidia-smi also confirms that the NVidia is what is being used.


EDIT: It never occurred to me that I might have more than one GPU available to the host (I always just took it for granted that NVidia was all there was... my i5-7500 CPU has integrated graphics as well... imagine that).  I have not yet edited the vmx file to force discrete, so is that why I am getting the above line from the mksSandbox.log file?

 

0 Kudos
bluefirestorm
Champion
Champion

Since the GTX 1050Ti is a Pascal GPU (one generation before Turing GPUs), VMware Workstation will use OpenGL instead of Vulkan. Notice the "GLRenderer" in your mksSandbox.log instead of "Vulkan Renderer". If you do want to force using Vulkan instead of OpenGL, you do have to add the mks.vk.allowUnsupportedDevices = "TRUE" line in the vmx that I mentioned earlier.

You should be able to see the OpenGL version also in the mksSandbox.log file. To see the version from glxinfo

glxinfo | grep -i version

The Intel integrated GPU tends to behave differently. For some if a monitor is not connected to the Intel GPU, the OS seems to ignore it. In my case, I have an i7-8700K with the Intel UHD630 enabled on the BIOS without a monitor attached to it, the Workstation still sees it as a valid Vulkan device and lists it as the first. You should be able to disable the Intel integrated GPU at the host motherboard BIOS.

0 Kudos
Mongo424242
Enthusiast
Enthusiast

Thanks once again, bluefirestorm!  That is exactly what I was hoping (no additional driver installs), although I currently have no applications that explicitly require Vulkan.  The more I learn about this, the more questions I have, and there is no shortage of reading material on the subject.  At least I can experiment in my VMs "non-destuctively" by simply changing the vmx file...

Mongo

0 Kudos