ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.2k stars 175 forks source link

Remote Play Crackling Audio #6749

Closed Flameslice closed 1 year ago

Flameslice commented 4 years ago

Please describe your issue in as much detail as possible:

The expected behavior is that I can stream from my PC to my steam link indefinitely without audio issues. What happens is it works well initially for some variable period of time, but after that the audio will start crackling or popping until it eventually cuts out entirely. I've made sure Pulseaudio is set to the same sample rate as my TV. The stream log is here. Testing on a NixOS and Ubuntu based PC yielded the same results, but streaming from those same PC's running Windows worked fine.

Steps for reproducing this issue:

  1. Boot up a remote play session from a linux host to a steam link
  2. Wait for some undefined period of time
  3. Eventually, audio crackles and pops, until it eventually cuts out entirely.
Fjoggs commented 3 years ago

I just tried streaming to my steam link after removing the speech-dispatcher package, but sadly it did not resolve the issue for me. :( (ubuntu 20.04)

delilahlah commented 3 years ago

Seeing this issue with the Steam Link app for the Nvidia Shield TV Pro 2019 and an Arch Linux host. Also, the standalone Steam Link hardware exhibits the same issue. I thought this was a Wine/Proton issue, but I saw it with a native game last night (Hellpoint). This is a real bummer. I did contact Steam support so maybe :crossed_fingers: ?

tlgyuksel commented 3 years ago

For me, the problem went away if I changed my pulseaudio output to HDMI audio (stereo) from my audio interface (2+2 output) as @GitoMat suggested.

delilahlah commented 3 years ago

For me, the problem went away if I changed my pulseaudio output to HDMI audio (stereo) from my audio interface (2+2 output) as @GitoMat suggested.

I'm also using an audio interface (BEHRINGER_UMC404HD w/ the ladspa_dsp plugin for my speakers) and completely unplugging it and removing any configuration in ~/.config/pulse did have some difference after setting the default to GP102 HDMI Audio Controller. Previously I was only able to stream ~10 minutes before the sound started distorting. While using the HDMI as the default I can get ~30. Still pretty poor.

I'll do some more testing because I only had time to test with HDMI once.

Edit: Did some more tests and I was able to get 1 hour for one session and 37 minutes for another before it started breaking up.

tlgyuksel commented 3 years ago

Did some more tests and I was able to get 1 hour for one session and 37 minutes for another before it started breaking up.

Are you using steam-runtime or native? Before I changed my audio output from my interface (behringer umc204hd) to hdmi, I also switched to native runtime using the steam-native-runtime from AUR.

Once I have the time I'll switch back to steam-runtime and test if changing the audio output to HDMI still solves the problem. Maybe it's combination of both that solved my problem.

Sirnanigans commented 3 years ago

Are we able to plug a Bluetooth receiver into the Link and receive audio that way? I am currently working around the issue with my home stereo's bluetooth and it works okay without sync issues.

I am convincedt that this issue is buried inside of steam itself and cannot be resolved except by Valve, who has forgotten it.

delilahlah commented 3 years ago

Are you using steam-runtime or native? Before I changed my audio output from my interface (behringer umc204hd) to hdmi, I also switched to native runtime using the steam-native-runtime from AUR.

I switched over this morning and gave it a try. Although it looks like steam-native-runtime is in the official repos and not the AUR. Same results.

christopher-john-czettel commented 3 years ago

Just wanted to add, that I am also affected. Gentoo/Kernel 5.9.3/NVidia Sheild.

gdesecrate commented 3 years ago

My audio cracks down and gets lost in around 5-10 minutes 5.9.1-1-MANJARO + Steam Link

I tried multiple options on both host and client - nothing helps

delilahlah commented 3 years ago

My very kludgy workaround for this involves the following:

Obviously, this doesn't fix the underlying issue and if you are streaming to a thing that's not running Pulseaudio, then this won't help. On a side note, after all these years of thinking Pulseaudio was an over-engineered mess, with all of it's client/server architecture, it looks like it's just the right amount of engineered. Who knew?


† Relevant configs. I think I may have also needed to tweak some ALSA things to get Pulseaudio working initially. pavucontrol is your friend here, as is $ systemctl --user status pulseaudio.{service,socket}.

$ cat ~/.config/pulse/daemon.conf
# Realtime optimization
high-priority = yes
realtime-scheduling = yes
realtime-priority = 9

# Sample rate
default-sample-rate = 48000
alternate-sample-rate = 176000
default-sample-format = s24-32le
resample-method = speex-float-9

# Optimized fragements for steam
default-fragments = 5
default-fragment-size-msec = 5

# Misc daemon settings
exit-idle-time = -1
log-level = info
$ cat ~/.config/pulse/default.pa 
.include /etc/pulse/default.pa

load-module module-udev-detect tsched=0
load-module module-alsa-sink device=hw:0,0

I also needed to noodle around with paprefs to get the server to show up on the network.


‡ To tell the host to use the pi (ip of 10.0.1.160):

$ echo 'default-server = 10.0.1.160' > ~/.config/pulse/client.conf && pulseaudio -k 

And after my game session is done:

$ rm ~/.config/pulse/client.conf
djibux commented 3 years ago

I am experiencing this issue on Debian Testing. The sound is fine for some time (between half an hour to an hour and a half) and then quickly degrades, from light saturation/crackling, to totally inaudible.

Stopping and restarting the streaming instantly fixes the audio issues. I don't need to restart the game, the steam client on the host, or the steam link.

That happens no matter what game I play (CPU intensive or not, optimized for steam play or not), and happens even with other uses (streaming the desktop for instance). It also happens to my friends when I host a game using remote play.

It is visible in the streaming_log.txt. Starting from 22:29:09, the "drop_before" value is no longer zero. The time corresponds to when the sound started to sound distorted on that session.

[2020-11-15 22:25:09] Audio source [System Pulse]: init=614533992, through=66242399, last_start=66241924, mixed=2880282, drop_before=0, drop_after=0
[2020-11-15 22:26:09] Audio mix: start=614507768, returned=69121440
[2020-11-15 22:26:09] Audio source [System Pulse]: init=614533992, through=69122378, last_start=69121893, mixed=2879979, drop_before=0, drop_after=0
[2020-11-15 22:27:09] Audio mix: start=614507768, returned=72001920
[2020-11-15 22:27:09] Audio source [System Pulse]: init=614533992, through=72002615, last_start=72002038, mixed=2880237, drop_before=0, drop_after=0
[2020-11-15 22:28:09] Audio mix: start=614507768, returned=74881440
[2020-11-15 22:28:09] Audio source [System Pulse]: init=614533992, through=74882509, last_start=74881912, mixed=2879894, drop_before=0, drop_after=0
[2020-11-15 22:29:09] Audio mix: start=614507768, returned=77761920
[2020-11-15 22:29:09] Audio source [System Pulse]: init=614533992, through=77762512, last_start=77762021, mixed=2874877, drop_before=5126, drop_after=0
[2020-11-15 22:30:09] Audio mix: start=614507768, returned=80641920
[2020-11-15 22:30:09] Audio source [System Pulse]: init=614533992, through=80642504, last_start=80642050, mixed=2743286, drop_before=136706, drop_after=0
[2020-11-15 22:31:09] Audio mix: start=614507768, returned=83522400
[2020-11-15 22:31:09] Audio source [System Pulse]: init=614533992, through=83522628, last_start=83522282, mixed=2316228, drop_before=564014, drop_after=0
[2020-11-15 22:32:09] Audio mix: start=614507768, returned=86402400
[2020-11-15 22:32:09] Audio source [System Pulse]: init=614533992, through=86402625, last_start=86402274, mixed=1588326, drop_before=1291679, drop_after=0
[2020-11-15 22:33:09] Audio mix: start=614507768, returned=89282880
[2020-11-15 22:33:09] Audio source [System Pulse]: init=614533992, through=89281361, last_start=89282266, mixed=758190, drop_before=2121812, drop_after=0
[2020-11-15 22:34:09] Audio mix: start=614507768, returned=92163360

I hope that helps pinpoint the issue.

Thanks.

Sirnanigans commented 3 years ago

It is visible in the streaming_log.txt. Starting from 22:29:09, the "drop_before" value is no longer zero. The time corresponds to when the sound started to sound distorted on that session.

This is very helpful. I'm surprised that I somehow missed that this log exists. Unfortunately I don't understand what these drop_before and drop_after values mean. Any ideas?

djibux commented 3 years ago

Well, I have no idea…

Blasken commented 3 years ago

I had this exact issue for a long time but found a solution that worked for me a while back and have not had any problems since, arch forum post.

Since the problem persisted regardless of how I launched Steam, with every permutation of soundcards and configurations possible with every client I had access to, I concluded the problem was on the host and that the sound problems rather ought to be a subsequent issue. After noticing issues with my Xbox 360 controllers I switched out xpad for xboxdrv and all sound issues were gone at once. I have not tried to find exactly what was wrong with xpad since it xboxdrv works and I need it for 4 player games, so more testing is needed to really conclude that it is a solution(, or rather a workaround).

One theory I have is that xboxdrv handles controller enumeration in a different way than xpad and that the client might be registering TV remotes (maybe hdmi arc controllers for e.g. Steam Link?) with some shaky stability during the session. This is maybe a bit too specific considering the sample space of only one host with limited devices, but I believe that the issue is rooted in the handling of input devices on the host.

I was a bit too preoccupied back then to cross-post the solution, but I noticed now that this issue still had no solution and understand that my old post probably is not the first hit on google, so here it is. I include my current host pulse configurations to show that it works with mostly default, slightly configured for online FPS games. Hope it works for others as well!

$ cat .config/pulse/default.pa
#!/usr/bin/pulseaudio -nF

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore restore_device=false
load-module module-card-restore

### Automatically load driver modules depending on the hardware available
load-module module-udev-detect tsched=0

### Load several protocols
load-module module-dbus-protocol

### Automatically restore the default sink/source when changed by the user
### during runtime
load-module module-default-device-restore

### Make sure we always have a source/sink around, even if it is a null sink.
load-module module-always-source
load-module module-always-sink

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Modules to allow autoloading of filters (such as echo cancellation)
load-module module-filter-heuristics
load-module module-filter-apply
$ cat .config/pulse/daemon.conf
load-default-script-file = yes

default-fragments = 8
default-fragment-size-msec = 6

exit-idle-time = -1
flat-volumes = no
resample-method = speex-float-10
default-sample-format = s16le
default-sample-rate = 48000
default-sample-channels = 2
alternate-sample-rate = 44100

high-priority=no
nice-level=-1

; realtime-priority (=5 default) must be less than rlimit-rtprio (=9 default)
realtime-scheduling = yes
realtime-priority = 5

; Might cause distortion when enabled
avoid-resampling = no
delilahlah commented 3 years ago

The comment just before this one.

I was never using plain xpad on the host. Rather, I was using xpadneo. I uninstalled xpadneo and swapped it for xboxdrv and I still have same sound issues. :thinking:

Edit: Seems like my Pi 4 was having some issue with its micro HDMI connector causing issues (surprising nobody). I'll need to test this some more…

ntropy83 commented 3 years ago

Since I am having long play sessions lately with Cyberpunk, I have found this issue on my remote play setup aswell. After roughly 45 minutes, the audio starts crackling more and more, until it completly vanishes. Host is on Manjaro Budgie, latest xanmod-lts kernel and client is on Manjaro Plasma, standard kernel.

Mystic7X commented 3 years ago

I've been having the same issue, but I may have figured out something that seems to work so far. Install the full Pulse Audio Volume Control application and go in the advanced settings. In there I have set the audio latency offset to about 100 ms. I don't notice any difference in audio delay and haven't had any audio issues yet. So far the overall audio quality sounds better.

djibux commented 3 years ago

Install the full Pulse Audio Volume Control application and go in the advanced settings. In there I have set the audio latency offset to about 100 ms.

What a great Christmas present :) Nice find, it works for me as well. I was able to have two sessions of about two hours without any sound issue.

