utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.6k stars 1.33k forks source link

setting USB 2.0 doesn't really work with ARM64 VMs #5150

Open d0wntime opened 1 year ago

d0wntime commented 1 year ago

Describe the issue Setting USB support to USB 2.0 in a VM appears to not disable XHCI/USB3, and devices (including the USB2 bus) are still attached to a USB3 bus. This is visible in the QEMU options in the VM that's fired up in ps auxww output or by using the export command button.

-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

downtime 26532 12.0 0.8 420142624 271536 ?? S 1:52PM 0:03.64 /Applications/UTM.app/Contents/XPCServices/QEMUHelper.xpc/Contents/MacOS/QEMULauncher.app/Contents/MacOS/QEMULauncher /Applications/UTM.app/Contents/Frameworks/qemu-aarch64-softmmu.framework/Versions/A/qemu-aarch64-softmmu -L /Applications/UTM.app/Contents/Resources/qemu -S -spice unix=on,addr=/Users/peter/Library/Group Containers/WDNLXAD4W8.com.utmapp.UTM/26284E6C-0FF4-4C8F-ABC1-D9295E8146D9.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 vmxnet3,mac=AA:36:98:45:EB:06,netdev=net0 -netdev vmnet-shared,id=net0 -device virtio-ramfb -cpu cortex-a57 -smp cpus=2,sockets=1,cores=2,threads=1 -machine virt-7.2,virtualization=on -accel tcg,tb-size=2048 -drive if=pflash,format=raw,unit=0,file=/Applications/UTM.app/Contents/Resources/qemu/edk2-aarch64-code.fd,readonly=on -drive if=pflash,unit=1,file=/Users/peter/VMs/CS470/cloud.cs470.local.utm/Data/efi_vars.fd -m 8192 -device intel-hda -device hda-duplex -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=drive3B12B39B-EEF4-4B79-B0BA-A2874149BA20,removable=true,bootindex=0,bus=usb-bus.0 -drive if=none,media=cdrom,id=drive3B12B39B-EEF4-4B79-B0BA-A2874149BA20,file=/Users/peter/tmp/VMs/ESXi-arm64/VMware-VMvisor-Installer-7.0.0-21447677.aarch64.iso,readonly=on -device nvme,drive=driveA0153FF4-9E69-4964-9F7F-5EE17E297918,serial=A0153FF4-9E69-4964-9F7F-5EE17E297918,bootindex=1 -drive if=none,media=disk,id=driveA0153FF4-9E69-4964-9F7F-5EE17E297918,file=/Users/peter/VMs/CS470/cloud.cs470.local.utm/Data/A0153FF4-9E69-4964-9F7F-5EE17E297918.qcow2,discard=unmap,detect-zeroes=unmap -device virtio-serial -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 cloud.cs470.local -uuid 26284E6C-0FF4-4C8F-ABC1-D9295E8146D9 -rtc base=localtime -device virtio-rng-pci -device virtio-balloon-pci

Configuration

Crash log
not applicable

Debug log
attached

Upload VM
attached config.plist.txt debug.log

osy commented 1 year ago

The problem here is that you’re using ARM64 which doesn’t have any supported USB 2.0 bus.

aonez commented 1 year ago

It does work using emulation, so it does work.

d0wntime commented 1 year ago

which are you saying works @aonez ? you're missing a couple words.

UTM's UI isn't working if I tell it to give me only USB 2.0, and it gives me XHCI. please just give me an unsupported bus ... USB 2.0 may not have a supported bus, but I do have devices working on an OS that doesn't like QEMU's XHCI implementation, by means of attaching external devices. with this OS, I have to use an external keyboard to get keyboard input to work.