SteamVR-for-Linux icon indicating copy to clipboard operation
SteamVR-for-Linux copied to clipboard

[BUG] SteamVR reports headset display is not connected, consistent crashes after headset reset

Open WaviestBalloon opened this issue 9 months ago • 7 comments

Describe the bug SteamVR claims that my Valve Index's display is not connected, after using the headset reset option that appears on the prompt, SteamVR now crashes violently causing my displays to freeze up and, what appears to be, a graphical reset to occur.

Reproduction is odd as I have now reached a state where I am unable to reset SteamVR to it's default state, I can only rarely reproduce the headset not connected message if I uninstall or swap branches a few times.

To Reproduce Steps to reproduce the behavior:

  1. Open SteamVR
  2. If error 496 occurs, reset the headset or instant crash on start-up
  3. SteamVR crashes

Expected behavior Being able to launch SteamVR correctly.

System Information (please complete the following information):

  • Steam client version (build number or date):
  • SteamVR version: 2.9.6 (Have attempted to try multiple branches: previous, beta)
  • Distribution (e.g. Ubuntu): Arch Linux
  • Steam runtime diagnostics:

Steamruntimediagnostics.txt

  • Steam and SteamVR logs:

steam-logs.tar.gz

  • Minidumps:

steam-minidumps.tar.gz

Screenshots

Image

Image

Image

Additional context During my time attempting different solutions or potential fixes, I have stumbled upon some weird behavior:

dc_stream_state_dmesg.txt

no_edid_read_dmesg.txt - No longer occurs, was caused by me swapping the displayport cable between slots on my GPU.

After a little more tinkering, I was able to get a lease to appear in xrandr, which wasn't previously there as the Index would occasionally show up as a "Unknown" monitor according to KDE:

xrandr_dmesg.txt

This may be unrelated, but after SteamVR crashes on my system, playing any videos either on Youtube in Firefox or a local file in VLC will cause display output to freeze up, rarely updating every ~20 seconds or so.

Edit: I've noticed that when the headset is connected via displayport, SDDM goes into a squared resolution and the headset's display is detected in xrandr - I have now made it full circle to error 496!

WaviestBalloon avatar Apr 02 '25 00:04 WaviestBalloon

~~Temporary workaround~~ (No longer required!)

After some hours of tinkering, I have discovered a workaround which I'm still working on breaking down, here's what I did that solved this issue:

  1. Switch from a Wayland session to a X11 session
  2. Open up a terminal, check the result of xrandr to verify it has detected something connected to DisplayPort:
DisplayPort-1 connected (normal left inverted right x axis y axis)
   640x480       59.94  
  1. Unplug the Index's power jack and plug it back in
  2. Run xrandr again, the port where the Index is plugged into should have different, more in-depth with lots of available resolutions and refresh rates which were not there before:
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
   2880x1600     90.00 + 144.00   120.02    80.00  
   1920x1200     90.00  
   1920x1080     90.00  
   1600x1200     90.00  
   1680x1050     90.00  
   1280x1024     90.00  
   1440x900      90.00  
   1280x800      90.00  
   1280x720      90.00  
   1024x768      90.00  
   800x600       90.00  
   640x480       90.00  

It should say "disconnected" even if the cable is plugged in.

  1. Launch SteamVR
  2. Voila! It should be detected, check the display on the Index

[!NOTE]
If Room Setup does not detect that your headset is ready but SteamVR says it's active, restart SteamVR again or repeat the steps.

[!NOTE]
If your base stations are in sleep mode and they do not initalise, power cycling them should make them come online, sometimes SteamVR fails to wake them up in my case.

I've noticed the SteamVR overlay seem very unstable, it is barely functional at all, unsure if that's related to AMD (as this is a new system, previously used NVIDIA and the overlay was somewhat functional) or a different issue.

I'll update these steps until I pin point the exact method as I was trying a lot of different things including switching to a different kernel. (Which I don't think did anything, that's something I'd need to test) I did also enable Direct Mode in SteamVR's Developer settings.

WaviestBalloon avatar Apr 03 '25 12:04 WaviestBalloon

@WaviestBalloon someone from AMD found the issue and fixed it regarding the

[  222.911955] [drm:dm_vblank_get_counter [amdgpu]] *ERROR* dc_stream_state is NULL for crtc '2'!

dmesg output.

patch is here: https://gitlab.freedesktop.org/drm/amd/-/issues/1856#note_2836580 Direct link: https://gitlab.freedesktop.org/-/project/4522/uploads/3eafd2bce64ce81006bbdcd8d8d78a5a/0001-drm-amd-display-fix-incorrect-return-of-vblank-enabl.patch

