Playback of sound is delayed from clicking play

Hi, this isn’t a new issue so I don’t believe its related to upgrading to kernel 5.8.
Whenever i play a video on YouTube or Reddit etc, the video plays but sound is not present for 5 seconds of playback. While trying to troubleshoot, I tried rewinding the video to a second after the video starts but the audio issue still remains. It isn’t browser specific either, tried both Brave (chromium) and Firefox.
Can anyone help? If more information is needed to troubleshoot, please let me know.

is only browser audio delayed or is audio from within system also delayed?

please post system information

inxi -Fxxxz

and Pulseaudio information

pulseaudio --dump-conf

~ >>> inxi -Fxxxz
System: Kernel: 5.8.0-2-MANJARO x86_64 bits: 64 compiler: N/A Desktop: GNOME 3.36.4 tk: GTK 3.24.22 wm: gnome-shell
dm: GDM 3.36.3 Distro: Manjaro Linux
Machine: Type: Desktop Mobo: ASUSTeK model: ROG STRIX B350-F GAMING v: Rev X.0x serial: UEFI: American Megatrends
v: 5220 date: 09/12/2019
CPU: Topology: 6-Core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2 L2 cache: 3072 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 86279
Speed: 2052 MHz min/max: 2200/3600 MHz boost: enabled Core speeds (MHz): 1: 2003 2: 1865 3: 2856 4: 1952 5: 2953
6: 2689 7: 2822 8: 1876 9: 1952 10: 1865 11: 3133 12: 2763
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] vendor: Tul
driver: amdgpu v: kernel bus ID: 0b:00.0 chip ID: 1002:731f
Display: x11 server: X.org 1.20.8 compositor: gnome-shell driver: amdgpu,ati unloaded: modesetting,radeon
alternate: fbdev,vesa resolution:
OpenGL: renderer: AMD Radeon RX 5700 XT (NAVI10 DRM 3.38.0 5.8.0-2-MANJARO LLVM 10.0.1) v: 4.6 Mesa 20.1.5
direct render: Yes
Audio: Device-1: Advanced Micro Devices [AMD/ATI] Navi 10 HDMI Audio driver: snd_hda_intel v: kernel bus ID: 0b:00.1
chip ID: 1002:ab38
Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel
bus ID: 0d:00.4 chip ID: 1022:1487
Sound Server: ALSA v: k5.8.0-2-MANJARO
Network: Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: 5.6.0-k port: e000 bus ID: 04:00.0
chip ID: 8086:1539
IF: enp4s0 state: down mac:
Device-2: Intel Wireless-AC 9260 driver: iwlwifi v: kernel port: e000 bus ID: 08:00.0 chip ID: 8086:2526
IF: wlp8s0 state: up mac:
Device-3: Intel Wireless-AC 9260 Bluetooth Adapter type: USB driver: btusb bus ID: 1-9:4 chip ID: 8087:0025
Drives: Local Storage: total: 1.36 TiB used: 667.33 GiB (47.8%)
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO 500GB size: 465.76 GiB speed: 31.6 Gb/s lanes: 4
serial: rev: 2B2QEXE7 scheme: GPT
ID-2: /dev/sda vendor: Seagate model: ST1000DM010-2EP102 size: 931.51 GiB speed: 6.0 Gb/s rotation: 7200 rpm
serial: rev: CC43 scheme: GPT
Partition: ID-1: / size: 453.69 GiB used: 147.34 GiB (32.5%) fs: ext4 dev: /dev/nvme0n1p2
Swap: ID-1: swap-1 type: partition size: 3.72 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/nvme0n1p3
Sensors: System Temperatures: cpu: 61.4 C mobo: N/A gpu: amdgpu temp: 56 C
Fan Speeds (RPM): N/A gpu: amdgpu fan: 0
Info: Processes: 369 Uptime: 4h 10m Memory: 15.63 GiB used: 5.88 GiB (37.6%) Init: systemd v: 245 Compilers: gcc: 10.1.0
clang: 10.0.1 Packages: pacman: 1522 Shell: Zsh v: 5.8 running in: guake inxi: 3.1.05

pulseaudio --dump-conf

Read from configuration file: /home/jackp/.config/pulse//daemon.conf

daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 9
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = yes
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-13.0/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target =
log-level = notice
resample-method = soxr-vhq
avoid-resampling = yes
enable-remixing = yes
remixing-use-all-sink-channels = yes
enable-lfe-remixing = no
lfe-crossover-freq = 0
default-sample-format = float32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 25
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 8000
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000

The issue only seems to occur when using HDMI audio. Audio direct though onboard sound works fine.

pulseaudio data shows there is a custom user configuration file ~/.config/pulse/daemon.conf

suggest you edit that file and add this:

flat-volumes = no

and restart pulseaudio to reload configuration

systemctl --user restart pulseaudio

default pulseaudio configuration setting flat-volumes = yes also uses these additional configuration settings

enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 8000
deferred-volume-extra-delay-usec = 0

this will cause an 8 second delay in audio level changes

there is an explanation about how deferred volumes work in man pulse-daemon.conf (line 330)
but this feature does not work well, so many distributions change configuration to ‘flat volumes=no’
and next version of Pulseaudio v14 will have this default setting change
PulseAudio 14.0 release notes (draft)

Thank you, this has helped. However it only reduced the delay. It is now 3 seconds instead of 5. So I manually added “deferred-volume-safety-margin-usec = 0” and this fixes the issue inconsistently. Anything else I could do?

The only other thing I see that might cause a delay problem is:

resample-method = soxr-vhq

suggest try other resample methods soxr-hq or speex-float-5
man pulse-daemon.conf has more information about resample methods

  • terminal alsamixer
  • F6 and select your generic sound card
  • disable auto-mute
1 Like