You are not logged in.

#1 Yesterday 22:59:36

prokrastinator
Member
Registered: 2025-12-18
Posts: 6

[Solved]SteamVR - Error 498 | VRInitError_Compositor_GnomeNoDRMLeasing

Hi there,
i had this before and i was able to solve it just with a mesa downgrade: https://bbs.archlinux.org/viewtopic.php?id=311089
Today steam client made an update and here we are again. This time i dug a litte deeper....

System:

  • Arch Linux, GNOME 49.4 (mutter 49.4-1), Wayland

  • AMD RX 7900 XT

  • Valve Index

  • Mesa 25.2.7-1, SteamVR 2.15.5, steamvr-linux-fixes-layer-bin 0.1.3

What did NOT help:

  • Trying previous and beta version of steam VR

  • Mesa downgrade to 25.2.7 sad This time

  • steamvr-linux-fixes layer v0.1.3 (patches CreateDirectModeSurface, not FindDirectDisplayWayland)

  • Disabling steamvr-linux-fixes entirely

  • MESA_VK_DEVICE_SELECT

  • VK_ADD_LAYER_PATH=/usr/share/vulkan/implicit_layer.d

History of errors:

1. Error 307/303 vrcompositor segfault at CreateDirectModeSurface because mutter advertised two wp_drm_lease_device_v1 globals (card0 + card1). card0 (iGPU) had an empty connector → NULL deref.
Fixed by a systemd service that unbinds the iGPU before the display manager starts:

echo 0000:19:00.0 > /sys/bus/pci/drivers/amdgpu/unbind

2. Error 498 now the only remaining issue.

What error 498 seems to be:
VRInitError_Compositor_GnomeNoDRMLeasing, CHmdWindowSDL::FindDirectDisplayWayland() returns nil.
The Wayland DRM lease protocol is working correctly: mutter advertises card1, sends connector_id=273, name="DP-2", description="VLV Index HMD". Everything is received by vrcompositor. No Vulkan call explicitly fails.

So i did some testing and identified a possible root cause:
FindDirectDisplayWayland() internally calls FindDirectDisplayVulkan(), which calls vkGetPhysicalDeviceDisplayPropertiesKHR. In Mesa 25.2.7, this returns count=0 because the internal WSI connector list is empty, it only gets populated after vkGetDrmDisplayEXT() has been called first. But FindDirectDisplayVulkan runs before vkGetDrmDisplayEXT is ever called, so it sees 0 displays and returns nil. The total time between UUID log and the "(nil)" result is ~0.016ms, consistent with an immediate early-exit, not a DRM ioctl call.

Confirmed with test programs:

BEFORE vkGetDrmDisplayEXT: vkGetDisplayPropertiesKHR → count=0
AFTER  vkGetDrmDisplayEXT: vkGetDisplayPropertiesKHR → count=1

vkGetDrmDisplayEXT(physdev, card1_fd, 273, &display) itself works fine and returns VK_SUCCESS with a valid handle, both with a directly-opened FD and with an FD transferred via SCM_RIGHTS (as Wayland does it). The Mesa display name returned is "monitor" (hardcoded).

Hypothesis for fix:
Mesa 26.x may pre-populate the WSI connector list at init time (by scanning DRM connectors), so vkGetDisplayPropertiesKHR returns results immediately without needing vkGetDrmDisplayEXT to be called first. Testing Mesa 26 + steamvr-linux-fixes (which patches the sampler crash introduced in Mesa 26) would be my next step.

Question:
Has anyone gotten error 498 working on GNOME with Mesa 26.x + steamvr-linux-fixes?
Is there another known workaround for the empty WSI display list at init time?
Or am i on a totally wrong path here?
I really dont want to give it up...

Last edited by prokrastinator (Today 12:49:04)

Offline

#2 Today 12:47:28

prokrastinator
Member
Registered: 2025-12-18
Posts: 6

Re: [Solved]SteamVR - Error 498 | VRInitError_Compositor_GnomeNoDRMLeasing

Somehow the issue solved itself after several restarts.

So if someone gets the error, this could be it.
If you have a dual-GPU AMD system, GNOME's Mutter advertised two wp_drm_lease_device_v1 Wayland globals — one for card0 (iGPU) and one for card1 (dGPU). vrcompositor tried to process both. Since  the iGPU has no connected display, it has an empty connector, which caused a NULL pointer dereference (segfault at address 0x20) inside CreateDirectModeSurface.
                                                                                                                                                                                           
Try this:                                                                                                                                                       
1. unbind-igpu.service (systemd system service)                                                                                                                                           
  Unbinds the iGPU from the amdgpu driver before the display manager starts, so Mutter never sees it and never advertises its DRM lease device.
 
2. steamvr-linux-fixes-layer-bin (AUR package)                                                                                                                                           
  A Vulkan layer that patches vrcompositor's direct mode surface selection. Needed for Mesa 26 compatibility.

3. vrcompositor-launcher.sh, two added exports:                                                                                                                                         
  export VK_ADD_LAYER_PATH=/usr/share/vulkan/implicit_layer.d   # load the fixes layer                                                                                                     
  export MESA_VK_DEVICE_SELECT=pci:0000:03:00.0                 # force my dGPU only                                                                                                           
                                                                                                                                                                                           
                                                                                                                                                                                       
Works with Mesa 26.0.2 (current), no Mesa downgrade needed!

Last edited by prokrastinator (Today 12:53:27)

Offline

Board footer

Powered by FluxBB