Monado can't find PSVR with NVIDIA drivers
I compiled this project following the instructions on an up-to-date Manjaro system.
$ meson --version
0.57.1
$ ninja --version
1.10.2
$ uname -a
Linux PCDMJ 5.11.6-1-MANJARO #1 SMP PREEMPT Thu Mar 11 19:05:51 UTC 2021 x86_64 GNU/Linux
When starting monado-service
I get the following error message while a PSVR is connected to my RTX 2080 Super:
ERROR [get_obj] Failed to find node 'active'!
ERROR [ht_device_create] Failed to create hand tracker module
DEBUG [xrt_gfx_provider_create_system] Doing init 0x55f58d136d70
WARN [compositor_check_and_prepare_xdev] Had to fill in meshuv on xdev 'PS VR Headset', this should be done in the driver.
DEBUG [vk_select_physical_device] Can not deal well with multiple devices.
DEBUG [vk_select_physical_device] Choosing Vulkan device index
DEBUG [vk_select_physical_device] Available GPUs
DEBUG [vk_print_device_info_debug] GPU index 0
name: GeForce RTX 2080 SUPER
vendor: 0x10de
product: 0x1e81
apiVersion: 1.2.155
driverVersion: 460.224.0
DEBUG [vk_print_device_info_debug] GPU index 1
name: GeForce GTX 960
vendor: 0x10de
product: 0x1401
apiVersion: 1.2.155
driverVersion: 460.224.0
DEBUG [vk_print_device_info_debug] GPU index 2
name: llvmpipe (LLVM 11.1.0, 256 bits)
vendor: 0x10005
product: 0x0000
apiVersion: 1.0.2
driverVersion: 0.0.1
DEBUG [vk_print_device_info_debug] Selected GPU: 1
name: GeForce GTX 960
vendor: 0x10de
product: 0x1401
apiVersion: 1.2.155
driverVersion: 460.224.0
ERROR [_test_for_nvidia] NVIDIA: No whitelisted displays found!
ERROR [_test_for_nvidia] == Current Whitelist ==
ERROR [_test_for_nvidia] Sony SIE HMD *08
ERROR [_test_for_nvidia] HTC Corporation HTC-VIVE
ERROR [_test_for_nvidia] HTC Corporation VIVE Pro
ERROR [_test_for_nvidia] Oculus VR Inc. Rift
ERROR [_test_for_nvidia] Valve Corporation Index HMD
ERROR [_test_for_nvidia] == Found Displays ==
ERROR [comp_window_direct_randr_init] No non-desktop output available.
ERROR [comp_target_swapchain_create_images] vkGetPhysicalDeviceSurfaceSupportKHR: surface not supported! 'VK_SUCCESS'
ERROR [comp_target_swapchain_create_images] vkGetPhysicalDeviceSurfaceSupportKHR: surface not supported! 'VK_SUCCESS'
The compositor opens soon after (see 1) and the PSVR switches to its VR mode and the front LEDs light up. Pressing Enter closes the service properly (the command returns 0 but also displays: ERROR [ipc_server_main] Server exiting: '0'!
).
I have set the AllowHMD
option by having the following config file:
$ ll /usr/share/X11/xorg.conf.d/99-HMD.conf
-rw-r--r-- 1 root root 117 Mar 21 15:17 /usr/share/X11/xorg.conf.d/99-HMD.conf
$ cat /usr/share/X11/xorg.conf.d/99-HMD.conf
Section "Device"
Identifier "Device0"
Driver "nvidia"
Option "AllowHMD" "yes"
EndSection
I have also tried to set AllowHMD
to HDMI-0
using both methods, restarted my computer and retried running the service and I had the same behaviour (see 2).
Troubleshooting I have tried already:
- As the logs say they selected the wrong GPU (my headset is connected to the GPU-0), I have changed vk_helpers.c to force the
gpu_index
to be 0, the new output ends as follow:
DEBUG [vk_print_device_info_debug] Selected GPU: 0
name: GeForce RTX 2080 SUPER
vendor: 0x10de
product: 0x1e81
apiVersion: 1.2.155
driverVersion: 460.224.0
ERROR [comp_window_direct_acquire_xlib_display] vkAcquireXlibDisplayEXT: UNKNOWN RESULT (0x0000562d5b771898)
ERROR [compositor_init_swapchain] Window init_swapchain failed!
No window opens anymore, the service returns 255. I have checked and the value of the VkResult
is indeed -13.
- The logs also mention about the
non-desktop
output so I have forced the option to be 1 using xrandr and when running the original code (when the wrong GPU is selected) and they ends in:
ERROR [_test_for_nvidia] == Found Displays ==
ERROR [comp_window_direct_randr_get_output] vkGetRandROutputDisplayEXT: UNKNOWN RESULT
ERROR [compositor_init_swapchain] Window init_swapchain failed!
I have already mentioned the behaviour non-desktop
has on my computer on this issue to the guys at SteamVR-OpenHMD but here is a recap:
- When my computer turns on,
non-desktop
is 0 and the PSVR is used as a regular 1080p monitor. - When I set
non-desktop
to be 1 with xrandr, the PSVR is no longer used as a monitor by gnome but I can still move windows to that screen and windows will show with trialling graphical artefacts. - When I set the PSVR to not be used in gnome, xrandr lists it as disconnected.
I am more than happy to provide more info to help you find out where I might have a problem.
1: I think it is the compositor, it is the window that should be displayed in the headset showing a grey world to the left and right eye. The border of each image has some chromatic aberration at the edge when displayed on my main monitor.
2: I have tried to get a confirmation that indeed the AllowHMD
option is indeed being taken into account but I could not find a way to confirm that.