I use DisplayPort audio as my main output, and it seems there is a slight delay between the sink being started and me actually hearing anything (the audio isn’t delayed I just miss the start). I’ve managed to mostly fix it by disabling suspend on idle, so now once I’ve played some audio once its fine.

However when I reboot I then miss the first bit of audio again. I have no idea what I need to do to fix this. If I try to manually enable the sink with with pacmd suspend 0 I still get the same issue. The only potential fix I can think of is to set a KDE startup command for pacmd play-file and point it to a very short silent audio file. Does anyone have any better ideas?

Edit: I forgot to mention, when suspend on idle is enabled there is an audible pop every time the audio starts and suspends. With suspend on idle disabled I still hear this pop on login (and the first time audio is played) which suggests something is happening when I log in

Edit 2: Apparently it still does it every time the audio stream switches to a different app, however if I start the second one playing before I pause the first it starts straight away

  • Infernal_pizza@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I’ve found a janky fix that seems to work. I noticed that if you start a second audio stream while the first one was still playing it started straight away. There is a pulseaudio module called module-sine which generates a constant sine wave and you can choose the frequency.

    So I added load-module module-sine frequency=1 to /etc/pulse/default.pa. This constantly plays an inaudible sound wave which seems to keep the stream alive and stops the popping/delays. I’m not 100% sure if that is a good fix or not as you are effectively constantly playing audio, but I can’t find a better way to solve it!

    • SkipperWannabe@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I guess that’s one way to fix it. Thanks for letting me know.

      However, I think I will keep searching for a different fix. Playing a sound constantly will keep on nagging me, even though it shouldn’t. Also I am worried about what will happen when an application like mpv wants full access to the device, but there is an ongoing stream there.

      On a side note, since this came up and I have been paying attention, I noticed that some of the system notification sound that I keep missing are caused due to this delay :(

      On the plus side, since I almost constantly listen to some music at low volume, I might actually be doing your fix in a round about manual way. This was how I noticed that system notification played fine, if music was already playing, but not otherwise.

      • Infernal_pizza@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        One other suggestion I saw was to create a file under /etc/modprobe.d/disableHdaPowersave.conf with the content options snd-hda-intel power_save=0, but that made no difference to me. If you do find anything else please let me know as I’m not 100% happy with my solution!

        • SkipperWannabe@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Thanks, but that didn’t make any difference for me as well. I will let you know if I find anything else.