9
submitted 1 year ago* (last edited 1 year ago) by Infernal_pizza@lemmy.world to c/archlinux@lemmy.ml

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

you are viewing a single comment's thread
view the rest of the comments
[-] Infernal_pizza@lemmy.world 1 points 1 year ago

Interesting, how is your sound bar connected?

[-] skipperwannabe@lemm.ee 2 points 1 year ago* (last edited 1 year ago)

Initially, I used HDMI -> Soundbar -> Monitor. The soundbar handles the sound and forwards the video signal to the monitor. Right now, it's the same, except it is using display port for Laptop to Soundbar connection. Hope I understood the question correctly. If you ever figure out the delay, please do update with a solution.

[-] Infernal_pizza@lemmy.world 2 points 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 2 points 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.world 2 points 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 2 points 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.

[-] Infernal_pizza@lemmy.world 2 points 1 year ago

I'll let you know if I find anything, I've just posted on the Arch forums as well so hopefully someone there can help. If not then unfortunately this one might stay unsolved

this post was submitted on 03 Aug 2023
9 points (100.0% liked)

Arch Linux

7173 readers
28 users here now

The beloved lightweight distro

founded 4 years ago
MODERATORS