Audio is delayed through laptop's speakers, but it's fine without any delay when headphones plugged in

Hello folks!

I don’t mean to beat this topic to death with another post, but I’ve searched the forum for a possible solution. Nothing worked. It’s just a nuisance I want to resolve once and for all. I’m experiencing audio delay issue. I’ve had this issue since the first day I installed Manjaro. It’s nothing new.

When I plug in headphones, the audio is fine without any delay through headphones. But the audio through laptop’s speakers are a bit delayed.

If I play an audio file that reads “I am just happy to be back”, because of the initial delay, I only hear “happy to be back”.

Any help to resolve this issue is greatly appreciated! Thanks.

please provide the mandatory

inxi --admin --verbosity=7 --filter --no-host --width

informations first.

Hi Olli!

Here is the output. Thanks!

Audio:
Device-1: Intel Tiger Lake-H HD Audio vendor: Micro-Star MSI
driver: sof-audio-pci-intel-tgl
alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3
chip-ID: 8086:43c8 class-ID: 0401
Device-2: NVIDIA GA104 High Definition Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:228b class-ID: 0403
API: ALSA v: k6.1.44-1-MANJARO status: kernel-api with: aoss
type: oss-emulator tools: alsactl,alsamixer,amixer
Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
Server-2: JACK v: 1.9.22 status: off tools: N/A
Server-3: PipeWire v: 0.3.77 status: active with: 1: pipewire-pulse
status: active 2: pipewire-media-session status: active 3: pipewire-alsa
type: plugin tools: pactl,pw-cat,pw-cli

it should be installed but please check if the firmware is installed

pacman -Qi sof-firmware

Correct! It’s already installed.

Here is the output.

error: could not register ‘sublime-text’ database (database already registered)
Name : sof-firmware
Version : 2.2.6-1
Description : Sound Open Firmware
Architecture : x86_64
URL : https://www.sofproject.org/
Licenses : custom:BSD custom:ISC
Groups : None
Provides : None
Depends On : None
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 17.43 MiB
Packager : Jan Alexander Steffens (heftig) heftig@archlinux.org
Build Date : Thu 06 Jul 2023 02:51:32 PM EDT
Install Date : Fri 14 Jul 2023 06:31:35 AM EDT
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature

i’m not the expert but there are various issues with tiger-lake audio. if you use the search function of manjaro with “tiger lake audio” a lot of different issues will occur. a second thing you might try is to uninstall pipewire and use pulse insead.

Thank you for your help and response, Olli.

Quick question! There seems to be many parts and pieces of pipewire such as pipewire-alsa, pipewire-audio, pipewire-media-session, pipewire-pulse, gst-plugin-pipewire, etc…

When I try to remove the main file “pipewire” only in Package Manager, I get the message “Failed to prepare transaction. Could not satify dependencies.” Can you tell me how I can successfully remove pipewire as you recommended without causing problem with something else?

I think removing pipewire is worth a shot to see if it solves my problem with the audio delay. If it doesn’t work, then I can move on to the next possible solution.

Thank you.

PipeWire cannot be removed completely because it is also needed for Wayland

To revert back to PulseAudio:

pamac remove manjaro-pipewire; pamac install pulseaudio

and reboot

Quick question! For optional dependencies, there were 5 options. I didn’t know which one to select. So, I picked the first option (1: pulseaudio-equalizer: Graphical equalizer). Please see below. Then I received a message that said “* removing pipewire-pulse breaks dependency ‘pulseaudio-bluetooth’ required by gnome-bluetooth-3.0”. I pressed “N” for “NO” as I didn’t want to have a bluetooth problem. Would it be correct to assume that the installation was not complete and not finalized because I selected “NO” at the end? Or the last part was only pertaining to the bluetooth option? Thanks.

Preparing…
Checking dependencies…

To remove (1):
manjaro-pipewire 20221015-2 extra

Total removed size: 1.6 kB

Apply transaction ? [y/N] y
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update, or remove packages
Authenticating as: BIZDIK (atici)
Password:
==== AUTHENTICATION COMPLETE ====
Removing manjaro-pipewire (20221015-2)… [1/1]
Running post-transaction hooks…
Arming ConditionNeedsUpdate… [1/2]
Refreshing PackageKit… [2/2]
Transaction successfully finished.
Preparing…
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update, or remove packages
Authenticating as: BIZDIK (atici)
Password:
==== AUTHENTICATION COMPLETE ====
Synchronizing package databases…

Choose optional dependencies for pulseaudio:
1: pulseaudio-equalizer: Graphical equalizer
2: pulseaudio-jack: Jack support
3: pulseaudio-lirc: IR (lirc) support
4: pulseaudio-rtp: RTP and RAOP support
5: pulseaudio-zeroconf: Zeroconf support

Enter a selection (default=none): 1

Checking afdko dependencies…
Resolving dependencies…
Checking inter-conflicts…
Error: Failed to prepare transaction:
could not satisfy dependencies:

  • removing pipewire-pulse breaks dependency ‘pulseaudio-bluetooth’ required by gnome-bluetooth-3.0

Edit build files : [e]
Apply transaction ? [e/y/N] N

