ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.26k stars 174 forks source link

Incorrect channel mapping (NVIDIA/HDMI Surround 5.1) #6150

Open cminnoy opened 5 years ago

cminnoy commented 5 years ago

Your system information

Linux host:

March 14, 2019 06:05:42, Steam-API v018

Computerinformatie: Fabrikant: ASRock Model: ASRock AB350M-Pro4 Systeemomvang: Desktop Geen aanrakingsinvoer gedetecteerd

Processorgegevens: CPU-fabrikant: AuthenticAMD CPU-merk: AMD Ryzen 7 PRO 1700X Eight-Core Processor
CPU-soort: 0x17 CPU-model: 0x1 CPU Stepping: 0x1 CPU-type: 0x0 Snelheid: 3400 Mhz 16 logische processoren 8 fysieke processoren HyperThreading: Ondersteund FCMOV: Ondersteund SSE2: Ondersteund SSE3: Ondersteund SSSE3: Ondersteund SSE4a: Ondersteund SSE41: Ondersteund SSE42: Ondersteund AES: Ondersteund AVX: Ondersteund CMPXCHG16B: Ondersteund LAHF/SAHF: Ondersteund PrefetchW: Niet ondersteund

Versie van besturingssysteem: Ubuntu 18.04.2 LTS (64 bits) Kernelnaam: Linux Kernelversie: 4.15.0-46-generic X Server-uitgever: The X.Org Foundation X Server-versie: 11906000 X Window Manager: Metacity (Marco) Steam-runtimeversie: steam-runtime-beta-release_2019-01-10

