Possibly a clean solution for "USB device in use" problem

Discussion in 'Parallels Desktop for Mac' started by karunko, Oct 31, 2006.

  1. karunko

    karunko

    Messages:
    6
    1) Start Parallells and run your OS of choice;

    2) Plug in the USB device;

    3) From Parallels, select the device for the list at the bottom right for the screen;

    4) See the error message? Okay then try the following:

    - Open a Terminal and type the following four commands to unload the drivers marking the
    device "in use" (even though OS X doesn't know what to do with it):

    sudo kextunload -b com.apple.driver.AppleUSBCDC

    sudo kextunload -b com.apple.driver.AppleUSBCDCWCM

    sudo kextunload -b com.apple.driver.AppleUSBCDCACMData

    sudo kextunload -b com.apple.driver.AppleUSBCDCACMControl

    (Note: this is a non destructive action and the drivers will be loaded *again* next time
    you plug in any USB device).

    5) From Parallels, select the device from the list at the bottom right of the screen again
    and, this time, everything should work normally (assuming the proper drivers have been
    installed, etc.)



    Hope this helps!

    K.
     
  2. bennie

    bennie

    Messages:
    12
    Below are the responses I got when trying this on a MacBook.

    kextunload: unload id com.apple.driver.AppleUSBCDC failed (result code 0xe00002c2)
    kextunload: unload id com.apple.driver.AppleUSBCDCWCM failed (result code 0xe00002c2)
    kextunload: unload id com.apple.driver.AppleUSBCDCACMData failed (result code 0xe00002c2)
    kextunload: unload id com.apple.driver.AppleUSBCDCACMControl failed (result code 0xe00002c2)
     
  3. karunko

    karunko

    Messages:
    6
    Maybe different kernel extensions are loaded on a MacBook?

    You can try the following *before* plugging in the device you want to use from Parallels:

    1) Open a Terminal a make it as wide as possible so the output is easy to read;

    2) Type:
    kextstat
    and take note of the output (especially the last line and the number in the first column);

    3) Plug in the USB device and, after a couple of seconds, try to attach it to Paralels;

    4) After receiving the usual error message, use the kextstat command again and check
    the output for additional entries compared to step 2 (they should be at the bottom and
    the number in the first column could be >= 100).

    5) Try unloading those newly loaded extensions repeating the command:

    sudo kextunload -b com.apple.driver.WhateverHasBeenAdded


    Just fo the record, on my MacMini Intel Core Duo the last line from step 2 reads:

    95 0 0x2ef62000 0x5000 0x4000 com.apple.driver.XsanFilter (2.7.0) <34 11>

    and the additional extensions are loaded as 100, 101, etc.



    K.
     
  4. Miko

    Miko

    Messages:
    13

    Thanks for the tip but like the user abov i keep getting the error message:

    Code:
    failed (result code 0xe00002c2)
    :(
     
  5. Milkman

    Milkman

    Messages:
    2
    It sure does! You are now officially my hero !!! :D :D
    Parallels should hire you. and pay you big bucks.

    I can finally use the SonyEricsson PC suite to sync, backup, ... my SE m600i without dual booting.
    As the matter of fact I can completely get rid of the Bootcamp partition and regain 5 Gb of precious HD space.
    (Now if only Apple would finally release an iSync update that supports UIQ3 phones :mad: )

    Thank you!
    Hans.

    PS I'm on an MacBook Pro 2 GHz, running XP in Parallels 1940.
     
  6. MarkHolbrook

    MarkHolbrook

    Messages:
    350
    I checked both my MBP 15" running 10.4.8 and my MacMini also on 10.4.8. I didn't have a USB device plugged in. Without one plugged in these drivers don't seem to exist on either of my machines.

    I then plugged in a USB key into my MBP and a new driver appeared:

    com.apple.iokit.IOUSBMassStorageClass

    So I think these drivers may be somewhat device specific. But the idea is great.
     
  7. darkone

    darkone

    Messages:
    804
    ummm as with most OS's, the driver doesnt load, if you dont have the device plugged in...
     
  8. MarkHolbrook

    MarkHolbrook

    Messages:
    350
    Exactly my point but add: "driver loaded may be different for different devices"
     
  9. karunko

    karunko

    Messages:
    6
    *blushes*

    Well, glad to see I've helped somone! :)


    Anyway, as I seem to have have jumped to the wrong conclusion (i.e., assuming that the
    same drivers are loaded for every Mac model and every USB device attached) I would like
    to offer a more general approach:

    - On a "just booted" system open a terminal, make it wide enough to read the output
    comfortably, and type the command:

    kextstat

    - You're likely to see about a hundred or so lines and no, you're not supposed to remember all
    of them -- just take note of the very last one (especially the number on the left, which is even
    easier to remember);

    - Run Parallels;

    - Start the guest OS;

    - Plug in the USB device you can't attach because Parallels says it's in use by OS X;

    - After 2-3 seconds, try to select it from the USB devices list on the bottom right of the screen;

    - Frown at the error message about trying again in 5-10 seconds (okay, technically
    speaking this step is not required :D );

    - Back in the terminal, type the command:

    kextstat

    This time there should be more lines (4 on my Mac Mini but your mileage may vary). They
    *should* be the last in the list and they *should* contain someting like:

    com.apple.driver.USBsomethingOrTheOther

    at the very end of these new lines;

    - Now that we have a list of drivers hogging the USB device, we can unload them
    with a series o commands like:

    sudo kextunload -b com.apple.driver.USBsomethingOrTheOther

    Try to unload them in the same order as they appear in the list or, if this doesn't work,
    in last to first order but, by all means, MAKE SURE TO UNLOAD THE RIGHT ONES!
    (Sorry for caps but your Mac is likely to crash, freeze or just act weird if you don't pay
    attention here. Nothing that a reboot won't fix, but you've been warned).

    - Now that the unwanted drivers are (hopefully) out of the way, you can go back to
    Parallels and this time you *should* be able to attach the USB device and use it
    normally from wtihin the guest OS (Windows or whatever).


    At any rate, as this seems to be a fairly widespread problem, I figured it would be very
    nice of you to post your success/failure mini-reports here. Something simple like:

    It Works: Mac Mini 1.66 GHz Intel Core Duo, 1 GB RAM



    Good luck!

    K.
     
  10. Purplish

    Purplish Kilo Poster

    Messages:
    521
    This looks promising...but 2 quick questions before I try it.

    1) Do you have to re-execute this procedure everytime you reboot? Or for that matter every time you plug in the USB device?

    2) Have you automated this procedure in a script? Or is that too likely to make the Mac go casters up?

    Thanks!
     
  11. karunko

    karunko

    Messages:
    6
    1) After reboot: yes; after plugging a USB device: it depends. I haven't exeprimented much, but
    there seems to be some kind of "delay" before the kernel extensions are loaded again;

    2) Not automated as different Mac models and different USB devices seem to load different
    kernel extensions. This of course could be done, but I'm lazy and I need to connect my Nokia
    9500 just a couple of times a month! :) As I wrote in the previous post, just make sure to
    unload the right extension(s) and, as long as you don't go "unload happy" everything will be
    fine.



    K.
     
  12. dlhoefer

    dlhoefer

    Messages:
    7
    I'm having this identical problem. Have you come up with a fix?? Just got my MacBook Core 2 Duo last friday
     
  13. lh99

    lh99

    Messages:
    7
    Works, but not with MPLAB ICD2

    I was able to get this principle to work on my MBP 15" but not for the device that I really need -- the MPLAB ICD2 (embedded microcontroller programmer/debugger). When I plug it in, Parallels (Win XP) tries to capture it. It even installed the drivers the first time I used it. After that, it has just given the "Wait 5-10 seconds" error.

    Following the above instructions exactly, I don't find a single new Kernel Extension when the device is plugged in. I even copied the Terminal output into Excel and ran a compare on the kextstat output from before/after plugging in the ICD2. There is absolutely no change! Does this mean that OS X isn't capturing the device? If so, why can't Parallels? Parallels definitely sees it as a "Vendor Specific..." device in the list.

    Anyone else having a similar problem?
     
  14. ltf3

    ltf3

    Messages:
    14
    yes I am!

    I need a USB key for a PC app to run on Parallels. First time I tried it it went fine.

    However now I keep getting the "5-10 secs" message. I did the upgrade to build 1970... but no difference.

    If I perservere long enough plugging and unplugging eventually I can run the app. But it's a pain.

    I also have another USB device (a guitar) that shows in the list of USB devices... but never gets its driver loaded. The "5-10 secs" message always pos up.

    I tried all the trminal stuff here... nothing worked. On my MBPro under 10.4.8 the list of USB drivers seems standard.... nothing extra when new devices are connected.

    Seems like it's an issue that needs attention!

    Lee
     
  15. ltf3

    ltf3

    Messages:
    14
    well, I got my software dongle going...

    In the end I deactivated the USB Autoconnect. Seems to work much better if I plug in the dongle wait a bit, then activate it manually. The I get the Windows "dink donk" sound and all is well.

    However the USB guitar (a Fretlight 400 from Optek) won't go no matter what. Always the device in use message...:confused:

    Oh well...

    Lee
     
  16. CTP

    CTP

    Messages:
    5
    I can't Get My USB Dongle to work

    I have a macbook pro C2D. I tried all the terminal commands you said "kextstat" Bt I don't see anything new or anything to the effect of and able usb device when I plug my usb dongle in and hit "kextstat" again. There are no new drivers that show up. I to get the dreaded "USB device you are trying to connect to the virtual machine is being used by another process. Wait 5-10 seconds, then try to connect the device again. If this does not help, find the application that blocked up the device and disconnect it manually." Anythoughts? Without this dongle ey I can't use the single program I use in windows (the whole reason I bought parallels)

    p.s I also tried to deactivate autoconnect and waited but it still didn't work.
     
    Last edited: Nov 6, 2006
  17. CTP

    CTP

    Messages:
    5
    Bootcamp?

    I wonder what would happen if you ran the windows xp drivers cd you get from bootcamp on the VM? I am curious. Anythoughts?
     
  18. joem

    joem

    Messages:
    1,247
    Since the drivers are for totally different hardware, my only curiosity would be what sort of crash would I get.

    The VM is emulated hardware and is very different from the real hardware.
     
  19. CTP

    CTP

    Messages:
    5
    haha me too.
     
  20. CTP

    CTP

    Messages:
    5
    USB Update

    I spoke to a customer service reptoday and he said they had a client inquire about buying around 1000 copies of Parallels but they need to use dongle keys. He said he imagined they would be looking more into usb support for an update in the near future. I hope this is true:)
     

Share This Page