@kisak-valve, @slouken, any chance that workaround helps solve the issue?

Mystic7X commented 3 years ago

I also bumped it to 150 ms and noticed increased frame rates. Seems to be the sweet spot.

JustEnoughDucks commented 3 years ago

Perhaps I did this wrong, but my pavu control (QT version) device delay doesn't go past 99ms. I set each output device individually to 99ms, but got the same crackling behavior.

Then I installed the non-QT version and cranked it to 150ms. I still get the same crackling in 10 minutes. Did you have to do any extra steps besides setting the latency and restarting steam/link?

Mystic7X commented 3 years ago

Try factory reset on your steam link. I had installed the beta and went back.

Matombo commented 3 years ago

I've been having the same issue, but I may have figured out something that seems to work so far. Install the full Pulse Audio Volume Control application and go in the advanced settings. In there I have set the audio latency offset to about 100 ms. I don't notice any difference in audio delay and haven't had any audio issues yet. So far the overall audio quality sounds better.

I only find latency settings on a per device basis for my host computer, do you men that?

JustEnoughDucks commented 3 years ago

@Mystic7X I tried runtime and native steam, factory resetting the steam link, and setting a variety of delays. Still same 10 minute static -> cutout behavior. Are there previous steps in this thread that perhaps still need to be applied in combination with the pavucontrol delay?

