As described in this AskUbuntu post, basically every time there’s some audio playback, there is a variable delay when the audio starts. It can range from anything like a fraction of a second to a full two seconds.

I noticed this first when playing YouTube videos and then it was excruciatingly obvious and a real problem while editing audio in Audacity.

If it’s any good, I’m using an NVIDIA RTX 3070 and I’m still under X, not Wayland, and using Pulse Audio.

My audio is going to my HDMI connected monitor where my speakers are connected.

This is only happening since I did a fresh install of Kubuntu 24.04 earlier this September.

Update: Added my graphics card model.

  • CyborganismOP
    link
    fedilink
    15 days ago

    I checked my packages list and pipewire seems to be installed. I’m old school so I’m not up to date on the latest changes in that regartd. I’ll have to check how pipewire works with Ubuntu/Kubuntu.

    • @[email protected]
      link
      fedilink
      2
      edit-2
      5 days ago

      Use this command to determine if your using Pulse or Pipewire on the backend:

      pactl info | grep "Server Name"

      If it says you’re using PulseAudio, then use these commands to switch to Pipewire:

      sudo apt install pipewire pipewire-audio-client-libraries wireplumber
      systemctl --user --now disable pulseaudio.service pulseaudio.socket
      systemctl --user --now enable pipewire pipewire-pulse wireplumber
      

      If that doesn’t fix it, I suspect the issue might have to do with suspending power, like /u/[email protected] suggested. Edit ~/.config/wireplumber/main.lua.d/50-alsa-monitor.lua and add

      ["node.pause-on-idle"] = false,
      ["session.suspend-timeout-seconds"] = 0,
      

      Save and reboot. Let me know if that fixes it

      • CyborganismOP
        link
        fedilink
        14 days ago

        pactl info | grep “Server Name”

        This is the output I’m getting:

        Server Name: PulseAudio (on PipeWire 1.0.5)

        Well THAT’S clear hahahaha … So does that mean I’m using PulseAudio or PipeWire?

        Edit ~/.config/wireplumber/main.lua.d/50-alsa-monitor.lua

        That path doesn’t even exist. I don’t have the wireplumber subdirectory.

        I’m gonna check with Pulseaudio if there are any known bugs. I wasn’t sure where to start looking but this thread has given me some good hints, thanks to people like you. :)

        • @[email protected]
          link
          fedilink
          2
          edit-2
          4 days ago

          Well THAT’S clear hahahaha … So does that mean I’m using PulseAudio or PipeWire?

          It means you’re using Pipewire :D. I think Pipewire builds on top of PulseAudio or integrates it or something. In any case, try this command to confirm it’s Pipewire:

          systemctl --user status wireplumber.service

          My output looks like this:

          ● wireplumber.service - Multimedia Service Session Manager
               Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; preset: enabled)
               Active: active (running) since Thu 2024-12-05 13:12:41 PST; 2 days ago
          

          (The (running) means it’s running)

          That path doesn’t even exist

          It might be under /usr/share/wireplumber/main.lua.d/. The only difference is this folder is for system files that affect all users, but given that this bug is happening on your own hardware that’s probably what you want to change anyways

          (You can also create ~/.config/wireplumber/main.lua.d/50-alsa-monitor.lua if you want; this is assuming you didn’t change your XDG directories to not use .config)

          • CyborganismOP
            link
            fedilink
            24 days ago

            wireplumber.service - Multimedia Service Session Manager Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; preset: enabled) Active: active (running) since Fri 2024-12-06 21:17:10 EST; 2 days ago Yep. Looks like I am!

            It might be under /usr/share/wireplumber/main.lua.d/

            It is!!!

            (You can also create ~/.config/wireplumber/main.lua.d/50-alsa-monitor.lua if you want; this is assuming you didn’t change your XDG directories to not use .config)

            Ok so I will try this first.

              • CyborganismOP
                link
                fedilink
                23 hours ago

                So I tried it and when I rebooted I saw my sound was muted. When I clicked on the volume icon in the system tray it said “No output or input devices found.”