The bug only happens the first time you start SteamVR after your GPU was initialized.. If you start it a second time it works... The patch fixes the problem, but they are hesitant to merge it, as it introduces a regression with another (older) embeeded GPU.

Spacefish avatar Apr 04 '25 01:04 Spacefish

The bug only happens the first time you start SteamVR after your GPU was initialized.. If you start it a second time it works... The patch fixes the problem, but they are hesitant to merge it, as it introduces a regression with another (older) embeeded GPU.

I believe that the kernel message is just one part of the puzzle, if you are saying that first time starting SteamVR causes the bug but afterwards it should be resolved then it doesn't match the issue I'm facing, it is a constant reset under Wayland.

My workaround currently works the best at the moment and all my VR games work as intended under X11, my only issue is that Half-Life: Alyx crashes during scene transitions which has been a bug with AMD drivers since launch (under native build and Proton) from a bit of research but I've heard that cranking down the render resolution may help.

Thank you for your reply though, I appreciate it!

WaviestBalloon avatar Apr 30 '25 09:04 WaviestBalloon

I'm also suffering from this exact issue. Some of the forum posts I came across suggested that this might be a SteamVR udev issue, but I added the relevant rules and there didn't seem to be any real change. I've attached my System Report from SteamVR if any devs happen to be looking at this particular thread.

SteamVR-2025-05-21-PM_03_21_49.txt

I'm currently using linux-zen version 6.14.7 with the patch specified in this comment (though I was on 6.14.6 unpatched with all of the same issues):

patch is here: https://gitlab.freedesktop.org/drm/amd/-/issues/1856#note_2836580

The patch doesn't seem to have changed anything on the Wayland side whatsoever, but I'll take a look at Xorg to see if it helps there or not.

I'm also not entirely sure what problems you ran into in terms of EDID, but I also seem to be having some strangeness when running cat /sys/class/drm/card1-DP-2/edid | parse-edid as I get the following result:

Checksum Correct

Section "Monitor"
        Identifier "Index HMD"
        ModelName "Index HMD"
        VendorName "VLV"
        # Monitor Model Year: 2018
        # EDID version 1.3
        # Digital Display
        # Display Physical Size not given. Normal for projectors.
        Gamma 2.20
        Option "DPMS" "false"

        #Extension block found. Parsing...
I only know about extension blocks of type 02h. PLEASE email me!
Something strange happened. Please contact the author,
Matthew Kern at <[email protected]>

In addition to this, I'm suffering from an issue where any application other than SteamVR's void menu (not sure what you'd call it, but where you see the circles and lines and your base stations and things) causes extreme artifacting. It looks almost as if a grid of 100x100 or so pixels had their rows/columns randomized, making seeing anything while in VR impossible. This persists even when using Monado. This makes me think that this is some sort of software issue related to OpenXR or my drivers, because I've also never experienced this issue before, and the fact that it doesn't happen when inside Steam's stripped-down VR environment would have me believe that it cannot be a problem of hardware.

The last issue mentioned is likely due to something not having to do with SteamVR itself, but I thought that I'd include it for good measure, or if anyone has seen this issue before or might know where to point me on it. I'll also be consulting the Arch forums about this to see if there's any insight I can gather and report back if I figure something out.

LandonDeam avatar May 21 '25 19:05 LandonDeam

It seems like that the issue has been magically resolved, either due to a new Mesa update or a SteamVR update or both! I can now start SteamVR under Wayland without issues and getting into a game (Tested with BONEWORKS and Beat Saber so far), other than having to power-cycle my headset on some occasions, Direct Mode is required to be enabled.

Also, dmesg output is now much cleaner as well no issues relating to amdgpu other than the HL:A crash, when playing other games, only segfaults relating to vrwebhelper are shown so that's a plus! :3 (HL:A is still unplayable sadly)

Unless anyone else is reporting that the issue is still occurring then I'll be closing this soon. (@PorkDevMode)

WaviestBalloon avatar May 23 '25 15:05 WaviestBalloon

I'm still getting this issue on Wayland. If there's any interest, I can try and send whatever info is asked for. I'm just also working on another problem at the same time. I'll let it be known if I find out anything more about this particular issue.

LandonDeam avatar May 27 '25 00:05 LandonDeam

Seems that this was either a kernel bug or AMDVLK was finding it's way into SteamVR/Monado someway somehow, because uninstalling it seems to have resolved this issue for me entirely.

LandonDeam avatar Jun 02 '25 18:06 LandonDeam

Closing per the last several comments.

kisak-valve avatar Jul 05 '25 02:07 kisak-valve