ALVR icon indicating copy to clipboard operation
ALVR copied to clipboard

Can't get sound stream on Quest 2 using Linux with pipewire

Open famellad opened this issue 3 years ago • 10 comments

Description

General Troubleshooting

  • [x] I carefully followed the instructions in the README and successfully completed the setup wizard
  • [x] I read the ALVR Wikis here and here

Environement

Hardware

linux-hardware link

Installation

ALVR Version: 18.2.1

SteamVR Version: 1.21.12

Install Type:

  • [x] Packaged (exe, deb, rpm, etc)*
  • [ ] Portable (zip)
  • [ ] Source

*Installed using the AUR packaged version of alvr

OS Name and Version: EndeavourOS

I am currently using Pipewire, my setup is working fine for my Speakers, USB Headphones and Bluetooth Earbuds. I have installed pipewire-jack and I am using wireplumber as the session manager.

I read this comment and I seem to have the same setup here, although both pw-cli outputs they've posted are no longer available so I can't really be sure.

Depending of what audio device name I choose in the advanced settings of the ALVR dashboard I get different errors in the logs, which are linked here.

I'm at a bit of a loss because information to get audio streaming working on Linux is scattered all over the issue tracker, and there's no information about it in the wiki.

I would appreciate any guidance, and I will keep experimenting to see if I can figure something out!

Thanks in advance!

famellad avatar Mar 28 '22 19:03 famellad

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 28 '22 08:04 stale[bot]

I'm having the same issue. Will perform some attempts to have better diagnostic data to allow this bug report to go forward.

Patola avatar Apr 30 '22 14:04 Patola

Had a small breakthrough today, same setup as before. When enabling advanced options in the Audio tab at the dashboard, selecting the jack backend and then using cpal_client_in as the audio device, I get my Quest 2 to mirror my USB microphone sound.

Using Helvum (or any patchbay app) I can manually connect the output of my game to cpal_client_in, and the Quest 2 will play the sound from the application.

Three caveats with this method:

  • The patches have to be manually connected for each application, and for each time I start each application. This is annoying but I can live with it.
  • The Quest will still mirror the sound from the microphone, if I manually disconnect the device using Helvum, everything stops working and then it resets back to default. This can be worked around by disconnecting my microphone, but this is of course much less than ideal.
  • cpal_client_in only has one input, and as such the audio stream becomes a mono mix of both stereo channels. This is alright for rhythm games, or light apps like Google Earth, but turns a lot of games into a very subpar experience due to lack of binaural sound. I'm sure this can be fixed by turning that input into a stereo input, but I lack the technical knowledge with both Pipewire and JACK (and the interaction between the two) to figure out where to change this config, or what command to run. I will keep looking into this.

Anyway this is looking sort of promising, and maybe it will give someone else enough insight to actually figure out how this all works and why it sorta sometimes seems to almost be working.

P.S.: I got the idea of opening a patchbay app from this video, she did get it working first try tho, and using the default audio device on Steam OS, so I'm not sure what's going on there, and I don't have a Steam Deck to dive deeper into that.

famellad avatar May 13 '22 05:05 famellad

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 12 '22 08:06 stale[bot]

Issue is still going on, I can assign mono-only sound for the game via qjackctl / helvum / carla after it starts if I set jack on ALVR. But it hinders the playability of many games where you need to use sound to locate the threat, like horror games.

Patola avatar Jun 12 '22 09:06 Patola

Same problem here, no way I can hear audio on the headset

"jack" doesn´t even appear on alvr for me, even when using pipewire

LuNeder avatar Jun 30 '22 18:06 LuNeder

It works now Still no jack option, but choosing "pipewire" instead and then using Helvum to manually reroute audio to "pipewire alsa" makes it work (as said on https://github.com/alvr-org/ALVR/issues/673#issuecomment-1031385220).

Still: I have to manually reroute the audio for every single app I open, every single time I open them.

LuNeder avatar Jun 30 '22 19:06 LuNeder

Similar here, but I have to choose "jack" in the list, and then I am getting stereo sound... Still not automatic, and it doesn't work 100% of the time, not sure what's going on.

famellad avatar Jul 07 '22 03:07 famellad

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 10 '22 01:08 stale[bot]

In fact, this issue is mostly resolved in the nightly builds, you still have to use a patchbay app to manually route the sound. But it is working in stereo, using the Default device while choosing alsa as the backend. The only thing missing now is to just do this connection automatically.

famellad avatar Aug 10 '22 02:08 famellad

At this point it seems like a duplicate of #673 so I'm closing

Vixea avatar Jul 03 '23 14:07 Vixea