How to remove Nvidia HDMI audio output in PulseAudio?

in 18.10 i was able to fix it

file /etc/modprobe.d/blacklist.conf
add

blacklist snd_hda_codec_hdmi

Just set the soundcard's profile to "off", for example:

pactl set-card-profile alsa_card.usb-Generic_ThinkPad_Dock_USB_Audio-00 off

pavucontrol can do this is well in its "Configuration" tab:

enter image description here

An alternative is to completely disable any auto connect functionality in pulseaudio, however I like this functionality in the case of my bluetooth headset. With the above solution you can disable soundcards in a fine-grained manner.


1. Delete User Settings

Another approach prior to editing the default.pa would be to rename the hidden directory ~/.pulseaudio to something like ~/.pulseaudio.000 in your /home directory. This is where your user defined setup is stored. If deleted or renamed it will immediately be recreated from the /etc/pulse/default.pa settings.

2. Edit Defaults

Only if this has no effect for your system then maybe udev loads the HDMI interface as default sink. Then one approach could be as already mentioned by HagenaarsDotNu to edit the default.pa. Mind to make a backup of the current default.pa. Look for this section which is pretty self-explaining (mind that hal-detect will not work in Ubuntu >10.04).

### Load audio drivers statically (it's probably better to not load
### these drivers manually, but instead use module-hal-detect --
### see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink
#
### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Alternatively use the static hardware detection module (for systems that
### lack udev support)
load-module module-detect
.endif

3. The Elegant Way

Another more elegant way to get audio working is to enable "Simultaneous Output" from paprefs as depicted here:

paprefs

This enables audio output on both, the internal audio, and the HDMI-Interface. Make this virtual output device your default and you have all options at your hands.