[0.9.* & 0.8.8] Major sound delay on Linux
[0.9.* & 0.8.8] Major sound delay on Linux
I can't quite tell if this is a bug or a configuration issue, but Factorio seems to have major sound delay problems. I was initially running it through PulseAudio's ALSA plugin, and so I was blaming the delay on that, but I just tried it with ALSA only, and the same thing happens. This has happened in every version of Factorio I've used so far. I'm running 64-bit Arch Linux and the sound is playing through my Logitech G930 headset. Any help would be much appreciated. Thanks in advance.
Re: [0.9.* & 0.8.8] Major sound delay on Linux
We couldn't have reproduced this on our Linux machines. But it is a problem since multiple people have complained about this in the past. If someone has any idea what is wrong that would be very helpful. For now moving this to 0-1 magic.
-
- Filter Inserter
- Posts: 559
- Joined: Mon Mar 04, 2013 9:23 am
- Contact:
Re: [0.9.* & 0.8.8] Major sound delay on Linux
That headset plugs into USB port and not into sound output right?
If that is true make sure you have full USB 2.0 support set up (proper drivers, USB 2 port). Why?
It is quite posible that the wireless adapter which you plug into USB is actually the one who is processing audio (acts as soundcard). So if USB port works as USB 1 it might not alow fast enough processing for the headset.
@Developers
What is the size of sound buffer Allegro sound library is using?
If this buffer is to big it might cause delays due to slow data transfer.
If it is to small you may get intermitent sound which is usualy heard as cracks at start or sound intermitens when things get worse.
If that is true make sure you have full USB 2.0 support set up (proper drivers, USB 2 port). Why?
It is quite posible that the wireless adapter which you plug into USB is actually the one who is processing audio (acts as soundcard). So if USB port works as USB 1 it might not alow fast enough processing for the headset.
@Developers
What is the size of sound buffer Allegro sound library is using?
If this buffer is to big it might cause delays due to slow data transfer.
If it is to small you may get intermitent sound which is usualy heard as cracks at start or sound intermitens when things get worse.
Re: [0.9.* & 0.8.8] Major sound delay on Linux
I apologize that it took so long to reply, but this remains an issue. I don't think it's an issue with USB, as I haven't had this problem with anything else. Furthermore, I've now tried this with both my headset and my computer's internal speakers. Both audio devices produce the same delay. I'm beginning to think it may be an issue with Allegro.
Re: [0.9.* & 0.8.8] Major sound delay on Linux
Same for me here.
But I also get cracks when I am starting the game sometimes (:
But I also get cracks when I am starting the game sometimes (:
Re: [0.9.* & 0.8.8] Major sound delay on Linux
Same problem here if pulseaudio is running. Is there a reason you use libasound instead of openal or sdl?
*Edit:
I see it uses allegro5.
I found a workaround that fixes this for me:
Create or edit /etc/allegro5rc and change the audio driver to oss:
I tried setting my driver to pulseaudio but then the game completely fails to initilize audio and quits.
It works with the default ALSA but has the delay, OSS seems to work fine though.
Also look /usr/share/doc/liballegro5.0/examples/allegro5.cfg for more options in case anyone can find a better fix.
*Edit:
I see it uses allegro5.
I found a workaround that fixes this for me:
Create or edit /etc/allegro5rc and change the audio driver to oss:
Code: Select all
[graphics]
driver=default
[audio]
driver=oss
It works with the default ALSA but has the delay, OSS seems to work fine though.
Also look /usr/share/doc/liballegro5.0/examples/allegro5.cfg for more options in case anyone can find a better fix.
-
- Burner Inserter
- Posts: 17
- Joined: Fri May 02, 2014 2:46 pm
- Contact:
Re: [0.9.* & 0.8.8] Major sound delay on Linux
I have the same issue (Ubuntu 14.04 x64), however the oss, pulseaudio and openal options all crash the game on startup, and the alsa option causes a >1 second delay.
Re: [0.9.* & 0.8.8] Major sound delay on Linux
I'm sorry that all I can do is report that this issue is manifesting itself on my linux box as well. Ubuntu 13.10
I wish I could tell you more.
I wish I could tell you more.
-
- Burner Inserter
- Posts: 17
- Joined: Fri May 02, 2014 2:46 pm
- Contact:
Re: [0.9.* & 0.8.8] Major sound delay on Linux
I haven't tried debugging the alsa delay yet, I can use oss with the padsp oss wrapper, pulseaudio works when I build allegro myself, therefore since it doesn't work in factorio I assume it isn't compiled in.
Re: [0.9.* & 0.8.8] Major sound delay on Linux
Got this Problem even after trying Nemoders fix
Re: [0.9.* & 0.8.8] Major sound delay on Linux
Hey guys, I'm really sorry that I can't help you, but for 0.10.0 we upgraded allegro, so there is a chance this will improve.
I have no idea what I'm talking about.
Re: [0.9.* & 0.8.8] Major sound delay on Linux
Ok, after some testing I found a way to get the sound working correctly.
1. Follow Nemod's advice on the first page and set "oss" in the allegro5rc config file.
2. Kill pulseaudio with "pulseaudio -k" (you can restart it again with "pulseaudio --start") .
3. Start the game with "padsp ./factorio" (included in the pulsaudio-utils package that should already be installed, or install it first).
1. Follow Nemod's advice on the first page and set "oss" in the allegro5rc config file.
2. Kill pulseaudio with "pulseaudio -k" (you can restart it again with "pulseaudio --start") .
3. Start the game with "padsp ./factorio" (included in the pulsaudio-utils package that should already be installed, or install it first).
Re: [0.9.* & 0.8.8] Major sound delay on Linux
Previous post. and a few hours' research, fixed this on Fedora 19.
Re: [0.9.* & 0.8.8] Major sound delay on Linux
Dedas solution worked for me on Kubunutu 12.04; thanks
Re: [0.9.* & 0.8.8] Major sound delay on Linux
Thanks for the confirmation (+including Distribution identification is a good idea too)
The "kill pulseaudio" step might not be necessary
To my knowledge, padsp uses pulseaudio to create an emulated OSS sound system device,
which means pulseaudio will be immediately respawned anyway.
The "kill pulseaudio" step might not be necessary
To my knowledge, padsp uses pulseaudio to create an emulated OSS sound system device,
which means pulseaudio will be immediately respawned anyway.
Re: [0.9.* & 0.8.8] Major sound delay on Linux
I have the same issue, that audio is massively (2-3 seconds) delayed. However I am only experiencing the problem when using my headphones (bluetooth), not when using the built-in sound card.
I am using pulseaudio, version 4.0, and using OSS + padsp works as a fix for me, at least during my short testing.
Edit: While sounds work fine, the background music has terrible sound artifacts when using padsp, but I've never had much success with padsp in the past, either… but that makes the workaround unusable for me as well.
Edit 2: Okay, I was wrong. It does in fact not depend on which audio device I am using. One out of so many times, the game actually has delay-free sound, simply by restarting the game often enough.
Edit 3: And then, after loading a game, audio starts to be delayed again…
I am using pulseaudio, version 4.0, and using OSS + padsp works as a fix for me, at least during my short testing.
Edit: While sounds work fine, the background music has terrible sound artifacts when using padsp, but I've never had much success with padsp in the past, either… but that makes the workaround unusable for me as well.
Edit 2: Okay, I was wrong. It does in fact not depend on which audio device I am using. One out of so many times, the game actually has delay-free sound, simply by restarting the game often enough.
Edit 3: And then, after loading a game, audio starts to be delayed again…
Re: [0.9.* & 0.8.8] Major sound delay on Linux
That's a known issue, the music right now is a placeholder and is terribly compressed. Doesn't matter what platform you play on.dominikh wrote:Edit: While sounds work fine, the background music has terrible sound artifacts when using padsp, but I've never had much success with padsp in the past, either… but that makes the workaround unusable for me as well.
Ignore this
Re: [0.9.* & 0.8.8] Major sound delay on Linux
No, it doesn't sound half as bad when actually playing through ALSA. The padsp artifacts are an actual padsp problem, one I have with most applications I've tried it with.Gammro wrote:That's a known issue, the music right now is a placeholder and is terribly compressed. Doesn't matter what platform you play on.dominikh wrote:Edit: While sounds work fine, the background music has terrible sound artifacts when using padsp, but I've never had much success with padsp in the past, either… but that makes the workaround unusable for me as well.
Re: [0.9.* & 0.8.8] Major sound delay on Linux
Same problem still in 0.10.0cube wrote:Hey guys, I'm really sorry that I can't help you, but for 0.10.0 we upgraded allegro, so there is a chance this will improve.
Setting driver=pulseaudio for allegro throws an exception on startup every time:
Code: Select all
(gdb) catch throw
Catchpoint 1 (throw)
(gdb) r
Starting program: /home/nemoder/Games/Factorio/./bin/x64/factorio
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff2243700 (LWP 25778)]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
Catchpoint 1 (exception thrown), 0x00007ffff678dfd0 in __cxa_throw ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0 0x00007ffff678dfd0 in __cxa_throw ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x000000000058e170 in ?? ()
#2 0x000000000058eb48 in ?? ()
#3 0x00000000007f322d in ?? ()
#4 0x000000000087355b in ?? ()
#5 0x00007ffff5e8db45 in __libc_start_main (main=0x870960, argc=1,
argv=0x7fffffffe508, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe4f8) at libc-start.c:287
#6 0x000000000040f289 in ?? ()
- CorrettoSambuca
- 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
Same issue here. Currently on Ubuntu 14.04.
If it helps, I'm dual-booting windows 7 on this machine and the windows version runs fine.
If it helps, I'm dual-booting windows 7 on this machine and the windows version runs fine.