Videokaart: Stuurprogramma: NVIDIA Corporation GeForce GTX 1060 6GB/PCIe/SSE2 Versie stuurprogramma: 4.6.0 NVIDIA 390.116 OpenGL-versie: 4.6 Kleurdiepte bureaublad: 24 bits per pixel Vernieuwingsfrequentie monitor: 59 Hz Leverancier-id: 0x10de Apparaat-id: 0x1c03 Herziening niet gedetecteerd Aantal monitoren: 1 Aantal logische videokaarten: 2 Resolutie primaire beeldscherm: 1920 x 1080 Bureaubladresolutie: 1920 x 1080 Grootte primaire beeldscherm: 20.20" x 11.34" (23.15" diag) 51.3cm x 28.8cm (58.8cm diag) Primaire bus: PCI Express 16x Primaire VRAM: 6144 MB Ondersteunde MSAA-modi: 2x 4x 8x 16x

Geluidskaart: Geluidsapparatuur: Nvidia GPU 84 HDMI/DP

Geheugen: RAM: 16036 MB

Overige: Taal gebruikersinterface: Nederlands TAAL: nl_BE.UTF-8 Totale beschikbare ruimte op harde schijf: 449648 Mb Grootste vrije blok op harde schijf: 274461 Mb VR-headset: geen gedetecteerd

Recente foutmeldingen:

Steam Link hardware:

Build 688 beta, SN FL55306E5D

Ubuntu MATE 18.04.2 LTS

Please describe your issue in as much detail as possible:

While doing in-home streaming using a Linux desktop system as host and Steam-Link hardware as client, when playing games using the surround 5.1 option, the channels are not mapped correctly to the AV-receiver speakers. Center speaker gets played in the rear-right speaker, front-right gets played in rear-left, etc.

Tried to remap channels using pulseaudio, but this was not a success. For example right-front channel keeps being played very dim compared to other channels, as it was initially placed at the rear, where it is normal to be played a bit more dim.

The cause is either the Linux SteamClient or the NVIDIA driver. I tested a Windows laptop also as client machine connected to the Linux host for in-home streaming and got also wrong channel output, so the chance that the SteamLink-hardware is the cause is minor.

Using pavumeter and speaker-test -c6 -twav you can see that audio on the host seems to be mapped correctly (at least visually they match). Auditory towards SteamLink the channels end-up in the wrong speakers.

Note: when you select Digital Stereo (HDMI) on the Linux host as profile, the 2-channels are played correctly on the SteamLink & AV receiver in the front speakers.

In case you need more info on the issue, let me know.

Steps for reproducing this issue:

  1. At host, enable in-home streaming. Select in the Linux audio configuration under tab devices profile 'Digital Surround 5.1 (HDMI)'. The onboard audio on the motherboard is disabled, audio only through HDMI of graphics card.
  2. Enable Surround 5.1 in the steam link and connect to a 5.1 AV receiver.
  3. Play game; alternatively play a video stream using Kodi or VLC
  4. to test each channel seperatly, exit big picture mode while connected(streaming) and use pavumeter and speaker-test from command line.
cminnoy commented 5 years ago

In the mean time I did some more testing. Connecting the Linux host directly to the AV receiver via HDMI worked as expected; all surround channels are correctly mapped. This indicates that it is most likely not the NVIDIA driver but Steam itself.

I double checked with another PC using the same Ubuntu MATE 18.04.2 LTS, also with an NVIDIA graphics card, but this time a GTX 1070 (instead of the GTX 1060). Both have the same drivers. The mismatch in channels happens also on that PC as host when streaming via Steam.

I tried to see if the channel mismatch was related to HDMI; so I enabled the onboard audio again, chose Analog 5.1 Surround as profile. That gave exactly the same result as HDMI with wrong channels mapped.

DrSky2007 commented 5 years ago

I can confirm the problem. I have exact the same setup and the same problem described above.

crowdh commented 5 years ago

I’m in 19.04 and I get a pretty similar situation. While testing with a surround video. FR = RR FC = RR FL = RL RR = RR+FR RL = RL+RL Sub = none (but I have one)

When I switch the audio in stereo mode I barely hear my front speaker... which work perfectly on all my other device. I’m new on Ubuntu, the same pc had W10 and everything was perfect before switching to Ubuntu. I mean surround and stereo worked perfectly.

My htpc is directly plugged in my home theatre. All update are done. Spec. I5-2400, gtx 670, 8gb, ssd 30gb.

Xenophobe-01 commented 3 years ago

I just set up a dual boot with Ubuntu 20.04 (plan is to kick Microsoft to the curb asap) and have run across this same issue with remote play streaming on my home network.

Operating System Version: Ubuntu 20.04.3 LTS (64 bit) Kernel Name: Linux Kernel Version: 5.11.0-37-generic X Server Vendor: The X.Org Foundation X Server Release: 12011000 X Window Manager: Mutter (Muffin) Steam Runtime Version: steam-runtime_0.20210906.1 CPU Brand: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz RAM: 15971 Mb Video Card: Driver: NVIDIA Corporation NVIDIA GeForce GTX 1070/PCIe/SSE2 Driver Version: 4.6.0 NVIDIA 470.63.01 Audio device: Realtek ALC892

Steam client application Built: Sep 17 2021, at 04:30:38 Steam API: v020 Steam package versions: 1631912732

I have tried adjusting the /etc/daemon.conf file with the following edits:

remixing-produce-lfe = yes
remixing-consume-lfe = yes
lfe-crossover-freq = 80
default-sample-rate = 48000
default-sample-channels = 6
default-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe

My receiver is a Sony STR DH-550, I have tested with both the hardware Steam Link and the Steam Link app on my Raspberry Pi 3B+, with both I get this test result using the Analog Surround 5.1 Output:

FL=FL&FR FC=FC & RR FR=RL RL=FR RR=RL LFE=FC with modified daemon.conf, NO sound with unmodified daemon.conf

Even when I select Analog Stereo Output, the FL=FL but the FR=FC.

Using Windows 10 the audio is correct on all channels/speakers, whether using the Steam Streaming Speakers or the Realtek Onboard Audio device.

This is the only issue I've run across that is holding me back from ditching Windows, as I game in my living room recliner via the Steam Link ... but with the audio not working properly, I have to keep Windows for gaming.

Edit: I installed pavucontrol to see if it might help and I noticed that under Recording the listing for Steam shows an odd channel listing when you unlock them ... Front Left, Front Left of Center, Front Center, Front Right, Front Right of Center, Rear Center.

The Output Devices when unlocked show what I would expect ... Front Left, Front Right, Rear Left, Rear Right, Front Center, LFE. Is it possible that the problem lies within what Steam Streaming recording is set for?

Edit 2: I removed pavucontrol since it didn't seem to be helping me any, then ran the update/upgrade commands even though I did that before installing pavucontrol earlier today and 3 files updated (unfortunately I didn't pay attention to file names).

Now when Gnome is set to analog stereo and the steam link is set to stereo, I at least get proper stereo channels in the stream, but when I select analog 5.1 in Gnome the test results are now FL=FL, FR=FR, RL=FL quieter, RR=FR quieter, FC=FL & FR balanced, and no LFE when steam link is set to stereo, but still all over the place as in my original post when the steam link is set to 5.1.

Xenophobe-01 commented 3 years ago

I've noticed that the issue is with the Steam recording for the streaming. With 5.1 analog set in the gnome sound control and 5.1 set in the steam link, pavucontrol shows both the Input Devices and Output Devices are using the correct channel map, start streaming and then check the Recording tab and Steam is recording and thus sending the wrong channels. This appears to be something in the Steam streaming client that is not properly mirroring the channels used in the Input and Output Devices.

