1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Linux Audio crackling and echoing on Arch Linux

Discussion in 'Help' started by m811, Apr 18, 2019.

Mods: makmoud98, Mazey
  1. m811

    m811 Catapult Fodder

    Messages:
    5
    Hey,

    Got the game off of Steam, so thank you for making it free! Seems like a cute mix off old school Soldat and Terraria/other semi-building games. Unfortunately the moment it starts, it, or something its depending on, messes up the system audio, causing everything to crackle, echo and the game's own audio to lag. This on a fairly vanilla Arch Linux setup that so far has had no problem with audio, be it in WINE or Linux native games. From a few old threads I saw mentions of ALSA and PulseAudio's ALSA plugins and what-not, but no immediate solution. System audio returns to normal when the game stops.

    Has anyone had similar issues and found a simple fix, incl. perhaps getting the fix upstreamed so it wouldn't be a recurring issue?

    Thanks in advance!
     
    Bobinours and Grendell100 like this.
  2. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    This is a known issue, other that I've only seen it happen periodically, and I have no idea what causes it (other than the proprietary audio engine we use).

    I attached a custom build below where I have a bunch of changes that are not merged yet, including a new shiny audio engine (plus new lighting plus performance improvements). The largest issue of this build is probably that lighting at night can be very fucky.
    Try backuping your game folder than copying these files into it. There are issues when trying to run this on older Linux distributions but since we're both on Arch there shouldn't be any library version issues.
    This will work until a new update that changes the build version is released though.

    //EDIT by Furai: Removed the attachment as it's outdated.
     
    Last edited by a moderator: Apr 21, 2019
  3. m811

    m811 Catapult Fodder

    Messages:
    5
    Hey again!

    Thanks for the custom build! I didn't get around to testing this, but fortunately I can confirm the latest update, May 28, 2019, build 2962, seems to finally fix the audio crackling on Linux here.
     
  4. Furai

    Furai THD Team THD Team Administrator

    Messages:
    3,124
    Another thing you might want to try is to add "tsched=0" to your pulseaudio config. I'm pretty sure there are archlinux topics covering how to do that. This hack in general helps with crackling sound on linux.
     
    Last edited: Jun 5, 2019
  5. m811

    m811 Catapult Fodder

    Messages:
    5
    Thanks, but given that it now works out of the box, that won't be necessary. :) I assume it was indeed the game's audio engine's fault given I haven't touched PulseAudio's config and the symptoms don't align with that `tsched=0` is often claimed to solve.
     
  6. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    We didn't touch anything though... Good thing I guess huh ::):
     
  7. m811

    m811 Catapult Fodder

    Messages:
    5
    No new audio engine? Hehe, well that's interesting. As a developer bugs that disappear like that sure.. bug me. They're bound to resurface eventually. :P
    --- Double Post Merged, Jun 25, 2019, Original Post Date: Jun 5, 2019 ---
    Haa, and as predicted, the issue resurfaced the second time I fired King Arthur's Gold up. Hadn't restarted the machine, nor changed anything in its config.
     
  8. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    That's very weird, other software running maybe?
     
  9. m811

    m811 Catapult Fodder

    Messages:
    5
    Beats me. Out of the 30–40 games I've played/tried, KAG has so far been the only one with choppy sound. Rest of the software running tends to be constant — Rhythmbox, VLC and Firefox primarily. I haven't tried the `tsched` suggestion above, but given that KAG did manage to work without crackling that one time, would hint that ALSA drivers are fine, wouldn't it?
     
  10. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    No idea, the sound cracking issue has been a thing on KAG Linux for a while, but I've never seen it to that extent (unless yet it's another issue).
    If you run KAG through wine/proton you shouldn't have that issue.
     
Mods: makmoud98, Mazey