My HDMI display has a speaker, but very often if I try to play anything it makes a loud static noise and it’s driving me mad. Even just idling it sometimes makes noise. I haven’t found any viable fix and I want to prevent my laptop from seeing that the display is capable of outputting audio completely.
I have tried the following. It worked for kernel 6.12.87 (custom build) but not with kernel 7.0.3 (from nixpkgs/hydra). For 6.12.87 the HDMI output is gone from pavucontrol selection, as expected. But for 7.0.3 the display is still showing up in pavucontrol as “Ryzen HD Audio controller (HDMI plugged in)”, and the noise came back.
boot.extraModprobeConfig = ''
install snd_hda_codec_hdmi ${pkgs.coreutils}/bin/false
'';
boot.blacklistedKernelModules = [
"snd_hda_codec_hdmi"
];
Am I missing something? How can I figure out what kernel module is actually driving the HDMI audio and disable it permanently?
Thanks.