[Unsolved] Sound card passthrough doesn't work properly inside Windows VM

Hi there!

I’m trying to passthrough a PCIe sound card (Creative Labs Sound Blaster X-Fi Titanium HD) to a Windows virtual machine to enjoy some hardware accelerated EAX effects in games but it doesn’t seem to be working properly inside a VM (no audio coming from the headphones, video playback becomes slowed down or speed up etc…)

Sometimes I also get this popup (inside Windows VM):

Windows has detected that audio enhancements for the following device are causing problems: Speakers (Creative SB X-Fi)
Would you like to disable Driver Enhancements for this device?

What I’ve tried:

  1. Using sound card on bare metal (i.e. no virtualization) both on Windows 10 and 11 with both unofficial drivers from Daniel and the official ones (it works fine)
  2. Passing through the PCIe sound card to a Linux (Ubuntu) guest (works fine out of the box)
  3. Passing to a different Windows VM (tried Windows 7, 10 and 11) - doesn’t work (devices is detected and there’s no error reported in Windows Device Manager but there’s no audio coming from the headphones and the entire system’s playback (both local video and YouTube) becomes weird: it will either refuse to play video, or it would play it but slowed down (still no audio from headphones, only video) or speed up)
  4. Tried enabling MSI with MSI Utility v3 inside Windows VM (didn’t help)
  5. Disabling all audio enhancements both in Windows settings and Creative Labs configuration panel
  6. Tried different (sound card) modes (Game mode, Creative Mode)

Sound card (just like the GPUs) is properly isolated from the host using kernel arguments:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash cpufreq.default_governor=performance nomodeset intel_iommu=on iommu=pt rd.driver.pre=vfio-pci vfio-pci.ids=10de:0ffe,10de:0e1b,1002:67c4,1002:aaf0,1b21:2142,1102:000b systemd.unified_cgroup_hierarchy=1 hid_apple.fnmode=2 hid_apple.swap_fn_leftctrl=1 hid_apple.swap_opt_cmd=1 hid_apple.ejectcd_as_delete=1"

IOMMU groups look ok:

IOMMU Group 0:
  00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3ec2] (rev 07)
IOMMU Group 1:
  00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
  00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8) [8086:1905] (rev 07)
  01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107GL [Quadro K2000] [10de:0ffe] (rev a1)
  01:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio Controller [10de:0e1b] (rev a1)
  02:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon Pro WX 7100] [1002:67c4]
  02:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0]
IOMMU Group 10:
  00:1c.4 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #5 [8086:a294] (rev f0)
IOMMU Group 11:
  00:1c.6 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #7 [8086:a296] (rev f0)
IOMMU Group 12:
  00:1d.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #9 [8086:a298] (rev f0)
IOMMU Group 13:
  00:1f.0 ISA bridge [0601]: Intel Corporation Z370 Chipset LPC/eSPI Controller [8086:a2c9]
  00:1f.2 Memory controller [0580]: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller [8086:a2a1]
  00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
  00:1f.4 SMBus [0c05]: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller [8086:a2a3]
IOMMU Group 14:
  00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-V [8086:15b8]
IOMMU Group 15:
  03:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 [144d:a808]
IOMMU Group 16:
  04:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller [1b21:2142]
IOMMU Group 17:
  05:00.0 Audio device [0403]: Creative Labs EMU20k2 [Sound Blaster X-Fi Titanium Series] [1102:000b] (rev 03)
IOMMU Group 18:
  07:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller [1b21:2142]
IOMMU Group 19:
  08:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller [1b21:2142]
IOMMU Group 2:
  00:02.0 VGA compatible controller [0300]: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630] [8086:3e92]
IOMMU Group 3:
  00:14.0 USB controller [0c03]: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [8086:a2af]
IOMMU Group 4:
  00:16.0 Communication controller [0780]: Intel Corporation 200 Series PCH CSME HECI #1 [8086:a2ba]
IOMMU Group 5:
  00:17.0 SATA controller [0106]: Intel Corporation 200 Series PCH SATA controller [AHCI mode] [8086:a282]
IOMMU Group 6:
  00:1b.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #17 [8086:a2e7] (rev f0)
IOMMU Group 7:
  00:1b.4 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #21 [8086:a2eb] (rev f0)
IOMMU Group 8:
  00:1b.6 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #23 [8086:a2ed] (rev f0)
IOMMU Group 9:
  00:1c.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #1 [8086:a290] (rev f0)

Here’s the entire list of PCIe devices (output of lspci):

00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3ec2] (rev 07)
  Subsystem: ASUSTeK Computer Inc. 8th Gen Core Processor Host Bridge/DRAM Registers [1043:872f]
  Kernel driver in use: skl_uncore
  Kernel modules: ie31200_edac
00:01.0 PCI bridge [0604]: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
  Kernel driver in use: pcieport
