You are not logged in.

#1 2015-12-07 21:07:48

WDPK83.7FM
Member
Registered: 2015-12-04
Posts: 7

[SOLVED] Some Steam games have extremely distorted music and/or sound.

Hi, I've managed to get pretty far into Arch Linux by just using the wiki but I've run into an issue which I haven't be able to resolve for the last couple of days. As the title says some games have extremely distorted sound. Some examples being The Fall and Planetary Annihilation (both of which are running nativley). I'm using pulseaudio and ALSA for my sound and the vast majority of games work but these seem to appear on my volume control panel and suddenly dissapear in an instant which is followed by the distorted sound. There are some games that seem to have 'some' of this issue too as games like Robocraft and OpenTTD often have the same scratchy sound for a few seconds and then return to normal audio quite frequently.

I'm using a USB headset and I've tried various fixes I've seen on various forums (and of course on the Wiki) but they seem to have no effect on my issue which leads me to beleive that this is probobly a simple fix as I've probobly left something out during my installation as I've tried all of these games on other distributions and they've worked fine. I'm running the 64-bit version of Arch Linux with XFCE4 as my primary desktop enviroment, I'm not sure what other information you might need (I'm totally new to the world of Arch Linux) so please don't hesitate to ask away.

Since this issue is hard to explain I'll leave this video here:
https://www.youtube.com/watch?v=1HDWcuxyS7M

Last edited by WDPK83.7FM (2015-12-13 10:21:52)

Offline

#2 2015-12-10 18:14:41

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

I can't listen your video right now so I can't tell exactly what's wrong, but I think I know what you're talking about anyway.  There are a couple possible causes of this:
The first is CPU usage.  I've found some sound cards/adapters tend to have playback issues once CPU usage gets maxed out.  I'm not sure if this will actually work, but you could try lowering the "nice" level of pulseaudio using the "renice" command.  I'd avoid going below -5.

The other issue is your USB bandwidth.  Most computers may only have 2 or 3 USB host ports, but all of the rest of your USB ports are actually attached to a hub. It's pretty difficult to figure out which ports are shared by what USB host.  I don't know what other USB devices you have (remember, things like integrated webcams, bluetooth, or SD card readers are usually considered USB devices) but if they're all shared through the same USB host port, your USB headset might be starving for bandwidth.  It's not likely, but it is possible.  Try plugging in the headset to another USB port and see if that helps.

Last edited by schmidtbag (2015-12-10 18:16:19)

Offline

#3 2015-12-10 18:40:23

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

See recent Steam libasound problem.

What I did, to fix it:

rm -rf ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/alsa-lib ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libasound.so*

Offline

#4 2015-12-11 06:49:32

WDPK83.7FM
Member
Registered: 2015-12-04
Posts: 7

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

brebs wrote:

See recent Steam libasound problem.

What I did, to fix it:

rm -rf ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/alsa-lib ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libasound.so*

Just tried this and after I restarted I now only get sound from the right side of my headphones. The distortion is still there too. I have seen similar distortion before on Ubuntu but it only happened with Audacity (it played very fast and had distorted sound).

Edit: Fixed the sound only being on the right, for some reason ALSA set my left audio to 9% after I removed those files.

Last edited by WDPK83.7FM (2015-12-11 06:52:03)

Offline

#5 2015-12-11 07:02:27

WDPK83.7FM
Member
Registered: 2015-12-04
Posts: 7

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

schmidtbag wrote:

I can't listen your video right now so I can't tell exactly what's wrong, but I think I know what you're talking about anyway.  There are a couple possible causes of this:
The first is CPU usage.  I've found some sound cards/adapters tend to have playback issues once CPU usage gets maxed out.  I'm not sure if this will actually work, but you could try lowering the "nice" level of pulseaudio using the "renice" command.  I'd avoid going below -5.

The other issue is your USB bandwidth.  Most computers may only have 2 or 3 USB host ports, but all of the rest of your USB ports are actually attached to a hub. It's pretty difficult to figure out which ports are shared by what USB host.  I don't know what other USB devices you have (remember, things like integrated webcams, bluetooth, or SD card readers are usually considered USB devices) but if they're all shared through the same USB host port, your USB headset might be starving for bandwidth.  It's not likely, but it is possible.  Try plugging in the headset to another USB port and see if that helps.

My CPU usage is usually very low even when starting these games so I doubt that that is the issue and I've tried moving about things in terms of USB devices but that doesn't seem to work (I only have my mouse and my headphones as USB devices). I used the renice command to set the priority level of the Planetary Annihilation process to -5 but the sound remains distorted.

Offline

#6 2015-12-11 14:02:22

schmidtbag
Member
From: NH, USA
Registered: 2011-02-08
Posts: 337

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

Out of curiosity, does this problem happen in Windows, does it happen in different distributions, and does it happen if you plug these headphones into a different computer?

Offline

#7 2015-12-11 15:18:43

WDPK83.7FM
Member
Registered: 2015-12-04
Posts: 7

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

I use to run Xubuntu on this exact same machine (with the same headphones) and the games all had perfect audio. This still happens with speakers too so I doubt that the headphones are the issue. They also work fine on my laptop which is running Elementary OS (based on Ubuntu).

Offline

#8 2015-12-12 10:43:53

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

I know you mentioned the wiki, but not specifically the PulseAudio troubleshooting section:
https://wiki.archlinux.org/index.php/Pu … io_quality

Also, try comparing ALSA and pulse config files between Xubuntu and Arch. It may give you a lead as to what setting might be responsible.

Offline

#9 2015-12-12 16:01:22

WDPK83.7FM
Member
Registered: 2015-12-04
Posts: 7

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

mouseman wrote:

I know you mentioned the wiki, but not specifically the PulseAudio troubleshooting section:
https://wiki.archlinux.org/index.php/Pu … io_quality

Also, try comparing ALSA and pulse config files between Xubuntu and Arch. It may give you a lead as to what setting might be responsible.

I've already been through this page before but I've done a couple of the things it suggests. Adding "load-module module-echo-cancel" to "/etc/pulse/default.pa" has no effect but adding "load-module module-udev-detect tsched=0" to the same file kills my sound entirely. I reset all my pulseaudio configs and did this all again to remove the Dameon startup error and there is still distortion. Also tried alterting my bitrate to 48000 in my pulseaudio config file but and set enable-lfe-remixing to true but none of these had any effect.

I've also noticed that in every application that does this it always eventually fixes itself. For example after playing Planetary Annihilation for thirty minutes it started meracuously working again after the in-game AI decided to speak. However I'm afraid I can't get any information about my previous system with Xubuntu since I no longer have it installed on any of my machines but I can tell you that I didn't alter pulsaudio or ALSA in any way on Xubuntu so it was presumabley just running the default configuration for Pulse and ALSA.

Offline

#10 2015-12-12 16:10:14

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 291

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

You did notice that there already is a load-module module-udev line in default.pa? It is included in a .if .endif block.

When I set it to resample to anything higher than 48000 steam games will distort. I leave it to s16le and 44100, but I do change to soxr-vhq.

Last edited by mouseman (2015-12-12 16:18:04)

Offline

#11 2015-12-12 17:05:32

WDPK83.7FM
Member
Registered: 2015-12-04
Posts: 7

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

mouseman wrote:

You did notice that there already is a load-module module-udev line in default.pa? It is included in a .if .endif block.

When I set it to resample to anything higher than 48000 steam games will distort. I leave it to s16le and 44100, but I do change to soxr-vhq.

Oh sorry didn't see the "load-module module-udev" line, it's there (I need new glasses tongue). Just spent a little bit of time altering bitrates (tried high and lower bitrates. Tried 32000, 44100, 48000 and even 88200!) but there was no change in audio on the games affected. I've now switched my resample method to "soxr-vhq" but that doesn't have any affect either.

Offline

#12 2015-12-12 17:40:40

Durden
Member
Registered: 2011-06-19
Posts: 261

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

nvm

Last edited by Durden (2015-12-12 19:02:28)

Offline

#13 2015-12-12 22:20:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,756

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

USB cards can be finicky since they don't support tsched on a ALSA driver level, therefore setting tsched=0 will not really help you. What should help is calculating the proper fragment sizes as outlined in https://wiki.archlinux.org/index.php/Pu … PulseAudio (Note that in order to kill pulseaudio and prevent pulse from respawning to execute the commands to determine the proper values you should mask the pulseaudio user socket instead of writing autostart = no into client.conf)

systemctl --user mask pulseaudio.socket

soxr resamplers add latency so you "usually" don't want to use them yet unless you don't mind that. Another quick thing to try if that didn't help is to define a hard pulse latency, by starting steam with

PULSE_LATENCY_MSEC=30 #or 60

Last edited by V1del (2015-12-12 22:20:21)

Offline

#14 2015-12-13 10:19:19

WDPK83.7FM
Member
Registered: 2015-12-04
Posts: 7

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

I genuinley cannot beleive I didn't try this, D'oh! So as it turns out I had forgotten that you can unplug my headset from it's USB external soundcard and just run it off of my built-in soundcard on my motherboard which works fine. Although it doesn't actually fix the issue entirely it's good enough for me and the slight step-down in audio quality isn't that jarring. I did try calculating the proper fragment size but it seems like the external soundcard it comes with is just an absoloute mess to try and fix and since I'm new to Arch I decided to opt for my easiest option but nevertheless thanks anyway.

Now if only I could find the marked as solved button...

Last edited by WDPK83.7FM (2015-12-13 10:20:42)

Offline

#15 2016-01-01 08:45:47

killer1804
Member
From: Russia, Zlatoust
Registered: 2010-07-26
Posts: 56

Re: [SOLVED] Some Steam games have extremely distorted music and/or sound.

Thank you very much, after updating my sound disappeared completely in the steam, but thanks to your article the problem was solved.

Offline

Board footer

Powered by FluxBB