QEMU VMs require a USB controller for hotplugging to work. MicroVM.nix automatically enables the USB controller when any static USB devices are added or when graphics.enable is set to true, but this is not the case for all AppVMs. For example, after the internal USB camera passthrough to ChromiumVM was commented out, there is no USB controller present and USB camera hotplugging no longer works. This fix addresses that issue.
Fixes SSRCSP-5500.
Checklist for things done
[x] Summary of the proposed changes in the PR description
[x] More detailed description in the commit message(s)
[x] Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
Description of changes
QEMU VMs require a USB controller for hotplugging to work. MicroVM.nix automatically enables the USB controller when any static USB devices are added or when graphics.enable is set to true, but this is not the case for all AppVMs. For example, after the internal USB camera passthrough to ChromiumVM was commented out, there is no USB controller present and USB camera hotplugging no longer works. This fix addresses that issue.
Fixes SSRCSP-5500.
Checklist for things done
x86_64
aarch64
riscv64
make-checks
and it passesnixos-rebuild ... switch
Instructions for Testing
Connect a USB camera to Lenovo X1 and make sure it's available in Chromium.