VK_EXT_headless_surface is missing in vulkaninfo

Hello folks,

I’d like to see VK_EXT_headless_surface when executing vulkaninfo in Google Colab headless instance with T4 GPU.

Here’s what I did so far:

  1. Update drivers
!apt install -qy wget vulkan-tools xvfb libnvidia-gl-535
!apt remove -qy mesa-vulkan-drivers
  1. Install headlesss nvidia-525 drivers
!apt install nvidia-headless-525

Here’s the output of !nvidia-xconfig --query-gpu-info:

Number of GPUs: 1

GPU #0:
  Name      : Tesla T4
  UUID      : GPU-2e550925-ce29-5566-4a1a-d0803a404083
  PCI BusID : PCI:0:4:0

  Number of Display Devices: 0

And the output of !vulkaninfo --summary:

'DISPLAY' environment variable not set... skipping surface info
error: XDG_RUNTIME_DIR not set in the environment.
==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.204


Instance Extensions: count = 19
-------------------------------
VK_EXT_acquire_drm_display             : extension revision 1
VK_EXT_acquire_xlib_display            : extension revision 1
VK_EXT_debug_report                    : extension revision 10
VK_EXT_debug_utils                     : extension revision 2
VK_EXT_direct_mode_display             : extension revision 1
VK_EXT_display_surface_counter         : extension revision 1
VK_KHR_device_group_creation           : extension revision 1
VK_KHR_display                         : extension revision 23
VK_KHR_external_fence_capabilities     : extension revision 1
VK_KHR_external_memory_capabilities    : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2         : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2       : extension revision 1
VK_KHR_surface                         : extension revision 25
VK_KHR_surface_protected_capabilities  : extension revision 1
VK_KHR_wayland_surface                 : extension revision 6
VK_KHR_xcb_surface                     : extension revision 6
VK_KHR_xlib_surface                    : extension revision 6

Instance Layers:
----------------

Devices:
========
GPU0:
	apiVersion         = 4206834 (1.3.242)
	driverVersion      = 2245656896 (0x85da0140)
	vendorID           = 0x10de
	deviceID           = 0x1eb8
	deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
	deviceName         = Tesla T4
	driverID           = DRIVER_ID_NVIDIA_PROPRIETARY
	driverName         = NVIDIA
	driverInfo         = 535.104.05
	conformanceVersion = 1.3.5.0
	deviceUUID         = 2e550925-ce29-5566-4a1a-d0803a404083
	driverUUID         = 0415fb4e-e904-5af7-8fad-a705dd68f35e

Hello @fbeaufort and welcome to the NVIDIA developer forums.

I am not sure that the NVIDIA driver implements the headless extension.

A bit of clarification: The headless driver package does not mean the same as the headless Vulkan extension. If you check the spec then the VK extension states:

“It provides a mechanism to create VkSurfaceKHR objects independently of any window system or display device.”

That means it does not matter whether you have a headless system or not.

The headless driver on the other hand only incurs that it does not install the actual driver parts needed to support a windowing or display system. So on that system you would not even be able to create a surface and bind it to a display device.

Lastly, this particular extension is only supported through the Layer system of Vulkan. There are third-party implementations available, but I cannot say anything to their quality or completeness.

I hope I could help a bit.

Thanks!