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.
happens with AMD and HDMI. solution for pipewire/wireplumber is setting:
["node.pause-on-idle"] = false, ["session.suspend-timeout-seconds"] = 0,
I have an NVidia RTX 3070. Does that change anything?
don’t have one of those. doesn’t hurt to try.
If it’s any good, I’m still under X, not Wayland, and using Pulse Audio.
Switch to Pipewire. It’s a drop-in replacement with many bugs fixed.
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.
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/dingdongitsabear@lemmy.ml 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
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. :)
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)● 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.
Let me know if this works
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.”
Oh man thanks I’m gonna try this out.
I get this with Ubuntu and fedora as well using Wayland pipewire
Also when the sound in a video goes very quiet it appears to cut out and have a delay again in resuming
If I play very quiet white noise in the background no delays or cutouts happen
I’ll be interested to know if you manage to fix this, I had this issue and nothing I tried worked. Setting the audio decides not to suspend would work but only for a single audio source. The closest I got to fixing it was to use the inbuilt sine wave function to play a constant 20Hz sine wave which I couldn’t hear but stopped the playback device from suspending. But that started to cause its own issues so I just got an audio extension lead and switched to using my front panel audio