Transaction cancelled.

Removal of manjaro-pipewire worked, but panac would have failed due to the pulseaudio-bluetooth dependency if you had not cancelled the transaction

The commands have been confirmed to work for Xfce and KDE systems, but neither of them require
pulseaudio-bluetooth as a dependency

I suggest you install pulseaudio and pulseaudio-bluetooth and do not select any other optional dependencies this time

pamac install pulseaudio pulseaudio-bluetooth

Pamac should install 3 packages:

  • pulseaudio to replace pipewire-pulse
  • pulseaudio-alsa to replace pipewire-alsa
  • pulseaudio-bluetooth

Reboot system when packages have been installed

1 Like

nikgnomic, thank you so much for your help! I did as you suggested and everything finalized and went well. I don’t mean to be a downer but, this didn’t solve the problem with the audio delay!

The audio through headphones and even through “bluetooth speaker” come out fine without any delay, This is absolutely and logically beyond me as to why the audio through headsets and even “external” bluetooth comes out without any delay, but through the internal laptop’s speaker’s there is a delay. This is absolutely mind-boggling about Manjaro.

I can’t make logical sense of this either (so far)
There should not be any delay between audio from internal speakers and headphone jack because they are coming from the same audio device and probably using a shared audio channel

Please post more information about audio devices detected in ALSA

sudo alsa-info.sh --upload

Sorry for the delay, nikgnomic! I just noticed your post.

Here is the output.

>  !!################################
>  !!ALSA Information Script v 0.5.3 
>  !!################################
>                                           
>  !!Script ran on: Fri Sep  1 12:20:01 UTC 2023
>                                               
>                                               
>  !!Linux Distribution                         
>  !!------------------
>                      
>  ID_LIKE=arch        
>                      
>                      
>  !!DMI Information   
>  !!---------------      
>                                                                            
>  Manufacturer:      Micro-Star International Co., Ltd.    
>  Product Name:      GS76 Stealth 11UG                 
>  Product Version:   REV:1.0                        
>  Firmware Version:  E17M1IMS.118                
>  System SKU:        17M1.1                      
>  Board Vendor:      Micro-Star International Co., Ltd. 
>  Board Name:        MS-17M1                           
>                                                    
>                                                   
>  !!ACPI Device Status Information                 
>  !!---------------                                  
>                                                    
> /sys/bus/acpi/devices/ACPI000C:00/status        15  
> /sys/bus/acpi/devices/ACPI000E:00/status        15 
> /sys/bus/acpi/devices/INT33A1:00/status         15 
> /sys/bus/acpi/devices/INT340E:00/status         15 
> /sys/bus/acpi/devices/INT34C6:00/status         15  
> /sys/bus/acpi/devices/INT3F0D:00/status         15 
> /sys/bus/acpi/devices/INTC1040:00/status        15  
> /sys/bus/acpi/devices/INTC1043:00/status        15  
> /sys/bus/acpi/devices/INTC1043:01/status        15  
> /sys/bus/acpi/devices/INTC1043:02/status        15  
> /sys/bus/acpi/devices/INTC1051:00/status        15  
> /sys/bus/acpi/devices/LNXPOWER:00/status        1 
> /sys/bus/acpi/devices/LNXPOWER:05/status        1

alsa-info script usually finds a lot more information about ALSA audio devices

I suggest you update system BIOS to latest version E17M1IMS.119

Reboot to load new BIOS

If audio is still not working as expected

sudo alsa-info.sh --upload

and post the link to data uploaded to alsa-project

nikgnomic,

As you suggested, I updated system BIOS to E17M1IMS.119. Unfortunately, it still didn’t solve the audio delay issue with the laptop’s internal speaker.

Yep, this time, the also-info script has so much information.

Here is the link:
ALSA Information Script

Thank you.

I got same issue and what I noticed, the left speaker is delaying more than the right.

Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: Micro-Star MSI
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:43c8 class-ID: 0401
  Device-2: NVIDIA GA106 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 8
    link-max: lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:228e class-ID: 0403
  API: ALSA v: k6.6.1-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 0.3.84 status: off with: 1: pipewire-media-session
    status: off 2: pipewire-alsa type: plugin tools: pw-cat,pw-cli
  Server-3: PulseAudio v: 16.1 status: active tools: pacat,pactl

Hello, I am struggling with the same sound delay you mentioned on my MSI laptop. Have you found any solution?

Sorry for the delay to respond! I just noticed your posting. I’ve tried anything and everything, suggested here as well as things I found in my google search to resolve this issue. Unfortunately, nothing has worked so far!

It absolutely makes no sense whatsoever as you would expect to have an audio delay from an outside source like headphones when you plug it in, not from an internal speaker! But it is the opposite here! It’s mind-boggling.

I recently opened a call regarding MSI GP76 11800h. The likely cause for what you call delay might be a smart amplifier that needs better initialization. As a workaround I found that nonstop playing a long wav file (i use birds twittering in a park). That way the amplifier doesn’t go to power save / noise cancelling.

I tried everything from here and what I found on google and nothing solved the delay problem. My laptop is MSI Creator Z16, so it look like the problem is with MSI machines maybe.