Mystic7X commented 3 years ago

I messed around with it some more and noticed negative latency #'s work too. Try going to -200ms and see if you get different results. Always use the current default play back audio device.

tris-tan commented 3 years ago

I also have this issue with Manjaro (Arch) host and Nvidia Shield TV Pro client. Neither the xpad or latency offset suggestions above helped resolve it either.

For me, it starts after about 60-90 minutes of game time and quickly devolves (in about 15 minutes) into hellish sounding compression/crushing. Reconnecting to the stream fixes the issue temporarily, without having to restart the game or either of the devices, as others have confirmed.

Hopeful a fix can be found for this soon, it's pretty annoying.

tlgyuksel commented 3 years ago

I have been doing streaming since last I time posted, also switched my graphics card since then and only fix is changing my audio output to DisplayPort. Even for long gameplay sessions it works for me. Just wanted to report.

Mystic7X commented 3 years ago

So, my previous fixes didn't completely fix the problem, it delayed it from happening. Really wanted to figure this annoying problem out. So far I tried something different with good results. In Pulse Audio Volume control application, volume control settings, turn off all the audio profiles listed for all the audio devices. Go in the output devices and make sure all you see is the 'Dummy' (Virtual) audio device present. If for some reason you don't see it, launch steam and it should show up. After that, try streaming your games and see if the audio acts up. I've had several 3 hour gaming session over my steam link without audio issues after doing this.

