LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 12.2: Strange Problems with VirtualBox & USB (https://www.linuxquestions.org/questions/slackware-14/slackware-12-2-strange-problems-with-virtualbox-and-usb-773491/)

smwtul 12-04-2009 12:05 PM

Slackware 12.2: Strange Problems with VirtualBox & USB
 
I have read through the VBox user documentation and the USB section of the FAQ and come to a dead-stop, I cannot get any USB peripherals working.
I am running the latest VBox (3.1.0) on Slackware dist 12.2
uname -a = Linux Pops 2.6.27.7-smp #2 SMP Thu Nov 20 22:32:43 CST 2008 i686 Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel GNU/Linux

My login is part of plugdev and vboxusers.
I have tried changing the rule in /etc/udev/rules.d/10-vboxdrv.rules, adding the gid for both groups (one at a time) for the usbfs mount statement in /etc/rc.d/rc.S: /sbin/mount -v usbfs /proc/bus/usb -t usbfs -o devgid=102,devmode=664, and have tried adding a line to fstab for mount of /proc/bus/usb with devgid,devmode set for 664

If I disable all these modifications, VBox comes up just fine, WinXP runs fine, and my USB devices (that I have set filters for) show up under Devices->USB Devices but they are grayed out.
My Palm Pilot is what I am trying to get working BTW.

Here is the strange part. I make any one (or all) of the modifications as discussed above, basically enabling RW for group. I start VBox and it comes up fine, I then start WinXP which comes up and VBox grabs the mouse (no matter where it is located in the screen), BUT the mouse pointer does not move in VBox or in Linux even though the mouse is active in WinXP. I must explain that the mouse is still working (if I am careful I can hi-light icons, right click them, etc), its the pointer icon on the screen that does not move. I can do a ctrl-alt-del and task manager comes up so the keyboard is being recognized, but right-ctrl no longer releases focus from VBox, I can't get my mouse and keyboard back to Linux. I have to manually bring up task manager with ctrl-alt-del and keyboard to shutdown, or very carefuly move the mouse around until I can select shut-down in task manager.

I disable the rule changes or mount options, reboot, and am back to normal operation with grayed out USB devices.

I am stumped, any advice would be greatly appreciated.

Steven Wheeler

Didier Spaier 12-04-2009 12:53 PM

Just to make sure... Do you use PUEL edition or OSE edition ?

I remind you that USB do not work in OSE edition.

smwtul 12-05-2009 07:23 AM

It is the PUEL version

One other tidbit of info, I tried running VBox as root, and get the exact same problems.
Thanks

catkin 12-05-2009 07:50 AM

Have you tried running the VirtualBox USB analysis script in this LQ post?

What is the name of the group with ID 102?

Any USB mouse and-or USB keyboard must not be attached to a virtual machine; if they are, the virtual machine will take them over and they will not be available on the host.

dolphin77 12-05-2009 09:45 AM

This works for me /etc/fstab:
Code:

usbfs            /proc/bus/usb    usbfs      devgid=102,devmode=0664 0 0
Code:

vladimir@darkstar:~$ cat /etc/group |grep 102
vboxusers:x:102:vladimir


smwtul 12-05-2009 06:36 PM

"Any USB mouse and-or USB keyboard must not be attached to a virtual machine; if they are, the virtual machine will take them over and they will not be available on the host."

Ouch, that hurts. My keyboard and mouse are connected to my computer via a single USB port, sounds like that is the problem.
I have an Intel M/B that has no PS2 ports on it.

Back to the drawing board I fear

Thanks!

smwtul 12-05-2009 06:38 PM

catkin: vboxusers is gid 102

dolphin77: I had tried this too, did not work for me.

Thanks to everyone for posting

Cheesesteak 12-06-2009 02:43 AM

I'm running Slackware 13.0 64-bit with VirtualBox PUEL edition, and my computer has both a USB keyboard and mouse. USB works fine here:


1. I created a group named vboxusers with gid=215 and added my regular user accout for it
2. Installed VirtualBox
3. Added usbfs /proc/bus/usb usbfs devmode=0664,devgid=83 0 0 to my /etc/fstab, where devgid=83 is the plugdev group. My regular user accout is also a member of the plugdev group.


I had been using version 3.0.12, and upgraded to 3.1.0 with no issues.
Never had cause to modify any udev rules.


Andy

catkin 12-06-2009 04:41 AM

Quote:

Originally Posted by smwtul (Post 3781281)
"Any USB mouse and-or USB keyboard must not be attached to a virtual machine; if they are, the virtual machine will take them over and they will not be available on the host."

Ouch, that hurts. My keyboard and mouse are connected to my computer via a single USB port, sounds like that is the problem.
I have an Intel M/B that has no PS2 ports on it.

Back to the drawing board I fear

Thanks!

USB keyboards and mice work just fine with VirtualBox; the only problems arise when they are configured as USB devices for virtual machines, as in Menu->System->"Sun VirtualBox"-><virtual machine name>->USB. If that is done they stop working on the host when the guest is running.

smwtul 12-06-2009 08:17 AM

Ahh, I understand

Here are the results of running the analysis script
VirtualBox PUEL version found. OK.
Name of user used to run VirtualBox: smw
This computer has udev rules file for VirtualBox, /etc/udev/rules.d/10-vboxdrv.rules. OK.
No fstab usbfs line found. udev rules are effective.
Group name used for VirtualBox USB access is vboxusers.
Group vboxusers found in /etc/group. OK.
Here is the group line from /etc/group:
vboxusers:x:102:smw,sdw
User smw is in group vboxusers/102. OK.
Access mode used for VirtualBox USB access is 0664.
Access mode (0664) includes 'group write'. OK.
Kernel module vboxdrv loaded. OK.
All tests passed. OK. :-)

