ValveSoftware / SteamVR-for-Linux

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

SteamVR fails to use direct display #520

Open dbgasaway opened 2 years ago

dbgasaway commented 2 years ago

Describe the bug Whenever I launch SteamVR, it currently always shows the 2 eye displays on desktop. No graphics are sent to the Index at all, so it's not usable.

There are also occasional minor graphical glitches on the eye displays, where parts are grayed out for a split second (hard to grab a screenshot), but that's a minor issue and has been going on for longer.

Troubleshooting steps I already tried:

To Reproduce Steps to reproduce the behavior:

  1. Launch SteamVR
  2. See the VRCompositor window and a warning about direct display mode

Expected behavior No window appears on the screen, and graphics appear on the Index display

System Information (please complete the following information):

Screenshots (like other posts where it just shows on desktop only)

Additional context

The interesting part from the logs I think is:

Sun May 29 2022 17:14:49.674008 - HMD deviceUUID is 537207a7b7f41b67
Sun May 29 2022 17:14:49.674045 - Looking for direct display through RandR
Sun May 29 2022 17:14:49.674059 -  - Root 0x93c
Sun May 29 2022 17:14:49.717859 -    - Output 0x41 - 115 modes, 1 preferred
Sun May 29 2022 17:14:49.717893 -      - Mode 0 0x43 3840x2160 (looking for 2880x1600)
Sun May 29 2022 17:14:49.719423 -    - Output 0x242 - 0 modes, 0 preferred
Sun May 29 2022 17:14:49.724531 -    - Output 0x243 - 0 modes, 0 preferred
Sun May 29 2022 17:14:49.727061 -    - Output 0x244 - 0 modes, 0 preferred
Sun May 29 2022 17:14:49.727186 -    - Output 0x245 - 0 modes, 0 preferred
Sun May 29 2022 17:14:49.727284 -    - Output 0x246 - 0 modes, 0 preferred
Sun May 29 2022 17:14:49.727341 -    - Output 0x247 - 0 modes, 0 preferred
Sun May 29 2022 17:14:49.727395 -    - Output 0x248 - 0 modes, 0 preferred
Sun May 29 2022 17:14:49.727421 -    - Output 0x249 - 0 modes, 0 preferred
Sun May 29 2022 17:14:49.727433 - Tried to find direct display through RandR: (nil)
Sun May 29 2022 17:14:49.727442 - Looking for direct display through Vulkan WSI
Sun May 29 2022 17:14:49.733127 -  - Vulkan output 0: 2880x1600 resolution, 0x0 dimensions - Valve Corporation Index HMD (DP-5)
Sun May 29 2022 17:14:49.733240 - Tried to find direct display through Vulkan WSI: 0x561c6299da20
Sun May 29 2022 17:14:49.736357 - Trying to match desired rate of 90.003006Hz.
Sun May 29 2022 17:14:49.736389 - 4 modes on display:
Sun May 29 2022 17:14:49.736403 -  - 0: 2880x1600@90.003006Hz
Sun May 29 2022 17:14:49.736414 -  - 1: 2880x1600@79.999001Hz
Sun May 29 2022 17:14:49.736423 -  - 2: 2880x1600@120.019005Hz
Sun May 29 2022 17:14:49.736432 -  - 3: 2880x1600@144.000000Hz
Sun May 29 2022 17:14:49.736441 - Selected mode 0.
Sun May 29 2022 17:14:49.738494 - Failed to acquire xlib display
Sun May 29 2022 17:14:49.738513 - CHmdWindowSDL: Failed to create direct mode surface

Some ~months ago, this used to not be the case - I would only have this issue intermittently, and it could be fixed by resetting the Index and adjusting cables. I tried to use it again recently, and discovered the above new issue. I'm wondering if it's due to new nvidia drivers (going from 4?? to 510) as I did upgrade to 22.04 during that time, but it's hard to say due to the long time difference. I had also adusted VK_ICD_FILENAMES to get display working, and pulse settings to fix sound a while earlier, before it had the current issue.