matty-fb commented 3 years ago

In Pulse Audio Volume control application, volume control settings, turn off all the audio profiles listed for all the audio devices. Go in the output devices and make sure all you see is the 'Dummy' (Virtual) audio device present.

This 100% fixes the crackling/disappearing audio problem for me. Normally the problem crops up after 15-20 minutes, but I just had two hours of flawless operation. Thank you so much for figuring this out, @Mystic7X !

tris-tan commented 3 years ago

Thank you @tlgyuksel and @Mystic7X, I can also confirm that this fixed the issue on my side. It looks like you've arrived at the same solution by different means maybe? Could be down to the audio on PC & the client going out of sync and disabling PC side means there's nothing to sync? Anyway, I hope this helps Valve fix it too, so I don't need to keep messing with audio (and desktop resolution #7130) settings every time 😃

skowr commented 3 years ago

Hi Guys.

I was following the thread from the beginning as I noticed the problem started longer than year ago. I can confirm that @Mystic7X trick does the work. I was able to stream for 3 hours without any audio issues. Great work, thanks.

Still, it is interesting to understand the reason why sound goes out of sync after some time. I was trying to capture network traffic and find a patter that could indicate the problem but without luck. I feel it is really some pulse audio configuration issue. I don't know about others but I had sound playing on my host machine although I enabled the option to turn if off (making ugly sound reverb). Then the sound distortion was happening on Link. I guess once Valve would fix that my host PC is quiet while streaming I would not have any sound the problems on Steam Link as well.

The solution to turn off sound configurations is nice but cumbersome. I need to basically turn off sound configuration upon start streaming. Any idea how to script it in game launcher or steam launcher? (I am using Ubuntu 20.04)

JustEnoughDucks commented 3 years ago

