[Donion] [2.0.7] Sounds stop at some point, then freeze upon exit

Zeroji
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Jan 16, 2021 10:22 am
Contact:

[Donion] [2.0.7] Sounds stop at some point, then freeze upon exit

Post by Zeroji »

Hello, I've started playing on my own dedicated server (with Space Age enabled), and a few seconds after the initial cutscene the game stopped producing any sounds. I checked my PC settings and played audio successfully from another app, then went to in-game sound settings, clicked on the drop-down for output devices (which was on Default) and the game froze when I selected my headset.

I restarted without issue, then played for ~90 minutes before having the same issue, and when I went to quit the game (disconnected, then pressed Exit on the main menu) the game froze again. I had to quit via the Steam "STOP" button both times.

I've attached both logs, the only non-default values in the "[sound]" section of the config are volume sliders. I haven't tried to reproduce this on single-player. Factorio 1.1.110 worked flawlessly for 9 hours (missed spoon :oops: ) yesterday on the same hardware.

EDIT: I had the game running on the main menu while typing this report, and after 5 minutes when I focused it the sound immediately stopped. Clicking Exit froze the process again.

EDIT 2: Happened again, I kept playing without sounds for a couple minutes and the game worked fine. I got an achievement and whatever Steam uses to play the achievement sound still worked. As a side note, killing the process with SIGTERM doesn't work unless I do it twice. I will migrate the server and my client to 2.0.8 and see if it happens again.

