overte icon indicating copy to clipboard operation
overte copied to clipboard

No output in HMD on Monado

Open TwilightKiddy opened this issue 9 months ago • 9 comments

Using this version: https://public.overte.org/build/overte/master20250405/Overte-2025.03.3-115-g4e6575a917-x86_64.AppImage with --useExperimentalXR.

After the launch, Overte picks up the OpenXR runtime, but outputs nothing to the HMD. Stdout gets endlessly flooded with hundreds of these lines:

[04/14 01:51:27] [WARNING] [openxr.display] hmdPresent: Shoudln't run frame cycle. Skipping renderin frame 5
[04/14 01:51:27] [WARNING] [openxr.display] beginFrameRender: Shoudln't run frame cycle. Skipping renderin frame 7

Initially was testing without the controllers connected, but connecting them did not change anything. Also tried launching with QT_QPA_PLATFORM=xcb, same result.

Useful info about my system

OS: Gentoo Linux x86_64 Kernel: Linux 6.12.11-gentoo-x86_64 DE: KDE Plasma 6.2.5 WM: KWin (Wayland) CPU: 12th Gen Intel(R) Core(TM) i9-12900H (20) @ 5.00 GHz GPU 1: NVIDIA GeForce RTX 3080 Ti Mobile [Discrete] GPU 2: Intel Iris Xe Graphics @ 1.45 GHz [Integrated] Locale: en_US.utf8

monado.log overte.log

TwilightKiddy avatar Apr 13 '25 22:04 TwilightKiddy

74 posted a new AppImage. I believe there is also a fix for a potential deadlock in there, so it is worth trying. https://public.overte.org/build/overte/master20250419/Overte-2025.03.3-141-g7b810125c0-x86_64.AppImage

JulianGro avatar Apr 19 '25 18:04 JulianGro

Looking at the log, the offending line part to be:

XR_ERROR_GRAPHICS_DEVICE_INVALID: xrCreateSession(createInfo->next) Argument chain does not contain any known graphics bindings
[04/14 02:02:08] [CRITICAL] [openxr.context] XR_ERROR_GRAPHICS_DEVICE_INVALID: Failed to create session
[04/14 02:02:08] [CRITICAL] [openxr.display] Post graphics init failed.

So it looks like maybe our OpenXR plugin passes a wrong graphics device there? Perhaps the mixture of Nvidia proprietary and Intel Mesa is causing a case we didn't expect?

JulianGro avatar Apr 20 '25 11:04 JulianGro

So it looks like maybe our OpenXR plugin passes a wrong graphics device there? Perhaps the mixture of Nvidia proprietary and Intel Mesa is causing a case we didn't expect?

This would make a lot sense, especially since it's happening on a laptop, so there's both integrated GPU and RTX 3080 I think

ksuprynowicz avatar Apr 20 '25 11:04 ksuprynowicz

Here's the part that is used for creating session:

    XrGraphicsBindingOpenGLXlibKHR binding = {
        .type = XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR,
        .xDisplay = XOpenDisplay(nullptr),
        .glxDrawable = glXGetCurrentDrawable(),
        .glxContext = glXGetCurrentContext(),
    };

@TwilightKiddy we should compare this part with applications that work for you.

ksuprynowicz avatar Apr 20 '25 14:04 ksuprynowicz

I mean, it is trying to get an X11 display on a Wayland session. We should probably also support XrGraphicsBindingOpenGLWaylandKHR.

@TwilightKiddy you could try running Overte with the xcb Qt platform plugin. The AppImage should do that by default though, which it apparently isn't in your case. Also, does desktop mode work on the same AppImage? If yes, could you post a log of that starting up as well?

JulianGro avatar Apr 20 '25 23:04 JulianGro

We should probably also support XrGraphicsBindingOpenGLWaylandKHR.

XrGraphicsBindingOpenGLWaylandKHR isn't actually implemented on any runtime (and probably never will be), we would need XrGraphicsBindingEGLMNDX.

I think Qt6 exposes the necessary EGL stuff we would need for Wayland OpenXR support through QNativeInterface, but I'm not sure if Qt5 does.

ada-tv avatar Apr 20 '25 23:04 ada-tv

For now it looks like a workaround is to start whole window manager on discrete GPU

ksuprynowicz avatar Apr 20 '25 23:04 ksuprynowicz

@TwilightKiddy we should compare this part with applications that work for you.

Tried xrgears, works without any issues. But it uses Vulkan, not OpenGL. If you have any other app for me to try, will be glad to help.

@TwilightKiddy you could try running Overte with the xcb Qt platform plugin. The AppImage should do that by default though, which it apparently isn't in your case.

Passing QT_QPA_PLATFORM=xcb to the AppImage changes nothing, as I discribed in the initial report. It behaves the same, lines you found are still in the log.

Also, does desktop mode work on the same AppImage? If yes, could you post a log of that starting up as well?

It does, and I can switch to desktop mode from VR when running with --useExperimentalXR with Ctrl+1. Here is a log when running without that flag:

overte.log

For now it looks like a workaround is to start whole window manager on discrete GPU

Tried running my whole session with prime-run, still the same behaviour.

TwilightKiddy avatar Apr 21 '25 20:04 TwilightKiddy

I was able to successfully play Overte in VR with my Pico 4 + Wivrn, I wasnt able to get my mic working in game however.

tested with this version: https://github.com/overte-org/overte/issues/1444#issuecomment-2816824568 and the experimental openxr enabled, i did have to prepend QT_QPA_PLATFORM=xcb too.

I am on Arch with an AMD gpu

Mhowser avatar Apr 21 '25 22:04 Mhowser