ValveSoftware / SteamVR-for-Linux

Issue tracker for the Linux port of SteamVR
933 stars 45 forks source link

[BUG] Gnome 47 / Mutter 47 Failed to lease display #753

Open davibu opened 1 week ago

davibu commented 1 week ago

Describe the bug I'm on Debian Sid with Gnome 47 and Mutter 47.1-4. When I start SteamVR I get the error message 498:

Failed to lease display
Your desktop environment (Gnome Wayland) does not support Direct Rendering Manager leases, which is required for virtual reality.

To Reproduce Steps to reproduce the behavior:

  1. Start SteamVR on Debian sid with Gnome Wayland 47
  2. See error

Expected behavior I expect that SteamVR starts and leases the HMD display as Mutter 47 introduced DRM lease support.

System Information (please complete the following information):

Screenshots Screenshot From 2024-11-18 17-28-00

Additional context I always get the error message

SteamVR setup is incomplete, some features might be missing. See Steam client logs folder for detail

But even with this message SteamVR runs on X11.

kisak-valve commented 1 week ago

Hello @davibu, DRI_PRIME=pci-0000_12_00_0 in your extended runtime diagnostics hints that environment variable is forcing Steam and SteamVR to run on the integrated GPU, while I suspect your HMD is physically connected to the discrete GPU. You might get lucky with completely closing Steam, then running steam from a terminal. If that helps, then it tells us that the error 496 is from SteamVR trying to find the HMD display on the unlikely but requested GPU.

Otherwise, these are some lines of interest from vrcompositor.txt for a SteamVR dev to ponder:

[Warning] - CHmdWindowSDL::FindDirectDisplayWayland: vkGetDrmDisplay failed.
[Info] - Tried to find direct display through Wayland: (nil)
[Error] - CHmdWindowSDL: Failed to create direct mode surface
[Error] - CHmdWindowSDL: VR requires direct mode.
[Error] - Error making window!
[Info] - Failed to kill gpu-trace
[Info] - Failed to initialize compositor
[Info] - Failed to start compositor: VRInitError_Compositor_GnomeNoDRMLeasing

GNOME wayland should have a chance at working now that https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3746 is part of of the 47.0 release and the error message on SteamVR's side predates the DE release.

davibu commented 1 week ago

Thank you very much, it now seems to work!

To document the steps I took:

  1. Set /usr/sbin into the path according to https://github.com/ValveSoftware/SteamVR-for-Linux/issues/563 which solved the SteamVR setup is incomplete message.
  2. Starting steam from terminal
  3. When I running into code 303(It seems to occur when SteamVR was not properly closed or started) : Reboot PC and goto step 1
  4. Enjoying VR
kisak-valve commented 1 week ago

Related: https://github.com/ValveSoftware/steam-for-linux/issues/8983