@tlgyuksel this is what solved (worked-around) the problem for me like tris-tan. I removed all outputs except my DP monitor output, with the 100ms offset, and was able to do a 2 hour straight play and desktop video streaming session with no crackling. If I had only virtual outputs but no DP/HDMI monitor output, crackling behavior continued.

There was a slight other bug though. If audio was completely silent for an unknown amount of time (I left it once for 30 minutes, and once for around 5) it will be completely silent. I am not sure if it is related, but all outputs were properly set, but the Link seemed to not be able to pick the audio stream back up. I would be interested in seeing if someone else still has this problem/ doesn't have any problem like this.

djibux commented 3 years ago

@skowr, for me the audio also plays on the host no matter what setting I choose.

@Mystic7X, you're right, I am still experimenting issues on longer sessions when setting a delay. I don't have the "Dummy" output you're talking about… Only my HDMI output, or my external audio card when I use it.

romanovzky commented 3 years ago

This solved for me as well, I tried a longish (2h session) without issues.

@djibux if you turn off all the output profiles the dummy will show up.

So it seems that for some reason having output profiles activated is messing up steam's stream audio output channel... I don't know enough about audio, but this seems to be a clear trail for Valve to look into.

djibux commented 3 years ago

@romanovzky thanks! Found it and it works like a charm. I just spent the whole morning streaming videos without issue.

delilahlah commented 3 years ago

@skowr I'm not sure how to key a script off of starting a remote play session, but this script will set all of you profiles to off and then restore them with Ctrl+C:

#!/usr/bin/env bash

set -e

function cleanup() {
    local -n cards="${1}"
    local -n profiles="${2}"
    local i=0
    for card in "${cards[@]}"; do
        printf "\nsetting card ${card} back to ${profiles[${i}]}"
    pacmd set-card-profile "${card}" "${profiles[${i}]}"
    ((i=i+1))
    done
    systemctl --user restart pulseaudio.{service,socket}
}

function main() {
    systemctl --user restart pulseaudio.{service,socket}
    local original_cards=($(pacmd list-cards | grep 'index: ' | rev | cut -d ' ' -f 1 | rev))
    local original_profiles=($(pacmd list-cards | grep 'active profile: ' | cut -d '<' -f 2 | tr -d '>'))

    for card in "${original_cards[@]}"; do
    pacmd set-card-profile "${card}" off
    done

    trap 'cleanup original_cards original_profiles' EXIT

    echo 'sleeping... ^C to cleanup'
    sleep infinity
}

main

Edit: Managed to play with all cards set to off while using just the dummy output and I had no audio issues, so this does seem like a feasible workaround. :grinning:

SkyLeite commented 3 years ago

@skowr I'm not sure how to key a script off of starting a remote play session, but this script will set all of you profiles to off and then restore them with Ctrl+C:

[snip]

Edit: Managed to play with all cards set to off while using just the dummy output and I had no audio issues, so this does seem like a feasible workaround. grinning

Would it be possible to have this run automatically when launching a game through Remote Play somehow?

nickzelei commented 3 years ago

@grahampfau I tried running your script, but to no avail. The sound ended up not playing through the link and ended up being piped through my computer's monitor. I even verified it was set to the dummy input.

I'm streaming the steam link as an app through my nvidia shield.

usrtrv commented 3 years ago

@grahampfau Thanks, script worked well for me. About 1 hour of play, no more audio issues. Fedora 33 streaming to a Chromecast.

delilahlah commented 3 years ago

@grahampfau I tried running your script, but to no avail. The sound ended up not playing through the link and ended up being piped through my computer's monitor. I even verified it was set to the dummy input.

I'm streaming the steam link as an app through my nvidia shield.

That's very odd. Does pacmd list-sinks show something like this while the script is running?

$ pacmd list-sinks
1 sink(s) available.
  * index: 2
    name: <auto_null>
    driver: <module-null-sink.c>
    flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: RUNNING
    suspend cause: (none)
    priority: 1000
    volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
           balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 6.29 ms
    max request: 7 KiB
    max rewind: 7 KiB
    monitor source: 3
    sample spec: s24-32le 2ch 48000Hz
    channel map: front-left,front-right
                Stereo
    used by: 1
    linked by: 1
    configured latency: 18.75 ms; range is 0.50 .. 2000.00 ms
    module: 25
    properties:
        device.description = "Dummy Output"
        device.class = "abstract"
        device.icon_name = "audio-card"
