Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No luck (so far) getting these to run [Nvidia] #1

Open
s4y opened this issue Aug 12, 2022 · 8 comments
Open

No luck (so far) getting these to run [Nvidia] #1

s4y opened this issue Aug 12, 2022 · 8 comments

Comments

@s4y
Copy link

s4y commented Aug 12, 2022

I'm trying these patches on an Arch Linux system and not having any luck.

Both the dmabuf patch and the glx patch let me start an XR session, and both just result in a black screen on the headset. If I'm using the dmabuf version of the patch, I see this printed periodically:

Crash Annotation GraphicsCriticalError: |[C0][GFX1]: ToSurfaceDescriptor failed in VRLayerChild::SubmitFrame (t=22.4654) [GFX1]: ToSurfaceDescriptor failed in VRLayerChild::SubmitFrame

There are no printed errors with the glx patch. I tried the plain patch (glReadPixels), too, and it causes Firefox to crash on starting any WebGL context:

Exiting due to channel error. Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Receive IPC close with reason=AbnormalShutdown (t=6.86694) Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Receive IPC close with reason=AbnormalShutdown (t=7.47218) Exiting due to channel error.

Here's my system:

  • Arch Linux
  • NVIDIA GeForce RTX 2060 Mobile
  • Original Vive, SteamVR 1.22.13
  • driver: nvidia 515.65.01-1
  • X11 (LightDM + Openbox)
  • SteamVR already running
  • Tried with Firefox tip of tree and also r681378, since that was around the time you were working on this.

Any ideas or troubleshooting thoughts would be much appreciated!

@mrxz
Copy link
Owner

mrxz commented Aug 13, 2022

That's unfortunate. I just tried both the dmabuf and glReadPixel patches on the Firefox tip (r700545) and both did still work for me (although the dmabuf one did crash after some minutes 😓). Running the same SteamVR version as you 1.22.13.

I have the feeling the issue is likely due to using NVIDIA. Sadly I don't have an NVIDIA card to test with. But to rule out some other factors, things I make sure of:

  • No optimizations/release build of firefox, just ./mach bootstrap, ./mach build and ./mach run
  • Restarting SteamVR between attempts (SteamVR under Linux is sadly not the most reliable)
  • When using the glx patch EGL is not used, and when using dmabuf EGL is used and dmabuf as well (you can check about:support to verify)

These patches are still hacks at the end of the day. Conceptually the glReadPixels approach is the easiest and arguably the least hackish. I'm surprised that this one causes any WebGL context to crash for you. Perhaps debugging that crash might shed more light on the cause.

What you could try is playing around with the code in gfx/gl/SharedSurfaceGL.cpp when using the glReadPixels patch. If you leave out both the fBindFramebuffer and fReadPixel calls, it should result in a black screen in the HMD. If that does work, either the previously bound framebuffer needs to be restored, or the fReadPixel call is invalid (e.g. the framebuffer is multisampled).

I hope this gives you some ideas and things to try. Keep me posted if you make any progress or find something.

@Utopiah
Copy link

Utopiah commented Aug 14, 2022

Getting similar results on Ubuntu 22.04, also 515.65.01 with 1.22.13. ./mach patch/build/run work without problem, SteamVR does get "firefox" when pressing "enter VR" yet the screen is black.

fabien@fabien-CORSAIR-ONE-i160:~/Prototypes/firefox/mozilla-unified$ ./mach run
 0:00.34 /home/fabien/Prototypes/firefox/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/bin/firefox -no-remote -profile /home/fabien/Prototypes/firefox/mozilla-unified/obj-x86_64-pc-linux-gnu/tmp/profile-default
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: VA-API test failed: failed to initialise VAAPI connection. (t=0.0815473) [GFX1-]: glxtest: VA-API test failed: failed to initialise VAAPI connection.
[2022-08-14T20:48:49Z ERROR glean_core::metrics::ping] Invalid reason code startup for ping newtab
/home/fabien/.steam/debian-installation/steamapps/common/SteamVR/bin/vrwebhelper/linux64/vrwebhelper.sh: line 17: STEAMVR_VRENV: unbound variable
ATTENTION: default value of option mesa_glthread overridden by environment.

@Olm-e
Copy link

Olm-e commented Aug 17, 2022

just to confirm I could make it work with an AMD rx 5600 xt ... so probably nvidia driver related bug ;)

@rcelyte
Copy link
Contributor

rcelyte commented Aug 17, 2022

Works on my RX 580, but crashes after some minutes as @mrxz mentioned.

@Utopiah
Copy link

Utopiah commented Aug 19, 2022

I don't have an NVIDIA card to test with.

If that helps @mrxz I can setup a cloud instance with an NVIDIA GPU then share access. It wouldn't have VR working (CloudXR on Linux is not out yet) but it might help spot what the problem is, eventually surface it back to NVIDIA or wherever the problem belongs.

@mrxz mrxz changed the title No luck (so far) getting these to run No luck (so far) getting these to run [Nvidia] Aug 21, 2022
@mrxz
Copy link
Owner

mrxz commented Aug 21, 2022

If that helps @mrxz I can setup a cloud instance with an NVIDIA GPU then share access.

Thanks for the offer @Utopiah, but the biggest challenge will be finding time to dive into the issue... I do have a laptop with an Nvidia card that I could perhaps try it on, so I'll see if I can get around to it.

Works on my RX 580, but crashes after some minutes as @mrxz mentioned.

Thanks for trying it out, @rcelyte. Just to clarify, while I also reported it to 'crash' it's more a hang/freeze. Did you observe the same, or did it really crash Firefox for you?

@rcelyte
Copy link
Contributor

rcelyte commented Aug 21, 2022

@mrxz It froze

@Utopiah
Copy link

Utopiah commented Aug 21, 2022

biggest challenge will be finding time to dive into the issue... I do have a laptop with an Nvidia card that I could perhaps try it on, so I'll see if I can get around to it.

Understood, let me know if there is anything I can test and whatever data, error log, etc that could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants