QEMU/KVM and GPU Passthrough Troubleshooting
Guest GPU Audio Crackling and IRQ xx: Nobody Cared Fix
Windows
The solution of the issue Guest GPU HDMI Audio Crackling, Broken or Losing is well explained by Jonp at UNRAID Forums. In short we must try to enable the MSI – Message Signaled Interrupts option if the device support it. Here is a detailed step-by-step instruction how to do that.
I was mentioned the kernel command irqpool
as solution for this issue, but in my opinion and according to some other posts, provided in the references section, this setting is an actual solution for the problem irq 44: nobody cared (try booting with the "irqpool" option); handlers: vfio_intx_handler; Disabling IRQ #44
, that appears at my system when booting a VM with GPU passthrough with a display attached to it, which was causing host system reboot.
Linux
Linux guests usually enable MSI by themselves. To force use of MSI for GPU audio devices, use the following command and reboot.
sudo lspci -nnv -s 02:00
- Note the lines
Kernel driver in use: vfio-pci
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF119 [NVS 315] [10de:107c] (rev a1) (prog-if 00 [VGA controller]) Subsystem: NVIDIA Corporation GF119 [NVS 315] [10de:102f] Physical Slot: 1 Flags: bus master, fast devsel, latency 0, IRQ 255, NUMA node 0 Memory at fa000000 (32-bit, non-prefetchable) [size=16M] Memory at 23ff0000000 (64-bit, prefetchable) [size=128M] Memory at 23ff8000000 (64-bit, prefetchable) [size=32M] I/O ports at d000 [size=128] Expansion ROM at fb000000 [disabled] [size=512K] Capabilities: [60] Power Management version 3 Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [78] Express Endpoint, MSI 00 Capabilities: [b4] Vendor Specific Information: Len=14 <?> Capabilities: [100] Virtual Channel Capabilities: [128] Power Budgeting <?> Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?> Kernel driver in use: vfio-pci Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia 02:00.1 Audio device [0403]: NVIDIA Corporation GF119 HDMI Audio Controller [10de:0e08] (rev a1) Subsystem: NVIDIA Corporation GF119 HDMI Audio Controller [10de:102f] Physical Slot: 1 Flags: fast devsel, IRQ 255, NUMA node 0 Memory at fb080000 (32-bit, non-prefetchable) [disabled] [size=16K] Capabilities: [60] Power Management version 3 Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [78] Express Endpoint, MSI 00 Kernel driver in use: vfio-pci Kernel modules: snd_hda_intel
References
- UNRAID Forums: Windows 10 VM Losing Audio
- UNRAID Forums: Kernel Disabling IRQ #16
- RedHat ListMAN: Kernel panic at vfio_intx_handler leads to low performance in guest VM
- Alex Williamson: VFIO tips and tricks (at vifo.blogspot.com): Usefully Q&A
- Proxmox Wiki: Pci passthrough » HDMI Audio crackling/broken
Hide the Warnings KVM: vcpu0 ignored rdmsr
sudo nano /etc/modprobe.d/kvm.conf
options kvm report_ignored_msrs=0 # Or: GRUB_CMDLINE_LINUX_DEFAULT="... kvm.report_ignored_msrs=0 ..."
sudo update-initramfs -u -k all
- Note, according to my experience, this option may cause crashes of the host system!?
References
- Proxmox: How to stop warnings "kvm: vcpu0 ignored rdmsr"
- ignore_msrs for host CPU being ignored
KVM Modeinfo
modinfo kvm
filename: /lib/modules/5.4.0-77-generic/kernel/arch/x86/kvm/kvm.ko
license: GPL
author: Qumranet
srcversion: 20C68083F39E14AB616D0B8
depends:
retpoline: Y
intree: Y
name: kvm
vermagic: 5.4.0-77-generic SMP mod_unload modversions
sig_id: PKCS#7
signer: Build time autogenerated kernel key
sig_key: 67:66:2F:F8:26:8F:56:E9:37:7F:B7:AD:33:FA:97:31:CA:7F:FF:50
sig_hashalgo: sha512
signature: 6C:0B:65:F9:46:AC:D8:B7:94:E8:B9:9D:A0:4B:97:E6:63:52:5A:FF:
...
parm: nx_huge_pages:bool
parm: nx_huge_pages_recovery_ratio:uint
parm: ignore_msrs:bool
parm: report_ignored_msrs:bool
parm: min_timer_period_us:uint
parm: kvmclock_periodic_sync:bool
parm: tsc_tolerance_ppm:uint
parm: lapic_timer_advance_ns:int
parm: vector_hashing:bool
parm: enable_vmware_backdoor:bool
parm: force_emulation_prefix:bool
parm: pi_inject_timer:bint
parm: halt_poll_ns:uint
parm: halt_poll_ns_grow:uint
parm: halt_poll_ns_grow_start:uint
parm: halt_poll_ns_shrink:uint