michaelnew commented 3 years ago

FWIW, I'm using pipewire rather than pulseaudio and I'm not having this problem. I've been able to stream from my machine running the 5.10.10 zen kernel to an Android 10 phone, as well as an Android 9 TV for several hours without any dropouts.

I should note that pipewire hasn't been completely stable for me and I have had it crash while using remote play. But it happens during normal system use as well, and it's rare.

System:    Host: archbox Kernel: 5.10.10-zen1-1-zen x86_64 bits: 64 Desktop: sway 1.5-4d43f1dd Distro: Arch Linux 
Machine:   Type: Desktop System: ASUS product: N/A v: N/A serial: N/A 
           Mobo: ASUSTeK model: ROG CROSSHAIR VIII HERO (WI-FI) v: Rev X.0x serial: 190958446300253 
           UEFI: American Megatrends v: 3003 date: 12/04/2020 
CPU:       Info: 12-Core AMD Ryzen 9 3900X [MT MCP] speed: 3487 MHz min/max: 2200/3800 MHz 
Graphics:  Device-1: Blackmagic Design DeckLink Mini Recorder driver: blackmagic-io v: 12.0a14 
           Device-2: Advanced Micro Devices [AMD/ATI] Vega 20 [Radeon VII] driver: amdgpu v: kernel 
           Display: wayland server: X.org 1.20.10 compositor: sway driver: loaded: modesetting 
           resolution: <missing: xdpyinfo> 
           Message: Advanced graphics data unavailable for root. 
Audio:     Device-1: Blackmagic Design DeckLink Mini Recorder driver: blackmagic-io 
           Device-2: Advanced Micro Devices [AMD/ATI] Vega 20 HDMI Audio [Radeon VII] driver: snd_hda_intel 
           Device-3: Advanced Micro Devices [AMD] Starship/Matisse HD Audio driver: snd_hda_intel 
           Device-4: Blue Microphones Yeti Stereo Microphone type: USB driver: hid-generic,snd-usb-audio,usbhid 
           Sound Server: ALSA v: k5.10.10-zen1-1-zen 
Network:   Device-1: Realtek RTL8125 2.5GbE driver: r8169 
           Device-2: Intel I211 Gigabit Network driver: igb 
           Device-3: Intel Wi-Fi 6 AX200 driver: N/A 
Drives:    Local Storage: total: 8.78 TiB used: 6.01 TiB (68.4%) 
Info:      Processes: 463 Uptime: 2h 01m Memory: 62.77 GiB used: 4.99 GiB (8.0%) Shell: Zsh inxi: 3.2.02 
community/wireplumber 0.3.0-1 (332.3 KiB 1.9 MiB) (Installed)
extra/pipewire-pulse 1:0.3.20-1 (3.9 KiB 0.0 B) (Installed)
extra/pipewire-jack 1:0.3.20-1 (93.1 KiB 333.0 KiB) (Installed)
extra/pipewire 1:0.3.20-1 (1.2 MiB 5.8 MiB) (Installed)
extra/libpipewire02 0.2.7-1 (334.6 KiB 1.5 MiB) (Installed)
extra/alsa-card-profiles 1:0.3.20-1 (26.2 KiB 169.1 KiB) (Installed)
nickzelei commented 3 years ago

@grahampfau Here is the output of my pacmd list-sinks

pacmd list-sinks
1 sink(s) available.
  * index: 1
    name: <auto_null>
    driver: <module-null-sink.c>
    flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: IDLE
    suspend cause: (none)
    priority: 1000
    volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 1326.55 ms
    max request: 344 KiB
    max rewind: 344 KiB
    monitor source: 3
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 2000.00 ms; range is 0.50 .. 2000.00 ms
    module: 25
    properties:
        device.description = "Dummy Output"
        device.class = "abstract"
        device.icon_name = "audio-card"
Managor commented 3 years ago

@michaelnew I can contradict that I've had this problem on both PA and PW.

libgradev commented 3 years ago

