From 27f97f6c45f025ed6da965daeada79f66dea1a91 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 27 Oct 2025 18:48:27 +0000 Subject: [PATCH] monitors/alsa: Increase headroom for VMware and VirtualBox Ubuntu received reports of very bad audio stuttering when running 25.10 in VMware & Virtualbox on Windows 11 hosts. ac0d8ee4a88113c831963b2c01d9139d79ddc4a1 dropped the headroom from 8192 samples to 2048. This seems fine for QEMU+KVM, but for unknown reasons, the system emulation on Windows with these VMware/Virtualbox is much slower, and xruns become frequent. See: https://bugs.launchpad.net/ubuntu/+source/wireplumber/+bug/2127250 https://discourse.ubuntu.com/t/vm-ubuntu2025-10-on-vmware-workstation-and-sound-problem/71066/3 --- src/config/wireplumber.conf.d/alsa-vm.conf | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/config/wireplumber.conf.d/alsa-vm.conf b/src/config/wireplumber.conf.d/alsa-vm.conf index c7b9693c..9b1e6b81 100644 --- a/src/config/wireplumber.conf.d/alsa-vm.conf +++ b/src/config/wireplumber.conf.d/alsa-vm.conf @@ -19,5 +19,25 @@ monitor.alsa.rules = [ api.alsa.headroom = 2048 } } + }, + # VMware & VirtualBox on Windows hosts require more headroom to + # avoid stuttering. + { + matches = [ + { + node.name = "~alsa_input.pci.*" + cpu.vm.name = "~^(vmware)|(oracle)$" + } + { + node.name = "~alsa_output.pci.*" + cpu.vm.name = "~^(vmware)|(oracle)$" + } + ] + actions = { + update-props = { + api.alsa.period-size = 1024 + api.alsa.headroom = 8192 + } + } } ]