ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.18k stars 173 forks source link

[Bug] Microphone/Audio crackly on voice chat (inbound and outbound) #6747

Open BloodyIron opened 4 years ago

BloodyIron commented 4 years ago

I'll post my Steam Information in a reply.

When I use STEAM voice chat, the output (speakers/headphones) and input (microphone) is crackly.

It crackles when I hear what other people are saying, and when people listen to what I say into my mic, they say that's crackly too (or breaks up).

When I use other VoIP tools, like Riot.im or Discord, I do not get the same issue.

This has been persistent for many months now, and I'm very confident this is a STEAM bug. This has also persisted across different hardware and major versions of Ubuntu, for me.

BloodyIron commented 4 years ago
System Information

``` Computer Information: Manufacturer: Unknown Model: Unknown Form Factor: Desktop No Touch Input Detected Processor Information: CPU Vendor: AuthenticAMD CPU Brand: AMD Ryzen 5 2600 Six-Core Processor CPU Family: 0x17 CPU Model: 0x8 CPU Stepping: 0x2 CPU Type: 0x0 Speed: 3400 Mhz 12 logical processors 6 physical processors HyperThreading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Supported SSE41: Supported SSE42: Supported AES: Supported AVX: Supported AVX2: Unsupported AVX512F: Unsupported AVX512PF: Unsupported AVX512ER: Unsupported AVX512CD: Unsupported AVX512VNNI: Unsupported SHA: Unsupported CMPXCHG16B: Supported LAHF/SAHF: Supported PrefetchW: Unsupported Operating System Version: Ubuntu 19.10 (64 bit) Kernel Name: Linux Kernel Version: 5.3.0-24-generic X Server Vendor: The X.Org Foundation X Server Release: 12005000 X Window Manager: GNOME Shell Steam Runtime Version: steam-runtime_0.20191119.3 Video Card: Driver: X.Org Radeon RX 580 Series (POLARIS10, DRM 3.33.0, 5.3.0-24-generic, LLVM 9.0.0) Driver Version: 4.5 (Compatibility Profile) Mesa 19.2.1 OpenGL Version: 4.5 Desktop Color Depth: 24 bits per pixel Monitor Refresh Rate: 119 Hz VendorID: 0x1002 DeviceID: 0x67df Revision Not Detected Number of Monitors: 2 Number of Logical Video Cards: 1 Primary Display Resolution: 1920 x 1080 Desktop Resolution: 3840 x 1080 Primary Display Size: 20.51" x 11.54" (23.50" diag) 52.1cm x 29.3cm (59.7cm diag) Primary VRAM: 8192 MB Sound card: Audio device: ATI R6xx HDMI Memory: RAM: 32110 Mb Miscellaneous: UI Language: English LANG: en_CA.UTF-8 Total Hard Disk Space Available: 468426 Mb Largest Free Hard Disk Block: 125674 Mb VR Headset: None detected Steam Linux Runtime Information: { "can-write-uinput" : true, "steam-installation" : { "path" : "/home/bloodyiron/.steam", "data_path" : "/home/bloodyiron/.steam/steam", "issues" : [ "dot-steam-steam-not-symlink" ] }, "runtime" : { "path" : "/home/bloodyiron/.steam/ubuntu12_32/steam-runtime", "version" : "0.20191119.3", "issues" : [ ], "pinned_libs_32" : { "list" : [ " 21233672 4 drwxr-xr-x 2 bloodyiron bloodyiron 4096 Nov 26 14:35 pinned_libs_32", " 21233848 0 -rw-r--r-- 1 bloodyiron bloodyiron 0 Nov 26 14:35 pinned_libs_32/has_pins", " 21233862 4 -rw-r--r-- 1 bloodyiron bloodyiron 76 Nov 26 14:35 pinned_libs_32/system_libGLU.so.1", " 21233861 4 lrwxrwxrwx 1 bloodyiron bloodyiron 92 Nov 26 14:35 pinned_libs_32/libGLU.so.1 -> /home/bloodyiron/.steam/ubuntu12_32/steam-runtime/usr/lib/i386-linux-gnu/libGLU.so.1.3.08004", " 21233846 4 lrwxrwxrwx 1 bloodyiron bloodyiron 87 Nov 26 14:35 pinned_libs_32/libdbus-1.so.3 -> /home/bloodyiron/.steam/ubuntu12_32/steam-runtime/lib/i386-linux-gnu/libdbus-1.so.3.5.8", " 21233847 4 -rw-r--r-- 1 bloodyiron bloodyiron 76 Nov 26 14:35 pinned_libs_32/system_libdbus-1.so.3" ] }, "pinned_libs_64" : { "list" : [ " 21233845 4 drwxr-xr-x 2 bloodyiron bloodyiron 4096 Nov 26 14:36 pinned_libs_64", " 21233851 0 -rw-r--r-- 1 bloodyiron bloodyiron 0 Nov 26 14:35 pinned_libs_64/has_pins", " 21233849 4 lrwxrwxrwx 1 bloodyiron bloodyiron 100 Nov 26 14:35 pinned_libs_64/libpangox-1.0.so.0 -> /home/bloodyiron/.steam/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libpangox-1.0.so.0.3000.0", " 21233857 4 -rw-r--r-- 1 bloodyiron bloodyiron 101 Nov 26 14:35 pinned_libs_64/system_libdbusmenu-glib.so.4", " 21233853 4 -rw-r--r-- 1 bloodyiron bloodyiron 80 Nov 26 14:35 pinned_libs_64/system_libGLU.so.1", " 21233852 4 lrwxrwxrwx 1 bloodyiron bloodyiron 94 Nov 26 14:35 pinned_libs_64/libGLU.so.1 -> /home/bloodyiron/.steam/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libGLU.so.1.3.08004", " 21233854 4 lrwxrwxrwx 1 bloodyiron bloodyiron 100 Nov 26 14:35 pinned_libs_64/libdbusmenu-gtk.so.4 -> /home/bloodyiron/.steam/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libdbusmenu-gtk.so.4.0.13", " 21233850 4 -rw-r--r-- 1 bloodyiron bloodyiron 94 Nov 26 14:35 pinned_libs_64/system_libpangox-1.0.so.0", " 21233863 0 lrwxrwxrwx 1 bloodyiron bloodyiron 12 Nov 26 14:36 pinned_libs_64/libcurl.so.3 -> libcurl.so.4", " 21233860 4 -rw-r--r-- 1 bloodyiron bloodyiron 82 Nov 26 14:35 pinned_libs_64/system_libcurl.so.4", " 21233855 4 -rw-r--r-- 1 bloodyiron bloodyiron 99 Nov 26 14:35 pinned_libs_64/system_libdbusmenu-gtk.so.4", " 21233856 4 lrwxrwxrwx 1 bloodyiron bloodyiron 101 Nov 26 14:35 pinned_libs_64/libdbusmenu-glib.so.4 -> /home/bloodyiron/.steam/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libdbusmenu-glib.so.4.0.13", " 21233858 4 lrwxrwxrwx 1 bloodyiron bloodyiron 91 Nov 26 14:35 pinned_libs_64/libcurl.so.4 -> /home/bloodyiron/.steam/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libcurl.so.4.2.0" ] } }, "os-release" : { "id" : "ubuntu", "id_like" : [ "debian" ], "name" : "Ubuntu", "pretty_name" : "Ubuntu 19.10", "version_id" : "19.10", "version_codename" : "eoan" }, "architectures" : { "i386-linux-gnu" : { "can-run" : true, "library-issues-summary" : [ ], "graphics-details" : { "x11/vulkan" : { "messages" : "ERROR: [Loader Message] Code 0 : /usr/lib/x86_64-linux-gnu/libvulkan_intel.so: wrong ELF class: ELFCLASS64\nERROR: [Loader Message] Code 0 : /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so: wrong ELF class: ELFCLASS64\nXlib: extension \"NV-GLX\" missing on display \":0\".\n/usr/src/packages/BUILD/demos/vulkaninfo.c:3141: failed with VK_ERROR_INITIALIZATION_FAILED\n", "renderer" : null, "version" : null, "issues" : [ "cannot-load" ] }, "glx/gl" : { "renderer" : "Radeon RX 580 Series (POLARIS10, DRM 3.33.0, 5.3.0-24-generic, LLVM 9.0.0)", "version" : "4.5 (Compatibility Profile) Mesa 19.2.1" }, "egl_x11/gl" : { "messages" : "Waffle error: 0x1 WAFFLE_ERROR_FATAL: dlopen(\"libEGL.so.1\") failed: libEGL.so.1: wrong ELF class: ELFCLASS64\n", "renderer" : null, "version" : null, "issues" : [ "cannot-load" ] }, "egl_x11/glesv2" : { "messages" : "Waffle error: 0x1 WAFFLE_ERROR_FATAL: dlopen(\"libEGL.so.1\") failed: libEGL.so.1: wrong ELF class: ELFCLASS64\n", "renderer" : null, "version" : null, "issues" : [ "cannot-load" ] } } }, "x86_64-linux-gnu" : { "can-run" : true, "library-issues-summary" : [ ], "graphics-details" : { "x11/vulkan" : { "messages" : "Xlib: extension \"NV-GLX\" missing on display \":0\".\n", "renderer" : "AMD RADV POLARIS10 (LLVM 9.0.0)", "version" : "1.1.107 (device 1002:67df) (driver 19.2.1)" }, "glx/gl" : { "renderer" : "Radeon RX 580 Series (POLARIS10, DRM 3.33.0, 5.3.0-24-generic, LLVM 9.0.0)", "version" : "4.5 (Compatibility Profile) Mesa 19.2.1" }, "egl_x11/gl" : { "renderer" : "Radeon RX 580 Series (POLARIS10, DRM 3.33.0, 5.3.0-24-generic, LLVM 9.0.0)", "version" : "4.5 (Compatibility Profile) Mesa 19.2.1" }, "egl_x11/glesv2" : { "renderer" : "Radeon RX 580 Series (POLARIS10, DRM 3.33.0, 5.3.0-24-generic, LLVM 9.0.0)", "version" : "OpenGL ES 3.2 Mesa 19.2.1" } } } }, "locale-issues" : [ ], "locales" : { "" : { "resulting-name" : "en_CA.UTF-8", "charset" : "UTF-8", "is_utf8" : true }, "C" : { "resulting-name" : "C", "charset" : "ANSI_X3.4-1968", "is_utf8" : false }, "C.UTF-8" : { "resulting-name" : "C.UTF-8", "charset" : "UTF-8", "is_utf8" : true }, "en_US.UTF-8" : { "resulting-name" : "en_US.UTF-8", "charset" : "UTF-8", "is_utf8" : true } }, "egl" : { "icds" : [ { "json_path" : "/usr/share/glvnd/egl_vendor.d/10_nvidia.json", "library_path" : "libEGL_nvidia.so.0" }, { "json_path" : "/usr/share/glvnd/egl_vendor.d/50_mesa.json", "library_path" : "libEGL_mesa.so.0" } ] }, "vulkan" : { "icds" : [ { "json_path" : "/usr/share/vulkan/icd.d/intel_icd.x86_64.json", "library_path" : "/usr/lib/x86_64-linux-gnu/libvulkan_intel.so", "api_version" : "1.1.102" }, { "json_path" : "/usr/share/vulkan/icd.d/nvidia_icd.json", "library_path" : "libGLX_nvidia.so.0", "api_version" : "1.1.99" }, { "json_path" : "/usr/share/vulkan/icd.d/radeon_icd.x86_64.json", "library_path" : "/usr/lib/x86_64-linux-gnu/libvulkan_radeon.so", "api_version" : "1.1.107" } ] } } The Steam Linux Runtime container tool is not installed. ```

