# Trying to use USB webcam

## ISHAIM

Hi,

I'm trying to get my Intel Easy PC Camera USB webcam to work. I've compiled into the kernel what I believe are the appropriate options):

 Symbol: USB_GSPCA_SPCA508 [=y]

 Prompt: SPCA508 USB Camera Driver

   Defined at drivers/media/video/gspca/Kconfig:177

   Depends on: MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && V4L_USB_DRIVERS

   Location:

     -> Device Drivers

       -> Multimedia support (MEDIA_SUPPORT [=y])

         -> Video capture adapters (VIDEO_CAPTURE_DRIVERS [=y])

           -> V4L USB devices (V4L_USB_DRIVERS [=y])

             -> GSPCA based webcams (USB_GSPCA [=y])

When I try and use the webcam with cheese, there is no video input, only the color coded bars. If I go to preferences, there is a grayed out Device (USB Camera (8086:0110) (/dev/video0). Running sudo cheese has no effect on letting me modify this either.

I have installed the following v4l related packages:

```
[I] media-libs/libv4l

     Available versions:  0.5.3 ~0.6.1 ~0.6.4

     Installed versions:  0.5.3(12:18:12 02/26/10)

     Homepage:            http://hansdegoede.livejournal.com/3636.html

     Description:         Collection of video4linux userspace libraries

[I] media-plugins/gst-plugins-v4l

     Available versions:  (0.10)  0.10.23!t 0.10.24!t (~)0.10.25!t

     Installed versions:  0.10.25(0.10)!t(10:54:12 02/27/10)

     Homepage:            http://gstreamer.freedesktop.org/

     Description:         plugin for gstreamer

[I] media-plugins/gst-plugins-v4l2

     Available versions:  (0.10)  0.10.14!t 0.10.16!t ~0.10.17!t

     Installed versions:  0.10.16(0.10)!t(00:22:32 02/26/10)

     Homepage:            http://gstreamer.freedesktop.org/

     Description:         plugin for gstreamer

[I] x11-drivers/xf86-video-v4l

     Available versions:  0.1.1 0.2.0 {debug}

     Installed versions:  0.2.0(10:14:57 02/26/10)(-debug)

     Homepage:            http://xorg.freedesktop.org/

     Description:         video4linux driver
```

I'm wondering whether I should compile the drivers as modules. This is the output of ls -R /dev/v4l:

```
/dev/v4l/:

by-id  by-path

/dev/v4l/by-id:

usb-8086_0110-video-index0

/dev/v4l/by-path:

pci-0000:00:1d.0-usb-0:2:1.0-video-index0
```

Also, the device /dev/video0 does actually exist.

Any help appreciated,

Thanks

----------

## blytte

The GSPCA driver has many subdrivers and I wonder if you have enabled the right one. Try enabling them all and compiling them as modules. The drivers should then be able to figure it out by themselves.

Even if the documentation says your driver should be the 508, I have my suspicions. I had a similar camera by Intel once and if I recall they had made several versions over time with different chips that were all called the same and performed about the same.

If it is the right driver, have you checked dmesg for any error messages?

Also, you might want to make sure the userspace software is working correctly. I don't know if the driver is making the color bars or the cheese is.

----------

## cach0rr0

that's def the right driver far as I can tell

(last line)

# grep -r DEVICE.*0x0110 /usr/src/linux/drivers/media/video/

```

/usr/src/linux/drivers/media/video/usbvision/usbvision-cards.c: { USB_DEVICE(0x2304, 0x0110), .driver_info=PINNA_PCTV_USB_PAL_FM },

/usr/src/linux/drivers/media/video/cx18/cx18-cards.c:   { PCI_DEVICE_ID_CX23418, CX18_PCI_ID_TOSHIBA, 0x0110 },

/usr/src/linux/drivers/media/video/gspca/mr97310a.c:    {USB_DEVICE(0x08ca, 0x0110)},   /* Trust Spyc@m 100 */

/usr/src/linux/drivers/media/video/gspca/spca508.c:     {USB_DEVICE(0x0733, 0x0110), .driver_info = ViewQuestVQ110},

/usr/src/linux/drivers/media/video/gspca/spca508.c:     {USB_DEVICE(0x8086, 0x0110), .driver_info = IntelEasyPCCamera},

```

You could try it as a module. I would still try adding your normal user to the 'video' group, even though having done the test with 'sudo' should have ruled that out. 

Sorry I'm not terribly helpful on this one, just wanted to confirm you do have the right driver.

----------

## ISHAIM

Thanks for the help thus far.

dmesg doesn't really show any errors, on the contrary it appears things are alright:

```
[    6.051148] spca508 6-2:1.0: usb_probe_interface

[    6.051151] spca508 6-2:1.0: usb_probe_interface - got id

[    6.051154] gspca: probing 8086:0110

[    6.053650] spca508: Webcam Vendor ID: 0x8086

[    6.055647] spca508: Webcam Product ID: 0x0110

[    6.056646] spca508: Window 1 average luminance: 0

[    6.114695] gspca: probe ok

[    6.114712] usbcore: registered new interface driver spca508

[    6.114715] spca508: registered
```

I now have compiled the drivers as modules. Still, no luck. I'm not sure what making sure the userspace software is working correctly entails. I do have USE="v4l". I've tried to capture through VLC as well, still no luck. I am in the video group.

Thanks

----------

## cach0rr0

try running cheese from the console and seeing if it spits out anything useful 

i dont have any real brilliant ideas, but heh, worth trying. 

As you already have /dev/video0 the driver side of things is fine.

----------

## ISHAIM

There is no console output whatsoever from running cheese from the console. Not even from running cheese as superuser.

----------

## SDNick484

Was this issue ever solved?  Coincidentally, I too just found my old Easy PC Camera that I got for free somewhere.  I seem to recall using it in Linux years ago, but I can't get it working now.

EDIT: I've gotten skype to work via the 508 module and using " bash -c 'LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype' " which I  got from https://help.ubuntu.com/community/Webcam.  However the other apps I've tried don't seem to respond even when invoking the compat library.

EDIT2: I was able to get vlc to work via "LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so  vlc".  It's built with both the libv4l2 & v4l2 use flags.

----------

## ISHAIM

Thanks a lot   :Cool:  , I was able to get the webcam working in vlc with 'LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so vlc', however the video stream has a bluish tint and is really laggy. At least I know it's working.

I am using the regular v4l USE flag, should I not? Is it deprecated?

Still nothing in cheese either.

----------

