Question: Virtualbox: Webcam access failure in guest
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Question: Virtualbox: Webcam access failure in guest
USB webcam access problem in guest. Both "guest additions" and "extension pack" are installed on guest. On host, added my userid to "vboxusers" group. Logged out/logged back in on host. Configured USB filter for Webcam in Virtualbox. Started guest. Guest can see webcam, but lists it as "unknown device" in the Devices->USB dropdown. "lsusb" in guest lists the device as a webcam. I start up "cheese" in guest, and all options are grayed out, even "Properties", so I assume this means that it is not seeing that a webcam is installed.
Attached picture shows host setup at the top of the pic, guest setup on lower half of pic.
Any ideas what I have done incorrectly? I'm guessing that the guest OS must need to load a driver for the webcam, and that hasn't happened, but I don't really know. Probably a dumb user error on my part. This is the first time I've tried to use USB in a guest. Note: the HP PSC950 printer usb device came through from the host to the guest as expected (e.g., it was not called an "unknown device" in the drop-down).
Host OS: LinuxMint13_Xfce_x64_LTS
Guest OS: same - LinuxMint13_Xfce_x64_LTS
Virtualbox v4.1.12 (from the LinuxMint13 repos)
Yes, the webcam works on the Host OS using cheese. My kernel is 3.2.0
I installed guvcview in the guest. When I start it, I get a popup: "Guvcview error: Unable to start with minimum setup Please reconnect your camera." I have tried reconnecting the camera (before I posted this thread even), and that does not make any difference.
I may have to try a newer version of VirtualBox. Since I'm on an older version of Mint (Maya - 13, the current Long Term Support version), I always try the software in the distro repos first, before moving to a newer version. That's kind of the reason for LTS releases, the software may not be the newest bleeding edge, but it's stable. In my case here though, "stable" may not equal "functional". I'll do a little more research into this to see if it can work with my current VirtualBox release, and then probably install a newer VirtualBox release if required.
I upgraded VirtualBox to the newest release ... 4.3.0 Actually I uninstalled everything related to my previously installed version 4.1.12 including config files, etc., and then installed 4.3.0 from scratch (DEB file downloaded from the Virtualbox website).
Unfortunately, this made no difference. The same USB "unknown device" problem still occurs with release 4.3.0
Then we know it is an issue with the distro and not the virtual machine.
I don't think so. But it is quite possible that something in the VM is preventing the Guest OS from detecting the webcam and working with it. Even though the OS of the Guest is perfectly capable of doing that on it's own (without the VM in the middle).
The distro on the Host and the distro on the Guest are identical. The webcam works on the Host, but not on the Guest. Both the Host and the Guest OS are "LinuxMint 13 Maya Xfce x64". Both were loaded from the same ISO download that I had burned to a DVD long ago. They were both loaded from the same physical DVD, and they both have all updates from the repos applied (the same repos for both Host and Guest).
No special drivers were loaded on the Host for the webcam to work. The distro came out-of-the-box with support for the webcam. This is expected, since UVC webcams have been supported directly by the Linux kernel since 2.6.something. And the distro I am running uses the 3.2.0 kernel (same exact kernel, same exact distro, in both the Host and the Guest).
So it's not the distro per se, but could be a combination of the distro and the VM when they are working together. The distro does fine with the webcam if the VM is not present.
You should try a newer kernel. Since 3.2 many modifications were made to the usb handling.
I had a mobo that had some buggy usb drivers (nvidia MCP78 or something) and i even got kernel panics if i used a certain low end webcam (which was working fine in the host) in a VM. So the kernel is important even you pass it through to a VM. Since i changed the mobo to a different chipset (A85X), i had no issues.
No, I did not boot the HOST from a LiveCD. I don't understand why I'd want to do that. I'd have to install VirtualBox all over again in the LiveCD environment (not that that is difficult). But the Host already works just fine with the webcam.
I did try booting the Guest with a newer kernel. I booted the Guest with a LinuxMint 15 LiveCD. I can't remember what kernel that one used, but it was newer than the one I have been using in Mint 13. I still had the same problem with failure to access the webcam.
BUT, I did notice on booting the newer kernel LiveCD that an error quickly scrolled by regarding a problem with uvcvideo. Ahah! A clue. Chances are the older distros were seeing this same error and when booting them I just did not see it, or maybe the error was hidden from screenview on the older distros.
I've been busy the last few days and unable to investigate this newly found uvcvideo error. But I have a new direction to head off in for troubleshooting now. I just have to find the time to pursue it.
[ 31.380198] usb 1-1: new high-speed USB device number 2 using ehci_hcd
[ 31.942563] Linux video capture interface: v2.00
[ 33.936660] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)
[ 33.936803] usbcore: registered new interface driver snd-usb-audio
[ 33.975414] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[ 33.992729] uvcvideo: Failed to query (129) UVC probe control : -32 (exp. 26).
[ 33.992749] uvcvideo: Failed to initialize the device (-5).
[ 33.992844] usbcore: registered new interface driver uvcvideo
[ 33.992858] USB Video Class driver (1.1.1)
[ 34.098367] 2:3:4: cannot set freq 48000 to ep 0x86
[ 34.110372] 2:3:4: cannot set freq 48000 to ep 0x86
... this same "cannot set freq" message repeats several dozen times ...