Closed joni999 closed 1 year ago
Hi, yes this is an issue with AMD GPUs on linux, unfortunately I don't own one but I think I have an idea what the issue is, so I will look into this soon and try to find someone to test for me.
On a side note, I saw the post on the WMR subreddit of my video, I think maybe people are getting confused. If you don't need to do PC VR streaming then ALXR/ALVR is not neccessary to just use a WMR headset on linux, you only need Monado either as an OpenXR runtime for OpenXR based games or built as an OpenVR driver for SteamVR.
There is also the option of the OpenXR branch of OpenComposite so you can use Monado as an OpenXR runtime and have OpenComposite shim OpenVR calls to it but it's still a WIP so some games may not work or have issues.
Thanks for pointing me in the right direction - I'm not only confused, but also have little clue of what I'm doing actually :-) , so this information helps a lot! I almost got Monado to work "standalone" with SteamVR - Monado does list the HP Reverb G2 as a device, but I'm still figuring out how to get display-output on the VR-Headset though.
But that has nothing to do with this project or this ticket, so at least on my end there's no need to keep this ticket open, but you can keep it open if you want to analyze the issue I had.
Thank you.
Thanks for pointing me in the right direction - I'm not only confused, but also have little clue of what I'm doing actually :-) , so this information helps a lot! I almost got Monado to work "standalone" with SteamVR - Monado does list the HP Reverb G2 as a device, but I'm still figuring out how to get display-output on the VR-Headset though.
But that has nothing to do with this project or this ticket, so at least on my end there's no need to keep this ticket open, but you can keep it open if you want to analyze the issue I had.
Thank you.
You might need to enable direct-mode, if you need Monado specific help they have an active discord server
As for the original issue (the ERROR_DEVICE_LOST crash), it is still an issue to ALXR so I'll keep it open until I fix it.
same CS reject on my system, nothing in dmesg
Tried to build v0.7, issue is still present
amdgpu_cs_submit_raw2 fails, but does not report any error There are two concurrent calls:
Thread 1 "alxr-client" hit Breakpoint 3, 0x00007fffe341c080 in amdgpu_cs_submit_raw2 () from /usr/lib64/libdrm_amdgpu.so.1
(gdb) bt
#0 0x00007fffe341c080 in amdgpu_cs_submit_raw2 () from /usr/lib64/libdrm_amdgpu.so.1
#1 0x00007fffe92b5ac2 in radv_amdgpu_cs_submit (ctx=ctx@entry=0x555556243140, request=request@entry=0x7fffffffba70, sem_info=sem_info@entry=0x7fffffffbc00)
at ../src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c:1861
#2 0x00007fffe92b7a1f in radv_amdgpu_winsys_cs_submit_chained (ctx=ctx@entry=0x555556243140, queue_idx=queue_idx@entry=0, sem_info=sem_info@entry=0x7fffffffbc00,
cs_array=0x55555625d070, cs_count=<optimized out>, initial_preamble_cs=0x5555566b7f10) at ../src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c:961
#3 0x00007fffe92b808d in radv_amdgpu_winsys_cs_submit_internal (can_patch=true, sem_info=0x7fffffffbc00, submit=0x7fffffffbd00, ctx=0x555556243140)
at ../src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c:1349
#4 radv_amdgpu_winsys_cs_submit (_ctx=0x555556243140, submit_count=1, submits=0x7fffffffbd00, wait_count=<optimized out>, waits=<optimized out>, signal_count=<optimized out>,
signals=0x0, can_patch=true) at ../src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c:1433
#5 0x00007fffe91b591e in radv_queue_submit_normal (submission=<optimized out>, queue=<optimized out>) at ../src/amd/vulkan/radv_device.c:5326
#6 radv_queue_submit (vqueue=<optimized out>, submission=<optimized out>) at ../src/amd/vulkan/radv_device.c:5369
#7 0x00007fffe92f1272 in vk_queue_submit_final (queue=queue@entry=0x555556245400, submit=submit@entry=0x5555563d4e10) at ../src/vulkan/runtime/vk_queue.c:377
#8 0x00007fffe92f2571 in vk_queue_submit (queue=queue@entry=0x555556245400, info=info@entry=0x7fffffffbf70) at ../src/vulkan/runtime/vk_queue.c:839
#9 0x00007fffe92f3606 in vk_common_QueueSubmit2KHR (_queue=0x555556245400, submitCount=1, pSubmits=<optimized out>, _fence=0x0) at ../src/vulkan/runtime/vk_queue.c:1156
#10 0x00007fffe92fe262 in vk_common_QueueSubmit (_queue=0x555556245400, submitCount=1, pSubmits=<optimized out>, fence=0x0) at ../src/vulkan/runtime/vk_synchronization2.c:416
#11 0x00007fffe9c82fda in vk_locked_submit () from /home/mittorn/monado/build/src/xrt/targets/openxr/libopenxr_monado.so
#12 0x00007fffe9c76e96 in client_vk_swapchain_acquire_image () from /home/mittorn/monado/build/src/xrt/targets/openxr/libopenxr_monado.so
#13 0x00007fffe9c6d6d9 in xrt_swapchain_acquire_image () from /home/mittorn/monado/build/src/xrt/targets/openxr/libopenxr_monado.so
#14 0x00007fffe9c6d96f in oxr_swapchain_acquire_image () from /home/mittorn/monado/build/src/xrt/targets/openxr/libopenxr_monado.so
#15 0x00007fffe9c49ca4 in oxr_xrAcquireSwapchainImage () from /home/mittorn/monado/build/src/xrt/targets/openxr/libopenxr_monado.so
#16 0x00007ffff7a9e0fd in xrAcquireSwapchainImage (swapchain=0x7fffd40158f0, acquireInfo=0x7fffffffcc30, index=0x7fffffffcc4c) at src/loader/xr_generated_loader.cpp:351
#17 0x00007ffff7f11de7 in (anonymous namespace)::OpenXrProgram::RenderLayer (this=0x555555f570a0, predictedDisplayTime=113827104520, views=..., projectionLayerViews=..., layer=...)
at /mnt/data2/ALXR07/alvr/openxr-client/alxr-engine-sys/cpp/ALVR-OpenXR-Engine/src/alxr_engine/openxr_program.cpp:2484
--Type <RET> for more, q to quit, c to continue without paging--
#18 0x00007ffff7f115d7 in (anonymous namespace)::OpenXrProgram::RenderFrame (this=0x555555f570a0)
at /mnt/data2/ALXR07/alvr/openxr-client/alxr-engine-sys/cpp/ALVR-OpenXR-Engine/src/alxr_engine/openxr_program.cpp:2319
#19 0x00007ffff7ec376e in alxr_process_frame (exitRenderLoop=0x7fffffffd2ef, requestRestart=0x7fffffffd2ee)
at /mnt/data2/ALXR07/alvr/openxr-client/alxr-engine-sys/cpp/ALVR-OpenXR-Engine/src/alxr_engine/alxr_engine.cpp:188
#20 0x0000555555605800 in alxr_client::main () at alvr/openxr-client/alxr-client/src/main.rs:45
and
#0 0x00007fffe341c080 in amdgpu_cs_submit_raw2 () from /usr/lib64/libdrm_amdgpu.so.1
#1 0x00007fffe92b5ac2 in radv_amdgpu_cs_submit (ctx=ctx@entry=0x555556243140, request=request@entry=0x7fffe0b0a2d0, sem_info=sem_info@entry=0x7fffe0b0a460)
at ../src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c:1861
#2 0x00007fffe92b7a1f in radv_amdgpu_winsys_cs_submit_chained (ctx=ctx@entry=0x555556243140, queue_idx=queue_idx@entry=1, sem_info=sem_info@entry=0x7fffe0b0a460,
cs_array=0x7fffa41cff50, cs_count=<optimized out>, initial_preamble_cs=0x7fffa44828c0) at ../src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c:961
#3 0x00007fffe92b808d in radv_amdgpu_winsys_cs_submit_internal (can_patch=true, sem_info=0x7fffe0b0a460, submit=0x7fffe0b0a560, ctx=0x555556243140)
at ../src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c:1349
#4 radv_amdgpu_winsys_cs_submit (_ctx=0x555556243140, submit_count=1, submits=0x7fffe0b0a560, wait_count=<optimized out>, waits=<optimized out>, signal_count=<optimized out>,
signals=0x7fffa41773c8, can_patch=true) at ../src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c:1433
#5 0x00007fffe91b591e in radv_queue_submit_normal (submission=<optimized out>, queue=<optimized out>) at ../src/amd/vulkan/radv_device.c:5326
#6 radv_queue_submit (vqueue=<optimized out>, submission=<optimized out>) at ../src/amd/vulkan/radv_device.c:5369
#7 0x00007fffe92f1272 in vk_queue_submit_final (queue=queue@entry=0x555556245648, submit=submit@entry=0x7fffa4177340) at ../src/vulkan/runtime/vk_queue.c:377
#8 0x00007fffe92f2571 in vk_queue_submit (queue=queue@entry=0x555556245648, info=info@entry=0x7fffe0b0a7d0) at ../src/vulkan/runtime/vk_queue.c:839
#9 0x00007fffe92f3606 in vk_common_QueueSubmit2KHR (_queue=0x555556245648, submitCount=1, pSubmits=<optimized out>, _fence=0x555556aceed0) at ../src/vulkan/runtime/vk_queue.c:1156
#10 0x00007fffe92fe262 in vk_common_QueueSubmit (_queue=0x555556245648, submitCount=1, pSubmits=<optimized out>, fence=0x555556aceed0) at ../src/vulkan/runtime/vk_synchronization2.c:416
#11 0x00007ffff7ee2100 in (anonymous namespace)::CmdBuffer::Exec (this=0x555555f5e790, queue=0x555556245648)
at /mnt/data2/ALXR07/alvr/openxr-client/alxr-engine-sys/cpp/ALVR-OpenXR-Engine/src/alxr_engine/graphicsplugin_vulkan.cpp:532
#12 0x00007ffff7ee9f92 in (anonymous namespace)::VulkanGraphicsPlugin::UpdateVideoTexture (this=0x555555f5e350, yuvBuffer=...)
at /mnt/data2/ALXR07/alvr/openxr-client/alxr-engine-sys/cpp/ALVR-OpenXR-Engine/src/alxr_engine/graphicsplugin_vulkan.cpp:3536
#13 0x00007ffff7ed1f18 in std::__invoke_impl<void, void (IGraphicsPlugin::* const&)(IGraphicsPlugin::YUVBuffer const&), std::shared_ptr<IGraphicsPlugin> const&, IGraphicsPlugin::YUVBuffer&> (__f=@0x7fffe0b0b578: &virtual table offset 176, __t=std::shared_ptr<IGraphicsPlugin> (use count 2, weak count 0) = {...})
at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/invoke.h:74
#14 0x00007ffff7ed164b in std::__invoke<void (IGraphicsPlugin::* const&)(IGraphicsPlugin::YUVBuffer const&), std::shared_ptr<IGraphicsPlugin> const&, IGraphicsPlugin::YUVBuffer&> (
--Type <RET> for more, q to quit, c to continue without paging--
__fn=@0x7fffe0b0b578: &virtual table offset 176) at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/invoke.h:96
#15 0x00007ffff7ed0c28 in std::invoke<void (IGraphicsPlugin::* const&)(IGraphicsPlugin::YUVBuffer const&), std::shared_ptr<IGraphicsPlugin> const&, IGraphicsPlugin::YUVBuffer&> (
__fn=@0x7fffe0b0b578: &virtual table offset 176) at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/functional:97
#16 0x00007ffff7ecfaed in (anonymous namespace)::FFMPEGDecoderPlugin::Run (this=0x7fffd400bd90, ctx=..., isRunningToken=...)
at /mnt/data2/ALXR07/alvr/openxr-client/alxr-engine-sys/cpp/ALVR-OpenXR-Engine/src/alxr_engine/decoderplugin_ffmpeg.cpp:498
#17 0x00007ffff7ec96c0 in operator() (__closure=0x7fffd4022a08) at /mnt/data2/ALXR07/alvr/openxr-client/alxr-engine-sys/cpp/ALVR-OpenXR-Engine/src/alxr_engine/decoder_thread.cpp:86
#18 0x00007ffff7ecd338 in std::__invoke_impl<void, XrDecoderThread::Start(const XrDecoderThread::StartCtx&)::<lambda()> >(std::__invoke_other, struct {...} &&) (__f=...)
at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/invoke.h:61
#19 0x00007ffff7ecd2ed in std::__invoke<XrDecoderThread::Start(const XrDecoderThread::StartCtx&)::<lambda()> >(struct {...} &&) (__fn=...)
at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/invoke.h:96
#20 0x00007ffff7ecd29a in std::thread::_Invoker<std::tuple<XrDecoderThread::Start(const XrDecoderThread::StartCtx&)::<lambda()> > >::_M_invoke<0>(std::_Index_tuple<0>) (
this=0x7fffd4022a08) at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/std_thread.h:253
#21 0x00007ffff7ecd246 in std::thread::_Invoker<std::tuple<XrDecoderThread::Start(const XrDecoderThread::StartCtx&)::<lambda()> > >::operator()(void) (this=0x7fffd4022a08)
at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/std_thread.h:260
#22 0x00007ffff7ecd1f0 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<XrDecoderThread::Start(const XrDecoderThread::StartCtx&)::<lambda()> > > >::_M_run(void) (
this=0x7fffd4022a00) at /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/std_thread.h:211
#23 0x00007ffff5cc3c14 in std::execute_native_thread_routine (__p=0x7fffd4022a00) at /var/tmp/portage/sys-devel/gcc-11.1.0-r1/work/gcc-11.1.0/libstdc++-v3/src/c++11/thread.cc:82
#24 0x00007ffff7b5d92a in start_thread (arg=<optimized out>) at pthread_create.c:442
#25 0x00007ffff7be025c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb)
VUID-VkDeviceQueueCreateInfo-queueCount-00382(ERROR / SPEC): msgNum: 1787754462 - Validation Error: [ VUID-VkDeviceQueueCreateInfo-queueCount-00382 ] Object 0: handle = 0x55555663bc00, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x6a8ef7de | vkCreateDevice: pCreateInfo->pQueueCreateInfos[0].queueCount (=2) is not less than or equal to available queue count for this pCreateInfo->pQueueCreateInfos[0].queueFamilyIndex} (=0) obtained previously from vkGetPhysicalDeviceQueueFamilyProperties (i.e. is not less than or equal to 1). The Vulkan spec states: queueCount must be less than or equal to the queueCount member of the VkQueueFamilyProperties structure, as returned by vkGetPhysicalDeviceQueueFamilyProperties in the pQueueFamilyProperties[queueFamilyIndex] (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkDeviceQueueCreateInfo-queueCount-00382) Objects: 1 [0] 0x55555663bc00, type: 2, name: NULL It seems that RADV does not support 2 queues in this configuration, so it getting EINVAL later
VkQueueFamilyProperties:
========================
queueProperties[0]:
-------------------
minImageTransferGranularity = (1,1,1)
queueCount = 1
queueFlags = QUEUE_GRAPHICS | QUEUE_COMPUTE | QUEUE_TRANSFER | QUEUE_SPARSE_BINDING
timestampValidBits = 64
present support = true
VkQueueFamilyGlobalPriorityPropertiesKHR:
-----------------------------------------
priorityCount = 4
priorities: count = 4
QUEUE_GLOBAL_PRIORITY_LOW_KHR
QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR
QUEUE_GLOBAL_PRIORITY_HIGH_KHR
QUEUE_GLOBAL_PRIORITY_REALTIME_KHR
queueProperties[1]:
-------------------
minImageTransferGranularity = (1,1,1)
queueCount = 4
queueFlags = QUEUE_COMPUTE | QUEUE_TRANSFER | QUEUE_SPARSE_BINDING
timestampValidBits = 64
present support = true
VkQueueFamilyGlobalPriorityPropertiesKHR:
-----------------------------------------
priorityCount = 4
priorities: count = 4
QUEUE_GLOBAL_PRIORITY_LOW_KHR
QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR
QUEUE_GLOBAL_PRIORITY_HIGH_KHR
QUEUE_GLOBAL_PRIORITY_REALTIME_KHR
It seems, should be possible to use second queuefamily for texture translation
https://gitlab.freedesktop.org/mesa/mesa/-/issues/850 maybe this is related
finally fixed it: created videoCpy queue on second queue family and it works
finally fixed it: created videoCpy queue on second queue family and it works
Hi, sorry I took so long to respond, yes that was the problem. I figured this would be the issue, I just been focused on other stuff so thank you for spending the time to debug and fix it.
Description
I'm trying to get a HP Reverb G2 VR Headset working with Monado + ALVR Server + ALXR Client on SteamVR.
All components are running locally on this machine and the HP Reverb G2 VR Headset is connected as well.
I'm launching the components as follows:
Monado:
#> monado-service
ALVR Server:
#> [...]/alvr_server_linux_portable/bin/alvr_launcher
ALXR Client:
#> [...]/alxr-client-linux/alxr-client --localhost
When trying to launch the ALXR Client the following Messages appear in the terminal and the program crashes after a few seconds:
here is the dmesg (created by "journalctl -b >dmesg.txt"): https://paste.centos.org/view/5ba5a3b6
General Troubleshooting
Environement
Hardware
Note: for Linux, an upload to the
hw-probe
database is preferred:hw-probe -all -upload
https://linux-hardware.org/?probe=175c84f6ea
Installation
ALVR Version: v18.2.3
SteamVR Version: beta 1.24.3
Install Type:
exe
,deb
,rpm
, etc)zip
)=> I used the alxr-client-linux.tar.gz File
OS Name and Version (
winver
on Windows orgrep PRETTY_NAME /etc/os-release
on most Linux distributions):