00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8) [8086:1905] (rev 07)
  Kernel driver in use: pcieport
00:02.0 VGA compatible controller [0300]: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630] [8086:3e92]
  DeviceName:  Onboard IGD
  Subsystem: ASUSTeK Computer Inc. CometLake-S GT2 [UHD Graphics 630] [1043:872f]
  Kernel modules: i915
00:14.0 USB controller [0c03]: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [8086:a2af]
  Subsystem: ASUSTeK Computer Inc. 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [1043:872f]
  Kernel driver in use: xhci_hcd
  Kernel modules: xhci_pci
00:16.0 Communication controller [0780]: Intel Corporation 200 Series PCH CSME HECI #1 [8086:a2ba]
  Subsystem: ASUSTeK Computer Inc. 200 Series PCH CSME HECI [1043:872f]
  Kernel driver in use: mei_me
  Kernel modules: mei_me
00:17.0 SATA controller [0106]: Intel Corporation 200 Series PCH SATA controller [AHCI mode] [8086:a282]
  Subsystem: ASUSTeK Computer Inc. 200 Series PCH SATA controller [AHCI mode] [1043:872f]
  Kernel driver in use: ahci
  Kernel modules: ahci
00:1b.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #17 [8086:a2e7] (rev f0)
  Kernel driver in use: pcieport
00:1b.4 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #21 [8086:a2eb] (rev f0)
  Kernel driver in use: pcieport
00:1b.6 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #23 [8086:a2ed] (rev f0)
  Kernel driver in use: pcieport
00:1c.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #1 [8086:a290] (rev f0)
  Kernel driver in use: pcieport
00:1c.4 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #5 [8086:a294] (rev f0)
  Kernel driver in use: pcieport
00:1c.6 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #7 [8086:a296] (rev f0)
  Kernel driver in use: pcieport
00:1d.0 PCI bridge [0604]: Intel Corporation 200 Series PCH PCI Express Root Port #9 [8086:a298] (rev f0)
  Kernel driver in use: pcieport
00:1f.0 ISA bridge [0601]: Intel Corporation Z370 Chipset LPC/eSPI Controller [8086:a2c9]
  Subsystem: ASUSTeK Computer Inc. Z370 Chipset LPC/eSPI Controller [1043:872f]
00:1f.2 Memory controller [0580]: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller [8086:a2a1]
  Subsystem: ASUSTeK Computer Inc. 200 Series/Z370 Chipset Family Power Management Controller [1043:872f]
00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
  Subsystem: ASUSTeK Computer Inc. 200 Series PCH HD Audio [1043:8735]
  Kernel driver in use: snd_hda_intel
  Kernel modules: snd_hda_intel
00:1f.4 SMBus [0c05]: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller [8086:a2a3]
  Subsystem: ASUSTeK Computer Inc. 200 Series/Z370 Chipset Family SMBus Controller [1043:872f]
  Kernel driver in use: i801_smbus
  Kernel modules: i2c_i801
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-V [8086:15b8]
  Subsystem: ASUSTeK Computer Inc. Ethernet Connection (2) I219-V [1043:8672]
  Kernel driver in use: e1000e
  Kernel modules: e1000e
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107GL [Quadro K2000] [10de:0ffe] (rev a1)
  Subsystem: Hewlett-Packard Company GK107GL [Quadro K2000] [103c:094c]
  Kernel driver in use: vfio-pci
  Kernel modules: nvidiafb, nouveau
01:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio Controller [10de:0e1b] (rev a1)
Subsystem: Hewlett-Packard Company GK107 HDMI Audio Controller [103c:094c]
  Kernel driver in use: vfio-pci
  Kernel modules: snd_hda_intel
02:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon Pro WX 7100] [1002:67c4]
  Subsystem: Dell Ellesmere [Radeon Pro WX 7100] [1028:0b0d]
  Kernel driver in use: vfio-pci
  Kernel modules: amdgpu
02:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0]
  Subsystem: Dell Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1028:aaf0]
  Kernel driver in use: vfio-pci
  Kernel modules: snd_hda_intel
03:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 [144d:a808]
  Subsystem: Samsung Electronics Co Ltd SSD 970 EVO Plus 1TB [144d:a801]
  Kernel driver in use: nvme
  Kernel modules: nvme
04:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller [1b21:2142]
  Subsystem: Device [2142:1b21]
  Kernel driver in use: vfio-pci
  Kernel modules: xhci_pci
05:00.0 Audio device [0403]: Creative Labs EMU20k2 [Sound Blaster X-Fi Titanium Series] [1102:000b] (rev 03)
  Subsystem: Creative Labs SB1270 [SoundBlaster X-Fi Titanium HD] [1102:0062]
  Kernel driver in use: vfio-pci
  Kernel modules: snd_ctxfi
07:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller [1b21:2142]
  Subsystem: ASUSTeK Computer Inc. ASM2142 USB 3.1 Host Controller [1043:8756]
  Kernel driver in use: vfio-pci
  Kernel modules: xhci_pci
08:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM2142 USB 3.1 Host Controller [1b21:2142]
  Subsystem: ASUSTeK Computer Inc. ASM2142 USB 3.1 Host Controller [1043:8756]
  Kernel driver in use: vfio-pci
  Kernel modules: xhci_pci

I’ve also created a /etc/modprobe.d/blacklist-ctxfi.conf file with blacklist snd_ctxfi to avoid any interference from the host.

Here’s an example of my XML:

Windows 7 (virt-manager) XML definition:
**<domain** type**=** "kvm"**>**

**<name>** win7_x64**</name>**

**<uuid>**618a742d-7e26-4ff1-9eda-d6b054b4391e**</uuid>**

**<metadata>**

**<libosinfo:**libosinfo xmlns**:**libosinfo**=**"http://libosinfo.org/xmlns/libvirt/domain/1.0"**>**

**<libosinfo:**os id**=**"http://microsoft.com/win/7"**/>**

**</libosinfo:** libosinfo**>**

**</metadata>**

**<memory** unit**=** "KiB"**>** 16777216**</memory>**

**<currentMemory** unit**=** "KiB"**>** 16777216**</currentMemory>**

**<vcpu** placement**=** "static"**>** 8**</vcpu>**

**<iothreads>** 1**</iothreads>**

**<cputune>**

**<vcpupin** vcpu**=** "0" cpuset**=** "1"**/>**

**<emulatorpin** cpuset**=** "10-11"**/>**

**<iothreadpin** iothread**=** "1" cpuset**=** "10-11"**/>**

**</cputune>**

**<os>**

**<type** arch**=**"x86_64" machine**=**"pc-i440fx-jammy"**>**hvm**</type>**

**<loader** readonly**=**"yes" type**=**"pflash"**>**/mnt/Samsung_500GB/VM/Windows/Win7/OVMF_win7_code.fd**</loader>**

**<nvram>**/mnt/Samsung_500GB/VM/Windows/Win7/win7_x64_VARS.fd**</nvram>**

**<bootmenu** enable**=** "no"**/>**

**</os>**

**<features>**

**<acpi/>**

**<apic/>**

**<hyperv** mode**=** "custom"**>**

**<relaxed** state**=** "on"**/>**

**<vapic** state**=** "on"**/>**

**<spinlocks** state**=** "on" retries**=** "8191"**/>**

**<vendor_id** state**=**"on" value**=**"1234567890ab"**/>**

**</hyperv>**

**<kvm>**

**<hidden** state**=** "on"**/>**

**</kvm>**

**<vmport** state**=** "off"**/>**

**<ioapic** driver**=** "kvm"**/>**

**</features>**

**<cpu** mode**=**"custom" match**=**"exact" check**=**"partial"**>**

**<model** fallback**=** "allow"**>** IvyBridge**</model>**

**<topology** sockets**=**"1" dies**=**"1" cores**=**"8" threads**=**"1"**/>**

**</cpu>**

**<clock** offset**=**"localtime"**>**

**<timer** name**=**"rtc" tickpolicy**=**"catchup"**/>**

**<timer** name**=**"pit" tickpolicy**=**"delay"**/>**

**<timer** name**=** "hpet" present**=** "no"**/>**

**<timer** name**=**"hypervclock" present**=**"yes"**/>**

**</clock>**

**<on_poweroff>** destroy**</on_poweroff>**

**<on_reboot>** restart**</on_reboot>**

**<on_crash>** destroy**</on_crash>**

**<pm>**

**<suspend-to-mem** enabled**=** "no"**/>**

**<suspend-to-disk** enabled**=** "no"**/>**

**</pm>**

**<devices>**

**<emulator>**/usr/bin/qemu-system-x86_64**</emulator>**

**<disk** type**=**"file" device**=**"cdrom"**>**

**<driver** name**=** "qemu" type**=** "raw"**/>**

**<source** file**=**"/home/samael/Downloads/creative_drivers12.iso"**/>**

**<target** dev**=** "hda" bus**=** "ide"**/>**

**<readonly/>**

**<address** type**=**"drive" controller**=**"0" bus**=**"0" target**=**"0" unit**=**"0"**/>**

**</disk>**

**<disk** type**=**"file" device**=**"disk"**>**

**<driver** name**=**"qemu" type**=**"qcow2"**/>**

**<source** file**=**"/mnt/Samsung_500GB/VM/Windows/Win7/win7_system_vol_v2.qcow2"**/>**

**<target** dev**=** "sda" bus**=** "sata"**/>**

**<boot** order**=** "1"**/>**

