Audio pass through via HDMI often interrupted

Hi,

My issue:
Playing audio via HDMI to my AV receiver now has some freezes / “packet loss”. During playback it randomly seems to discard / drop some audio packets so that audio is missing for 1 or more seconds. The time and amount it happens is more or less random.

I had a 1070 before and it worked fine with audio via HDMI to my AV receiver. Now, since I got my 4070, I have issues every time I use it. Only Linux is affected. Windows works fine. So I guess it’s either the nvidia-drivers or pipewire.
Although I couldn’t see any errors with pipewire yet so far.
I also upgraded my kernel, drivers, pipewire. Nothing helped.
The only change I made when it first occurred was to replace my 1070 with the 4070.
It has been quite some weeks now, since I got my 4070 and I upgraded anything at least twice or more times already. Some pipewire guys also suspect issues with the GPU drivers, esp. since it worked perfectly fine before.
Anything is affected, Chrome, Firefox, mplayer, strawberry, mpg123. Anything.

Any ideas how to track it further down and, in the best case, be able to fix that?
nvidia-bug-report.log.gz (1.1 MB)

What monitor resolution are you using? Does enabling msi for snd_hda_intel help?

It’s 1920x1080. GPU->AV-Receiver->Full HD monitor.
Is it using snd_hda_intel? Ok, will try to enable MSI and report back soonish.

Sometimes the nvidia audio has issues with high resolution+high refresh rate monitor, shouldn’t be the case at 1080p.
Despite the name, the nvidia audio is indeed handled by the snd_hda_intel driver.

Didn’t help :(

# cat /sys/module/snd_hda_intel/parameters/enable_msi
1

Any official help would be pretty much appreciated. Because I’m really not sure how to debug that, since there are no errors or something else that helps to track down the issue.

I remember a driver bug where audio dropped out on gpu reclocking, please check by either setting “prefer maximum performance” in nvidia-settings/power-mizer or watching the performance levels to check.

https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2375

So I have set it to max performance and at least for the past ~40 Minutes it seems to be indeed totally fine. That might be it.

Yeah, so after about 2 hours I noticed only one cut. I’d tend to say that’s really it.
I haven’t tried that SMI stuff mentioned in the issue. But this seems to be indeed a driver issue here?

At least the driver’s behaviour regarding power management seems to trigger it. This issue seems to be rare and depending on hardware, as you noticed yourself, so it’s really hard to tell about the root cause.
Unrelated, I noticed some odd pcie gen values in your log

        GPU Link Info
            PCIe Generation
                Max                       : 3
                Current                   : 1
                Device Current            : 1
                Device Max                : 4
                Host Max                  : 4

Does it really only go up to gen 3 speed on max performance?

        GPU Link Info
            PCIe Generation
                Max                       : 3
                Current                   : 3
                Device Current            : 3
                Device Max                : 4
                Host Max                  : 4
            Link Width
                Max                       : 16x
                Current                   : 16x

That’s with max performance being set via nvidia-settings

Ok, just noticed you have an 11th gen intel cpu, only capable of gen3. So board and gpu support gen4 but get throttled by the cpu. All well.
Regarding audio, did you already check for a firmware update for your Denon AVR?

Yeah, my AVR is running the latest firmware already.

Hrm, really annoying actually. Either those cut/interruptions or 3-4 times the power draw :(

Using nvidia-smi -lmc should help with that to some degree. Unsatisfying, nevertheless.

Wouldn’t that lock the frequency to a specific or current selected value? So either full power or perhaps lowest frequency, depending on the value that’s set the moment I do this?

Yes, but mostly only the memory clocks and not the gpu clocks like “prefer maximum performance” does.

Yeah, so limiting the memory clock is indeed the real cause it seems. Anything works still fine so far, with the locked clock. Audio works, GPU stuff works.

It’d be nice if nvidia could take a look at it and fix it. I can try to help as much as possible by providing data, details and testing stuff.