Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB device not recognized #3975

Closed
zwb124 opened this issue May 3, 2022 · 70 comments
Closed

USB device not recognized #3975

zwb124 opened this issue May 3, 2022 · 70 comments

Comments

@zwb124
Copy link

zwb124 commented May 3, 2022

utm 3.2.1 cannot recognize any USB devices in vm

Configuration

  • UTM Version: 3.2.1
  • OS Version: macOS 12.3.1
  • Apple Silicon,macbook 14
@freebrowser1
Copy link

freebrowser1 commented May 3, 2022

Here (using UTM 3.1.5, same macOS M1 version), a USB stick is recognized, but an external harddisk (the small blue Samsung T7 2TB) formatted to exFAT is not recognized.
The Ubuntu 20.04 VM lists nothing in sudo fdisk -l.

@Kexkey
Copy link

Kexkey commented May 4, 2022

Same here. When playing with Input configs, USB Support and number of USB Devices, I can sometimes get my USB stick to be available from within the VM but then networking/Internet doesn't work. When removing USB support, networking is available again. I unfortunately couldn't find a pattern for this, I tried a lot of different combinations. So when I need to access the data on my USB storage, I make sure I don't need net access, copy my stuff and then restart the VM without USB and can go on.

More details: M1. Debian VM. Using sudo lsblk to list devices. Simply sudo apt update to test networking. When networking is down, I can't ssh @localhost (makes sense), I need to use VM console. Can't ping IP addresses either, getting Network is unreachable.

@SmartBoy84
Copy link

SmartBoy84 commented May 5, 2022

I'm having the same issue on my device, an iPhone SE 2, 14.4.

@osy
Copy link
Contributor

osy commented May 6, 2022

@zwb124 Is this issue new to 3.2.1? Can the same device be recognized in 3.1.5?

@zwb124
Copy link
Author

zwb124 commented May 6, 2022

@zwb124 Is this issue new to 3.2.1? Can the same device be recognized in 3.1.5?

yes,3.2.1,it seems good in 3.1.5,I don't remember.

@osy osy added this to the v3.2 milestone May 6, 2022
@osy
Copy link
Contributor

osy commented May 6, 2022

@zwb124 Is your device USB 3.0 and did you enable USB 3.0?

image

@zwb124
Copy link
Author

zwb124 commented May 7, 2022

@zwb124 Is your device USB 3.0 and did you enable USB 3.0?

image

yes,it is enable

@osy
Copy link
Contributor

osy commented May 7, 2022

Do you get any error message? Can you enable logging in QEMU settings and provide the log?

@zwb124
Copy link
Author

zwb124 commented May 7, 2022

No,There are no error messages,The VM did not respond when the USB device was plugged in

Here is the log:
Running: -L /Applications/UTM.app/Contents/Resources/qemu -S -qmp tcp:127.0.0.1:4000,server,nowait -nodefaults -vga none -spice "unix=on,addr=/Users/zhouwenbo/Library/Group Containers/WDNLXAD4W8.com.utmapp.UTM/2BCCA292-D7D6-469E-922D-CB6CFBEDC04C.spice,disable-ticketing=on,image-compression=off,playback-compression=off,streaming-video=off,gl=off" -device virtio-ramfb -cpu host -smp cpus=4,sockets=1,cores=4,threads=1 -machine virt,highmem=off -accel hvf -accel tcg,tb-size=1024 -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/zhouwenbo/Library/Containers/com.utmapp.UTM/Data/Documents/Windows11.utm/Images/efi_vars.fd -boot menu=on -m 4096 -device intel-hda -device hda-duplex -name Windows11 -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 qemu-xhci,id=usb-controller-0 -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=cdrom0,removable=true,bootindex=0,bus=usb-bus.0 -drive if=none,media=cdrom,id=cdrom0 -device nvme,drive=drive0,serial=drive0,bootindex=1 -drive if=none,media=disk,id=drive0,file=/Users/zhouwenbo/Library/Containers/com.utmapp.UTM/Data/Documents/Windows11.utm/Images/data.qcow2,discard=unmap,detect-zeroes=unmap -device virtio-net-pci,mac=DA:6E:A0:A5:6F:B5,netdev=net0 -netdev vmnet-shared,id=net0 -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 -uuid 2BCCA292-D7D6-469E-922D-CB6CFBEDC04C -rtc base=localtime -device virtio-rng-pci
WARNING: Image format was not specified for '/Users/zhouwenbo/Library/Containers/com.utmapp.UTM/Data/Documents/Windows11.utm/Images/efi_vars.fd' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
qemu-aarch64-softmmu: warning: Spice: playback:0 (0x12d08f140): setsockopt failed, Operation not supported on socket
qemu-aarch64-softmmu: warning: Spice: record:0 (0x12d08f1e0): setsockopt failed, Operation not supported on socket
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514
qemu-aarch64-softmmu: warning: vmnet: packet is too big, 0 > 1514

