STEAM GROUP
Steam Remote Play homestream
STEAM GROUP
Steam Remote Play homestream
2,683
IN-GAME
31,115
ONLINE
Founded
November 7, 2013
All Discussions > Bug Reports > Topic Details
ezkill Feb 18, 2014 @ 10:43am
Crackling/sparking HDMI audio with AMD on Ubuntu
ISSUE:
I get very crackling/sparking audio when streaming games from my Windows 7 machine to my Ubuntu 12.04 client. When playing the same games natively on the client, the audio is OK. Also, this happens when using HDMI audio, while the audio is fine when trying a headset through minijack.

I am not sure if this qualifies as a Steam bug, and it may in fact be some kind of Ubuntu or driver bug. But it is strange that it works fine when running the games natively, so it should be possible to get OK audio when streaming as well, I guess.
I happen to get the exact same audio issue in Google Chrome, but not in e.g. Firefox or XBMC, so it seems it depends on the software delivering the audio.
Curiously, the issue is fixed in Chrome by launching it with "--audio-buffer-size=2048". Could this be a hint on how to fix it for in-home streaming? Some kind of audio buffer setting?

Example of cross-platform game with the issue: Hotline Miami
Several other games also have the problem. I have yet to find a game which streams with OK audio to this client.

Server:
OS: Windows 7

Client:
OS: Ubuntu 12.04
Motherboard/GPU: ASRock 880GMH with on-board Radeon HD4250
GPU driver: Attempted both open-source Radeon driver and proprietary fglrx.
CPU: AMD Athlon II X2 250 Dual Core, 3.0Ghz


EDIT:
I guess it could also simply be due to the CPU being overburdened by the software decoding, and thus unable to fill the audio buffer properly. But possibly not if the decoding is single-thread, since the CPU is dual-core?
Last edited by ezkill; Feb 19, 2014 @ 7:15am
< >
Showing 1-11 of 11 comments
SCUZNUTS Feb 21, 2014 @ 3:43am 
Try this...
I did this on SteamOS and has pretty much 'fixed' my audio issues with tearing/static.
Tested with Bioshock Infinate and Saints Row 4.

Run from terminal;
(This will prompt for root password, if you have not set your password, type 'passwd' into terminal and set it).

sudo nano /etc/pulse/daemon.conf

Now comb through the lines, matching the below, updating the values and uncommenting them - remove the ';'

high-priority = no
nice-level = -1
realtime-scheduling = yes
realtime-priority = 5
flat-volumes = no
resample-method = speex-float-1
default-sample-rate = 48000

Ctrl+X - to exit
Y - to save changes
Enter - to save as same file name

Go into SteamOS - Restart PC.

Test out games.
ezkill Feb 21, 2014 @ 7:52am 
Sorry, didn't notice any difference after doing that.
DrLinny Feb 21, 2014 @ 2:47pm 
me either
Caelor Feb 22, 2014 @ 12:42pm 
I'm also noticing crackly/static-y (and tinny) audio with recent client updates. This is on an Ubuntu 12.04 system using HDMI on nVidia graphics and proprietary drivers - it may not be AMD related...

Update: Forcing PulseAudio's samplerate to 48000 has resolved it for me. (default-sample-rate = 48000 in /etc/pulse/daemon.conf)
Last edited by Caelor; Feb 22, 2014 @ 12:47pm
Dr. Allcome Feb 24, 2014 @ 9:39am 
I have the same problem on Ubuntu 12.04 using Nvidia HDMI audio. It should not be a resource problem, as I have GigaBit LAN and my CPU is only 30% saturated when streaming.

When using PulseAudio the problem sometimes does not occur at all and sometimes it is so bad that the audio gets completely distorted. Once the problem occurs, the only way to get rid of it again is to restart the game. Setting the sample rate to 48kHz did not make any difference for me.

When using plain ALSA the crackling is always present but a lot less than with PulseAudio.
Dr. Allcome Feb 24, 2014 @ 2:37pm 
I was able to fix the problem when using plain ALSA, by reverting "period_time", "period_size", "buffer_time" and "buffer_size" to their default values in my asoundrc. I had set some non default values there to increase the buffer sizes. However, it seems these values cause some trouble when streaming games with Steam.
Dr. Allcome Feb 27, 2014 @ 10:55am 
Unfortunately it turned out that reverting the buffer sizes to their default values did not fix the problem completely. The stuttering is still there, only far less noticable.

I now completely removed the dmixer plugin from my ALSA plugin chain and this seems to fix the problem. However, without the dmixer plugin, only one application can access the ALSA sound device at any given time. So it's not a perfect solution but one that works for now.
Dr. Allcome Mar 1, 2014 @ 2:52pm 
Well, again the problem was not fixed. I now upgraded ALSA, the NVidia driver and even the kernel to the lates LTS Saucy kernel, but in the end this has to be a simple buffer underun problem. There is simply not enough audio data available.

With some instructions on the Mint forum I was able to tune my PulseAudio fragment size to the maximum my card supports (only 20 msec): http://forums.linuxmint.com/viewtopic.php?f=42&t=44862

This way I was able to get rid of the problem as long as I do not display the streaming stats. When displaying the streaming stats (F6), the streaming client seems to switch to vsync and I get audio stuttering again. I can see that vsync is on when displaying the streaming stats because then i only get either 30 or 60 fps. When disabling streaming stats I get all kind of frame rates which are in between 30 and 60 - and more importantely, no audio stuttering.
Danger de Mort Jun 21, 2014 @ 3:39pm 
I was experiencing the same audio static issues when using In-Home Streaming from a Windows 7 PC to a AMD-powered Dell Zino running Ubuntu 14.04. I tried a number of recommendations, both from here and in other threads specific to In-Home Streaming, but the only fix that worked for me was a suggestion found in discussion about a similar bug[github.com] in SteamOS.

In short, open Terminal and do this:

sudo nano /etc/pulse/default.pa

Look for this line:

load-module module-udev-detect

Change it to this:

load-module module-udev-detect tsched=0

Press Ctrl - X to exit, then Y to save your changes, and Enter to save to the same file. Restart your computer and see how it works!
Last edited by Danger de Mort; Jun 21, 2014 @ 3:40pm
jcsthebomb Nov 7, 2014 @ 8:00am 
Just thought I would confirm the suggestion from samuelfine was both the easiest and most effective solution thus far for me. AMD APU A10-7850K, Ubuntu 14.04.1, latest Steam client.

Big Picture gives me the most trouble. It pops every 30 seconds or so, which is a huge improvement over every single time you take any action and get that nasty crackle.

When playing Borderlands 2, the crackle only happens every few minutes, and it's not very severe at all, but still noticeable.

While better, it is NOT totally fixed, and all of the threads I have seen so far don't TOTALLY fix it. Oh well, hopefully this is one thing that time and attention will eventually fix.
Mio Rin Jan 23, 2015 @ 10:39am 
I have that issue as well when streaming from a linux machine to another linux machine. I'm gonna try samuelfine's solution/workaround, and see if it works...



[Update] It worked for me. :D
Also, you don't really need to restart the whole computer for the changes to take effect.
Restarting pulseaudio is enough.
Do:
pulseaudio -k
to kill it, followed by
pulseaudio --start
to make sure it gets back up (does nothing if it's already up).
[/update]


Have Fun! :D
Z.
Last edited by Mio Rin; Feb 15, 2015 @ 8:29pm
< >
Showing 1-11 of 11 comments
Per page: 1530 50

All Discussions > Bug Reports > Topic Details
Date Posted: Feb 18, 2014 @ 10:43am
Posts: 11