I'll give the ideas from Cheesesteak a try later today

slouchfuzz 12-06-2009 08:17 AM

I was running into the same problem. Try this temporary fix:

sudo chmod -R 777 /proc/bus/usb

This fixed my 'greyed out' box issues and I was able to use any USB devices in my WinXP install through VirtualBox.



I ended up messing with the permissions on some 'usbdevX.X' device file entries I never noticed before in my /dev that have user ID and group ID of 'root' and 'vboxusers'.

catkin 12-06-2009 09:17 AM

Quote:

Originally Posted by smwtul (Post 3781689)
Ahh, I understand

Here are the results of running the analysis script
VirtualBox PUEL version found. OK.
Name of user used to run VirtualBox: smw
This computer has udev rules file for VirtualBox, /etc/udev/rules.d/10-vboxdrv.rules. OK.
No fstab usbfs line found. udev rules are effective.
Group name used for VirtualBox USB access is vboxusers.
Group vboxusers found in /etc/group. OK.
Here is the group line from /etc/group:
vboxusers:x:102:smw,sdw
User smw is in group vboxusers/102. OK.
Access mode used for VirtualBox USB access is 0664.
Access mode (0664) includes 'group write'. OK.
Kernel module vboxdrv loaded. OK.
All tests passed. OK. :-)

I'll give the ideas from Cheesesteak a try later today

Thanks for trying the script -- and sorry it did not identify the cause of your problem. When you do find what the problem is I'll modify the script to detect it.

smwtul 12-15-2009 04:17 PM

Thought I would provide an update on this issue.
I tried all of the suggestions, no luck.

I then remembered that I had an academic license for VMware WorkStation.
Loaded Workstation 7 and it picked up my USB devices without me doing anything.
Synced my Palm without problems.

I will continue to dig in to why VBox does not work with my USB and if I find anything I will post.

Thanks to all who tried to help me out. I appreciate it

Steven Wheeler


All times are GMT -5. The time now is 11:38 PM.