Xenophobe-01 commented 2 years ago

Just updating. Currently on linux mint 20.2 cinnamon desktop, the issue persists when streaming to the link as previously detailed. I did unplug and take my pc to the living room, hooked it up via hdmi from the nvidia card to the receiver and 5.1 audio worked fine. I also purchased an hdmi headless plug that simulates up to 7.1 surround sound in the hope that steam might accept that as being connected to an actual 5.1 speaker setup and record correctly, it did not work either.

entropicdrifter commented 2 years ago

Just chiming in to say that I also have this exact same issue in Linux Mint 20.2 cinnamon. In pavucontrol I can see Steam is recording 6 channels from my 5.1 output by Monitoring it, but the channels it's getting are listed as follows: Front Left, Front Left-of-Center, Front Center, Front Right, Front Right-of-Center, Rear Center whereas the output that Steam is recording from has its channels listed thusly: Front Left, Front Right, Rear Left, Rear Right, Front Center, LFE

jamietel commented 2 years ago

Can confirm @entropicdrifter . Had this issue today and tried figuring out what's going on.

My setup at the PC is a USB DAC with stereo sound, it does not support surround sound. Before I want to stream with steam, I need to select audio HDMI surround before opening steam and opening steam link. This way steam remote play is opened with the monitoring channel on correct surround device. But still, with incorrect mapping it isn't any useful.

I'm using a AMD RX5500XT, so it doenst seems to be related to NVIDIA only.

Is it an idea to create two virtuale devices (just like windows) where steam remote play automatically streams the audio from? This way anyone with a stereo setup like me can enjoy surround without doing some clicks first in pavucontrol.

Xenophobe-01 commented 2 years ago

Since this has been an open issue for the past 3+ years, it's clear that Valve is unable to fix this, unwilling to fix it, or just considers surround sound for steam streaming on linux to be too small a user percentage to waste time with.

Therefore, I've boxed the steam link and the Pi is being used as a stand alone mini pc. My gaming rig is now in my living room component cabinet, had to cut a panel out of the back for airflow and cabling, 4 peel and stick feet on the side of the case so I could slide it in neatly (also takes the torque off the graphics card and cpu cooler). With it directly hooked up to the receiver the surround sound is perfect, zero input lag and the picture is very noticeably better. If you can, I recommend moving your gaming rig into the room with the receiver and big screen.

entropicdrifter commented 2 years ago

@Xenophobe-01 For what it's worth I use Sunshine/Moonlight to stream from my main PC to my big TV and it handles surround sound just fine

UvixCreative commented 1 year ago

Just chiming in that I'm experiencing this same thing. I'm assuming Xenophone-01 is right in their assumption that a) steam in-home streaming users b) with a Linux host c) using surround sound is such a ridiculously insignificant subset of users that this issue is realistically not going to get resolved.

But in any case, this is my setup:

The Windows 10 PC is connected via HDMI and, as tested through Windows sound settings, the surround channels are mapped and connected correctly. I did get 2 sets of results while testing surround through Steam Link that are interesting, though.

When both Windows and the Steam Link app are configured for 5.1 output, the channel mapping is as such: FL is FL FR is LFE RL is RR RR is also RR? FC is FC LFE is... FC plus LFE but FC is quieter?

When both Windows and the Steam Link app are configured for 7.1 output, the channel mapping is as such: FL is FL FLC is FR FC is FC FR is LFE FRC is SL RC is SR AUX0 is nothing AUX1 is nothing

I have not tried Windows configured with 7.1 and Steam Link configured with 5.1, that might be interesting...

To clarify these results, the channel name on the left is the software name and the channel on the right is the observed actual output. The channel names on the left were the ones observed in Helvum for channel mapping, but I had the same thing as mentioned by a few others in here that the channel names (as observed in Pavucontrol) for the Steam recording stream included left-of-center and such -- they were not the standard 5.1 and 7.1 digital surround channel mappings.

* Steam Remote Play/in-home streaming isn't working at all for me from linux to a Steam client on Linux or WIndows, but it does work to the Steam Link app. That's a separate issue and I didn't spend much time troubleshooting it anyway

lavadrop commented 1 month ago

This is not just Nvidia or Analog/HDMI profile issue. Surround sound via Steam Link App simply does not work. It only maps to L/R and SW channels. I tested it with the Analog profile of my on-board soundcard as well as the HDMI profile of my GPU with the Fraunhofer AAC LFE and SBR Test - H.264 Video in mpv on the AppleTV Steam Link app.

Edit: it seems EasyEffects was altering the sinks on pipewire, however they remain wrong. After removing the audio software, now my Steam host transmits to my Apple TV Steam Link audio on front left, LFE and right surround channels.