Announcement

Collapse
No announcement yet.

debugging audio delay on HDMI (digital) output

Collapse
This topic has been answered.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] debugging audio delay on HDMI (digital) output

    I'm running a stock Kubuntu Focus Ir14 GEN 2

    I've upgraded to Ubuntu 24.04.3 LTS

    some detail on what's running:

    Code:
    >> pactl info
    Server String: /run/user/1000/pulse/native
    Library Protocol Version: 35
    Server Protocol Version: 35
    Is Local: yes
    Client Index: 110
    Tile Size: 65472
    User Name: USER
    Host Name: MACHINE
    Server Name: PulseAudio (on PipeWire 1.0.5)
    Server Version: 15.0.0​
    Default Sample Specification: float32le 2ch 48000Hz
    Default Channel Map: front-left,front-right
    Default Sink: alsa_output.pci-0000_00_1f.3.hdmi-stereo
    Default Source: alsa_input.usb-Angetube_Live_Camera_Angetube_Live_Camera_20211101015-02.analog-stereo​
    when I run the audio output through the laptop speakers, it's fine.

    when I run the default setup at home, I plug the HDMI cable into the monitor, and the speakers are connected to the monitor.

    what happens is the audio works, but if the sounds stops for *5 seconds or more*, then there is a delay induced on whatever the next sound that appears. the delay is approximately 1.5 seconds of silence while the machine otherwise is producing sound, but nothing comes out teh speakers. the sound begins and works after the delay.

    and, if the sound is "going", and stops for less than 5 seconds, there is no delay when it starts again.

    between alsa, pipewire, wireplumber and all the other audio f**king audio craziness, I can't even understand
    how it is supposed to work , or even what is running on this machine. the AI overviews that Google search
    offers are 90% of the time pointing me with assertions of authority to setup files that don't exist. there's
    more wrong online at this point than right.

    I've been struggling with this for about an hour and I give up. this is the third time I have tried to fix this and seemingly can't.

    I've tried pro audio- one setting there maps to the HDMI audio, and the delay persists.

    at this point I've got 79 entries in my bash history searching for power save, suspend, fsking around with intel drivers, security limits, modprobes, SoundKeepAlive, intel-audio-powersave etc etc etc

    trying different edits, rebooting, restarting, attempting to restart audio. whatever.

    whatever is coming out of Google, it's all bull**** AI slop, wrapping on top of itself at this point, and incredibly frustratingly useless.

    so, questions:

    1- where do I read about how sound works on Linux?

    2- how do I figure out what is running on this machine to make sound work?

    3- how do I go about diagnosing a delay *that only appears on the HDMI output* ?

    4- will the folks at Kfocus help with this?


    in frustration....
    Last edited by Snowhog; Yesterday, 01:44 PM.
  • Answer selected by Snowhog at Yesterday, 01:43 PM.

    hours of wasted time. finally fixed it!

    the place to correct this WAS here in this file:

    /usr/share/wireplumber/main.lua.d/50-alsa-config.lua

    where session.suspend-timeout-seconds DOES appear, but it's on a line that ALSO has a "double dash" in front of the line,
    which in the Lau language means "comment the rest this line" and not, "command line argument"
    like in EVERY OTHER PART OF LINUX
    (imo terrible choice. wtf. aren't # and ; enough??!?)

    FSCK

    so, you have to find this line, set the value to zero, AND then remove the double dash at the start of the line.

    so on this file, on my machine, the ACTUAL corrected line looks like this:

    Code:
    ["session.suspend-timeout-seconds"] = 0
    and it's WITHIN a 3-level nested Lua function, starting as "alsa_monitor.rules"
    in a sub-section entitled "apply_properties = "

    then you restart wireplumber on the command line with

    Code:
    systemctl --user restart wireplumber

    and, the problem resolves.

    Comment


      #2
      Originally posted by jmdugan View Post
      I'm running a stock Kubuntu Focus Ir14 GEN 2
      Specs? I will wager few of us here are actually familiar with Kubuntu Focus hardware.

      This will very much depend on the GPU driver for audio over HDMI, I think, as opposed to the sound chip, but mostly if it is Nvidia or maybe a spanking fresh AMD system.

      Is this independent of the software? For example, I have one device that only is out of sync on Bluetooth, and only when using VLC.

      Which kernel are you using? No idea if Focus uses their own, keep to the original Ubuntu release version (6.8), or use the current Ubuntu HWE that most LTS users have (6.14)?
      By 'upgraded to 24.04.3" do you mean that you were using 22.04 and upgraded to the current LTS, or that you started with 24.04 and have updated normally? (24.04.3 is really a version number for the ISO image, basically)

      If you have other kernel options available in grub, it may be worth booting one, particularly a major version such as the original 6.8, though previous 6.14 build are still worth checking.

      Originally posted by jmdugan View Post
      will the folks at Kfocus help with this?
      Why would you think they wouldn't? They would be seeing this themselves, or know of a fix or adjustment, before anyone else would. Have you asked them yet?


      When researching, the trick with Linux is to keep the timeframe small and recent.

      Say: ubuntu 24.04 audio delay hdmi after:2024/04/15 or just ignore content before 24.04 was around. Mostly because Linux content gets stale very quickly, and in the case of Ubuntu, the audio system is different from 24.04 in particular, so any tweaks for older releases would be different, or in different locations.

      Pipewire/Wireplumber is the system to .....focus... on.


      My first thought, and an easier thing to test:
      https://superuser.com/questions/1844...-slow-pipewire

      Definitely contact Kubuntu Focus. I see some of their people in Matrix/IRC chat often in varous Kubuntu channels. Developer types seldom visit web forums, unfortunately.



      Last edited by claydoh; Oct 14, 2025, 10:11 PM.

      Comment


        #3
        Originally posted by claydoh View Post
        Specs? I will wager few of us here are actually familiar with Kubuntu Focus hardware.

        This will very much depend on the GPU driver for audio over HDMI, I think, as opposed to the sound chip, but mostly if it is Nvidia or maybe a spanking fresh AMD system.

        Is this independent of the software? For example, I have one device that only is out of sync on Bluetooth, and only when using VLC.

        Which kernel are you using? No idea if Focus uses their own, keep to the original Ubuntu release version (6.8), or use the current Ubuntu HWE that most LTS users have (6.14)?
        By 'upgraded to 24.04.3" do you mean that you were using 22.04 and upgraded to the current LTS, or that you started with 24.04 and have updated normally? (24.04.3 is really a version number for the ISO image, basically)

        If you have other kernel options available in grub, it may be worth booting one, particularly a major version such as the original 6.8, though previous 6.14 build are still worth checking.


        Why would you think they wouldn't? They would be seeing this themselves, or know of a fix or adjustment, before anyone else would. Have you asked them yet?


        When researching, the trick with Linux is to keep the timeframe small and recent.

        Say: ubuntu 24.04 audio delay hdmi after:2024/04/15 or just ignore content before 24.04 was around. Mostly because Linux content gets stale very quickly, and in the case of Ubuntu, the audio system is different from 24.04 in particular, so any tweaks for older releases would be different, or in different locations.

        Pipewire/Wireplumber is the system to .....focus... on.


        My first thought, and an easier thing to test:
        https://superuser.com/questions/1844...-slow-pipewire

        Definitely contact Kubuntu Focus. I see some of their people in Matrix/IRC chat often in varous Kubuntu channels. Developer types seldom visit web forums, unfortunately.


        >specs:

        https://biocontact.org/other/laptop_...ase_output.txt

        https://biocontact.org/other/laptop_...nfo_output.txt

        https://biocontact.org/other/laptop_...shw_output.txt

        https://biocontact.org/other/laptop_...e-a_output.txt


        > Is this independent of the software?
        yes, seems that several softwares: audacity, vlc, firefox, aplay -- all exibit the same post-5sec wait relapse into a suspend-like state with audio gap on next sound start

        kernel?
        > uname -r
        6.8.0-51-kfocus​

        > do you mean that you were using 22.04 and upgraded to the current LTS, or that you started with 24.04 and have updated normally?
        I mean this issue did not appear when I was using 22.04, and when I upgraded manually to 24.04, this issue started.
        on kfocus, the -> 24.04 upgrade changed a ton, so much so that in place upgrade was impossible, they told us to backup and restore all userspace content

        on a side note, I don't know how I'd try out a 6.14 kernel, if I can do that without losing my current setup

        > Why would you think they wouldn't?
        my experience with kfocus so far is adamant refusal to admit their systems break the fundamental upgrade process endemic to Linux. cf above

        *** keep the timeframe small and recent ** very helpful thank you

        *** Pipewire/Wireplumber is the system to .....focus... on. *** great pointer.
        again, thank you

        Comment


          #4
          I tried his previously, excited there seemed to be an obvious setting with a 5 second delay. it didn't resolve it for me

          https://superuser.com/questions/1844...-slow-pipewire

          Comment


            #5
            Originally posted by jmdugan View Post
            kernel?
            > uname -r
            6.8.0-51-kfocus
            Originally posted by jmdugan View Post
            on a side note, I don't know how I'd try out a 6.14 kernel, if I can do that without losing my current setup
            The current KFocus ISO comes with 6.11. They seem to build their own here, but 6.8.0 was the original "GA" kernel for Ubuntu LTS, and 6.11.0 was the first HWE kernel upgrade. Now it is at 6.14.

            I don't know if KFocus have changed any apt configs to prevent stock Ubuntu kernels from being available, or are using just their kernel meta-package instead of using the Ubuntu one. It is called linux-image-kfocus-24.04-kfocus, which should depend on the current kernel, whatever version that happens to be at the time.


            It might be worth trying a live session of the current ISO to see if the delay is there -- assuming that this happens in a live session using the 6.8 kernel. Or try a separate install using the current image.
            I do wonder why you are not on their current kernel, though.

            Installing a new kernel does not replace the previous kernel. Normally three are kept, and with major versions, one of the previous should be retained. So, on a normal LTS, users who started with 6.8 would have the latest version of that ( it is still fully supported), plus up to the two most current 6.14 kernels. You can boot to previous kernels in grub. It usually has no effect on the system doing this, unless a third party driver or an Nvidia one failed to build a module for one of those kernels for some reason.

            I do not think that adding a stock Ubuntu kernel meta-package would break anything here -- apt itself handles the kernels kept, not the distro here. But I am not sure at all.

            If you are feeling experimental, you could install the hwe meta-package top pull in 6.14 :

            Code:
            sudo apt install --install-recommends linux-generic-hwe-24.04​
            Or look at trying Mainline kernels https://github.com/bkw777/mainline

            But the problem might not be a kernel version thing at all.

            Comment


              #6
              6722~/.local/state/wireplumber}sudo apt install --install-recommends linux-generic-hwe-24.04​
              [sudo] password for USER:
              Reading package lists... Done
              Building dependency tree... Done
              Reading state information... Done
              E: Unable to locate package linux-generic-hwe-24.04​​

              Comment


                #7
                6722~/.local/state/wireplumber}dpkg -l | grep linux-image
                ii linux-image-kfocus-24.04-kfocus 6.8.0-51.52+kfocus1 amd64 KFocus Linux kernel image
                ii linux-image-unsigned-6.8.0-51-kfocus 6.8.0-51.52+kfocus1 amd64 Linux kernel image for version 6.8.0 on 64 bit x86 SMP​

                Comment


                  #8
                  hours of wasted time. finally fixed it!

                  the place to correct this WAS here in this file:

                  /usr/share/wireplumber/main.lua.d/50-alsa-config.lua

                  where session.suspend-timeout-seconds DOES appear, but it's on a line that ALSO has a "double dash" in front of the line,
                  which in the Lau language means "comment the rest this line" and not, "command line argument"
                  like in EVERY OTHER PART OF LINUX
                  (imo terrible choice. wtf. aren't # and ; enough??!?)

                  FSCK

                  so, you have to find this line, set the value to zero, AND then remove the double dash at the start of the line.

                  so on this file, on my machine, the ACTUAL corrected line looks like this:

                  Code:
                  ["session.suspend-timeout-seconds"] = 0
                  and it's WITHIN a 3-level nested Lua function, starting as "alsa_monitor.rules"
                  in a sub-section entitled "apply_properties = "

                  then you restart wireplumber on the command line with

                  Code:
                  systemctl --user restart wireplumber

                  and, the problem resolves.

                  Comment

                  Users Viewing This Topic

                  Collapse

                  There are 0 users viewing this topic.

                  Working...
                  X