PulseAudio does not automatically create an output sink for Nvidia DP/HDMI audio
Summary
PulseAudio does not automatically create an output sink for Nvidia DP/HDMI audio when a monitor is connected via DP or HDMI, although the sound output works with ALSA directly.
environment
PulseAudio 14.2 from Fedora 34, GNOME/X11, Nvidia driver version 470.57.02
Hardware: Dell Alienware m15 R5 with Nvidia RTX 3060 GPU, Optimus disabled (only Nvidia GPU working).
Steps to reproduce
- Connect a monitor to DP or HDMI port, look for the corresponding audio output in GNOME Settings or the command
pactl list sinks
. - Run
cat /proc/asound/card0/eld*
to check if the audio capability of the monitor is detected. - Unmute all outputs associated with the Nvidia card with
alsamixer
and then test the audio output withspeaker-test -c 2 -r 48000 -D hw:0,7
oraplay -D plughw:0,7 /usr/share/sounds/alsa/Noise.wav
with 7 for DP or 3 for HDMI. - Run
pactl load-module module-alsa-sink device=hw:0,7
and check GNOME Settings again.
What is the current bug behavior?
- After the monitor is connected, the HDMI audio option doesn't appear in GNOME Settings.
pactl list sinks
only shows the Realtek on-board audio of the computer. - However, the monitor audio is indeed recognized by the Nvidia card: eld_0.4.txt.
- I can hear the sound through the monitor audio output when I use the ALSA commands.
- After running
pactl load-module module-alsa-sink device=hw:0,7
, "HDA Nvidia" shows up in PulseAudio/GNOME and the sound works normally. Adding this todefault.pa
also works.
Also attaching the logs of PulseAudio: pulse.log.
What is the expected correct behavior?
The HDMI audio should automatically become available to choose from PulseAudio, because this seems to be how it works on another system I have with Intel graphics.