arrowgent commented 4 years ago

whats your ISP & download/upload speed? do you have good PING to a local steam server? is your steam server configured in settings?

i dont doubt its possibly a steam issue if discord etc works fine

BloodyIron commented 4 years ago

lol VoIP uses ~64kbps in both directions, even if STEAM uses double that, bandwidth will never be a problem. But, just to be clear, 300mbps down, 15mbps up.

Yes I have good ping and routing to STEAM servers.

The STEAM server configuration is just for downloading of content, not VoIP (which is P2P btw).

Ruedii commented 4 years ago

This sounds like an issue with buffer underruns along the audio pathway somewhere.

Could it be PulseAudio related?

As a note, I've experienced the same issue. I'm going to try increasing my PulseAudio buffer size later, and see if that fixes it.

Myrddin-Wyllt commented 4 years ago

I'm experiencing the same issue using a 3.5mm analog headset on Manjaro; as for whether Pulseaudio is to blame, I have verified the microphone works correctly using arecord & aplay. There is no echo crackling or other distortions when recording outside of Steam in my testing.

When loading the Pulseaudio loopback-module, a light echo can be heard & audio output is delayed by ~200ms; but these are bugs specific to the loopback-module & largely unrelated to Steam's distortions. Testing ALSA directly by disabling Pulseaudio, the loopback function doesn't have any delay, & the echo isn't there (but Steam still suffers from this regardless). Recording with Pulseaudio doesn't produce the echo observed from the loopback-module as evidenced with Kwave.