So, my previous fixes didn't completely fix the problem, it delayed it from happening. Really wanted to figure this annoying problem out. So far I tried something different with good results. In Pulse Audio Volume control application, volume control settings, turn off all the audio profiles listed for all the audio devices. Go in the output devices and make sure all you see is the 'Dummy' (Virtual) audio device present. If for some reason you don't see it, launch steam and it should show up. After that, try streaming your games and see if the audio acts up. I've had several 3 hour gaming session over my steam link without audio issues after doing this.

This has completely fixed the issue this end too - have tested many hours now and never seen it reoccur (on two different front ends)!

Many thanks @Mystic7X

entrapta-dev commented 3 years ago

So, my previous fixes didn't completely fix the problem, it delayed it from happening. Really wanted to figure this annoying problem out. So far I tried something different with good results. In Pulse Audio Volume control application, volume control settings, turn off all the audio profiles listed for all the audio devices. Go in the output devices and make sure all you see is the 'Dummy' (Virtual) audio device present. If for some reason you don't see it, launch steam and it should show up. After that, try streaming your games and see if the audio acts up. I've had several 3 hour gaming session over my steam link without audio issues after doing this.

I've tried this for a few weeks now and no matter how long my gaming streaming session is I experience no audio degradation whatsoever anymore.

+1 Thank you, @Mystic7X!

willthong commented 3 years ago

Hi all, I went from getting this issue after 5-10 minutes to being able to play an hour plus without any issues. Thanks to those above who posted their solutions.

What didn't work for me:

Eventually, I tried enabling only my monitor's audio output (GP104 High Definition Audio Controller Digital Stereo (HDMI)), which I set to -100ms, and this made the issue much rarer (about once every 90 minutes). I'll probably make this into a bash script at some stage to apply whenever I want to game remotely (I already have a script to match the monitor's aspect ratio to my TV and launch Steam). I can't help but think this might be a DAC issue, at least in my case, given that the problem occurs faster when the output is set to the DAC.

Model: MS-7A40 2.0
Distro: Arch Linux [x86_64]
Kernel: 5.11.9-arch1-1
WindowManager: i3
CPU: 12 x AMD Ryzen 5 5600X 6-Core Processor
GPU: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)
RAM: 1789 MiB / 15990 MiB
Willdrick commented 3 years ago

is there any advancement on this issue? I am using Fedora 34 which doesn't even ship with Pulseaudio, it defaults to Pipewire. (so the script for the workaround sadly doesn't work)

I have tested with both the SteamLink app on my Samsung TV and the SteamLink device, I get about 5 minutes of proper sound (stereo, going via ARC to a sound bar on the TV) and then it starts degrading for a minute until it either becomes a garbled mess or it cuts out entirely.

Host: Fedora 34 Beta + Steam Beta Ryzen 5 2400g (kernel 5.11.10-300.fc34.x86_64 ) Radeon RX 570 (DRM 3.40.0 - LLVM 12.0.0 - Mesa 21.0.1)

Client: Samsung UN55MU6100 (Up to date firmware, T-KTMUABC-1290.3) SteamLink for Samsung TV (no updates available) App version 1.7.37 Libraries Version 18.0305.0001 Publication Date 2018.05.02

zebulon2 commented 3 years ago

The method https://github.com/ValveSoftware/steam-for-linux/issues/6749#issuecomment-753639362 from @Mystic7X of leaving only the dummy audio output works, mostly (after reboot - first time I turned off my GP104 High Definition Audio Controller Digital Stereo (HDMI) output I lost sound completely). However, sounds starts crackling after maybe 30-40 minutes anyway, but it returns to normal after a few seconds. Before that sound cut out entirely and did not return.

jroyvde commented 3 years ago

The newly announced Steam Deck runs a Linux-based OS, meaning this glitch is likely to cause problems for people streaming with their Deck as a host, for instance playing with friends over Remote Play Together.

insanemal commented 3 years ago

I am on Arch and am using a Steam Link. I use Pipe Wire. I get the audio issue after an hour or so, but I never used to.

It has just dawned on me that I stopped using the HDMI audio around the time it started playing up. I will test this.

insanemal commented 3 years ago

Update: It didn't help