Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
I'm not even 100% sure if this is a game bug or not, but it's been absolutely repeatable for loading the game from steam. IF I have another audio source playing (YouTube, twitch, whatever) when the game starts up, the Factorio music will start playing in a very choppy manner, and audio is persistently "broken and choppy" from there on. If I do NOT have another audio source playing, the Factorio game audio is fine, and I can resume playing whatever other audio source as soon as that familiar game starting chime has occurred.
This has only started happening since the 2.0 update, but sadly there is a confounding factor - I upgraded my computer at the same time as 2.0 released, and so it's difficult to absolutely tie it to the 2.0 update, it could easily be something weird about the new computer hardware (though the OS is literally the same from before and after, and nothing else in the OS is complaining).
Metadata:
OS: Debian unstable/sid updated regularly.
Hardware: 9950x and 7900xtx. Audio is actually a USB audio device, split into multiple virtual devices using pipewire, game is configured to use pipewire.
Desktop Env is the dreaded gnome 3 (sorry!) but running on the X11 backend (I was until recently an NVIDIA user)
Attached are two factorio logs - previous had the audio glitch, current did not (I muted other audio sources prior to starting the game for that run as noted above). I do not see any significant difference between them.
This has only started happening since the 2.0 update, but sadly there is a confounding factor - I upgraded my computer at the same time as 2.0 released, and so it's difficult to absolutely tie it to the 2.0 update, it could easily be something weird about the new computer hardware (though the OS is literally the same from before and after, and nothing else in the OS is complaining).
Metadata:
OS: Debian unstable/sid updated regularly.
Hardware: 9950x and 7900xtx. Audio is actually a USB audio device, split into multiple virtual devices using pipewire, game is configured to use pipewire.
Desktop Env is the dreaded gnome 3 (sorry!) but running on the X11 backend (I was until recently an NVIDIA user)
Attached are two factorio logs - previous had the audio glitch, current did not (I muted other audio sources prior to starting the game for that run as noted above). I do not see any significant difference between them.
- Attachments
-
- factorio-current.log
- (7.07 KiB) Downloaded 8 times
-
- factorio-previous.log
- (7.16 KiB) Downloaded 8 times
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
Would it be possible for you to try not splitting into virtual devices as a sanity check?
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
Not easily. I would have to rejig my audio setup to use a different device or completely rebuild my audio mappings - it uses a bunch of stream remapping logic to map audio from inputs to outputs (it's a Focusrite mixer).
It should be noted this was working perfectly for 1.1 Factorio, and has been working consistently for a variety of other games for years now. I would be surprised if this suddenly became an issue, just for 2.0.
It should be noted this was working perfectly for 1.1 Factorio, and has been working consistently for a variety of other games for years now. I would be surprised if this suddenly became an issue, just for 2.0.
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
Just to sanity check, I just fired up a bunch of games to see if any would have this issue. None did. Some were linux native games as well (shapez2), as well as a bunch running through proton. It seems very specific to Factorio 2.0.
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
Fair enough.
Unless you were using Allegro in 1.1 instead of the default SDL I'm not sure what could be the cause. Except using a newer version of SDL, nothing really changed in the way we open audio.
Unless you were using Allegro in 1.1 instead of the default SDL I'm not sure what could be the cause. Except using a newer version of SDL, nothing really changed in the way we open audio.
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
What is the output format you're using with your audio interface?
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
It's just 44.1kHz PCM 2 channel audio, as the log file notes, I believe. It looks like I've been using the SDL backend for a while, I just reviewed some old log files from backups from long ago, and they show this.
OK. The problem is setting "pipewire" in the UI. I've just done a bunch of launches, and if I leave it at the default of "pulseaudio" it seems to repeatedly load fine, and I can use the device redirects without problem. If I set it to "pipewire" it's glitchy and broken, even though pulseaudio is just using pipewire. Fascinating.
Note: the whole "driver" thing wasn't an option in 1.1 from what I recall, so I guess that's where to look.
Code: Select all
0.150 [Audio] Backend:SDL(default); Driver:pulseaudio, Device:Default device, Depth:16, Channels:2, Frequency:44100
Note: the whole "driver" thing wasn't an option in 1.1 from what I recall, so I guess that's where to look.
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
Huh, strange. One would guess using pipewire driver when using pipewire would work better.
Yes, the driver selection in Settings is new, it's just exposing the SDL_AUDIODRIVER variable/hint.
Well, as long as you have a working solution, I'm happy with that. We'll be updating our SDL soon so maybe it will fix your issue as well.
Yes, the driver selection in Settings is new, it's just exposing the SDL_AUDIODRIVER variable/hint.
Well, as long as you have a working solution, I'm happy with that. We'll be updating our SDL soon so maybe it will fix your issue as well.
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
I'm also having audio artifacts with the latest version. I thought it was my headphones/some weird interaction with OBS but it comes through on recorded audio clips too. I can upload a clip for you if you need
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
I've uploaded a clip of sound of a mining drill running but you'll notice after a few seconds there's weird audio artifacts where it's presumably trying to drop the gain on certain elements or mixing it incorrectly. https://youtu.be/UGf3YhLfKmI
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
I can't hear anything wrong in the clip. In any case this is not the same, so if you're having issues, please make a new topic and provide more information.Ober3550 wrote: ↑Sat Nov 02, 2024 6:23 am I've uploaded a clip of sound of a mining drill running but you'll notice after a few seconds there's weird audio artifacts where it's presumably trying to drop the gain on certain elements or mixing it incorrectly. https://youtu.be/UGf3YhLfKmI
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
side note: CS2 had audio issues for a long time on Linux, where the audio output buffer would keep filling up and accumulating latency. Resetting the audio output in the game helped or setting pipewire frequency to 44100:
https://github.com/ValveSoftware/csgo-o ... 1817424175
Though if you asked me, we should transition to a 48kHz Opus world (4/8kHz steps) to avoid compute intensive resampling as much as possible.
https://github.com/ValveSoftware/csgo-o ... 1817424175
Though if you asked me, we should transition to a 48kHz Opus world (4/8kHz steps) to avoid compute intensive resampling as much as possible.
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
I will be bringing support for Opus soon. The main goal is to reduce the size of audio data on disk. I'm not sure at the moment if we will fully switch to 48kHz.vadcx wrote: ↑Sat Nov 02, 2024 9:57 am Though if you asked me, we should transition to a 48kHz Opus world (4/8kHz steps) to avoid compute intensive resampling as much as possible.
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
I just tried listening to the clip on a different device and it sounds fine. So my headphones are dodgyDonion wrote: ↑Sat Nov 02, 2024 9:52 amI can't hear anything wrong in the clip. In any case this is not the same, so if you're having issues, please make a new topic and provide more information.Ober3550 wrote: ↑Sat Nov 02, 2024 6:23 am I've uploaded a clip of sound of a mining drill running but you'll notice after a few seconds there's weird audio artifacts where it's presumably trying to drop the gain on certain elements or mixing it incorrectly. https://youtu.be/UGf3YhLfKmI
Re: Weird glitchy audio when other audio source playing at start since 2.0 on Linux?
I'm gonna move this to resolved and chalk it up to Linux audio drivers oddities.