This seems to be different than existing issues given that

Note: Commenters who are also experiencing this issue are encouraged to include the "System Information" section in their replies.

YourSandwich commented 2 years ago

Same issue here for multiple months now i belive since nvidia driver 510 or something.

headassbtw commented 2 years ago

i'm having this issue now, on arch with nvidia glad to see that this issue isn't fixed, seeing as steam support sent me here

dbgasaway commented 2 years ago

I am still having the same issue with the 515 drivers

Gusted commented 2 years ago

Seems like the same issue as #514 and same symptoms as @dbgasaway described, when this happens previously(few months ago) readjusting cables, turning index on and off, rebooting PC it would work fine. But now it's just permanent and the Index HMD is of no use.

glad to see that this issue isn't fixed, seeing as steam support sent me here

Really wished that Valve dedicated a bit more to Linux VR(given they are fully embracing it now with Proton + Steamdeck), I'm happy to provide every kind of logs you need, happy to test out debug patches etc. But you're just left wandering around and regretting your purchase(Well Linux VR is experimental, not able to use your product at all and no workaround whatsoever is really bad and not what you'd expect when it first just worked fine).

exodrifter commented 2 years ago

I have this problem too.

The HMD was previously working when I was using the mesa drivers instead of the nvidia drivers, but neither the motherboard display port or the nvidia card display ports work now that I've decided to use nvidia.

Ensber commented 2 years ago

same on steam deck

earldbjr commented 2 years ago

Same issue on a brand new install of Manjaro, latest nvidia graphics 515.65.01 and kernel 5.15.60-1-MANJARO.

Seems like this bug is flooding the forums, interesting...

earldbjr commented 2 years ago

Can also confirm this problem affects both of my kubuntu gaming rigs, 22.04, 5.15.0-46-generic kernel, 510.47.03 nvidia driver.

Also affects kubuntu and manjaro on Lenovo Yoga 9i, latest updates.

The headsets have the blue light on the front, but are otherwise paperweights.

wallcarpet40 commented 2 years ago

Seems like everyone in this thread is using Nvidia, but I have some similar issues with Radeon 6800XT. Using Fedora 36, KDE Plasma Wayland. Kernel 5.18.18, Valve Index.

After starting up my PC and Steam:

  1. Start SteamVR -> Image shows up on the headset -> Crashes SteamVR within 10 seconds

  2. Start SteamVR again -> Image now shows up on my monitor. Close SteamVR by closing the SteamVR Status Monitor window.

  3. Repeat step 2 multiple times, same result: image only shows up on the monitor.

  4. Start SteamVR -> Image shows up on my monitor -> Go to SteamVR Status Monitor hamburger-menu -> Select Devices -> Restart Headset -> SteamVR restarts and now the image is on the headset. SteamVR Status Monitor window is now on the center of my monitor instead of the top left corner and the window cannot be moved.

  5. Select Devices -> Restart Headset -> Status Monitor window is now on the top left and image is showing up on the headset and I can play a game normally (Usually have to restart SteamVR after closing a game).

I just want to make sure that people have tried the "Devices -> Restart Headset" trick :)

earldbjr commented 2 years ago

As for myself there is no image on the headset, the screens arent lit up. No amount of restarting the headset via the gui, replugging all cables, or trying different ports makes a difference.

YourSandwich commented 2 years ago

As for myself there is no image on the headset, the screens arent lit up. No amount of restarting the headset via the gui, replugging all cables, or trying different ports makes a difference.

