vkQueuePresentKHR fails with VK_KHR_display WSI on MST adapter after reconnect
Brief summary of the problem:
I have a Valve Index VR headset connected to a Vega 64 with this MST adapter https://www.amazon.de/gp/product/B07YNLXH9D/.
This setup works fine after booting when everything is connected at boot and both Monado and SteamVR run fine.
However after power cycling the Valve Index, essentially reconnecting the display (possibly suspending the PC plays a role but suspending does not automatically cause it), vkQueuePresentKHR fails with VK_ERROR_SURFACE_LOST_KHR when using direct mode / VK_ICD_WSI_PLATFORM_DISPLAY. Both the Monado and the SteamVR VR runtimes fail to show anything in the VR headset as a result.
Only the vulkan wsi is affected. When running
xrandr --output DisplayPort-3 --set non-desktop 0, extending the X11 desktop to the Valve Index display works fine with no errors.
Debugging in mesa everything seems seems fine, up until
At init, when
vkGetRandROutputDisplayEXT() is called,
wsi_display_output_to_connector_id() gets a
97 from randr just fine.
Later, on the first call to
connector->active is false which is probably expected.
drmModeGetConnectorCurrent(wsi->fd = 17, connector->id = 97); returns
NULL which implies that the kernel driver somehow fails to get connector information from the MST adapter.
This only happens with the MST adapter. With the Valve Index directly connected to the GPU everything is fine.
The Project Northstar (an augmented reality headset) connected to the MST adapter also fails with the same error. I believe it uses the same displays but different display controllers/firmware than the Valve Index.
- CPU: Ryzen 3950X
- GPU: Vega 64
- System Memory: 64 GB
- Display(s): 4k Displayport Monitor, 1080p HDMI Monitor, Valve Index (Displayport). Only the Valve Index is connected to the MST adapter.
- Distro name and Version: Archlinux
- Kernel version: 5.9 and 5.8
- Custom kernel: zen-kernel
- AMD package version: mesa git, mesa 20.2.1
How to reproduce the issue:
Connect a VR HMD with Displayport to a MST adapter, reconnect it (?). Run SteamVR or Monado with direct mode.
I don't know if any other MST adapters are affected.