Closed mlozier closed 2 years ago
Connecting the iPhone is near the top of the list.
Yes I believe you can passthrough a USB webcam quite easily.
I have only attempted the iPhone passthrough, a few months ago.
See for generic passthrough https://github.com/sickcodes/Docker-OSX#allow-usb-passthrough
Alternatively, it would be possibly to connect using Linux + checkra1n's usbmuxd hax and then passthrough the iPhone that way. I'll work on it after I finish up what I'm currently doing but here is what might work https://github.com/libimobiledevice/usbmuxd
Working guide here by Reddit user "stochad"
On my laptop everything runs on the same IOMMU group for whatever strange reason... So I either cannot use any USB's and just the iPhone or passthrough. Working on this, however.
Snipped from: https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Setting_up_IOMMU
#!/bin/bash
shopt -s nullglob
for g in `find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V`; do
echo "IOMMU Group ${g##*/}:"
for d in $g/devices/*; do
echo -e "\t$(lspci -nns ${d##*/})"
done;
done;
Whichever group the iPhone is within, everything within that IOMMU group must be passed in together.
iPhone passthrough has been solved here: https://github.com/sickcodes/Docker-OSX/issues/133#issuecomment-836855901
I am yet to try it but it is confirmed working.
This is still an issue due to usb resetting in non-vfio mode.
However, if the stars align and your iommu groups are separated properly, or you have linux-zen with acs override patch (extremely dangerous security-wise), you can split the groups up and pass through the iPhone in an orderly fashion.
At your own risk, see dangers: https://vfio.blogspot.com/2014/08/iommu-groups-inside-and-out.html
Arch users easy-way to test:
linux-zen
, available on the AUR (add -zen
at GRUB/rEFInd).pcie_acs_override=downstream,multifunction
Every time I return to this my keyboard/trackpad/external drives get sucked into the VM through the phat iommu group and need to reboot.
Cool way would be use usbredirserver
: https://github.com/sickcodes/dock-droid#passthrough-android-webcam-camera-over-the-network
Interesting article from @MacMiniVault about USB redirections: https://www.macminivault.com/sharing-a-usb-device-with-a-remote-mac/
I swear we should be able to just literally usb redir the iPhone like this lol https://github.com/sickcodes/dock-droid#passthrough-android-webcam-camera-over-the-network
This has now been fixed, uploading docs soon
This script is awesome!! I'm having difficulty getting USB to work. I want to connect an iPhone to my host laptop and have it show in the MacOS guest. Also, my laptop's webcam is connected to the USB bus -- I would like for it to show so that FaceTime can be used. Do you have any information on this?
Thanks so much!