Black God

Gear head cheap Web camera (093a:2620) in Linux

Recently I bought a Gear head cheap Web camera from Frys Electronics. The vendor id and product id of this gadget is 093a:2620.  It does not come with driver for linux.

Once I connected to my laptop, I came to know that it is not supported by the current kernel 2.6.27 which I am using, shipped with Ubuntu 8.10. Googling the issue on internet found that there are other compatible web cams are supported by the gspca driver pac7311. And also I found that there is commit in v4l-dbv project which supports this cheaper web cam also.

How long it will take for this commit to reach linux kernel. This link says this support will go into linux kernel 2.6.29 only. Till then what can we do with this web cam, we can use it as paper weight or you can install MS-Windows for this purpose. Apart from this, there is one more option to get it done. Exploring what this fix is about and patching the current kernel with this patch. That is what I did. You have to build your kernel for this.

Update to Ubuntu users:

Ubuntu has announced recently that vanilla kernels will be available as .deb packages in ubuntu Personal Package Archives. This archive includes release candidates¬† also. These kernel packages are built without ubuntu patches and proprietary firmwares but with ubuntu’s default kernel configuration. Click here to download these vanilla kernels. So Ubuntu user can just install the latest 2.6.29 release candidate package to get the working web cam; they can skip the following steps to get it done.

The patch is very simple. The pac7311 module is having a list of supported hardware by this module. This list will be registered with kernel during module initialization. We are just going to add our vendor:device id also in this list.

Note: This is the problem with cheap web camera like this model. Though this model uses a well supported chip, it does not take care of getting itself (vendor & product id) added to its chip’s driver in linux.

Step 1: Download latest kernel from official linux site.
Step 2: Extract the compressed file.
Step 3: Run “make mrproper”
Step 4: Copy your current config file in uncompressed source directory as .config.
Step 5: Run “make oldconfig”
Step 6: Edit drivers/media/video/gspca/pac7311.c file. Look for

{USB_DEVICE(0x093a, 0x2621), .driver_info = SENSOR_PAC7302},

and add one more line as shown below to add our device and save the file.

{USB_DEVICE(<span style="color: #ff0000;">0x093a, 0x2620</span>), .driver_info = SENSOR_PAC7302},

Step 7: Run “make all”, “make install” and “make modules_install” to install the kernel and all modules.
Step 8: If necessary create a initramfs also depends on your distribution.
Step 9: Make necessary changes to in the grub or lilo to point to your newly compiled kernel.
Step 10. Reboot and you should find dmesg identifying your device when you plug-in web cam.

Now you can run any of your favourtie video application like cheese, skype to test how it rocks.

FAQs related to this HOWTO:

FAQ 1. My web cam is working in applications like cheese, but not in skype. In skype I get only green screen. What to do?

Skype video setting may look like this

Skype video setting may look like this

Ans:  To create a shortcut for skype with a fix is needed to solve this issue:
1. Create a simple script shown below with the name launchskype in your home folder

#!/bin/sh
export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
skype &

2. Set it as executable file. In file browser, right click the file and select “Make Link” option. It will create a link. Cut and paste this link to your desktop.
3. Double click this shortcut to launch skype. If it is prompted to “display or execute”, select execute (or make select as default action in nautilus preferences)

FAQ 2. Picture clarity is not good in these applications. How to tweak these settings?

v4lucp – Video For Linux User Control Panel is a GUI application which can do this. Just click here to download this tool. Compile and run.

v4lucp parameters screen

v4lucp parameters screen

But this tool can’t save your settings across booting.

Update: Release 1.3 of v4lucp supports saving and loading of the settings with a tool called v4l2ctrl.

10 comments for “Gear head cheap Web camera (093a:2620) in Linux

  1. A
    March 8, 2011 at 8:05 am

    actually its 2.6.18-194.17.1.el5.centos.plus

  2. A
    March 8, 2011 at 8:04 am

    I just got the WC735I GearHead from Microcenter for ~$12. I run 2.6.19 ( Centos 5.2 stock i believe). It picked up the camera right away. It identified it as :
    Vimicro USB Camera (Altair) (0ac8:3450)
    the quality is ok, i guess. the only single problem i have is that i can’t get the sound working. Mplayer says “no sound”..
    Any help?
    P.S. I plugged it into winxp it shows some input from the mic. so i’m guessing it’s either linux driver or the actual port.

  3. July 8, 2010 at 11:40 pm

    Hi , when viewing at your blog i see some kind of weird codes all over the page, in case it’s important I just thought I’d let you know it says this with all sorts of other stuff after it: Message : Exception of type ‘System.Web.HttpUnhandledException’ was thrown.

  4. Bbp
    July 3, 2010 at 7:57 pm

    Thanks

    I had this WebCam in my gadget box for a while and I never managed to make it work. I recently decide to give it a go so I plug it and it now works out of the box with kernel 2.6.32. I don’t even have the green screen problem in Skype. Unfortunately, it has a very poor quality. My other WebCam of similar price is much better.

    Anyway, thanks for this article, your v4lucp solution is very nice (now called v4l2ucp). I though I would have to put it back to the gadget box, but I’m actually able to get something out of it with that tool!

  5. December 15, 2009 at 12:09 am

    Would it be okay if I displayed part of this on my website if I link back?

    • December 15, 2009 at 6:03 am

      OK provided a link to this source url.

  6. Iain
    August 23, 2009 at 6:10 pm

    Thank you, the problem with the green screen has been annoying me for a while. Not any more though.

  7. Sarah White
    March 4, 2009 at 10:11 am

    I tried doing this, and I’ve followed the directions, but it just isn’t working. when starting up in the new kernel This is displayed on the screen:

    Starting up…
    [ 0.177595] pci 0000:01:00.0:BAR 6: can’t allocate mem resource [0xf0000000-0xefffffff]
    [ 1.545698] IO APIC resources could be not be allocated.
    Loading, please wait…
    WARNING: Couldn’t open directory /lib/modules/2.6.28.7: No such file or directory
    FATAL: Could not open /lib/modules/2.6.28.7/modules.dep.temp for writing: No such file or directory
    Gave up waiting for root device. Common problems:
    Boot args (cat /proc/cmdline)
    Check rootdelay = (did the system wait long enough?)
    Check root = (did the system wait for the right device?)
    Missing modules (cat /proc/modules; ls /dev)
    ALERT! /dev/disk/by-uuid/5c882d4e-7854-489e-beca-c3a3065b4347 does not exist. Dropping to a shell.

    BusyBox v1.10.2 (Ubuntu 1:1.10.2-1ubuntu7) built-in shell (ash)
    Enter ‘help’ for a list of built-in commands.

    (initramfs)

    any ideas???

    • March 4, 2009 at 10:21 am

      >Step 8: If necessary create a initramfs also depends on your distribution.
      Ensure that you have created initramfs properly. Ubuntu needs initramfs. Your root file system driver should be available in initramfs.

Leave a Reply

Your email address will not be published. Required fields are marked *