USB passthrough on Apple Silicon is unusable
Host environment
- Operating system: MacOS Ventura
- OS/kernel version: Darwin MacBook-Pro.local 22.6.0 Darwin Kernel Version 22.6.0: Sun Dec 17 22:13:25 PST 2023; root:xnu-8796.141.3.703.2~2/RELEASE_ARM64_T6020 arm64
- Architecture: ARM
- QEMU flavor: qemu-aarch64
- QEMU version: 8.2.1
- QEMU command line: one example: qemu-system-aarch64 -L /Applications/UTM.app/Contents/Resources/qemu -S -spice unix=on,addr=36789C18-E6FC-4A58-B549-6B00E11C96AF.spice,disable-ticketing=on,image-compression=off,playback-compression=off,streaming-video=off,gl=off -chardev spiceport,id=org.qemu.monitor.qmp,name=org.qemu.monitor.qmp.0 -mon chardev=org.qemu.monitor.qmp,mode=control -nodefaults -vga none -device virtio-net-pci,mac=26:62:F6:DE:8E:59,netdev=net0 -netdev vmnet-host,id=net0 -device virtio-ramfb -cpu host -smp cpus=8,sockets=1,cores=8,threads=1 -machine virt -accel hvf -drive if=pflash,format=raw,unit=0,file.filename=/Applications/UTM.app/Contents/Resources/qemu/edk2-aarch64-code.fd,file.locking=off,readonly=on -drive "if=pflash,unit=1,file=/Users/ball/Library/Containers/com.utmapp.UTM/Data/Documents/ParrotOS arm64 KDE.utm/Data/efi_vars.fd" -m 1024 -audiodev spice,id=audio0 -device intel-hda -device hda-duplex,audiodev=audio0 -device nec-usb-xhci,id=usb-bus -device usb-tablet,bus=usb-bus.0 -device usb-mouse,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 -device ich9-usb-ehci1,id=usb-controller-0 -device ich9-usb-uhci1,masterbus=usb-controller-0.0,firstport=0,multifunction=on -device ich9-usb-uhci2,masterbus=usb-controller-0.0,firstport=2,multifunction=on -device ich9-usb-uhci3,masterbus=usb-controller-0.0,firstport=4,multifunction=on -chardev spicevmc,name=usbredir,id=usbredirchardev0 -device usb-redir,chardev=usbredirchardev0,id=usbredirdev0,bus=usb-controller-0.0 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=usb-controller-0.0 -chardev spicevmc,name=usbredir,id=usbredirchardev2 -device usb-redir,chardev=usbredirchardev2,id=usbredirdev2,bus=usb-controller-0.0 -device usb-storage,drive=drivecdrom0,removable=true,bootindex=0,bus=usb-bus.0 -drive if=none,media=cdrom,id=drivecdrom0,readonly=on -device virtio-blk-pci,drive=drive0,bootindex=1 -drive "if=none,media=disk,id=drive0,file=/Users/ball/Library/Containers/com.utmapp.UTM/Data/Documents/ParrotOS arm64 KDE.utm/Data/data.qcow2,discard=unmap,detect-zeroes=unmap" -device virtio-serial -device virtserialport,chardev=org.qemu.guest_agent,name=org.qemu.guest_agent.0 -chardev spiceport,id=org.qemu.guest_agent,name=org.qemu.guest_agent.0 -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -chardev spicevmc,id=vdagent,debug=0,name=vdagent -device virtserialport,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0 -chardev spiceport,name=org.spice-space.webdav.0,id=charchannel1 -name "ParrotOS arm64 KDE" -uuid 36789C18-E6FC-4A58-B549-6B00E11C96AF -rtc base=localtime -device virtio-rng-pci
Emulated/Virtualized environment
- Operating system: Linux (various distros attempted)
- OS/kernel version: Debian 5.18.14 as one example
- Architecture: ARM
Description of problem
I can't get USB passthrough to work sufficiently well with wifi modems such as the RTL8187L or Atheros AR 9271.
I only use the VM as a router since the host OS doesn't have drivers for any external wifi modems. This is a setup I've used flawlessly many times in the past with other VMs on x86 platforms for many years, but with ARM it's been one fail after another. Parallels does work with the exact same host and guest, but fails in the networking area (plus it's expensive and overkill for something this simple). I mention this because I know the guest drivers work 100% with a different VM.
Steps to reproduce
- Run any Linux on QEMU on any Apple Silicon mac
- Attempt to use a Atheros AR 9271 USB device
- Various fails including a) USB device not showing up (lsusb) b) device shows up and Linux attempts to attach driver, but fails (lsmod shows driver loaded but no interface listed on iwconfig) c) interface shows up (never got the Atheros this far, but RealTek does) but the interface is slow, corrupts data, etc. d) after re-attaching several times it will eventually stop attaching at all requiring a MacOS system reboot, which is really annoying for my workflow.
It's basically non-functional for me. Atheros is 100% non-functional and RealTek 10% works (well enough to sometimes connect to the AP, but usually craps the bed if you try to do anything as simple as run a dhcp client to fetch the IP).
If anyone knows of any other Linux ARM on Mac ARM vm solutions that allow USB passthrough please let me know. Unfortunately, VirtualBox os currently not one of them.