EDIT 3: Reproduced on 2.0.8 main menu :(
Attachments
sound-stopped-on-menu-2.0.8.log
2.0.8 repro
(8.41 KiB) Downloaded 9 times
sound-stopped-one-hour-ish.log
Second log (froze on exit)
(26.67 KiB) Downloaded 12 times
sound-stopped-one-minute.log
First log (froze on settings)
(14.18 KiB) Downloaded 9 times
Donion
Factorio Staff
Factorio Staff
Posts: 310
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [2.0.7] Sounds stop at some point, then freeze upon exit

Post by Donion »

Hello,
More as a sanity check than anything, can you try disconnecting your controller and see if it behaves differently?
Donion
Factorio Staff
Factorio Staff
Posts: 310
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [2.0.7] Sounds stop at some point, then freeze upon exit

Post by Donion »

Also, are you using PulseAudio on your desktop?
Zeroji
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Jan 16, 2021 10:22 am
Contact:

Re: [Donion] [2.0.7] Sounds stop at some point, then freeze upon exit

Post by Zeroji »

I've switched my audio driver in game settings from "Default" (which I assume was PulseAudio) to PipeWire, and was able to play for 30+ minutes without issues and with a bunch of window focus changes (which seemed to trigger the bug earlier).
10-22-2024, 00-30-18.png
10-22-2024, 00-30-18.png (27.13 KiB) Viewed 303 times
Oddly, changing the preferred output between my headset (USB) and speakers (HDMI through screen) didn't work and simply restarted the game music, whereas using Pulse Audio Volume Control to do so worked fine. Using `dmesg` showed zero logs from the times where the issue occurred.

I guess this can be sent to obscure bugs linked to Linux sound management :lol: I have disconnected my controller for sanity check and will report tomorrow if it changes anything, but I think the switch to PipeWire fixed the issue. Good luck to all the team with the influx of reports, and thanks a lot for all your work on SA! <3
Attachments
factorio-current.log
Using PipeWire, no issue
(25.64 KiB) Downloaded 12 times
Donion
Factorio Staff
Factorio Staff
Posts: 310
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [2.0.7] Sounds stop at some point, then freeze upon exit

Post by Donion »

As far as I can tell/remember, the default should be PulseAudio. If you're using PipeWire, setting the preferred audio driver to that is highly recommended :)

The log shows successful switching between audio devices, so something strange is going on.

I'll leave this thread here for a while if you encounter the issue again or if you'll have some additional info.
Altainia
Inserter
Inserter
Posts: 26
Joined: Sun May 20, 2018 5:27 pm
Contact:

Re: [Donion] [2.0.8] PVP - No music

Post by Altainia »

Same here except with single player. This happened twice to me in 2.0.7, once when switching back to my computer with a KVM and USB switcher, and another upon starting up Factorio. I was unable to intentionally reproduce them, and all other times with switching or starting up, audio worked fine. Now in 2.0.8 it's happening consistently (so far).

Log file attached.

Using PulseAudio.

Also, when there is no audio, closing Factorio results in freezing for a minute or so (this also happens when switching the preferred output device in the sound settings).
Attachments
factorio-current.log
(7.91 KiB) Downloaded 12 times
Donion
Factorio Staff
Factorio Staff
Posts: 310
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [2.0.8] PVP - No music

Post by Donion »

Altainia wrote: Tue Oct 22, 2024 3:04 pm ...
Using PulseAudio.

Also, when there is no audio, closing Factorio results in freezing for a minute or so (this also happens when switching the preferred output device in the sound settings).
I have moved your post here since it looks like the same issue.

You say you're using PulseAudio, do you mean you're using it on your desktop? Is it possible for you to try PipeWire?
Altainia
Inserter
Inserter
Posts: 26
Joined: Sun May 20, 2018 5:27 pm
Contact:

Re: [Donion] [2.0.8] PVP - No music

Post by Altainia »

Donion wrote: Tue Oct 22, 2024 3:59 pm
Altainia wrote: Tue Oct 22, 2024 3:04 pm ...
Using PulseAudio.

Also, when there is no audio, closing Factorio results in freezing for a minute or so (this also happens when switching the preferred output device in the sound settings).
You say you're using PulseAudio, do you mean you're using it on your desktop? Is it possible for you to try PipeWire?
Yes, on my desktop... PipeWire seems to work. Also, I'd like to make an addendum about the game freezing for a minute or two. It's probably resuming when my USB audio device is unplugged; when switching to PipeWire just now and exiting the game to apply the change, the game hung, but did not go away until I unplugged my USB audio device out of curiosity (I realized that previously I didn't witness the game unfreezing after a time; rather, the game was unfrozen/exited when I came back to it after having switched away; I simply assumed it was due to it taking a while but may have been in fact due to the USB audio device disconnecting when switching).
Zeroji
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Jan 16, 2021 10:22 am
Contact:

Re: [Donion] [2.0.7] Sounds stop at some point, then freeze upon exit

Post by Zeroji »

Hi, I've done some more testing (with controller unplugged just in case) on different versions. I've executed "pactl list clients | grep Factorio" between every test, and saved the output in the files with no extension in the attached zip, with each filename in the form "f{VERSION}_{DRIVER}_{DEVICE and/or STATUS}".

Some observations:
  • Using PulseAudio, versions 2.0.7, 2.0.8 and 2.0.9 easily reproduce the issue
  • Version 1.1.110 uses PulseAudio by default, and does not appear to have any issue
  • Version 1.1.110 has two clients in the pactl output, where 2.0 has only one (no matter which audio driver is used)
Observations about switching the preferred audio device:
  • 1.1.110 with PulseAudio and 2.0.8 with PipeWire both produce a change in the "Client #" and "object.serial" values when switching between audio devices (for 1.1.110, this applies only to the second of the two clients)
  • 2.0.8 with PipeWire also produces a change in the "object.id" value, and the addition of a "target.object" value when the device is something else than default
  • 2.0.8 with PipeWire doesn't actually change the output device. Using pavucontrol to change the output device works, and seems to completely override what Factorio sees
  • All tested versions with PulseAudio have no issue switching the output device multiple times, and work great even when the default output device is changed in pavucontrol (i.e. follow default if set to default, keep specified device when set, changes in Factorio are reflected in pavucontrol and reality)
I also found a "fix" to get the sound to work again when the bug happens:
  • Open sound settings
  • Change the default output device, causing Factorio to hang - in my case, I changed from default (my headset) to my headset
  • Change something in the Configuration tab of pavucontrol, causing Factorio to resume and the sound to start playing again - in my case, I changed the "Navi 10 HDMI Audio" from using HDMI 5 Output to HDMI 3 Output (which should be irrelevant to Factorio since it's using my headset)
    → at this point a log is written for the audio device switch
  • Revert to the default audio device (just in case) and revert the changed configuration, sound keeps working
    → at this point another log is written for the 2nd audio device switch, see f209_pulse.log in attached zip
This fix is not permanent, and I've had a case of having the bug twice and fixing it twice in the same game session. Also, changing the sound card config while Factorio is not hanging doesn't fix it - somehow it has to be hanging for the config change to actually fix the bug... For now I will play using PipeWire to keep myself sane, but if anyone has questions I'll happily spend more time troubleshooting :)
Attachments
pactl-and-factorio-logs.zip
(18.82 KiB) Downloaded 10 times
Post Reply

Return to “Assigned”