Voice logs/ALSA info will be provided if requested/needed. There is more to this than the microphone though; notification sounds from Steam sound like they're from a blender filled with gravel (separate issue; cause/solution at bottom).

No other software on my system suffers from Steam's unique audio distortions (i.e., echo, crackling, noise, muddy); L4D2 voice chat in-game sounds better than Steam's current chat implementation (but it still sounds noisy/muddy, just no horrible echo). Echo is terrible regardless of settings in Steam chat; turning off "Noise Cancellation" helped modestly with overall sound quality. At times, the echo & distortions will lead to a cochlea-destroying feedback loop. Other advanced settings managed to make it worse than stock behavior. I should mention that the issue is most prominent when gain is above 50%.

Failed Attempts:

This issue also affects my laptop which uses a different codec (i.e., ALC255 I believe) when using the internal microphone through steam. This isn't specific to ALC1220 codecs.

Since this issue is affecting more than specifically Ubuntu, I'd advise removing the Distro Family label.

Additionally, the distortion from Steam's audio notifications is caused by Pulseaudio in some fashion; ALSA direct (i.e., with Pulseaudio disabled) had no garbled notification sounds.

System Specs: inxi & Steam

Ruedii commented 4 years ago

I've been running into this issue as well. I found simply opening the chat in the browser window addresses the issue, so it's definitely specific to the steam client.

