protonscr

[BUG] HTC Vive Pro SteamVR crashes (freezes) Manjaro host on start with HMD display containing noise, AMD RX5700

steamvrclosed bug
ValveSoftware/SteamVR-for-Linux#441 · opened 2021-05-01 by t00 · updated 2021-05-02 · 3 comments · github
Tt00 2021-05-01 github

I finally decided to report this issue after trying to set up HTC Vive Pro for the past 2 days, after fighting with other issues like 2 installed Vulkan drivers (MESA and AMD) causing error 307, never being able to update base stations (not supported anyway)/controllers/HMD hardware - did that on son's Windows machine, not having right udev rules.

The issue is simple, both beta and non-beta SteamVR crashes between 1 and 20 seconds since start. Sometimes HMD display is left with a noise, sometimes monitor switches off but most of the time there is no HMD display and the monitor display freezes with 100% cpu on one core. Interestingly, SteamVR small window is not shown - I can only get it to show with HTC Vive Pro switched off when launching SteamVR.

I can see vrserver log containing NUL characters at the end - Linux crashes before logger is able to append some more relevant information - no core dump is available.

Obviously the headset works flawlessly on Windows.

ls /usr/share/vulkan/icd.d/
radeon_icd.i686.json  radeon_icd.x86_64.json

vulkaninfo | grep driverInfo
ERROR: [Loader Message] Code 0 : /usr/lib32/libvulkan_radeon.so: wrong ELF class: ELFCLASS32
	driverInfo         = Mesa 21.0.3 (ACO)
	driverInfo                                           = Mesa 21.0.3 (ACO)

xrandr --prop
Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 16384 x 16384
DisplayPort-0 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 700mm x 390mm
	EDID: 
		00ffffffffffff003669a23d01010101
		241d0104b5462778fff8c5a556509e26
		115054bfef80714f81c0810081408180
		9500b300d1c04dd000a0f0703e803020
		3500bc862100001a000000fd00283c87
		873c0200202020202020000000fc004d
		4147333231435552560a2020000000ff
		004441324130313933363030343101de
		020344f151010203040510111213141f
		2021225f616023091707830100006d03
		0c001000383c20006001020367d85dc4
		01788003e305e301e40f008001e60607
		015c5c00565e00a0a0a0295030203500
		bc862100001e662156aa51001e30468f
		3300bc862100001e0e1f008051001e30
		40803700bc862100001c00000000004a
	GAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	DEGAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	GAMMA_LUT: 0 
		range: (0, 65535)
	CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
		0 1 
	DEGAMMA_LUT: 0 
		range: (0, 65535)
	TearFree: auto 
		supported: off, on, auto
	subconnector: Native 
		supported: Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native
	HDCP Content Type: HDCP Type0 
		supported: HDCP Type0, HDCP Type1
	Content Protection: Undesired 
		supported: Undesired, Desired, Enabled
	vrr_capable: 0 
		range: (0, 1)
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 94 
		supported: 94
	non-desktop: 0 
		range: (0, 1)
   3840x2160     60.00*+  60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   2560x1440     59.95  
   1920x1200     60.00  
   1920x1080     60.00    60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   1600x1200     60.00  
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x960      60.00  
   1366x768      59.79  
   1280x800      59.81  
   1152x864      75.00  
   1280x768      59.87  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
	EDID: 
		00ffffffffffff0022d202aa00000000
		081b0104a50c077802c7ecaa553cb723
		0b4c5200000001010101010101010101
		010101010101a4b5402cb14018607828
		ac00774200000018a4b5402cb1401860
		7828ac00774200000018000000fc0056
		4956452050726f0a20202020000000fd
		0017ff0fff32010a20202020202001c5
		02030c40230916058301000000000000
		00000000000000000000000000000000
		00000000000000000000000000000000
		00000000000000000000000000000000
		00000000000000000000000000000000
		00000000000000000000000000000000
		00000000000000000000000000000000
		000000000000000000000000000000e4
	GAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	DEGAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	GAMMA_LUT: 0 
		range: (0, 65535)
	CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
		0 1 
	DEGAMMA_LUT: 0 
		range: (0, 65535)
	TearFree: auto 
		supported: off, on, auto
	subconnector: Native 
		supported: Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native
	HDCP Content Type: HDCP Type0 
		supported: HDCP Type0, HDCP Type1
	Content Protection: Undesired 
		supported: Undesired, Desired, Enabled
	vrr_capable: 0 
		range: (0, 1)
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 101 
		supported: 101
	non-desktop: 1 
		range: (0, 1)
   2880x1600     90.04 +
   1920x1200     90.04  
   1920x1080     90.04  
   1600x1200     90.04  
   1680x1050     90.04  
   1280x1024     90.04  
   1440x900      90.04  
   1280x800      90.04  
   1280x720      90.04  
   1024x768      90.04  
   800x600       90.04  
   640x480       90.04  
