The steps described in this guide reflect what worked for me on my specific hardware and software setup. Your experience may vary depending on your system configuration. I am not responsible for any damage, data loss, or malfunction resulting from following this guide. Proceed at your own risk. Make sure to back up important data before making any system changes.
This guide provides a comprehensive walkthrough for passing through a Creative Labs Sound Blaster audio card to a Windows virtual machine on a Debian 12 host. This is necessary because native Linux drivers are often unavailable for these cards. The process involves overcoming IOMMU grouping issues by replacing the kernel and setting up network-based audio routing for a complete solution.
- No Inputs yet passed to the Linux
- No automatic startup yet (but simple to do manually)
i get about 100ms latency. you cant feel it unless you really look closely at lips or at syncing tests.
- You must know AT LEAST basic linux commands
- You must be confident with doing these steps
Before starting, you must enable virtualization and IOMMU support in your system's BIOS/UEFI.
- Goal: Enable hardware virtualization features required for VFIO.
- Actions:
- Reboot your computer and enter the BIOS/UEFI setup.
- Find and enable SVM Mode (for AMD CPUs) or VT-d (for Intel CPUs).
- Find and enable the IOMMU setting.
- Save changes and exit the BIOS/UEFI.
The most significant hurdle is often poor IOMMU grouping by the motherboard's firmware, which can prevent device passthrough.
- Action: A common first step is to add the
pcie_acs_override=downstream,multifunctionparameter to theGRUB_CMDLINE_LINUX_DEFAULTline in/etc/default/grub, followed bysudo update-grub. - To find your pci ID, run this command:
lspci -nn | grep -i "creative" | sed 's/^.*\[\([0-9a-f:]*\)\].*$/\1/'- (it should output something like this 1102:0010, if not DO NOT CONTINUE)
- Add this to the GRUB_CMLINE_LINUX_DEFAULT line in your grub config and replace the pci id with yours:
iommu=pt tsc=reliable vfio-pci.ids=(pci id) pcie_acs_override=downstream,multifunction - Save the file and run
sudo update-grubto apply. - Reboot Your System, and run
lspci -k | grep -i "Creative" -A 2. If the line "Kernel driver in use:" saysvfio-pci, then it was successfull so far. - If not, you need to troubleshoot why, because the VM doesnt see the card.
First run this command to check if you have this issue:
for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d); do echo "IOMMU Group ${g##*/}:"; for d in $g/devices/*; do echo -e "\t$(lspci -nns ${d##*/})"; done; done
If the device with the name "Creative" is in a seperate group (in some cases there is a "PCIe to PCI Bridge" with it, which is okay), you can skip this part.
If not, it means that your kernel does not seperate the devices, which means we cannot just take the Soundblastercard into the VM, we need to take ALL hardware of that group which is impossible. To fix this, we need a custom Kernel, i personally use XanMod, and it works perfectly for me. NOTE: For NVIDIA drivers to work, you NEED to use the LTS variant.
XanMod installation:
Here is their official site: https://xanmod.org/
Add the apt repository and PGP key from there.
Then install the LTS variant of the kernel sudo apt install linux-xanmod-lts-x64vX but replace the X with the version your CPU needs (listed on the site).
After installation reboot, you may need to reinstall some drivers (if you need wifi and it doesnt work, just reboot and select the debian kernel in GRUB).
After that is finished, run:
for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d); do echo "IOMMU Group ${g##*/}:"; for d in $g/devices/*; do echo -e "\t$(lspci -nns ${d##*/})"; done; done
and make sure the creative card is in a seperate group (in some cases there is a "PCIe to PCI Bridge" with it, which is okay).
If this is true, we are done with the hardest part! Nice!
I recommend the Tiny11 iso 24H2 to save on system resources:
https://archive.org/details/tiny-11-24-h-2-x-64-26100.1742
And its reccommended to install other VM drivers with the virtio iso:
https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/ (use the latest or stable)
Run these commands to ensure your VM will have internet:
sudo virsh net-start default
sudo virsh net-autostart default
Create a minimal and efficient Windows 11 VM using virt-manager.
-
Hypervisor: QEMU/KVM
-
Guest OS: Windows 11 (Debloated recommended)
-
Firmware: UEFI x86_64 with Secure Boot (
OVMF_CODE.secboot.fd) -
CPU/RAM: Start with 2 cores and ~3GB RAM.
-
Storage: Create a 20-30gb storage drive, probably too much but better more than less..
-
Passthrough Device: Add the Creative Labs PCI Host Device (add device -> pcie -> select the creative device).
-
Remove Virtual Hardware: Delete the default virtual sound card (e.g., ich9) and any unneeded USB redirectors.
-
Drivers: Attach the
virtio-win.isoto a virtual CD-ROM drive to install guest drivers during the Windows setup. -
Install: install the Windows OS and after that the virtio drivers
-
After install: After install, remove any windows password, and run
-
reg ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device" /v DevicePasswordLessBuildVersion /t REG_DWORD /d 0 /f -
in cmd. After that open "netplwiz", and unckeck "Users must enter a password to use this computer".
-
Set static ip: go to system settings and set your ip adress to
192.168.122.2to be static. -
Installing a web browser: to install a web browser, use CMD and run
winget install firefoxand install your preferred firefox version. -
Installing Soundblaster driver: Now open firefox and install the drivers for your soundblaster card.
-
Done!! After a reboot of the VM, your Soundblaster card should turn on!! :D
Since the host's audio is now separate from the guest's, you need a way to route it. This method uses a high-quality network stream, which is ideal if you lack a physical S/PDIF loopback.
-
If your motherboard has a S/PDIF OUT port, just connect it to the S/PDIF IN port of your soundblaster (if it has one), and enable it to be heard in the soundblaster command app.
If not, follow this:
IMPORTANT: You need ffmpeg on both Host and VM.
On your linux host run: sudo apt install ffmpeg
On the windows VM go to https://github.com/GyanD/codexffmpeg/releases/latest and download the "XXXXXXXXXXXXfull_build.zip" zip file.
Extract the file and place it in C:\ffmpeg.
You need to MAKE SURE the ffplay.exe is EXACTLY in C:\ffmpeg\bin\ffplay.exe or else it will NOT work
-
- open your bashrc or zshrc:
nano ~/.zshrcornano ~/.bashrcbased on what you use
- open your bashrc or zshrc:
-
- paste this code at the end of the file:
audio-start() {
if ! pw-cli ls Node | grep -q 'node.name = "SoundBlaster"'; then
echo "✨ Creating SoundBlaster audio sink..."
pw-cli create-node adapter \
"{ factory.name=support.null-audio-sink media.class=Audio/Sink object.linger=true node.name=SoundBlaster audio.rate=48000 audio.format=F16LE audio.channels=2 }"
else
echo "ℹ️ SoundBlaster audio sink already exists."
fi
if pgrep -f "ffmpeg.*udp://192.168.122.2:9999" > /dev/null; then
echo "⚠️ Audio stream is already running."
else
echo "✅ Starting audio stream..."
nohup pw-cat --record --target SoundBlaster.monitor --format f16 --rate 48000 - | /usr/bin/ffmpeg -f f16le -ar 48000 -ac 2 -i - -acodec pcm_f16le -f f16le udp://192.168.122.2:9999 &> /dev/null &
fi
}
audio-stop() {
if pgrep -f "ffmpeg.*udp://192.168.122.2:9999" > /dev/null; then
echo "⛔ Stopping audio stream..."
pkill -f "ffmpeg.*udp://192.168.122.2:9999"
else
echo "ℹ️ No audio stream running."
fi
}
-
- Save the file and exit
- Run
source ~/.zshrcto apply those changes. (may need to close and open terminal for it to really apply)
- create a text file, and type the following content inside:
@echo off C:\ffmpeg\bin\ffplay.exe -ch_layout stereo -f f16le -ar 48000 -nodisp -fflags nobuffer -flags low_delay -i udp://0.0.0.0:9999?buffer_size=131072%overrun_nonfatal=1 - rename it to
start_audio_reciever.bat - press Win+R and run
shell:startupand place thestart_audio_reciever.batinside the folder.
Important tips: Based on your setting in the Soundblaster, you can change the bitrate to be 24 or 32 bit by changing the
f16leandpcm_f16lefrom 16 to 24 or 32. For crystal clear audio! Same with the 48000, just change to anything you need. Note that these changes have to apply to ALL files and lines containing these string, so go thru all slowly!Currently i use 32bit 384000.
-
- open your bashrc or zshrc:
nano ~/.zshrcornano ~/.bashrcbased on what you use
- open your bashrc or zshrc:
-
- paste this code at the end of the file:
vm-start() {
echo "✅ Starting VM 'win11-audio'..."
virsh --connect qemu:///system start vm-name
echo "⏳ Waiting 5 seconds for VM to boot before starting audio..."
sleep 5
audio-start
}
vm-stop() {
echo "✅ Stopping audio..."
audio-stop
echo "✅ Shutting down VM 'win11-audio'..."
virsh --connect qemu:///system shutdown win11-audio
}
-
- Change
vm-nameto your actual VM name. To find the name out, run:virsh --connect qemu:///system list --all. - Save the file and exit
- Run
source ~/.zshrcto apply those changes. (may need to close and open terminal for it to really apply)
(or vm-stop to stop the VM and audio stream...)
To safely shutdown the VM when you shut down or reboot your pc, do this:
-
run
sudo nano /etc/default/libvirt-guests -
uncomment the lines
ON_SHUTDOWN=shutdown(and make sure it says "shutdown") andSHUTDOWN_TIMEOUT=30(i think 30 is a good timeout). -
Save the file and exit
-
run
sudo systemctl enable libvirt-guests.service -
run
sudo systemctl restart libvirt-guests.serviceThat's it! Now your windows guest will shutdown safely with your host.
- Change

