It just doesn’t work.
In /etc/modprobe.d/pci-vm.conf I’ve tried all of the following, each time after running:
grub2-mkconfig -o /boot/efi/EFI/fedora/grub/cfg
dracut -f
reboot
options snd_hd_intel probe_mask= every permutation from 1 - 7, each at a time.
options snd_hd_intel bdl_pos_adj=32
options snd_hd_intel position_fix= 1 and 2
options snd_hd_intel model=auto,enable_msi=0
None of these changed the symptom at all in the guest OS.
# cat /proc/asound/card0/codec#0
Codec: Nvidia GPU 84 HDMI/DP
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x10de0084
Subsystem Id: 0x104385b9
Revision Id: 0x100100
No Modem Function Group found
Default PCM:
rates [0x0]:
bits [0x0]:
formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
Power states: D0 D1 D2 D3 CLKSTOP EPSS
Power: setting=D0, actual=D0
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x04 [Pin Complex] wcaps 0x407381: 8-Channels Digital CP
Control: name="IEC958 Playback Con Mask", index=0, device=0
Control: name="IEC958 Playback Pro Mask", index=0, device=0
Control: name="IEC958 Playback Default", index=0, device=0
Control: name="IEC958 Playback Switch", index=0, device=0
Pincap 0x09000094: OUT Detect HBR HDMI DP
Pin Default 0x185600f0: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=01, enabled=1
Connection: 4
0x0a* 0x0b 0x0c 0x0d
Node 0x05 [Pin Complex] wcaps 0x407381: 8-Channels Digital CP
Control: name="IEC958 Playback Con Mask", index=1, device=0
Control: name="IEC958 Playback Pro Mask", index=1, device=0
Control: name="IEC958 Playback Default", index=1, device=0
Control: name="IEC958 Playback Switch", index=1, device=0
Pincap 0x09000094: OUT Detect HBR HDMI DP
Pin Default 0x185600f0: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=02, enabled=1
Connection: 4
0x0a* 0x0b 0x0c 0x0d
Node 0x06 [Pin Complex] wcaps 0x407381: 8-Channels Digital CP
Control: name="IEC958 Playback Con Mask", index=2, device=0
Control: name="IEC958 Playback Pro Mask", index=2, device=0
Control: name="IEC958 Playback Default", index=2, device=0
Control: name="IEC958 Playback Switch", index=2, device=0
Pincap 0x09000094: OUT Detect HBR HDMI DP
Pin Default 0x185600f0: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=03, enabled=1
Connection: 4
0x0a* 0x0b 0x0c 0x0d
Node 0x07 [Pin Complex] wcaps 0x407381: 8-Channels Digital CP
Control: name="IEC958 Playback Con Mask", index=3, device=0
Control: name="IEC958 Playback Pro Mask", index=3, device=0
Control: name="IEC958 Playback Default", index=3, device=0
Control: name="IEC958 Playback Switch", index=3, device=0
Pincap 0x09000094: OUT Detect HBR HDMI DP
Pin Default 0x185600f0: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=04, enabled=1
Connection: 4
0x0a* 0x0b 0x0c 0x0d
Node 0x08 [Pin Complex] wcaps 0x407381: 8-Channels Digital CP
Pincap 0x09000094: OUT Detect HBR HDMI DP
Pin Default 0x585600f0: [N/A] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Connection: 4
0x0a* 0x0b 0x0c 0x0d
Node 0x09 [Pin Complex] wcaps 0x407381: 8-Channels Digital CP
Pincap 0x09000094: OUT Detect HBR HDMI DP
Pin Default 0x585600f0: [N/A] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0xf, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Connection: 4
0x0a* 0x0b 0x0c 0x0d
Node 0x0a [Audio Output] wcaps 0x62b1: 8-Channels Digital Stripe
Converter: stream=0, channel=0
Digital: Enabled GenLevel
Digital category: 0x2
IEC Coding Type: 0x0
PCM:
rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
bits [0xe]: 16 20 24
formats [0x5]: PCM AC3
Unsolicited: tag=00, enabled=0
Node 0x0b [Audio Output] wcaps 0x62b1: 8-Channels Digital Stripe
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
bits [0xe]: 16 20 24
formats [0x5]: PCM AC3
Unsolicited: tag=00, enabled=0
Node 0x0c [Audio Output] wcaps 0x62b1: 8-Channels Digital Stripe
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
bits [0xe]: 16 20 24
formats [0x5]: PCM AC3
Unsolicited: tag=00, enabled=0
Node 0x0d [Audio Output] wcaps 0x62b1: 8-Channels Digital Stripe
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
bits [0xe]: 16 20 24
formats [0x5]: PCM AC3
Unsolicited: tag=00, enabled=0
So in the host (CentOS 7.5) I turned off PCI passthrough for both nVidia devices (sound and video), and set the Intel CPU sound to pass through to the guest with this systemd file:
[Unit]
Description=Deactivate nVidia sound card in host
After=systemd-libvirt-guests.service,libvirtd.service
Requires=systemd-libvirt-guests.service,libvirtd.service
[Service]
Type=oneshot
RemainAfterExit=yes
#ExecStart=/usr/bin/sh -c "virsh nodedev-dettach pci_0000_01_00_0"
#ExecStart=/usr/bin/sh -c "virsh nodedev-dettach pci_0000_01_00_1"
# Intel
ExecStart=/usr/bin/sh -c "virsh nodedev-dettach pci_0000_00_1f_3"
[Install]
WantedBy=multi-user.target
Unfortunately the service file can’t find libvirt.sock on boot so fails. And thus the Intel sound takes over and sound works in the host. When I manually:
virsh nodedev-dettach pci_0000_00_1f_3
… all sound stops. In KDE systemsettings I set the nVidia sound card to be the default, but the system remains mute, even as this setting survives boot.
Looks like I’ve made a mistake buying this card. In 22 years of running Linux exclusively I have never, never had this kind of stupid problem with sound. I have been without TV for 3 weeks now because of this and I am about to ditch this worthless card. Is this all because nVidia does not cooperate with Linux developers?