**<address** type**=**"drive" controller**=**"0" bus**=**"0" target**=**"0" unit**=**"0"**/>**

**</disk>**

**<controller** type**=**"usb" index**=**"0" model**=**"ich9-ehci1"**>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x04" function**=**"0x7"**/>**

**</controller>**

**<controller** type**=**"usb" index**=**"0" model**=**"ich9-uhci1"**>**

**<master** startport**=** "0"**/>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x04" function**=**"0x0" multifunction**=**"on"**/>**

**</controller>**

**<controller** type**=**"usb" index**=**"0" model**=**"ich9-uhci2"**>**

**<master** startport**=** "2"**/>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x04" function**=**"0x1"**/>**

**</controller>**

**<controller** type**=**"usb" index**=**"0" model**=**"ich9-uhci3"**>**

**<master** startport**=** "4"**/>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x04" function**=**"0x2"**/>**

**</controller>**

**<controller** type**=** "pci" index**=** "0" model**=** "pci-root"**/>**

**<controller** type**=** "sata" index**=** "0"**>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x05" function**=**"0x0"**/>**

**</controller>**

**<controller** type**=**"virtio-serial" index**=**"0"**>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x06" function**=**"0x0"**/>**

**</controller>**

**<controller** type**=** "ide" index**=** "0"**>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x01" function**=**"0x1"**/>**

**</controller>**

**<serial** type**=** "pty"**>**

**<target** type**=**"isa-serial" port**=**"0"**>**

**<model** name**=**"isa-serial"**/>**

**</target>**

**</serial>**

**<console** type**=** "pty"**>**

**<target** type**=** "serial" port**=** "0"**/>**

**</console>**

**<channel** type**=** "spicevmc"**>**

**<target** type**=**"virtio" name**=**"com.redhat.spice.0"**/>**

**<address** type**=**"virtio-serial" controller**=**"0" bus**=**"0" port**=**"1"**/>**

**</channel>**

**<input** type**=**"mouse" bus**=**"ps2"**/>**

**<input** type**=**"keyboard" bus**=**"ps2"**/>**

**<input** type**=**"mouse" bus**=**"usb"**>**

**<address** type**=** "usb" bus**=** "0" port**=** "1"**/>**

**</input>**

**<graphics** type**=** "spice" autoport**=** "yes"**>**

**<listen** type**=** "address"**/>**

**<image** compression**=**"off"**/>**

**<gl** enable**=** "no"**/>**

**</graphics>**

**<audio** id**=** "1" type**=** "none"**/>**

**<video>**

**<model** type**=**"vga" vram**=**"16384" heads**=**"1" primary**=**"yes"**/>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x02" function**=**"0x0"**/>**

**</video>**

**<hostdev** mode**=**"subsystem" type**=**"pci" managed**=**"yes"**>**

**<source>**

**<address** domain**=**"0x0000" bus**=**"0x04" slot**=**"0x00" function**=**"0x0"**/>**

**</source>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x0a" function**=**"0x0"**/>**

**</hostdev>**

**<hostdev** mode**=**"subsystem" type**=**"pci" managed**=**"yes"**>**

**<source>**

**<address** domain**=**"0x0000" bus**=**"0x01" slot**=**"0x00" function**=**"0x0"**/>**

**</source>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x08" function**=**"0x0" multifunction**=**"on"**/>**

**</hostdev>**

**<hostdev** mode**=**"subsystem" type**=**"pci" managed**=**"yes"**>**

**<source>**

**<address** domain**=**"0x0000" bus**=**"0x01" slot**=**"0x00" function**=**"0x1"**/>**

**</source>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x09" function**=**"0x0"**/>**

**</hostdev>**

**<hostdev** mode**=**"subsystem" type**=**"pci" managed**=**"yes"**>**

**<source>**

**<address** domain**=**"0x0000" bus**=**"0x05" slot**=**"0x00" function**=**"0x0"**/>**

**</source>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x0b" function**=**"0x0"**/>**

**</hostdev>**

**<memballoon** model**=** "virtio"**>**

**<address** type**=**"pci" domain**=**"0x0000" bus**=**"0x00" slot**=**"0x07" function**=**"0x0"**/>**

**</memballoon>**

**</devices>**

**</domain>**

Is there any way to get this sound card working properly inside a virtual machine? (perhaps tweak some ‘clock’ or CPU parameters inside VM’s definition etc…)

I’d really like to be able to play games with proper EAX effects inside my Windows VMs. Any help would be much appreciated! Thanks in advance :wink:

My solution: install Windows on bare metal.

Virtual machines are great for many things except for sensitive drivers like these Creative Labs ones.

P.S. instead of upgrading to Windows 11 I’ve downgraded to Windows 7… on Asus ProArt X870E-CREATOR WIFI motherboard and AMD 7950x CPU :sunglasses: