• luciferofastora@feddit.org
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    edit-2
    7 hours ago

    My pipewire seems to have issues with crackling audio and severely dampening my mic and I have no clue why.

    Still better than Windows.

    • HereIAm@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      3 hours ago

      Oh I had this issue and it drove me bonkers trying to fix it! I have to go digging a not to try and remember what fixed it in the end.

    • FauxLiving@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      edit-2
      3 hours ago

      My pipewire seems to have issues with crackling audio and severely dampening my mic and I have no clue why.

      Pipewire’s default quantum (buffer size, effectively) is incredibly low, this is good for low latency audio but anytime your system is too busy to keep the buffers filled you get crackling.

      If you look at pw-top you’ll see all of your devices and nodes. The quant column is probably 1 or a very small number for the devices.

      You can increase the quantum with this command. This only lasts until pipewire restarts:

       pw-metadata -n settings 0 clock.min-quantum 512
      

      At a sample rate of 48000, this is roughly a 10ms buffer. 1024 is 20ms, etc. You want it as low as possible without getting crackling. Start with 512 and adjust from there (you don’t have to use a power of 2, a quantum of 1234 works just as well).

      severely dampening my mic and I have no clue why.

      By default pipewire doesn’t do any ‘mic boost’, as Windows calls it. You can get the same effect by raising the maximum volume.

      In your sound control panel you should be able to turn the mic up higher than 100%. In KDE Plasma, you can do this in System Settings -> Sound -> Configure Volume Controls… [top right button] -> Raise maximum volume.

      Alternatively, you can use EasyEffects to add a compressor. This will boost your mic volume and also prevent it from getting too loud

      Compressors basically reduce the dynamic range of an audio signal by attenuating loud sounds and boosting quieter ones, this would provide a better mix.

      Other useful plug-ins are noise canceling, (kills background noise) and echo canceling (lets you play sound out of your speakers which won’t get picked up by your mic). Sometimes apps, like Discord, will do this signal processing for you while others, like Signal, do no signal processing.

    • 1984@lemmy.today
      link
      fedilink
      arrow-up
      1
      ·
      4 hours ago

      Read the arch wiki on troubleshooting pulse audio. I remember having this issue long ago.

      • luciferofastora@feddit.org
        link
        fedilink
        arrow-up
        2
        ·
        3 hours ago

        The issue occurred yesterday gaming with friends and I didn’t have time to troubleshoot yet, but I’ll keep that in mind, thanks!

    • Frenchgeek@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      6 hours ago

      I’m still trying to figure out why the only real way of taking screenshots fast in Wayland is to do a video capture of the desktop with pipewire…

        • Frenchgeek@lemmy.ml
          link
          fedilink
          arrow-up
          2
          ·
          1 hour ago

          I need it to automate fishing in Minecraft, and the normal way to take screenshots in Python (which is one line with PIL) on Linux went from at least 30 possible fps on X11 to 2 on Wayland. The only way to do it fast enough then is to use Pipewire. Which is one hell of a convoluted mess. (The next part of this whole mess will be finding a way to send mouse clicks without having Minecraft registering a mouse move too in case xdotools stop working)

          • prole@lemmy.blahaj.zone
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            49 minutes ago

            You need the print screen key for something else is what you’re saying (I had trouble following your reply)?

            Can only speak for KDE, but you can easily change the screenshot shortcut to something else in settings.