No sound via DisplayPort on GeForce RTX 3060 Ti

I get no sound with the headphones connected via the monitor, whereas if I jack them into the audio port on the front directly, the audio does indeed play (using aplay somefile.wav). The machine is not a laptop, but a stationary thing.

The problem occurred after dist-upgrade’ing from debian 11.x to 12.0, keeping the same kernel version and nvidia driver version as before. So I suspect there is something wrong in user-land, primarily. This kernel is custom built, but audio via monitor worked pre-upgrade.

I have checked the usual suspects: muted channels, tried every output there is. Pavucontrol displays “sound activity” on “GA104 High Definition Audio Controller Digital Stereo (HDMI)”.

If I press CTRL+ALT+F1 and switch to the virtual console with an “aplay” running in the background, the music switches on. As soon as I switch back with CTRL+ALT+F7 the music switches off again. This lead me to believe that there’s some switching going on there and that it is somehow related to the kernel module or the handling around it.

nvidia-bug-report.log.gz (395.9 KB)

UPDATE: After some hours of testing this out, I narrowed down the problem. If I do

~ aplay -D plughw:CARD=NVidia,DEV=3 testfile.wav

after I switched to

xrandr --output DP-0 --rate 144 --mode 2560x1440

then I get silence. If I switch back to:

xrandr --output DP-0 --rate 60 --mode 2560x1440

and then run the aplay command, then the sound plays again. Audio also plays with:

~ xrandr --output DP-0 --rate 143.86 --mode 2560x1440

It is almost as if the difference between 144 and 143.86 is that it leaves some bandwidth for the audio…