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

ALVR: Steam crash or pitch black view in headset #359680

Open
balintbarna opened this issue Nov 27, 2024 · 10 comments
Open

ALVR: Steam crash or pitch black view in headset #359680

balintbarna opened this issue Nov 27, 2024 · 10 comments
Labels
0.kind: bug Something is broken

Comments

@balintbarna
Copy link

Describe the bug

After connecting the headset to ALVR and launching SteamVR the view in the headset goes completely black. The VR view on the laptop screen shows SteamVR and the image moves correctly with the movement of the headset and controllers.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Have Quest 2 (larger storage version) with ALVR app 20.11.1 (latest right now) installed
  2. Have my system: https://codeberg.org/balint/nixos-configs#tuxedo
  3. Open ALVR dashboard
  4. Connect headset
  5. Start SteamVR from ALVR
  6. Enable SteamVR VR view to observe the corrrect image being generated
  7. Look in the headset to see black

Expected behavior

VR views should show on the headset

Additional context

I tried adding ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrmonitor.sh %command% to SteamVR's launch settings as suggested in this comment but then SteamVR just ends up crashing every time the headset connects. I tried a couple of different settings in ALVR for resolution, refresh rate, encoding, sound, etc, but didn't try everything.

I realised that the ALVR version on my device is 20.11.1 but the one in nixpkgs unstable is 20.11.0 so I forked nixpkgs and bumped the version but the result was the exact same after adding my fork to my system flake and rebuild-switching.

My computer is a Tuxedo Pulse 14 Gen 4 laptop: AMD Ryzen 7 8845HS, no dedicated GPU, no nvidia
My nixpkgs is nixos-24.11 with some packages - like ALVR - pulled from nixos-unstable. Steam should come from 24.11 so it should not have the issue the one on unstable has, unless I misunderstood what is in 24.11 now.

I haven't used ALVR on NixOS before so I don't have a version that worked that I could bisect between.

Metadata

  • system: "x86_64-linux"
  • host os: Linux 6.11.9-xanmod1, NixOS, 24.11 (Vicuna), 24.11.20241123.0c58267
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.10
  • nixpkgs: /nix/store/fnbr9s78sy4islw83vsaf0hgf88hih5v-source

Notify maintainers

Tagging people participating in the source build PR or having similar issues
@jopejoe1
@NovaViper
@eyJhb
@DaRacci
@LuNeder

Add a 👍 reaction to issues you find important.

@balintbarna balintbarna added the 0.kind: bug Something is broken label Nov 27, 2024
@aboglioli
Copy link

aboglioli commented Nov 28, 2024

I want to add that the error after adding ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrmonitor.sh %command% launch setting (as stated here in ALVR wiki) that I got is:

ERROR Encoder: cu->cuMemcpy2DAsync(&cpy, cuda_dev->stream) failed
ERROR Encoder:  -> CUDA_ERROR_INVALID_VALUE: invalid argument
ERROR Encoder: 
ERROR error in encoder thread: Failed to transfer Vulkan image to CUDA frame Generic error in an external library

If you Force Software encoder in Video settings, you can stream image.

It seems to be an error related to Nvidia drivers in my case.

  • Nvidia drivers: 560.35.03
  • CUDA: 12.6.
  • Kernel: 6.11.10

@MFlossmann
Copy link

This is a known issue, see here.

Currently, hardware encoding doesn't work for nvidia drivers on the nixpkgs derivation. Try forcing software encoding.

@balintbarna
Copy link
Author

I don't have nvidia drivers or hardware, not that I know of at least. Where did you see that error output? In ALVR log?

@balintbarna
Copy link
Author

balintbarna commented Nov 28, 2024

Also enabling both force software decoding and encoding didn't help, still crashes

@balintbarna
Copy link
Author

20:59:45.687 INFO Initial socket buffer size: send: 130560B, recv: 131072B
20:59:45.709 INFO Initial socket buffer size: send: 212992B, recv: 212992B
20:59:45.709 INFO Set socket send buffer succeeded: 425984
20:59:45.709 INFO Set socket recv buffer succeeded: 425984
20:59:45.712 INFO Render Target: 4288 2336
20:59:45.712 INFO Refresh Rate: 72
20:59:45.713 INFO CEncoder::Run
20:59:45.713 INFO CEncoder Listening
20:59:45.726 INFO CEncoder client connected, pid 22049, cmdline /home/balint/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/vrcompositor
20:59:45.755 INFO Using Vulkan device AMD Radeon Graphics (RADV GFX1103_R1)
20:59:45.762 INFO Using device path /dev/dri/renderD128
20:59:45.813 WARNING Failed to set cursor to Default
20:59:45.813 WARNING Failed to set cursor to Text
20:59:45.880 INFO Client disconnected. Cause: Interrupted system call (os error 4)
20:59:45.880 INFO Client disconnected. Cause: Interrupted system call (os error 4)
20:59:45.893 WARNING Failed to set cursor to Text
20:59:45.894 WARNING Failed to set cursor to Default
20:59:46.690 INFO Server disconnected

@MFlossmann
Copy link

Ah, sorry. @aboglioli added their error message, which is the result of nvidia HW encoding currently not working. But that issue has nothing to do with what you're struggling with.

@LuNeder
Copy link
Contributor

LuNeder commented Dec 16, 2024

I tried adding ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrmonitor.sh %command% to SteamVR's launch settings as suggested in this comment but then SteamVR just ends up crashing every time the headset connects.

I have the same issue here. Been talking for a while in the nixos gaming Matrix channel, but haven’t been able to fix this.

Related to alvr-org/ALVR#2476. Back then a kernel update had fixed it, but then after a few days and a flake update it broke again.

@LuNeder
Copy link
Contributor

LuNeder commented Dec 16, 2024

I’d recommend changing the issue title tho. The black view without the vrmonitor launch args is a thing on ALVR.

The NixOS issue here is that ALVR shouldn’t crash when you add the vrmonitor launch args thing.

@balintbarna balintbarna changed the title ALVR: Pitch black view in headset ALVR: Steam crash or pitch black view in headset Dec 16, 2024
@Octelly
Copy link

Octelly commented Dec 26, 2024

Same issue on NixOS unstable trying to connect a Quest 1.

@benbot
Copy link

benbot commented Dec 30, 2024

SteamVR seems to be all broken on nixos 😓

I'm able to connect my headset to alvr, but all I see is black in-headset and nothing on my monitor. no steamvr home window or anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

6 participants