@osy
Copy link
Contributor

osy commented May 7, 2022

You got the pop up when you plugged it in and the second pop up to allow attaching of the usb?

@zwb124
Copy link
Author

zwb124 commented May 7, 2022

You got the pop up when you plugged it in and the second pop up to allow attaching of the usb?

no pop up

https://github.com/zwb124/tempfile/blob/main/output.mp4?raw=true

@osy
Copy link
Contributor

osy commented May 7, 2022

I can't seem to access that. Is it hosted in a private repo? Anyways are you saying you were able to see the popup on 3.1.5 but on 3.2.1 there is no popup?

@zwb124
Copy link
Author

zwb124 commented May 7, 2022

I can't seem to access that. Is it hosted in a private repo? Anyways are you saying you were able to see the popup on 3.1.5 but on 3.2.1 there is no popup?

yes,it is

@osy
Copy link
Contributor

osy commented May 7, 2022

Can you reupload the video so it is not private?

@zwb124
Copy link
Author

zwb124 commented May 7, 2022

I changed it to public

@osy
Copy link
Contributor

osy commented May 7, 2022

Thank you.

If you remove the drive from your computer. Then, while UTM is in the foreground, plug in the USB drive again. Do you see a prompt from UTM asking if you want to attach the drive? (Both on 3.1.5 as well as on 3.2.1)

@osy
Copy link
Contributor

osy commented May 7, 2022

Another thing: did you download the release from https://github.com/utmapp/UTM/releases or from TestFlight.

@zwb124
Copy link
Author

zwb124 commented May 7, 2022

3.1.5 yes, 3.2.1 no response in any case

@osy
Copy link
Contributor

osy commented May 7, 2022

Oh! This isn't a UTM issue at all. I just updated to macOS 12.3.1 and I get the same issue (USB drives not detected, some other USB devices work fine). This seems to be a macOS bug...

Can you confirm by running 3.1.5 on 12.3.1?

@zwb124
Copy link
Author

zwb124 commented May 7, 2022

@osy
Copy link
Contributor

osy commented May 7, 2022

Okay, I just unplugged and re-plugged in the drive and it still works so never mind the macOS bug theory...

@osy
Copy link
Contributor

osy commented May 7, 2022

Can you confirm two things?

  1. The drive is USB 3.0
  2. You downloaded UTM 3.2.1 from GitHub release page OR TestFlight?

@zwb124
Copy link
Author

zwb124 commented May 7, 2022

1、USB 3.0 and 2.0 have this problem
2、utm 3.1.5 and 3.2.1 downloaded from GitHub release page

@osy
Copy link
Contributor

osy commented May 7, 2022

Do you have a USB 2.0 only hub you can test by plugging your USB 3.0 device into?

@zwb124
Copy link
Author

zwb124 commented May 7, 2022

USB 2.0 USB flash disk and 3.0 portable hard disk have this problem in utm 3.2.1,utm 3.1.5 both ok

@osy
Copy link
Contributor

osy commented May 7, 2022

testlibusb.zip

Can you download this and run:

$ xattr -d com.apple.quarantine testlibusb
$ ./testlibusb
$ sudo ./testlibusb

And post the output?

@zwb124
Copy link
Author

zwb124 commented May 7, 2022 via email

@osy
Copy link
Contributor

osy commented May 7, 2022

Can you run sudo /Applications/UTM.app/Contents/MacOS/UTM, create a new empty VM, start it and try to attach USB (you do not need to install any OS).

@osy

This comment was marked as off-topic.

