Error using VK_EXT_acquire_xlib_display on the Orin

I recently saw that VK_EXT_acquire_xlib_display was implemented on the AGX Orin. When I tried to acquire the display, I got VK_UNKNOWN_ERROR from
vkAcquireXlibDisplayEXT. I checked that Xlib display pointer dpy and the VkDisplay passed to the function are both valid. The same code runs fine on a desktop NVIDIA GPU. The display in this case is a Valve Index, which has the non-desktop flag and isn’t used by the window manager.

    Display* dpy = XOpenDisplay(nullptr);
    if (dpy == nullptr) {
        abort("Failed to open X display");
        return;
    }

    uint32_t display_count;
    VK_ASSERT_SUCCESS(vkGetPhysicalDeviceDisplayPropertiesKHR(vk_physical_device, &display_count, nullptr));
    std::vector<VkDisplayPropertiesKHR> display_properties(display_count);
    VK_ASSERT_SUCCESS(vkGetPhysicalDeviceDisplayPropertiesKHR(vk_physical_device, &display_count, display_properties.data()));

    std::cout << "Found " << display_count << " displays:" << std::endl;
    int index = 0;
    for (const auto& display : display_properties) {
        std::cout << "\t[" << index++ << "] " << display.displayName << std::endl;
    }

    auto display_select_str = std::getenv("XLIB_DISPLAY");
    assert(display_select_str != nullptr);
    int display_select = std::stoi(display_select_str);
    if (display_select >= display_count) {
        abort("Invalid display selection");
        return;
    }

    display = display_properties[display_select].display;

    // Now we acquire the Xlib display
    auto acquire_xlib_display = (PFN_vkAcquireXlibDisplayEXT) vkGetInstanceProcAddr(vk_instance, "vkAcquireXlibDisplayEXT");
    if (acquire_xlib_display == nullptr) {
        abort("Failed to load vkAcquireXlibDisplayEXT");
        return;
    }

    auto ret = acquire_xlib_display(vk_physical_device, dpy, display);
    if (ret != VK_SUCCESS) {
        abort("Failed to acquire Xlib display");
        return;
    }
    std::cout << "Acquired Xlib display" << std::endl;

Thanks for any help in advance

Hi,
The latest Jetpack release is 6.0GA(r36.3). If you use previous version, please upgrade to the latest version and try again.

Thank you for the response. I did try this on the latest version.

Update: I tried to acquire direct mode on a regular display using the extension and got the VK_UNKNOWN_ERROR as well, so it seems like a driver issue.

Hi,
This extension is not supported. We will check and evaluate to support it in the future.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.