Ubuntu Geek

Ubuntu Linux Tips,Howtos&Tutorials|Edgy,Feisty,Gutsy,Hardy

  • Subscribe RSS Feed

    subscribe to the ubuntu Geek RSS feed




  • Sponsor

  • Categories

  • Meta

  • Sponsor

  • Archives



  • WidgetBucks - Trend Watch - WidgetBucks.com

Tip: Getting Your Webcam To Work In Ubuntu

Posted by Shantanu Goel on May 12th, 2008 Email This Post Email This Post

I have an old noname cheapo webcam, that I dusted out of my junk (why? More on that in a post coming soon). I hoped that it would work in my Ubuntu setup out of the box like most of my other hardware. I connected it to my laptop’s usb port. dmesg gave the following output:

[21328.211333] usb 1-1: new full speed USB device using ohci_hcd and address 2
[21328.319698] usb 1-1: configuration #1 chosen from 1 choice
[21328.439705] Linux video capture interface: v2.00
[21328.458509] zc0301: V4L2 driver for ZC0301[P] Image Processor and Control Chip v1:1.05
[21328.459113] usb 1-1: ZC0301[P] Image Processor and Control Chip detected (vid/pid 0×0AC8/0×301B)
[21328.520576] usb 1-1: PB-0330 image sensor detected
[21328.870287] usb 1-1: Initialization succeeded
[21328.870919] usb 1-1: V4L2 device registered as /dev/video0
[21328.871001] usbcore: registered new interface driver zc0301
[21328.913737] usbcore: registered new interface driver gspca
[21328.913811] ubuntu/media/gspcav1/gspca_core.c: gspca driver 01.00.12 registered

Great! Everything set up, I thought. But running various programs, camorama, camE, kopete, everything gave weird errors like “Connection could not be made”, “device not ready” or just showed a blank screen. But soon, after few trial and errors, I found the solution. Basically the “zc0301″ module is the culprit and all you have to do to get your camera working is prevent it from loading. So, this is what I did:

sudo modprobe -r gspca
sudo modprobe -r zc0301
sudo modprobe gspca

And voila! the webcam started working like magic. Of course, this tip is only for webcams that use this particular chip. And if you want to make this change permanent so that you don’t have to run these commands everytime you want to use your webcam, all you have to do is add the following line to your /etc/modprobe.d/blacklist file

blacklist zc0301

This would prevent the module from loading whenever you connect your webcam to your computer. Let me know if this worked for you or if you have some of your own tips/tricks/hacks to get this or other webcams working on linux.

If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!

Related Articles

10 Responses to “Tip: Getting Your Webcam To Work In Ubuntu”

  1. Jithin James Says:

    hi,
    i got a creative webblaster webcam,can you tell me what are the adjustments to be made?
    i think my driver is ov511 and i have installed it but can you tell me what are the modifications i need to make in your method to get the webcam working?

  2. Krauze Says:

    hey,

    Have a question, is there something (drver or software) which enable my notebook cam? I have Asus F3F Series, can’t remember what model. And do not want to check it:P (it has CPU Duo T2450).

    Am running on Ubuntu 7.10 Gutsby Gibon

  3. eluminx Says:

    I am experiencing the same situation you were, but mine did not get fixed by your tip. One thing i have noticed tho is that i cannot open my gstreamer-properties to try and change the input type. Everytime i try to change it, it always freezes and i could never close it, not even if i try to kill thought CLI or with the sysmon. I have tried other options and my webcam still doesnt work in cheese or in kopete. Have you got any other tricks up your sleeve, if you do that would be great, thanks for the this tip tho is always great to try new things.

  4. Pavel Barina Says:

    Thanks, on my laptop Acer Aspire 5520G work webcam now. Before I add zc0301 to blacklist, webcam don’t work.

  5. Shantanu Goel Says:

    @Jithin: Try this http://gingedas.net/?q=node/170

    @Krauze, Eluminx: Can you tell me your webcam models?

  6. Shantanu Goel Says:

    @Pavel: Glad it worked for you :)

  7. Shantanu Goel Says:

    Guys, also check out my kinda unique copy-paste program at http://www.ubuntugeek.com/ease-out-your-copy-paste-woes-use-shantz-copy-basket.html
    or
    http://tech.shantanugoel.com/projects/misc-stuff/shantz-cp-basket
    and give me your feedback about it. :)

  8. eluminx Says:

    @Shantanu Goel: this what lsusb returns “Bus 002 Device 002: ID 0ac8:303b Z-Star Microelectronics Corp. ZC0303 WebCam” Hopefully that helps. THanks for taking the time…

  9. Shantanu Goel Says:

    @Eluminx: And what does “lsmod | grep gspca” give?

  10. eluminx Says:

    @Shantanu Goel:

    gspca 657872 0
    compat_ioctl32 11136 2 zc0301,gspca
    videodev 30720 2 zc0301,gspca
    usbcore 169904 8 zc0301,gspca,usblp,usb_storage,libusual,ohci_hcd,ehci_hcd

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>