Same experience :(

pss959 commented 2 years ago

This workaround may help: https://github.com/ValveSoftware/SteamVR-for-Linux/issues/355#issuecomment-635919607

mwestphal commented 1 year ago

Same issue here:

System Information (please complete the following information):

Distribution: ArchLinux
SteamVR version: 1.24.7
Steam client version: Dec 15 2022
Opted into Steam client beta?: No
Graphics driver version: nvidia  525.78.01 
CorneliusCornbread commented 1 year ago

Same exact issue on Fedora (Nobara) 37. Completely borked and will sometimes even crash my plasma session sending me back to the login.

System info: https://gist.github.com/CorneliusCornbread/b3e2c47b49e20fe09524574d68500d8d

bblacher commented 1 year ago

Same issue with my 7900 XTX on wayland.

YourSandwich commented 1 year ago

The issue is gone for me after Valve Replaced my Index Cable.

Check with lsusb and dmesg if your device is detected properly and there are no warnings like "USB might be broken"

Frityet commented 1 year ago

Same issue, GTX 1080 and a valve index

dbgasaway commented 1 year ago

To add onto debugging the original problem, I was able to use the Index just fine when running Windows on the same computer. So at least in my case it is likely a software issue. IIRC I also tested the 525 driver, and it failed as well.

minilandl commented 1 year ago

Same issue as others have reported with HTC Vive 1st gen Arch 6.1 Wayland wlroots RX 6700xt

RevoluPowered commented 1 year ago

Same issue on AMD RX6900 XT Manjaro with Wayland.

Wayland is the default now. I assume that valve doesn't support it yet fully.

Reproduction:

I wonder what patch we need to make if its just to SDL2 to resolve it. Maybe we can inject our own SDL 2 into SteamVR or forcefully replace it with a working version.

RevoluPowered commented 1 year ago

I checked the latest SDL release from today it didn't improve the situation or make it worse.

bblacher commented 1 year ago

So I've fixed this issue for my setup.

System Information:

My display setup:

This is just too much for my GPU to handle as of Linux 6.2.5. Using swaymsg output [output] power off I can disable the two 1920x1080p displays which results in SteamVR being able to start correctly.

I haven't tried this but it seems like the kernel branch mentioned in this comment has this issue fixed. If this is the case, Linux 6.3 would fix this issue for me without disabling the two 1920x1080p displays.

Frityet commented 1 year ago

I am still having the same issue with the 515 drivers

Would reverting drivers to <510 work?

IsaacFehr commented 1 year ago

After much debugging, I am still having this issue.

When I lauch SteamVR, the headset display is completely off and the vrcompositor shows up on my main display (single display setup over HDMI from Radeon 5700 XT). The VR compositor reacts correctly, showing the hub world and reacting to headset motion and controllers. But the display is blank and the Index speakers don't show up as an output device on my computer (though the Index HMD mic shows up as an input). The VR Monitor has a message saying that Direct Mode is off. I enable direct mode, SteamVR starts, but nothing has changed, and the prompt to enable direct mode is still there.

This issue has been driving me crazy. Adding all the things I tried here to help debug:

I even tried manually configuring the Index display with Xrandr, and this was the closest I got to making this work. I used the command xrandr --output DisplayPort-2 --mode 2880x1600 --rate 90.00 --set non-desktop 1 --left-of HDMI-A-0 then launched SteamVR. The headset display turned on and the VR Compositor showed up on the display! However the speakers still weren't working as an audio output device, and the framerate was very stuttery (not a performance issue), making it somewhat nauseating to use. I think this is because Direct Mode still isn't working.

System Information (please complete the following information):

Distribution: Fedora Workstation 38
SteamVR version: 1.25.7, also tried linux_v1.14
Steam client version: Mar 20, 2023 - 1679359315
Opted into Steam client beta?: Yes
Graphics driver version: Fedora Package xorg-x11-drv-amdgpu 23.0.0, 
Gist for SteamVR System Information: https://gist.github.com/IsaacFehr/be97e427d038615c875f5713aac40829

Other Info: Kernel: 6.3.0.0.rc3 Window Manager: Gnome 44.0 on Xorg GPU: AMD Radeon 5700 XT

Has anyone gotten this working on a similar setup to mine?

IsaacFehr commented 1 year ago

@kisak-valve, sorry to @ you, but I haven't been able to use SteamVR on Linux for months. Is there any update on this and related issues?

kisak-valve commented 1 year ago

Hello @IsaacFehr, friendly reminder that I'm a moderator for Valve's issue trackers on Github, and not a SteamVR developer myself.

I generally don't have access to any information past what is publicly available. There is a VR test box here with an HTC Vive, Ubuntu 22.04, and an AMD RX 480. That does generally work and is used at least once per mesa update.

ZarathustraDK commented 1 year ago

I just started getting this problem intermittently again out of the blue on Garuda Dragonized. The thing is, on this distro apparently, I can tell on boot if it is going to be a problem because the login-screen will be set to some ridiculously low resolution (after logging in it'll be fine again), and the HMD will be showing as a a second screen in display settings before even starting Steam.

The solution for me here, is to shut down and turn off power to everything, wait a couple of seconds until everything is completely off (motherboards have some residual power that lets them keep going for a while), then power back on. I got everything on a power-strip so that's relatively easy.

Just rebooting is not enough apparently. Spent a whole evening troubleshooting trying reinstalling steamvr, rebooting several times to try different kernels and snapshots and whatnot without any progress. I also tried unplugging the pc-connections and rebooting to no avail. Next day I tried cutting the power, and it worked first try. It has happened a couple of times since then, with the same solution working every time.

If I were to venture an uneducated guess, I'd say there's something on the HMD-side that somehow gets it stuck in extended mode, since headset-power isn't affected by a system reboot, perhaps with some kind of "being attached to a powered pc"-component that is throwing people off. @YourSandwich said replacing the cable fixed his problem, which would include powering off the HMD completely and breaking the connection to the pc/reseating the usb/DP-plugs, perhaps with a powered off pc?

Edit: Wanted to try simulating a brief power-outage by turning my powerstrip off and on quickly (with pc shut down ofc), trying to check if perhaps I could replicate the problem working off the hypothesis that perhaps a brief power-outage during downtime that resets the headset but doesn't stay off long enough to power down the motherboard could be the culprit. Long story short: I fried my powerstrip, and the only other one I have is one of those power-saving ones with a master-plug that turns off the other plug when not active, so can't test.

Edit: Got the error again today. Soft-rebooted a bunch of times, updated, soft-rebooted some more, no dice, tried shutting down without cutting power, still no dice. Cut the power to the powerstrip where pc and hmd was plugged in, waited 15 seconds, powered on, booted up, works again first try.

Update: I seem to have fixed the problem on my end. The solution for me was to open SteamVR, open Settings --> Devices --> Restart Headset. After that the headset rebooted and started up fine in Direct Display Mode. Apparently this way of restarting the headset is not the same as the one that presents itself when clicking "Enable Direct Display Mode".

alisonjenkins commented 1 year ago

Replying to https://github.com/ValveSoftware/SteamVR-for-Linux/issues/520#issuecomment-1547284784

Thanks this was the only thing that worked for me. Like you I am on Garuda and am seeing all the same symptoms.

purplebar0 commented 1 year ago

I encountered the issue where after a couple of reboots, my Index randomly started failing to use direct display mode. Thus, issues seem to randomly reappear and my Linux install gets very confused again, making Linux terminal and X desktop fall back to the lowest possible resolution.

Sure, it is possible to fix by navigating to SteamVR > Devices > Restart headset on the super low resolution desktop, but that is pretty inconvenient.

Would it be possible to restart the headset directly with a command and enter it in ex. .xinitrc so that the issue fixes itself automatically?


Edit: This might work: Edit 2: The below does not work.

/usr/share/X11/xorg.conf.d/60-index-hmd.conf

# Disables the monitor if Valve Index HMD does not use direct display mode
Section "Monitor"
        Identifier "Index HMD"
        Option "ignore" "true"
EndSection