It would be nice to be able to use the more lightweight Steam client, since games don't like running along side scalable memory footprint programs like web browsers, and don't know how to cue them to reduce their memory footprint.

jeffkeller87 commented 4 years ago

I found simply opening the chat in the browser window addresses the issue, so it's definitely specific to the steam client.

@Ruedii how does one do this? I frequently use the Steam voice chat and am looking for a workaround.

CodyRude commented 4 years ago

I see this in Arch, so it definitely isn't just Ubuntu. Discord and Mumble also work for me, so it isn't that.

I saw in my steam log errors that may be relevant:

[0328/202629.749683:WARNING:push_pull_fifo.cc(191)] PushPullFIFO: underflow while pulling (underflowCount=100, availableFrames=0, requestedFrames=512, fifoLength=12288)
[0328/210117.537644:WARNING:sync_reader.cc(170)] ASR: No room in socket buffer.: Broken pipe (32)
[0328/210117.538339:WARNING:input_sync_writer.cc(366)] AISW: No room in socket buffer.: Broken pipe (32)

I noticed in pavucontrol that steam voice chat shows up as chromium, so I'm guessing it is based on chromium. When I googled the PushPullFIFO error I stumbled upon this chromium bug that affects linux and mac: https://bugs.chromium.org/p/chromium/issues/detail?id=801685

mercuriete commented 4 years ago

i'm having the same problem on Gentoo. I supose this bug is not distro specific.

Failed Attempts:

karelfridrich commented 4 years ago

