Linux/Wireplumber/Pipewire: manual fix for steam remote play no-audio

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

CulunTse
Posts: 153
Joined: Mon, 15. Jun 15, 08:10
x4

Linux/Wireplumber/Pipewire: manual fix for steam remote play no-audio

Post by CulunTse »

I am currently trying Steam Remote Play under Linux, so I can game downstairs while the children sleep upstairs (where my "beast" machine is too).

I needed to perform manual corrections to the audio streams, in order to get sound at all.

Symptoms:
  • OS on both my desktop (gaming beast) and laptop (streaming receiver) is OpenSUSE tumbleweed, updated to state 2023-08-26, with steam installed via package manager (including steamtricks).
    Notably, this distro uses pipewire+wireplumber for Audio.
  • before remote play, X4 works flawlessly.
    6.20, English, build number 511811
    (and also always before that, going back to at least 4.00)
    I run heavily modded, from both steam workshop and nexus mods. No executable modding though, so I think audio handling is "vanilla".
  • when starting X4 from the laptop, via the "stream" option, X4 launches successfully, but no audio is played. Neither on laptop, nor on desktop.
  • after stopping streaming, audio is gone, even after game restart, game+steam restart, and even full desktop and laptop reboot.
  • to fix it, I had to manually reconnect the audio streams. For this I used QJackCtl. X4 presents itself as a JACK source named "alsoft", that had zero outgoing connections. Rewiring the R+L channels to my motherboard chipset sink restored audio (including headphone switching)
  • using the same trick, I could also get audio forwarding working for remote play. When streaming is started, a new JACK node named "steam" appears. Inputting the "alsoft" channels into this steam-node starts audio playback on the streaming receiver.
I guess Steam does some "smart" things to the audio setup when streaming starts, but trips up on either X4's "alsoft" library using JACK, or just doesn't handle pipewire in general.
I'm not sure if this is an X4 problem or a Steam-remote-play problem, but I wanted to at least write it down publicly somewhere, since I couldn't find anything online during my searches.

Per the rules sticky, I plan on adding technical details and screenshot, but must beg some patience, there's a baby sleeping literally on my belly.

Update: sleeping baby success, screenshots here:
https://drive.google.com/drive/folders/ ... sp=sharing
  • qjackctl-desktop-rhythmbox.png = steam opened, no game launched, rhythmbox music player playing "return to kingdom end" in the background (as comparison/default reference)
  • qjackctl-x4-no-audio.png = started X4 locally, but no sound plays; the "alsoft" node appears wsith X4 launch
  • qjackctl-x4-manually-wired-with-audio.png = manually dragging wires from "alsoft" to "starship" (=AMD mainboard audio codename) starts audio playing.
  • qjackctl-x4-streaming-with-audio.png = steam remote-play "connecting" to the already-running-game-with-manually-fixed-audio succesfully plays audio on the laptop too.
    Note how the "monitor" channels wire up to the "steam" node", and not directly to the "alsoft" node; steam taps into all sound, as tested by rhythmbox playback and some random system sounds (like the screenshot photo-shutter) also emitting from the laptop.
  • qjackctl-x4-streaming-no-audio.png = closing streaming, and exiting X4 on the desktop, then initiating game-launch as "stream" from the laptop, results in no-audio.
paroxysm
Posts: 2
Joined: Sat, 30. May 09, 12:25
x4

Re: Linux/Wireplumber/Pipewire: manual fix for steam remote play no-audio

Post by paroxysm »

I had the same problem today except I'm not using remote play.

X4 had no audio and wasn't showing up in pavucontrol so I checked Helvum (patchbay tool) and it was showing there as "alsoft" with no outgoing connections as seen in your screenshots. I connected this to my normal output and that got the audio going again.
If I run the game under proton everything just works.
CulunTse
Posts: 153
Joined: Mon, 15. Jun 15, 08:10
x4

Re: Linux/Wireplumber/Pipewire: manual fix for steam remote play no-audio

Post by CulunTse »

Good to know I'm not the only one!
And thanks for alerting me to Helvum, that's exactly what I needed!

Some context for passers-by who may not know the intricacies of Linux audio:
  • For the last decade or so, there were two mayor audio frameworks in Linux, PulseAudio (for "everyday" just-do-what-I-probably-want audio) and JACK (low-latency, high control, for professional studio use).
    In the ancient times, there was JACK (fiddly and esoteric) and ALSA (advanced Linux Sound Architecture), and looooots of buggy drivers and ad-hoc fixes in all the wrong places.
  • Pipewire (wikipedia link) is a new low-level audio framework that unifies audio and video streaming, and exposes both the JACK and the PulseAudio interfaces, and satisfies the requirements of both. The suggestion that this is even possible would get you laughed out of the linux-conference room only a few years ago, that's how revolutionary this is.
  • A few things that Pipewire adds over the existing solutions are
    • A security model that works with sandboxed applications (e.g. flatpak)
    • audio/video integration from the ground up, which solves a lot of fundamental issues around screencasting, audio-video delay sync, etc
    • a single, unified implementation for the previously-separate ecosystems: PulseAudio, JACK, ALSA and GStreamer.
  • Most distros are conservatively sticking to the tried-and-tested PulseAudio backend, but some of the more experimental distros have switched to PipeWire, which is thus rapidly maturing.
  • That said, Pipewire is opt-in available in even the most conservative distros, e.g. in Debian
  • WirePlumber is a "session manager"/configuration tool for PipeWire, that integrates SystemD to start, manage and persist the audio configuration
  • A good resource to learn more (way too much even?): PipeWire-Guide
zaratul
Posts: 1
Joined: Fri, 17. Apr 20, 13:20
x4

Re: Linux/Wireplumber/Pipewire: manual fix for steam remote play no-audio

Post by zaratul »

Had no sound as well (using Arch + pipewire)
Game also was not showing up in pavucontrol.

Used qgwgraph (qt pipewire tool) to connect the game (alsoft) to my speakers.
Works flawless again.

Return to “X4: Foundations - Technical Support”