Skip to content

Run Nvidia Vulkan headless without Xorg! #24

@boberfly

Description

@boberfly

Hi all,

I was looking around and discovered something kind of amazing and can potentially resolve the need for the nv_vulkan_wrapper entirely. This is what I did:

  1. Make a file for testing in $HOME/.local/share/vulkan/icd.d/nvidiaegl_icd.json
  2. Fill it with this, which is a copy of nvidia's standard icd only it is pointing to another library (I am using 415.27 of nvidia's driver):
    { "file_format_version" : "1.0.0", "ICD": { "library_path": "libEGL_nvidia.so.0", "api_version" : "1.1.84" } }
  3. Copy primus_vk.json to $HOME/.local/share/vulkan/implicit_layer.d/ like normal that is pointing to the actual primus_vk.so and NOT the nv_vulkan_wrapper at all.
  4. Run a Vulkan app with just enabling the ENABLE_PRIMUS_LAYER=1 your_vulkan_app

I'm doing this with The-Forge and the log file now tells me it is using my Nvidia card instead of my AMD card. I am not using an optimus laptop here also, so this seems to work on a dual-gpu setup in a regular PC. My display is going through a Vega Frontier Edition but it is being rendered on a Quadro K2000 (I will later test on an RTX 2070 and see if it works).

I have noticed some crazy stutter though, so there might be something else which needs to be fixed here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions