Audio starts after video

OK, I’m having an issue with audio starting after video. It’s NOT out of sync, it just starts playing a second or 5 after the video starts playing.

built-in speakers Dell s3221 connected via Display Port
kernel 5.10.23 - 1 MANJARO
AMD Ryzen 5 3600xt
Radeon RX 5500xt Navi 10 Audio
(I always choose proprietary drivers)
Gnome 3.38.4

I also have a pair of Cooler Master MH752 headphones that I use mainly for Zoom meetings. audio seems to work fine with the headphones.

I’ve also tried switching to HDMI but have had no luck.

Anyone have any thoughts?

Edit: I should mention that occasionally I run a game through steam and have no issues. I also tried downloading a video and have the same issue. If I pause a video and immediately hit play again, audio starts right up with no issue. It seems to only be when I first start a video or when I pause, work in other windows and return.

1 Like

Now that you mention it, I am having that same problem myself, and the delay also affects audio players ─ the audio only starts playing after several seconds into the songs.

I suspect that it could be a pulseaudio issue. :thinking:

I have the same problem audio over DisplayPort from a 5600XT to monitor lags the video start, once it starts it’s in sync.

Edit: I installed Kernel 5.11.6-1 and it’s working fine.
Edit2: Yeah, next day back to the same old shenanigans…

Please post system information

inxi -Faz

to show if this could be an issue with either pulseaudio or pipewire or a conflict if both are active

Mine reports that both are active, indeed. :thinking:

As far as I know Pipewire and PulseAudio do not work well together

Choose either:

  • Disable Pipewire to continue using PulseAudio

    systemctl --user mask --now pipewire.socket && systemctl --user stop pipewire.service


  • Install manjaro-pipewire to get the additional dependency files for Pipewire to work
    and remove PulseAudio packages
1 Like
[nx-74205:/dev/pts/3][/root] # systemctl --user mask --now pipewire.socket && systemctl --user stop pipewire.service
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user> --user to connect to bus of other user)

I had to run the second command as a user, and then it worked…

[16:24:11][aragorn] >  systemctl --user stop pipewire.service
Warning: Stopping pipewire.service, but it can still be activated by:

Edit: It doesn’t remedy the delay between the start of the sound and the sound actually becoming audible, though. Every song I play in JuK (or other media players) still starts off muted and then becomes audible several seconds into the song.

inxi -Faz                                                                                                                                                                                                                                                                  ✔ 
System:    Kernel: 5.11.6-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.11-x86_64 root=UUID=9b340dfe-45c6-48b7-a339-95cb7886815c ro quiet splash 
           apparmor=1 security=apparmor resume=UUID=56c88bff-fc31-410c-b51f-f0f419c11f39 udev.log_priority=3 
           Desktop: GNOME 3.38.4 tk: GTK 3.24.27 wm: gnome-shell dm: GDM Distro: Manjaro Linux base: Arch Linux 
Machine:   Type: Desktop System: Micro-Star product: MS-7A37 v: 1.0 serial: <filter> 
           Mobo: MSI model: B350M MORTAR (MS-7A37) v: 1.0 serial: <filter> UEFI: American Megatrends v: 1.MV date: 06/23/2020 
CPU:       Info: 6-Core model: AMD Ryzen 5 2600 bits: 64 type: MT MCP arch: Zen+ family: 17 (23) model-id: 8 stepping: 2 
           microcode: 800820D cache: L2: 3 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 81618 
           Speed: 2405 MHz min/max: 1550/3400 MHz boost: enabled Core speeds (MHz): 1: 2405 2: 1337 3: 1675 4: 1380 5: 1300 
           6: 1377 7: 1373 8: 1330 9: 2614 10: 1334 11: 1332 12: 1375 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] 
           vendor: Sapphire Limited driver: amdgpu v: kernel bus-ID: 28:00.0 chip-ID: 1002:731f class-ID: 0300 
           Display: wayland server: X.Org compositor: gnome-shell driver: loaded: amdgpu display-ID: :0 screens: 1 
           Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 677x381mm (26.7x15.0") s-diag: 777mm (30.6") 
           Monitor-1: XWAYLAND1 res: 2560x1440 hz: 144 dpi: 108 size: 600x340mm (23.6x13.4") diag: 690mm (27.2") 
           OpenGL: renderer: AMD Radeon RX 5600 XT (NAVI10 DRM 3.40.0 5.11.6-1-MANJARO LLVM 11.1.0) v: 4.6 Mesa 20.3.4 
           direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] Navi 10 HDMI Audio driver: snd_hda_intel v: kernel bus-ID: 28:00.1 
           chip-ID: 1002:ab38 class-ID: 0403 
           Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel 
           bus-ID: 2a:00.3 chip-ID: 1022:1457 class-ID: 0403 
           Device-3: Turtle Beach Ear Force P11 Headset type: USB driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-1:2 
           chip-ID: 10f5:0231 class-ID: 0300 serial: <filter> 
           Sound Server-1: ALSA v: k5.11.6-1-MANJARO running: yes 
           Sound Server-2: JACK v: 0.125.0 running: no 
           Sound Server-3: PulseAudio v: 14.2 running: yes 
           Sound Server-4: PipeWire v: 0.3.23 running: no 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI driver: r8168 
           v: 8.048.03-NAPI modules: r8169 port: f000 bus-ID: 22:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: enp34s0 state: down mac: <filter> 
           Device-2: Broadcom BCM4352 802.11ac Wireless Network Adapter vendor: ASUSTeK driver: wl v: kernel modules: bcma 
           port: f000 bus-ID: 25:00.0 chip-ID: 14e4:43b1 class-ID: 0280 
           IF: wlp37s0 state: up mac: <filter> 
Drives:    Local Storage: total: 465.76 GiB used: 107.88 GiB (23.2%) 
           SMART Message: Required tool smartctl not installed. Check --recommends 
           ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital model: WDS500G2B0B-00YS70 size: 465.76 GiB block-size: 
           physical: 512 B logical: 512 B speed: 6.0 Gb/s rotation: SSD serial: <filter> rev: 30WD scheme: GPT 