DisplayPort-2 disconnected (normal left inverted right x axis y axis)
	GAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	DEGAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	GAMMA_LUT: 0 
		range: (0, 65535)
	CTM: 0 
	DEGAMMA_LUT: 0 
		range: (0, 65535)
	TearFree: auto 
		supported: off, on, auto
	subconnector: Unknown 
		supported: Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native
	HDCP Content Type: HDCP Type0 
		supported: HDCP Type0, HDCP Type1
	Content Protection: Undesired 
		supported: Undesired, Desired, Enabled
	vrr_capable: 0 
		range: (0, 1)
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 106 
		supported: 106
	non-desktop: 0 
		range: (0, 1)
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
	GAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	DEGAMMA_LUT_SIZE: 4096 
		range: (0, -1)
	GAMMA_LUT: 0 
		range: (0, 65535)
	CTM: 0 
	DEGAMMA_LUT: 0 
		range: (0, 65535)
	TearFree: auto 
		supported: off, on, auto
	HDCP Content Type: HDCP Type0 
		supported: HDCP Type0, HDCP Type1
	Content Protection: Undesired 
		supported: Undesired, Desired, Enabled
	vrr_capable: 0 
		range: (0, 1)
	max bpc: 8 
		range: (8, 16)
	underscan vborder: 0 
		range: (0, 128)
	underscan hborder: 0 
		range: (0, 128)
	underscan: off 
		supported: off, on, auto
	scaling mode: None 
		supported: None, Full, Center, Full aspect
	link-status: Good 
		supported: Good, Bad
	CONNECTOR_ID: 110 
		supported: 110
	non-desktop: 0 
		range: (0, 1)

wget https://raw.githubusercontent.com/ValveSoftware/steam-devices/master/60-steam-vr.rules
wget https://raw.githubusercontent.com/ValveSoftware/steam-devices/master/60-steam-input.rules

Steps to reproduce the behavior

  1. Start Manjaro
  2. Turn on HTC Vive Pro
  3. Open Steam
  4. Open VR

Expected behavior
VR room opens.

System Information (please complete the following information):

Screenshots
noise

Tt00 2021-05-01 github

Some more details:

Overall games work great (working: Lutris/Epic Store/Rocket League, Steam:CS:GO/Quake Champions among others).
Vulkan and OpenGL is configured correctly, tested display using Refresh2025_Linux.
Machine did not crash until SteamVR issue, at least on kernels 5.10, 5.11.
There is second Nvdia 960 GPU installed but not used by host - using vfio module for pass-through.
mkinitcpio.conf contains: MODULES="crc32c vfio_pci vfio vfio_iommu_type1 vfio_virqfd amdgpu"
xorg.conf.d contains only 00-keyboard

uname -a
Linux too-pc 5.11.16-2-MANJARO #1 SMP PREEMPT Thu Apr 22 09:53:11 UTC 2021 x86_64 GNU/Linux

cat /etc/modprobe.d/*
blacklist nvidia
options usb-storage quirks=0bc2:ab38:u
options kvm ignore_msrs=Y
options kvm report_ignored_msrs=N
options vfio-pci ids=10de:1401,10de:0fba,10de:10d8,10de:0be3

I suspect the issue is related to some amdgpu driver issue but I don't set any explicit settings for it.

Tt00 2021-05-02 github

Update: I tried different Window Managers - Cinnamon, Cinnamon (Software), Gnome, XFCE (my default) - crash happens randomly for all, sometimes it might take a 1-2 minutes to crash.
Most of the time HMD shows a pink pattern, sometimes monitor switches off. I have seen checkerboard pattern with noise as well.

Tt00 2021-05-02 github

Eureka update: kernels 5.11 and 5.10 cause the same problem yet using fallback kernel 5.11 or 5.10 fixed the crash.

In my case problem was that amdgpu was last in MODULES section of mkinitcpio.conf - for some reason amdgpu driver did not like it when using VR. After the change, vfio for GPU pass-through of Nvidia GPU is still working fine.

The fix:

edit mkinitcpio.conf:
MODULES="amdgpu crc32c vfio_pci vfio vfio_iommu_type1 vfio_virqfd"

mkinitcpio -P linux511

Nothing extracted yet.