Sound issues when starting a video in YouTube

Darc Sceptor

Member
Joined
Oct 2, 2024
Messages
95
Reaction score
32
Credits
1,090
Okay I'll begin with the stupid opening: this worked fine under Windows.

I have my minicomputer connected to my main monitor using a DP port. That sends sound to my monitor and I have a soundbar plugged into my monitor giving me great sound and a volume control right here in front of me. When I run a video on YouTube under Linux I get about a 2 second period of silence before the sound comes out of the soundbar.

Any suggestions for fixing this?
 


When I run a video on YouTube under Linux I get about a 2 second period of silence before the sound comes out of the soundbar.
This is due to a energy saving feature, if your sound card doesn't produce output for more than X seconds (or if output is barely heard) then it's put to low power state, to get back to normal will take X seconds so you'll not hear the sound immediately.

If you're using pulseaudio this can be solved by either increasing the timeout until audio sink goes to sleep (recommended) or disable the feature completely (not recommended).

To see if you're using pulseaudio run:
Bash:
systemctl --user status pulseaudio

If from the output you see it's present and running then edit file below:
Bash:
sudo nano /etc/pulse/default.pa

In nano editor find the following line and set the value to 300 which means 300 seconds or 5 minutes:
Bash:
### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle timeout=300

To disable the feature completely comment out entire line with #

To save file after changes, press CTRL + O and to close editor press CTRL + X

Then reload pulseaudio for change to take effect:
Bash:
systemctl --user reload pulseaudio
 
So I ran the terminal and then I did the command for systemctl --user status pulseaudio
It came back with Unit pulseaudio.service could not be found.

I pulled up sound settings and unfortunately there is no timeout setting. So where do I go now?
 
So I ran the terminal and then I did the command for systemctl --user status pulseaudio
It came back with Unit pulseaudio.service could not be found.

I pulled up sound settings and unfortunately there is no timeout setting. So where do I go now?
Most likely you have pipewire running as default instead of pulseaudio
 
I ran systemctl and confirmed I am running pipewire.
When I tried the next step it came back saying that pipewire does not have a directory in etc.
So I cannot control the timeouts for pipewire?
 
I ran systemctl and confirmed I am running pipewire.
When I tried the next step it came back saying that pipewire does not have a directory in etc.
So I cannot control the timeouts for pipewire?
The pipewire config files are in /usr/share/pipewire/.
There's a manpage for pipewire.conf.
I have no experience with this latency issue, so can't help other than note the above.
 
I believe the best session manager for pipewire is called WirePlumber need to check if it is installed or not
The stock configuration files for wireplumber are stored in /usr/share/wireplumber. The recommended way to customize Wireplumber is adding snippets overriding specific settings in /etc/wireplumber or ~/.config/wireplumber.

then to solve your delay issue
See this Arch wiki

 
Do you watch YouTube in browser? Is the problem same with other apps?
 
Do you watch YouTube in browser? Is the problem same with other apps?
Yes, I watch in the browser. When I play games I do not have that problem.
 

Members online

No members online now.

Top