Partition: ID-1: / raw-size: 456.66 GiB size: 448.5 GiB (98.21%) used: 107.88 GiB (24.1%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 
           ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 312 KiB (0.1%) fs: vfat dev: /dev/sda1 
           maj-min: 8:1 
Swap:      Kernel: swappiness: 10 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda3 maj-min: 8:3 
Sensors:   System Temperatures: cpu: 37.0 C mobo: 39.0 C gpu: amdgpu temp: 55.0 C mem: 58.0 C 
           Fan Speeds (RPM): fan-1: 0 fan-2: 733 fan-3: 819 fan-4: 779 fan-5: 0 gpu: amdgpu fan: 0 
           Power: 12v: N/A 5v: N/A 3.3v: 3.33 vbat: 3.39 gpu: amdgpu watts: 27.00 
Info:      Processes: 338 Uptime: 16h 48m wakeups: 0 Memory: 31.37 GiB used: 3.28 GiB (10.5%) Init: systemd v: 247 
           tool: systemctl Compilers: gcc: 10.2.0 Packages: pacman: 1435 lib: 478 flatpak: 0 Shell: Zsh v: 5.8 running-in: gjs 
           inxi: 3.3.03 

Mine shows PulseAudio as sounds server-3 and PipeWire as server-4. But PipeWire is not running.

systemctl commands for Pipewire (or PulseAudio) do not work if it is run as root, or with sudo or without user --user option

use this command to check if systemd socket and service are deactivated

systemctl --user status pipewire*

For audio latency problems check the player does not have any audio processing to fade-in audio or anything else that might add latency. and check if there any settings for an audio buffer that could be reduced

With audio playing, use this command to find details about the audio stream

pacmd list-sink-inputs

and this to check the output sinks

pacmd list-sinks
1 Like

Yes, I figured that one out. I ran both commands as a user afterwards.

[14:50:39][aragorn] >  systemctl --user status pipewire*

[14:52:10][aragorn] >
[14:49:11][aragorn] >  pacmd list-sink-inputs
2 sink input(s) available.
    index: 0
        driver: <module-ladspa-sink.c>
        flags: START_CORKED 
        state: RUNNING
        sink: 0 <alsa_output.pci-0000_00_1f.3.analog-stereo>
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        muted: no
        current latency: 0.00 ms
        requested latency: 23.22 ms
        sample spec: float32le 2ch 44100Hz
        channel map: front-left,front-right
        resample method: copy
        module: 21
       = "LADSPA Stream"
                media.role = "filter"
       = "sink-input-by-media-role:filter"
    index: 72
        driver: <protocol-native.c>
        flags: START_CORKED 
        state: RUNNING
        sink: 1 <ladspa_output.mbeq_1197.mbeq>
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        muted: no
        current latency: 52.79 ms
        requested latency: 23.22 ms
        sample spec: float32le 2ch 44100Hz
        channel map: front-left,front-right
        resample method: (null)
        module: 9
        client: 88 <Chromium>
                application.icon_name = "chromium-browser"
       = "Playback"
       = "Chromium"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "34"
       = "65310"
                application.process.user = "aragorn"
       = "nx-74205"
                application.process.binary = "chromium"
                application.language = "en_US.UTF-8"
                window.x11.display = ":0"
                application.process.machine_id = "4b5681042054483897c5454a7631f8ba"
                application.process.session_id = "2"
       = "sink-input-by-application-name:Chromium"

[14:49:15][aragorn] >  pacmd list-sinks
2 sink(s) available.
    index: 0
        name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
        driver: <module-alsa-card.c>
        state: RUNNING
        suspend cause: (none)
        priority: 9039
        volume: front-left: 33024 /  50% / -17.86 dB,   front-right: 33024 /  50% / -17.86 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 23.23 ms
        max request: 4 KiB
        max rewind: 4 KiB
        monitor source: 0
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
        used by: 1
        linked by: 1
        configured latency: 23.22 ms; range is 0.50 .. 2000.00 ms
        card: 0 <alsa_card.pci-0000_00_1f.3>
        module: 6
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
       = "ALC887-VD Analog"
       = "ALC887-VD Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf120000 irq 126"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
       = "8086"
       = "Intel Corporation"
       = "a2f0"
       = "200 Series PCH HD Audio"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                device.access_mode = "mmap+timer"
       = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
                analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
                                device.icon_name = "audio-headphones"
        active port: <analog-output-lineout>
  * index: 1
        name: <ladspa_output.mbeq_1197.mbeq>
        driver: <module-ladspa-sink.c>
        state: RUNNING
        suspend cause: (none)
        priority: 1000
        volume: front-left: 33024 /  50%,   front-right: 33024 /  50%
                balance 0.00
        base volume: 65536 / 100%
        volume steps: 65537
        muted: no
        current latency: 22.83 ms
        max request: 8 KiB
        max rewind: 8 KiB
        monitor source: 1
        sample spec: float32le 2ch 44100Hz
        channel map: front-left,front-right
        used by: 1
        linked by: 1
        configured latency: 23.22 ms; range is 0.50 .. 2000.00 ms
        module: 21
                device.master_device = "alsa_output.pci-0000_00_1f.3.analog-stereo"
                device.class = "filter"
                device.ladspa.module = "mbeq_1197"
                device.ladspa.label = "mbeq"
       = "Multiband EQ"
                device.ladspa.maker = "Steve Harris <>"
                device.ladspa.copyright = "GPL"
                device.ladspa.unique_id = "1197"
                device.description = "LADSPA Plugin Multiband EQ on Built-in Audio Analog Stereo"
                device.icon_name = "audio-card"

I am not sure if the 52.79 ms latency for the equalizer sink includes the 23.22 ms latency for the output sink, but it is a lot less than the latency problems described so far

I suggest you check PulseAudio configuration settings for deferred-volume

pulseaudio --dump-conf

To turn off deferred-volume, create a custom configuration file in home folder ~/.config/pulse/daemon.conf and add this text

enable-deferred-volume = no

Then restart PulseAudio to load new configuration

systemctl --user restart pulseaudio

But if there are any audio issues with volume changes you may need to replacee this with a lower value for deferred-volume-safety-margin-usec = 1000 ( 1000μs )

For more information see manpage for pulse-daemon.conf