No usb access with VBox
Hi, I've been using VirtualBox (now by Oracle) for a few years now, and generally use the 'amd64 Non-ose' (Free for personal use)in which usb used to work but with the latest couple of versions Usb devices can be seen, but are 'greyed out' and Can't be selected. vBox ver 3.2.6.r63112
I wonder if the circumstances have changed, and now usb must be paid for, or what? I only want my joystick to use in winxp/vBox, but I've tried and upgraded to fix it but still nothing(usb)is accessible. It worked before (older versions) I have a custom kernel, have set permissions for vboxuser and read the manual. Please help me my favourite game f22_ADF (see my sig)awaits. cheers and regards Glenn One thing I have just thought of is weather I have the joystick setup correctly within My GNU/Linux system. But that won't account for the webcam, printer, sound box, bluetooth which are configured and working within GNU/Linux. (Well the printer will only scan, but that's another issue.) |
Did you install Guest Additions? After you install them, you need to check the boxes for each USB device you want the VM to control.
|
If you use Ubuntu, you must add your username to the virtualbox users group.
|
Hi, Thank you for the replies.
I have double checked the permissions and reinstalled Guest Additions, but no change. The usb devices remain greyed out, and can't be selected. Anything else I should check? Cheers Glenn |
Please run kudzu after plugging in the device
Also, compare fdisk -l or tail -f /var/log/messages or lsusb output before and after plugging the USB. |
Can't find kudzu, using hwinfo, the Joystick is listed...
and configured for kde4 Code:
84: USB 00.0: 0000 Unclassified device Code:
glenn@GamesBox:~$ sudo fdisk -l Code:
glenn@GamesBox:~$ sudo tail -f /var/log/messages Code:
glenn@GamesBox:~$ lsusb Regards Glenn |
Can you use the USB ports, if you start VB as root?
|
vBox starts when run from root, but there is no virtual machine in /root/
The VM's are on a different partition, within /home/glenn/local/vm1 |
Back from a reboot, to make sure any permission changes took effect.
still no access. vbox settings lists all the usb devices connected to this system. That's in the same place I can select usb2.0 support. But there's no change with the usb icon at the bottom of the window when vbox is up. It used to work, that was why I wondered if the package had changed. By the way, I use the .run (amd64) for all Distributions. I think the rpm packages available from Mandriva only supports the open source edition. From memory, it has no usb support at all. Thanks for responding, But I'm still stuck. Regards Glenn |
I've been running VirtualBox on a couple Arch boxes for a while, but to enable usb support I had to add the following to the fstab:
Code:
none /proc/bus/usb usbfs auto,busgid=101,busmode=0775,devgid=101,devmode=0664 0 0 |
For what its worth, I have a similar line, I had to add it also.
Quote:
|
Hmm... Have you tried dropping the busgid and busmode entries into fstab?
|
Hi, currently I have this usbfs line in /etc/fstab.
Code:
#Get read/write access to usb, load usbfs Thank you all. |
Hi, I changed the line
Code:
none /proc/bus/usb usbfs devgid=501,devmode=664 0 0 501 corresponds to my vboxusers gid. vbox user id is 503 I'm looking for busgid...group bus does not exist on my system /etc/group Code:
root:x:0: |
Here is a snippet from the vbox log, all lines with usb...
Code:
vbox log. |
After some looking around my system, I added my regular usid to the vboxusers group. Not sure if this will help or not, it shouldn't hurt anything. I also have regular users added to the USB group. That shouldn't hurt either.
|
This worked b4
Camorri, please explain what you mean, Because I'm lost....
<edit> I (glenn) as a user I am part of the vboxusers group. generally that was all I had to do, (make myself part of the "vboxusers" group) if the install went smoothly. So, I can't understand why this occurs now. regards Glenn. p.s. I have a custom kernel, is it possible I have left something out? I load the vbox modules when required with a script (~/bin/vbox_load.sh), rather that use dkms (dynamic kernel module service) That way it loads when I say, not automagically. I wonder??? I've had a few beers by now, I should say! |
Quote:
I'm doing everything on a stock kernel, and DKMS is doing its thing on my system. I have no experience with custom kernels, so I can not help there. |
I've also tried adding vboxusers, and myself to the usb group, but I found no difference.
My kernel is not so custom, Just configured and re-built by me with the sources. ntfs r/w, usb-audio, amd-gart, but no major customisations. This could be a setting I have set in msec, I'll have to go right through it to check. Maybe this arvo(afternoon). Regards Glenn |
Glenn, here's something that may be worth a try.
You know your usb devices show up under /proc/bus/usb and then under the sub-dirs /001 /002 etc depending on sockets etc. The devices you have plugged in will show up as a file under each of those and this filename will be probably 002, 003 etc - the file showing 001 will be the actual socket. Set the permissions of the _device_ file to be 'rwx' for group 'vboxusers' and/or 'others'. I'm happy doing many things at the CLI but the chmod/chown permissions is not one of these so I use that great terminal prog Midnight Commander which has carried on working in its own way without all the hassle that has appeared in recent Linux times like KDE4 and hal/udev or kernel stuff giving us problems like yours and mine (other thread). M.C. has its own drop-down menu to do all manner of things to files/directories and the chown/chmod bits give a nice visual feedback of the octal - 664/775 - type so you can see what applying 'rwx' for each set will do number-wise. I said above to change the permissions for the 2 groups beside 'owner' as "and/or" meaning that for my own bizarre experience I found that one distro would need both done whereas another needed the 'others' only. And that was despite the 'owner' being set as me or the actual login user. Even having fstab entries to get the /proc/bus/usb coming up _and_ giving it and an entry for usbfs device node permissions, all my usb devices could be used but not in VBox with recent kernels. When I did the permissions change manually on the device entries as above - eureka!!! Christ knows what actual code that's running in those newer kernels and/or newer hal/udev causing this grief. |
Hi, I am familiar...
Quote:
~/bin/vbox_load Code:
#!/bin/zsh I changed the permissions with this, Code:
#/dev/bus/usb Just checking now... ls -la /dev/bus/usb/003 & 004... Code:
glenn@GamesBox:~$ ls -la /dev/bus/usb/003 (29-07 11:07) Maybe ...vbox_load then the permissions? Back soon. And thank you! Regards Glenn |
... double post.
|
quick answer? here it is, you (and i) downloaded the free version of VBox. the free version has USB crippled. i also got the free version of VMware's VMPlayer, and USB works just fine on it...
|
Glenn, no, I said the /proc/bus/usb directories. And then you drill down to the seperate /001 /002 ... dirs where each of those will have a file entry for the device plugged in. It's the file entry for the device you need to chown.
The file 'devices' that's in /proc/bus/usb will list all the usb stuff plugged in and should show which bus entry it's in. For your problem device, look for its name in that file and then see which actual bus it's plugged into - /001 or /002 etc - then go to /001 and there another file named 002 (because the socket for that bus will be 001) will relate to your actual usb device. Double check that by unplugging all stuff and see that there are only the 001 files in those sub-dirs., Wait and then plug 1 device back into a usb socket. The time stamp of the file that appears will be obviously different from the "socket 001" file. |
Thanks, I thought I did that ,
but will do the checks, I have reinstalled and still it's the same. Talk soon, Regards Glenn ps, I have found near no benefits from newer kernels, I might trying the older versions that worked. I'm not developing, just want to play a game I got with a video card. |
I'll get midnight Commander
Midnight commander is broken on my system. |
UncleJed613, I don't think so,
but that is kinda what I suspected at first I thought the license may of changed. regards Glenn |
i went back and looked... i guess the PUEL version is supposed to have usb support, the OSE version does not. if you get it figured out, i'm still subscribed to this thread. in the meantime, i'm using VMware. i needed to talk to a TI evaluation module for a project, and couldn't wait around for an answer on VBox... if you get it figured out, great, i think VBox runs faster and smoother than VMware.... but in the meantime, VMware is working for what i need it for.
|
Thanks for that, Today, I am rebuilding and reinstalling the custom kernel,
When I find a replicable conclusion, I'll post back.. Cheers Glenn |
check kernel config, rebuild and install (to be sure, to be sure).
Reinstall nvidia graphics card (NVIDIA-Linux-x86_64-256.35.run) Installed no problems, so I know the sources are installed correctly(?) find and remove all except the virtual-machines and HardDisks. (winxpsp2 in this case) /home/glenn/local/vm1/.VirtualBox/Machines/winxpsp2/winxpsp2... /home/glenn/local/vm1/.VirtualBox/HardDisks/winxpsp2/... locate vbox, sudo rm -rf locate VirtualBox, sudo rm -rf After that I rebooted, then updatedb, and searched again. I found some stale links to vbox programs in /usr/bin, sudo rm -rf Once satisfied I had removed all instances of vbox, I then reinstalled ver (VirtualBox-3.2.6-63112-Linux_amd64.run) Once again before starting the virtual machine I was able to select which usb devices I wanted access to, Namely the Joystick. Logitech, Extreme 3D. Even now, the winxp VM is running, in the Oracle VM window it shows one usb device active, but from the winxp VM they are all greyed out and when moused-over, the message is Quote:
They managed to cripple the game with the agp-2.0 code 8 or 9 odd years ago (win2k). So, I'm sus, but I don't believe it. Checking Permissions... user. changed primary user of vboxusers (user) to vboxusers, and made glenn a member of the vboxusers. group. vboxusers has vboxusers, glenn, root, usb and games as members of the group. (I had glenn as the primary user of vboxusers (user)) reboot! Regards Glenn |
Still the same.
Copy log, cat and grep usb Code:
cat /home/glenn/My_system/vbox-logs/winxpsp2-2010-08-02.log | grep usb Code:
glenn@GamesBox:~$ lsusb (02-08 19:55) Regards Glenn |
lsusb...
Bus 002 Device 006: ID 046d:c215 Logitech, Inc. Extreme 3D Pro sudo chmod -R 775 /proc/bus/usb/002 sudo chown -hR vboxusers:vboxusers /proc/bus/usb/002 glenn@GamesBox:~$ ls -l /proc/bus/usb (02-08 20:26) total 0 dr-xr-xr-x 2 root root 0 2010-08-02 20:22 001/ dr-xr-xr-x 2 vboxusers vboxusers 0 2010-08-02 20:22 002/ dr-xr-xr-x 2 root root 0 2010-08-02 20:22 003/ dr-xr-xr-x 2 root root 0 2010-08-02 20:22 004/ -r--r--r-- 1 root root 0 2010-08-02 20:23 devices glenn@GamesBox:~$ ls -l /proc/bus/usb/002 (02-08 20:39) total 0 -rwxrwxr-x 1 vboxusers vboxusers 43 2010-08-02 20:22 001* -rwxrwxr-x 1 vboxusers vboxusers 192 2010-08-02 20:22 002* -rwxrwxr-x 1 vboxusers vboxusers 251 2010-08-02 20:22 003* -rwxrwxr-x 1 vboxusers vboxusers 50 2010-08-02 20:22 004* -rwxrwxr-x 1 vboxusers vboxusers 52 2010-08-02 20:29 006* glenn@GamesBox:~$ vbox_load (02-08 20:28) load modules for vbox. list vbox modules vboxnetadp 5171 0 vboxnetflt 15181 0 vboxdrv 1791525 2 vboxnetadp,vboxnetflt It works!:) My mistake was (not knowing about) permissions for usb, and in particular /proc/bus/usb. Yes, thanks skola..., I did misunderstand about the permissions for /proc, I was applying to/dev/bus/usb/...lol! Still this is new to me, but I thank you, all, for your guidance. Thanks Heaps. Regards Glenn |
Sorry not to be able to help in what must be a frustrating saga (because my versions are too different) but have you tried a) attaching USB devices from the command line (to see any error messages) and b) re-ordering the VirtualBox udev rule? Earlier in the thread a usbfs line in fstab was mentioned and that has obviated any need for a udev rule adjustment in my experience -- but it may be worth trying. More in this LQ thread.
EDIT: was posting while solution was being posted. Glad you found a solution. |
so what happened after a reboot?
edit: oh, now i see... not sure that's going to help me, since my USB is managed by HAL, and /etc/fstab hasn't got a usbfs entry as a result... |
Well what actually happened was, I tried doing far too much.
When all I needed to do was change the permissions for the joystick @ /proc/bus/usb/002 to vboxusers. I was already a member of the vboxusers group, and the usbfs line in /etc/fstab made no noticable difference, it may save me some trauma later ;) The reboots were mainly to be sure the system knew what changes I was trying to make to the permissions, I'm still learning. all's well, Now. Slight changes in these systems (to me, anyway) means never stop researching. Kinda what I wanted GNU/Linux for really. At least we can make it work, with a little collaboration, lol. Thank you all again. See you 'round the posts. Regards Glenn |
Well, I've come across another problem.
Yesterday the address for the usb joystick was /proc/bus/usb/002/005, but today it is /proc/bus/usb/003/005. Code:
Bus 003 Device 005: ID 046d:c215 Logitech, Inc. Extreme 3D Pro It's not too hard to reset it anytime I want to run the vbox and flight sim, but there must be a more efficient way. Any tips? Thank you Glenn |
ok, so last night i tried it as root, with no other modifications made. usb works when running vbox as root. after doing some further searching, i am not sure, but the file /etc/udev/rules.d/10-vboxdrv.rules may hold the key to fixing this:
Code:
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600" |
Quote:
|
i've tried that, but since there's no conflicting rules elsewhere, it had no effect, neither did changing the mode and owner information in the rules file
|
SOLVED Summary of operation
To summarise and mark this thread as solved this is what i have and did to it.
Quote:
Make $user a member of the vboxusers group add usbfs entry to /etc/fstab Code:
none /proc/bus/usb usbfs devgid=43,devmode=664 0 0 Code:
lsusb | grep "3D Pro" (23-02 15:49) my script, Code:
#!/bin/zsh Code:
echo "load modules for vbox." |
All times are GMT -5. The time now is 06:14 PM. |