Jump to content

usb difficulties in VirtualBox, bug# 39567


Recommended Posts

I am running 1.6.2 of VirtualBox non OSE version and have a difficulty accessing USB devices. I find that I can only access the device in the WinXP guest if I have had the usb device plugged in before I booted the system.

 

I see a bug that essentially says the same thing:

 

http://www.nabble.com/-Bug-39567--NEW:-Vir...td16378686.html

 

Does anyone else still have this problem, or is it supposed to have been fixed?

 

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

No, it definitely does not happen here... although I'm not using Mandriva. For me, ver. 1.6.2 is the very first one that USB 2.0 is working properly- before that it was a total mess.

Please try the usual remedy: adding to your /etc/fstab something like

none			/proc/bus/usb	usbfs	devgid=XXX,devmode=664 	0	0

 

Replace "XXX" with the actual gid your "vboxusers" group has in your system. Now reboot.

If you still have issues, and you don't mind a slight security risk, replace "664" with "666" (don't be afraid, there's nothing devilish about it... :D ).

Edited by scarecrow
Link to comment
Share on other sites

I already had that entry in /etc/fstab. From the supplied link, I got the idea that it was a Mandriva-only bug. It does work as long as I plug in the usb device (a Garmin Forerunner 305 gps watch) before I boot. That means to change usb devices I have to bring my system down -- not a good Linux advertisement.

Edited by RVDowning
Link to comment
Share on other sites

If it is any consolattion to you RV, I have spent most of my time today wrestling with the same problem, and funnily enough it is also a gps device that I am trying to connect to (Navman Pin). I gave up in the end because the whole thing was just about impossible. Let me define impossible. First you have a connection to the device, then 5 minutes later you don't, then an hour later you do, then 5 minutes later you don't etc.etc.

 

The whole business of USB connections in Virtualbox is a nightmare and it seems to have got worse just recently, I used to be able to connect to this device regularly until I updated to the Sun version of Virtualbox. (Perhaps they are trying to bring the PUEL version more in line with the OSE version?). I can't offer you much help with it, the 'fstab' entry that you have already helped me for a while but the connection just dropped for no reason about 5 minutes later in the middle of transferring data to the device, and so it went on.

 

Like yourself I also have an XP guest on version 1.6.2.

 

The only other thing you might look at is firewall settings, if you have a standalone firewall on the XP guest. Best advice is to unplug your phone line from the modem and then switch the firewall off.

 

There are some very long and unresolved bug reports about this kind of behaviour on the net, so it is not just you and me.

Link to comment
Share on other sites

Well, helping to confuse the issue is that I'm not real sure about Garmin software either.

 

Anyway, at the moment, it seems to work as long as I have the device plugged in when I bring up the system. I only got WinXP because of the Garmin stuff, so I could load new drivers into the devices, and also use their Training Center. I was able to download a Runner's World marathon training schedule into the Garmin Training Center, and then download that schedule into my Garmin Forerunner 305 gps watch. Unfortunately, Garmin doesn't know how to spell Linux. Sigh.....

 

I also want to be able to keep my Garmin Nuvi 350 (car gps device) updated.

 

I do notice that the entry I added to /etc/fstab causes a long pause in the boot process. It stops at that instruction for a good minute. That is annoying. I wonder if there is anyway to access usb from the WinXP guest without that entry.

 

I'll post back if I find out anything new.

 

Rich

Link to comment
Share on other sites

I do notice that the entry I added to /etc/fstab causes a long pause in the boot process. It stops at that instruction for a good minute. That is annoying.

 

You are damn right that is annoying, luckily it doesn't happen to me which I find difficult to explain as well.

 

You have definitely got the right 'devgid' in there have you? And your user account is a member of 'vboxusers'?

 

Other than those two things I can't think of anything else that might cause it.

Link to comment
Share on other sites

scarecrow:

 

The bug I quoted in my first message above is a Mandriva specific bug. I wouldn't expect it to affect other distributions.

 

viking777:

 

Yes, the "devgid" etc is right. Otherwise I wouldn't be able to access the USB in WinXP at all.

 

 

I also see the following bug which seems to be similar: http://www.nabble.com/-Bug-41281--NEW:-usb...td17680376.html

Link to comment
Share on other sites

scarecrow:

 

The bug I quoted in my first message above is a Mandriva specific bug. I wouldn't expect it to affect other distributions.

 

Yes, I understand this, but still it's weird having to reboot the machine to make it work.

What about plugging the USB device, and then restarting hal and/or unloading/reloading the "vboxdrv" module?

Remove vboxdrv from your modules loaded at startup, and then create a script similar to that one:

#! /bin/bash
modprobe vboxdrv
service hal restart
VirtualBox

Name it say "vboxstart", copy it to a system PATH, say /usr/bin, add it to the apps that can be sudo'ed, and whenever you plug your USB device call it with "sudo vboxstart".

Does it work now?

Edited by scarecrow
Link to comment
Share on other sites

I have managed to find a workround for this USB problem on one of my systems, trouble is it does not survive a reboot. I'll tell you how I have done it and if your error is the same it might help you. If you error is not the same then perhaps I can get some help to make my workround a little bit better.

 

To tell if you have the same error as me, open virtualbox and instead of starting your virtual machine, just click on the 'Settings' button. Before it opens do you get an error message telling you that it has 'Failed to access the USB subsystem'? This is what I have and this is the workround.

 

Virtualbox writes some files in the /tmp folder. Now unfortunately /tmp is owned by root and therfore it cannot write there when run as a normal user (quite how this relates to USB I don't know but it obviously does). The simple workround for me is to chown the /tmp folder (and all its contents) to my username (I leave the group as root). Once I have done this I get full access to all my USB devices even when hot plugged.

 

Trouble is of course that the /tmp folder permissions will revert to root every time you reboot so you have to do this every time you want to use Virtualbox. Very inelegant I know but it does work.

 

Second problem would be the security considerations of running with user access to /tmp, I am not sure about this but I can't imagine they would be that great given the temporary nature of its contents.

 

EDIT. I have just realised that the errors I am getting on Mandriva are not the same as those on Suse and the workround here only applies to the latter - sorry.

Edited by viking777
Link to comment
Share on other sites

FWIW, I seem to have the same problem. I wanted to use a VBox install to test my Windows Mobile sync stuff in a clean environment, but it doesn't want to work. :\ I haven't tested yet whether it works if I boot with the device plugged in. I don't get any error messages, but the guest just never sees the device...

Link to comment
Share on other sites

Well I have looked far and wide for a solution to this on Mandriva, but I can't find one. I get what I term 'partial' recognition now every time. What that means is that my keyboard, mouse, external hard drive and (strangely) webcam are always detected and operable, whereas my TomTom, PDA and USB key are always shown but greyed out and not usable.

 

I have achieved 100% success with USB on Suse 11 Virtualbox now, but trying to utilise a similar technique in Mandriva does not work as the problem is different. Prior to my finding out how to fix it I had no USB devices recognised at all on the Suse version of Virtualbox not even the keyboard and mouse but they now all work.

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...