[0.9.* & 0.8.8] Major sound delay on Linux

This subforum contains all the issues which we already resolved.
carkasjak
Burner Inserter
Burner Inserter
Posts: 15
Joined: Mon Jun 23, 2014 10:35 pm
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by carkasjak »

I've also had this issue on every version I've tried thus far. (between 0.9.8 and 0.10.1)
I am running Debian Unstable/Sid and the 64bit version of the game.

squisher
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Fri May 02, 2014 8:35 pm
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by squisher »

To summarize the solution, posted by Nemoder and Dedas:

1. Create or edit /etc/allegro5rc, and set to:

[graphics]
driver=default
[audio]
driver=oss

2. Start the game with "padsp ./factorio" (padsp is included in the pulsaudio-utils package)

(there should be no need to restart pulseaudio).
This worked on Fedora 18 x64.

carkasjak
Burner Inserter
Burner Inserter
Posts: 15
Joined: Mon Jun 23, 2014 10:35 pm
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by carkasjak »

squisher wrote:To summarize the solution, posted by Nemoder and Dedas:

1. Create or edit /etc/allegro5rc, and set to:

[graphics]
driver=default
[audio]
driver=oss

2. Start the game with "padsp ./factorio" (padsp is included in the pulsaudio-utils package)

(there should be no need to restart pulseaudio).
This worked on Fedora 18 x64.
This workaround works for me too.

Whyte
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Jul 15, 2014 11:47 am
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by Whyte »

Hi!

I managed to fix the delay by running Factorio like this:

Code: Select all

PULSE_LATENCY_MSEC=20 ./factorio
No other file editing needed. Maybe you (the devs) can try setting that environment variable inside the game, before initiatlizing the sound?

User avatar
CorrettoSambuca
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sun May 04, 2014 9:29 am
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by CorrettoSambuca »

I can confirm this workaround working for me.
Currently on Ubuntu 14.04 and the latest Factorio 0.10

Algram
Inserter
Inserter
Posts: 33
Joined: Sun Jan 26, 2014 10:28 am
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by Algram »

Followed squishers instructions and my sound issues are gone now (:

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by slpwnd »

Whyte wrote:Hi!

I managed to fix the delay by running Factorio like this:

Code: Select all

PULSE_LATENCY_MSEC=20 ./factorio
No other file editing needed. Maybe you (the devs) can try setting that environment variable inside the game, before initiatlizing the sound?
Good idea, though we probably ask one of you guys to test such a build (we couldn't reproduce this).

Algram
Inserter
Inserter
Posts: 33
Joined: Sun Jan 26, 2014 10:28 am
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by Algram »

Just do, the Linux guys are all in for this :b

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by cube »

Hi, I was reading about this a little and found that setting the PULSE_LATENCY_MSEC doesn't really work for everyone. (they were talking about skype, but I guess the problem will be the same).

Is there anyone using pulse audio who has the sound working out of the box? What do you have in the variable now?
...you print it using

Code: Select all

echo $PULSE_LATENCY_MSEC
I have no idea what I'm talking about.

Whyte
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Jul 15, 2014 11:47 am
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by Whyte »

Mine does not seem to be set to anything, so it's either a default or something Allegro sets. But setting it to 20 fixes the delay. The variable is an override, not something a user should usually have on their system.

I'm running stock Ubuntu 14.04, and Factorio 0.10.3 (and previous ones).

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by cube »

So in 0.10.4 the environment variable is set automatically on start, but never overwritten (so you can set it to other value yourself). Hope this doesn't break stuff for other people :-)
I have no idea what I'm talking about.

Whyte
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Jul 15, 2014 11:47 am
Contact:

Re: [0.9.* & 0.8.8] Major sound delay on Linux

Post by Whyte »

cube wrote:So in 0.10.4 the environment variable is set automatically on start, but never overwritten (so you can set it to other value yourself). Hope this doesn't break stuff for other people :-)
Yep, a very reasonable workaround!

Post Reply

Return to “Resolved Problems and Bugs”