Mint 19.3, kernel 5.3.x and 5.6.11 + Ryzen 5 3600, B450, rx580 and sound card is USB headset (C-Media Multimedia Headset). Happens every time I play with friends :( Same as others, only Steam chat is affected, every other application I use works just fine.

BloodyIron commented 4 years ago

Can we get some VALVe involvement here already?

XakepSDK commented 4 years ago

Happens on windows too, when linux user speaks with windows user. My input and output crackles, windows user hears crackles too.

baraclese commented 4 years ago

I created a new user in linux and discovered that it does not show the problem. I haven't found out which file or setting in my user profile is responsible yet.

mercuriete commented 4 years ago

can confim what @XakepSDK says: When I from Gentoo speak to Windows user, the input is recorded with crackles and the windows user complaint about my microphone. So not only the ouputs is cracking but the input as well.

baraclese commented 4 years ago

Ok, after some more testing I discovered some new information. I'm using pulseaudio with unmodified default configs in /etc/pulse. In gnome-control-center I have my input device set to my webcam mic and the output device set to my analog headphone. In steam I have the input device set as 'default'. If I set the output device as 'default' then the sound crackles. If however I set the output device directly for my analog headphone then in the steam microphone test my voice starts out a low pitch with crackles but after 30 seconds the pitch normalizes and the crackling stops.

AI0867 commented 4 years ago

Also have this bug on Gentoo. Both input and output crackle.

ZiLot34 commented 4 years ago

Hello. I'm gonna add my contribution to this bug and confirming a temporary fix.

System details : https://pastebin.com/TW2xGKQ4 Microphone is a Jabra UC VOICE 550 MS USB Using pulseaudio

I have the same artifact issue on Steam. This bug do not exist with other software (sound recorder or mumble). It's not a connection issue.

As @baraclese said, I tried, and it actually works. Going into options, changing default to the actual device you use both for input and output remove artifacts. There are still some of them tho. Not a lot but that's definitively a Steam client issue that should be fixed

mercuriete commented 4 years ago

Can confirm that @baraclese workaround the crackling is reduced a little bit but in my case it is still very perceptible.

EDIT: I tried to move the gain sliders and the problem is almost gone. don't know what I did because It is not very reproducible. moving randomly the gain sliders make steam to work temporary. hope somebody can replicate what i did because I am becoming crazy lol xD.

mercuriete commented 4 years ago

I just setup jackaudio with jacksink pulseaudio plugin and the problem is fixed.

I figured out somewhere in this thread: https://askubuntu.com/questions/572120/how-to-use-jack-and-pulseaudio-alsa-at-the-same-time-on-the-same-audio-device

Its counterintuitive that pulseaudio on top of jack has better latency than just pulseaudio by itself.

I had the same problem with Dirt Rally linux native game. The game have huge audio stutter (and audio latency) but for me is fixed using jackaudio pulse sink and jack audio pulse source.

This is of course not a fix but a workaround but al least I can play with my friends.

I hope valve will fix the audio drop outs.

So:

Failed Attempts:

Succeeded Attempts:

BloodyIron commented 4 years ago

I honestly don't know why VALVe is taking so long to fix a bug like this. It's just so bad that I don't even use STEAM voice any more at all and haven't done so for months. This is completely unusable.

mercuriete commented 4 years ago

@kisak-valve If I reproduce this bug on a SteamOS Virtual Machine this ticket will get more priority?

I am willing to help but I don't know where is the documentation for ticket priority.

This ticket affects 100% of Linux users so for my point of view is P1.

I would appreciate if you share what are the rules for creating QA environments and what are the correlation between valve's priority list and user's impact.

Thanks for doing such a great product, we can make better together. :smiling_face_with_three_hearts:

kisak-valve commented 4 years ago

Hello @mercuriete, friendly note that I'm a moderator helping out on Valve's Github issue trackers and not a Valve dev myself. I don't have any greater influence on what issues Valve devs prioritize at any given time.

mercuriete commented 4 years ago

ok, thanks for your work anyways :+1: I will try to reproduce in more computers than my main rig.

BloodyIron commented 4 years ago

@kisak-valve your work is most definitely appreciated! In all the GitHub and otherwise stuff!

MerkaST commented 4 years ago

I can confirm this issue with an analogue microphone under Lubuntu 20.04 on an MSI B350 Tomahawk motherboard. I tried several of the pulseaudio settings to no avail, but @baraclese's workaround works for me as well. However as opposed to https://github.com/ValveSoftware/steam-for-linux/issues/6747#issuecomment-641242898, only the output had an influence. Changing the input did nothing.

Oxalin commented 3 years ago

@kisak-valve I don't know if the "Distro Family: Ubuntu" tag is needed, since this bug is not limited to Ubuntu, since it is also reported on ArchLinux (as it is for me).

Oxalin commented 3 years ago

Here is my summary: I'm using ArchLinux mostly, but I switch to Windows from time to time. This bug as appeared somewhere in the last year (it could be more, I hadn't played with others in a long time since the birth of my child). At first, I tought it was related to something between my Link and my PC, until I had time to play a bit more. Then I realized that I was having two issues. One with the mic/audio (this one) and one between my Steam Link and my PC (issue #6749).

The issue I hear and that is heard at the other side (I play with my brother who is on Windows) is a crackle, as if the stream was hitting the end of every audio chunk sooner than expected, giving a choppy result (imagine an audio stream that would pass on a chop board). As many, I've tried using the runtime libraries and the native libraries to no improvement.

Using the same setup under Windows works without any mic/audio issue.

Is there an audio bot we can test against? And is there any way to downgrade Steam Client to a previous version and to help find out when the bug appeared (I would suggest to bissect the code, but I think downgrading far enough and moving foward is the closest thing we can do in a closed source program).

If I can test anything or provide any log, let me know.

MerkaST commented 3 years ago

@Oxalin I don't know of an audio bot, but using the microphone test function plays your audio back to you and I at least had the impression that it includes the crackling and reduction thereof when using the workaround mentioned above.

XakepSDK commented 3 years ago

I have installed pipewrite pulseaudio and configured it like said here; no cracking sound; no audio or voice in 32bit games btw https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1205017-pipewire-is-in-increasingly-great-shape-ready-for-more-user-testing?p=1205063#post1205063

H8to commented 3 years ago

I experience the same stuttering issues with Steam voice and csgo. A lot of steam games work without issues though. Using the pipewire drop in replacement for pulseaudio. Also tried with pulseaudio itself, but the crackling for incoming and outgoing sounds as well as audio in some games keep crackling.

Wenzel commented 3 years ago

I'm experiencing the same issue, however I was able to play online and have a conversation for a good 20 minutes before the sound suddenly started crackling for no reason.

BloodyIron commented 3 years ago

Yeah I still get this, and I have just flat out stopped using STEAM Voice completely. It's completely unreliable and just sounds like garbage.

buckwangs commented 3 years ago

I tried for a while to get people to join my Steam Group voice chat Vs jumping into Mumble (perfect) or Discord (perfect) but due to audio sounding choppy both in and out, it's a no go. Steam is up to date on Manjaro and even the bios is updated but Steam voice is truly clearly broken.

When voice works in L4D2, it works fine. But voice chat in Steam is broken and has been for a while now.

mjsir911 commented 3 years ago

The fix outlined here applied to /etc/pulse/daemon.conf fixed this issue for me.

BloodyIron commented 3 years ago

Well that might work, but users shouldn't have to fix pulseaudio daemon config parameters just to be able to use VoIP on STEAM. Especially when every other single VoIP program already works fine on Linux.

This is a VALVe problem.

Charadon commented 2 years ago

Just going to say that this is still a problem.

Though interestingly enough, this problem goes away if I use pipewire instead of pulseaudio. And I have no idea why.

mercuriete commented 2 years ago

@Charadon since I instaled pipewire I didn't notice any audio crackling anymore. But to be honest.. I didn't use Steam for audio chat but discord instead. I hope pipewire helps for you.

Charadon commented 2 years ago

Issue is, most static distributions either don't use pipewire, support an older version of pipewire, or support using pipewire but it's a pain to get running. And I personally still use pulseaudio as applications like OBS were giving me issues when using pipewire, so I went back to pulseaudio. Steam was really the only application that benfitted from using pipewire.

BloodyIron commented 2 years ago

Wait, this is still broken? What a joke. This is the ONLY VoIP program I have ever seen to have this issue. And I'm losing track of how many VoIP apps I use or have used.

Charadon commented 2 years ago

Wait, this is still broken? What a joke. This is the ONLY VoIP program I have ever seen to have this issue. And I'm losing track of how many VoIP apps I use or have used.

And the weird part, is that barely anyone talks about it. Do that few people actually use the steam chat feature?

mercuriete commented 2 years ago

@Charadon off-topic... OBS have Jack audio inputs. You need to go to settings and disable all pulseaudio inputs and then add 2 or more Jack audio inputs (on another place not settings) It will appear on qjackctl using pipewire. Then you have to route the mic to one OBS jack input and the monitor of your default sound card to another OBS Jack input. So off-topic but TLDR; pipewire is good with OBS.

BloodyIron commented 2 years ago

Wait, this is still broken? What a joke. This is the ONLY VoIP program I have ever seen to have this issue. And I'm losing track of how many VoIP apps I use or have used.

And the weird part, is that barely anyone talks about it. Do that few people actually use the steam chat feature?

I would say very few people use the voice aspect of STEAM chat. I for one gave up years ago because of this crackling, I just don't have time waiting around for a problem to be fixed that shouldn't have existed in the first place.

minisori commented 2 years ago

I confirm the bug on Debiean, i thought this was solved time ago. I also confirm that changing from default audio input and output on steam chat improves the sound a bit, but still alot of distortion and crackly.

Charadon commented 2 years ago

I think a good way of figuring this out what's causing this, is to provide what our /etc/pulse/ config files are. So here's mine:

client.conf.txt daemon.conf.txt default.pa.txt system.pa.txt

Since github doesn't allow uploading .conf files, you'll have to add .txt to the end of their names. I made a handy shell command to do this.

cd /etc/pulse
for i in ./*; do
    cat $i > $HOME/$i.txt
done

Then the outputted .txt files will be in your home folder.

Maybe someone will show up where they don't have this problem, and we can compare our pulseaudio config files and figure out what's different.

Rainyan commented 2 years ago

The way I solved this for my particular setup (OpenSUSE, generic USB microphone), in case this is helpful to someone else stumbling upon this: I noticed a significant reduction of the mic crackle rate when changing my PulseAudio config value default-sample-rate from 48000 to 44100. The remaining (now much less frequent) crackles disappeared entirely when I adjusted my buffer size, in my case default-fragments from 2 to 3, and default-fragment-size-msec from 25 to 17. This gives me a total audio latency of 3*17=51 ms. But these values probably depend on your particular sound card setup.

I suspect you could achieve the same with an even higher sample rate, using a larger buffer, but in my case this introduced unacceptably high audio latency, so I went with the lower sample rate.

To test these changes (for CS:GO/Source engine at least, as this was my use case), run a local map with voice_loopback 1, and whenever you restart PA, do a snd_restart (requires sv_cheats 1, at least in the CS:GO engine) in the game console to restart the game's internal sound system.

Anecdotally, in case it's relevant, I'm also using a realtime kernel patchset with appropriate PA config settings because of other music related stuff I use the PC for, but I highly doubt this is necessary/relevant at all for the vast majority of use cases; the sample rate + buffer size (not only fragment size, but num. fragments as well) seem like the much more likely culprits.

topas-rec commented 1 year ago

Another experience: Restarting steam client fixes the issue for some time (5 Minutes or so in my case)

Fr0zone commented 1 year ago

I had a new headset (Corsair hs65 Surround) and noticed this problem on my main computer, I tried the headset on my steam deck and it seemed to be fine. I ran pactl info on the deck and my Main (Manjaro with pulseaudio, no pipewire).
My main was running s16le for default sampling, the steamdeck was using float32le with pulseaudio on pipewire. I switched my main to (or was defaulted to float32le 48000 after switching to pulseaudio on pipewire)

default-sample-format = float32le
default-sample-rate = 48000

in /etc/pulse/daemon.conf and swapped to pulseaudio on pipewire by installing the manjaro-pipewire meta package

Not sure if switching to pulseaudio on pipewire was strictly necessary for this fix, I don't remember if I tried my headset with float32le before swapping to pulseaudio on pipewire but this issue seems to be fixed (but requires further testing) which I will do in one of my next chat sessions with buddies.

I had previously tested switching pulseaudio with default-sample-rate = 48000 and 44100 without restarting but using

pulseaudio -k 
pulseaudio --start

and tried setting

default-fragments = 5
default-fragment-size-msec = 2

as was suggested in this steam topic

mjsir911 The fix outlined here applied to /etc/pulse/daemon.conf fixed this issue for me.

chinoto commented 11 months ago

I tried screwing around with pulseaudio like many others to no avail. Switching to PipeWire a while back with a simple sudo zypper in pipewire-pulseaudio (openSUSE) and possibly rebooting was all it took to have clear voice chat. I've also found that my bluetooth headphones have less issue connecting properly (either failing entirely or using HSP/HFP instead of A2DP).

Charadon commented 11 months ago

I tried screwing around with pulseaudio like many others to no avail. Switching to PipeWire a while back with a simple sudo zypper in pipewire-pulseaudio (openSUSE) and possibly rebooting was all it took to have clear voice chat. I've also found that my bluetooth headphones have less issue connecting properly (either failing entirely or using HSP/HFP instead of A2DP).

Oh lord, this is still an issue on steam? I mean, it's a good thing pipewire has swooped in to save the day, but it's ridiculous that a bug I could reproduce on literally every device i've ever owned was never fixed by valve themselves.

chinoto commented 11 months ago

It may actually be an issue with pulseaudio that no one has ever tried to fix directly, instead opting to workaround it within their own apps or happening to not trigger it in the first place.

Doom Eternal would sometimes crackle with pulseaudio and the only workaround I found was to restart the game until it happened to not crackle. I have not played Doom Eternal much after installing PipeWire to know if this intermittent issue is still ever present, but I just launched it a couple times and there was no crackle. This might still be blamed on Steam though since it is launching the game.