@peterboivin

This comment was marked as off-topic.

@haima23
Copy link

haima23 commented May 17, 2022

Okay, as I am unable to reproduce this bug, I will have to move it to the future. If other people are experiencing this issue (including other people in this thread), please reply with the following:

What is the USB device that is having issues? An stick with Bar Ilan Responsa software
What version of UTM and macOS (including if it's Apple Silicon or Intel)? UTM 3.2.3 and M1 Pro with 13.4
What version of UTM did the same device last work on? I don't remember but it was work.
Do you see your device listed when you click the USB icon? If so, do you get an error message when you select it? I don't see.

@osy

This comment was marked as outdated.

@haima23

This comment was marked as outdated.

@chrisx8
Copy link

chrisx8 commented May 18, 2022

I'm having this issue with the latest version of UTM (v3.2.3) on MacOS 12.4 (Apple Silicon). UTM just doesn't recognize any USB device, even in the USB device menu in the top-right of VM windows.

  1. What is the USB device that is having issues?
    Seemingly all of them, including a SanDisk USB 3.0 flash drive, a generic JMicron based USB3.0-SATA enclosure, and a Yubikey 5 (USB 2.0).
  2. What version of UTM and macOS (including if it's Apple Silicon or Intel)?
    UTM v3.2.3, MacOS 12.4, Apple Silicon
  3. What version of UTM did the same device last work on?
    v3.1.5
  4. Do you see your device listed when you click the USB icon? If so, do you get an error message when you select it?
    No device listed.
  5. Follow USB device not recognized #3975 (comment) and post the results.
    I was moving USB devices around because I don't have enough ports...
$ ./testlibusb
Dev (bus 2, device 1): 1050 - 0407 speed: 12M
  Manufacturer:              Yubico
  Product:                   YubiKey OTP+FIDO+CCID
Dev (bus 0, device 1): 152D - 0578 speed: 5G
  Manufacturer:              JMicron
  Product:                   USB to ATA/ATAPI Bridge

$ sudo ./testlibusb
Dev (bus 2, device 1): 1050 - 0407 speed: 12M
  Manufacturer:              Yubico
  Product:                   YubiKey OTP+FIDO+CCID
Dev (bus 0, device 1): 152D - 0578 speed: 5G
  Manufacturer:              JMicron
  Product:                   USB to ATA/ATAPI Bridge

$ ./testlibusb
Dev (bus 2, device 1): 0781 - 5591 speed: 5G
  Manufacturer:              SanDisk
  Product:                   Ultra USB 3.0
Dev (bus 0, device 1): 152D - 0578 speed: 5G
  Manufacturer:              JMicron
  Product:                   USB to ATA/ATAPI Bridge

$ sudo ./testlibusb
Dev (bus 2, device 1): 0781 - 5591 speed: 5G
  Manufacturer:              SanDisk
  Product:                   Ultra USB 3.0
Dev (bus 0, device 1): 152D - 0578 speed: 5G
  Manufacturer:              JMicron
  Product:                   USB to ATA/ATAPI Bridge

@osy
Copy link
Contributor

osy commented May 18, 2022

@chrisx8 are the two devices that gets listed in testlibusb what you expect? Are you plugging them directly into your computer or through a usb hub (or a hub in your display)?

@chrisx8
Copy link

chrisx8 commented May 18, 2022

@osy testlibusb listed everything I plugged in. Everything is plugged in directly to the laptop (MacBook Pro 14", M1 Pro).

@osy
Copy link
Contributor

osy commented May 18, 2022

Can you do this after clicking the USB button on the toolbar and not seeing any devices:

  1. Open Activity Monitor
  2. Find UTM process and double click
  3. Click "Sample", copy paste the text to a .txt file, and attach it here.

@chrisx8
Copy link

chrisx8 commented May 18, 2022

@osy I did this for both v3.1.5 (works as expected) and v3.2.3 (no USB detected). See Sample output below:

sample_3.1.5.txt
sample_3.2.3.txt

@osy osy removed this from the Future milestone May 20, 2022
@osy
Copy link
Contributor

osy commented May 20, 2022

It was quite a journey but I finally managed to find the root cause: https://gitlab.freedesktop.org/spice/spice-gtk/-/issues/157

@osy osy closed this as completed in cd1b903 May 20, 2022
@osy
Copy link
Contributor

osy commented May 20, 2022

And this is why you shouldn't update all your dependencies at once. I had to sift through QEMU, libusbredir, libusb, spice-gtk and finally find the root cause which is a bad logic (introduced 2 years ago!!) that always ignores USB devices with address 0x1. Now the question is how come nobody else who uses SPICE ran into this before? Is there something on Linux that precludes devices from having address 0x1?

osy added a commit that referenced this issue May 20, 2022
Due to bad logic in SPICE, any device with address 0x1 is ignored.

Fixes #3975
@zwb124
Copy link
Author

zwb124 commented May 21, 2022

The USB problem has been solved. Thank you very much!

@soumik00
Copy link

soumik00 commented Sep 6, 2022

Hiii 👋🏿
I am facing problems to connect usb adapter on UTM(Mac m1)..... plz anyone help me😇
Screenshot 2022-09-06 at 7 13 56 PM
Screenshot 2022-09-06 at 7 14 07 PM

@binnichtaktiv
Copy link

binnichtaktiv commented Oct 27, 2022

Okay, as I am unable to reproduce this bug, I will have to move it to the future. If other people are experiencing this issue (including other people in this thread), please reply with the following:

  1. What is the USB device that is having issues?
  2. What version of UTM and macOS (including if it's Apple Silicon or Intel)?
  3. What version of UTM did the same device last work on?
  4. Do you see your device listed when you click the USB icon? If so, do you get an error message when you select it?
  5. Follow USB device not recognized #3975 (comment) and post the results.

What is the USB device that is having issues?

SanDisk 3.2Gen1 or every other usb stick i try
What version of UTM and macOS (including if it's Apple Silicon or Intel)?

UTM 4.0.9 macOS Ventura 13.0 m1 iMac
What version of UTM did the same device last work on?

thats my first time using UTM

Do you see your device listed when you click the USB icon? If so, do you get an error message when you select it?

When i select usb 3.0 in vm settings there is nothing just the utm pop up to allow the stick to connect to the vm nothing more. not in device manager etc. when i select usb 2.0 i get a error message in my vm (win11) that there is a problem with this device(there is no problem its working fine on macos and on my laptop(win10))
Bildschirm­foto 2022-10-27 um 20 38 56

its says: USB device not recognized.
The last USB device that was connected to this computer did not work properly and is not recognized by Windows.

Follow #3975 (comment) and post the results.

Last login: Thu Oct 27 18:10:05 on ttys000
jonasb.@iMacvonJonas ~ % cd /Users/jonasb./Downloads
jonasb.@iMacvonJonas Downloads % xattr -d com.apple.quarantine testlibusb
jonasb.@iMacvonJonas Downloads % ./testlibusb
Dev (bus 1, device 4): 0781 - 5583 speed: 5G
Manufacturer: USB
Product: SanDisk 3.2Gen1
Dev (bus 1, device 6): 05E3 - 0749 speed: 5G
Manufacturer: Generic
Product: USB3.0 Card Reader
Dev (bus 1, device 2): 2109 - 2817 speed: 480M
Manufacturer: VIA Labs, Inc.
Product: USB2.0 Hub
Dev (bus 1, device 1): 2109 - 0817 speed: 5G
Manufacturer: VIA Labs, Inc.
Product: USB3.0 Hub
jonasb.@iMacvonJonas Downloads % sudo ./testlibusb
Password:
Dev (bus 1, device 4): 0781 - 5583 speed: 5G
Manufacturer: USB
Product: SanDisk 3.2Gen1
Dev (bus 1, device 6): 05E3 - 0749 speed: 5G
Manufacturer: Generic
Product: USB3.0 Card Reader
Dev (bus 1, device 2): 2109 - 2817 speed: 480M
Manufacturer: VIA Labs, Inc.
Product: USB2.0 Hub
Dev (bus 1, device 1): 2109 - 0817 speed: 5G
Manufacturer: VIA Labs, Inc.
Product: USB3.0 Hub
jonasb.@iMacvonJonas Downloads %

@c-goes
Copy link

c-goes commented Nov 12, 2022

I can't connect a NVMe disk that is in an USB enclosure to a Linux VM. This is the log from the kernel.
Bildschirm­foto 2022-11-12 um 22 35 57

@lukechable
Copy link

I also can't get any USB external drives to show. But more confusingly, i NEVER have the input menu available that is showing for everyone else on the left sidebar. I've updated to the latest beta in an attempt to get it working, but still not INPUT option in the menu... Not sure what i'm doing wrong here.
I'm on an M1 Max Macbook, Trying to do latest ventura virtualized. Any tips to get that input option showing would be amazing...

I've taken an image from above, showing the highlighted input option in the sidebar menu. This is what i don't have, no matter what i do.

228114810-7dca9389-24d2-4119-9f4f-0e17cb0723b9

@zwb124
Copy link
Author

zwb124 commented Mar 28, 2023

You can try adjusting each setting in the input options one by one, then start the virtual machine, and after that, close the virtual machine. Then set the input options back to their original settings and start the virtual machine again to see if the issue is fixed. If not, you can continue modifying the settings and repeat the above steps until the issue is resolved.

@lukechable
Copy link

Screenshot 2023-03-28 at 4 42 24 pm

I don't have any input options at all.

@djmtype
Copy link

djmtype commented Apr 14, 2023

Having the same issues as @binnichtaktiv. My devices are shown correctly in USB list. But, as soon as I select one, I get a popup in Windows, stating it's unrecognized. Samsung Evo - ExFat format. Using UTM 4.1.6, Windows 11 arm on MacOS 13.3.1, M1 arm

@huuub
Copy link

huuub commented Jun 28, 2023

Why is this issue closed? It is clearly still an issue?

@Corentin7301
Copy link

Hi there!
Has a solution finally been found, as I have the same problem of USB devices not being recognized or even detected...
I'm on UTM : 4.3.5 and whether it's with a Parrot VM or Windows 7 VM, it doesn't work.
I'm using a Macbook Pro M1.
I have the two confirmation windows that open when the USB device is connected.

@dharmtej-0206
Copy link

dharmtej-0206 commented Nov 7, 2023

Does flashing software or firmware on your phone work in UTM? They do open and work fine, but those applications are not able to detect my Android phone. Is there a workaround? By the way, I have used the Mi Flash Tool, but sadly, it has no Mac alternatives. My device is a M2 running Sonoma 14.1. Any suggestions are accepted; let me know if there is a workaround for this issue. I do get the pop-ups asking for permission, but the flash tool is not detecting them.By the way, I also installed adb tools.

@NaotoFujihiro
Copy link

NaotoFujihiro commented Dec 25, 2023

I faced the same issue.
In my case, allowing UTM to access the USB device was needed.

Here's my environment.

$ sw_vers
ProductName:		macOS
ProductVersion:		14.1
BuildVersion:		23B74
Version 4.4.5 (94)

Screenshot 2023-12-25 at 14 56 15
Screenshot 2023-12-25 at 14 56 53
Screenshot 2023-12-25 at 14 57 00

@Yuriy-Nayda
Copy link

I faced the same issue. In my case, allowing UTM to access the USB device was needed.

Here's my environment.

$ sw_vers
ProductName:		macOS
ProductVersion:		14.1
BuildVersion:		23B74
Version 4.4.5 (94)

Screenshot 2023-12-25 at 14 56 15 Screenshot 2023-12-25 at 14 56 53 Screenshot 2023-12-25 at 14 57 00

Have same issue. 500GB SSD is well seen on VMWare Fusion , from where i did a backup of Windows 10 to this SSD, and then when conecting same SSD to UTM, windows on UTM can not see it saying device is not recognized. As well MacOS when SSD connected to it sees it well.

@Yuriy-Nayda
Copy link

that's crazy: i have used another type-c to type-c cable and mentioned above by me SSD got connected to the Windows on UTM!!

@safts
Copy link

safts commented Jul 19, 2024

that's crazy: i have used another type-c to type-c cable and mentioned above by me SSD got connected to the Windows on UTM!!

Funny enough, same thing happened to me. I was using the manufacturer's cable, which is a beefy USB3 type c cable. Switching to a USB2 one made my drive available in the linux VM (I can see it with fdisk -l where previously I could not). Crazy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests