Tip: Getting Your Webcam To Work In Ubuntu

来源:互联网 发布:mac adobe reader8.0 编辑:程序博客网 时间:2024/06/04 23:26

Tip: Getting Your Webcam To Work In Ubuntu

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 0x0AC8/0x301B)
[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 gspcasudo modprobe -r zc0301sudo 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.

26 comments to Tip: Getting Your Webcam To Work In Ubuntu

  • Duong Ngoc Son

    Thank you for your post. I have solved my similar problem with the webcam Colovis. Just put the line:

    blacklist sn9c102

    into the file: /etc/modprobe.d/blacklist.

    Then all thing work well.

  • Nate

    Thanks for the tip, although I do not need it. I recently bought a cheapo webcam while in Japan and, surprisingly, it worked with Ubuntu out of the box, yet it would not work with Windows XP. Strange, another reason Ubuntu is my OS of choice.

  • T.Shrinivasan

    Did you tried the application “cheese”?

    cheese only loaded my inbuilt camera in HP laptop.

  • lefty.crupps

    I cannot get my cheapo Dynex usb webcam working on my Debian Lenny system; I have tried the suggestions to unload sn9c102 and zc0301 and reloading gspca but it still isn’t going for me (no /dev/video device created). Frustrating.

    [ 1253.807894] usb 4-1.3: new full speed USB device using ehci_hcd and address 4
    [ 1253.903205] usb 4-1.3: configuration #1 chosen from 1 choice
    [ 1253.904702] usb 4-1.3: New USB device found, idVendor=05a9, idProduct=8519
    [ 1253.904717] usb 4-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 1253.904724] usb 4-1.3: Product: USB Camera
    [ 1253.904730] usb 4-1.3: Manufacturer: OmniVision Technologies, Inc.
    [ 1254.167300] usbcore: registered new interface driver snd-usb-audio
    [ 1264.245001] usbcore: deregistering interface driver gspca
    [ 1264.245001] gspca: driver gspca deregistered
    [ 1275.943147] Linux video capture interface: v2.00
    [ 1275.951155] usbcore: registered new interface driver gspca
    [ 1275.951155] gspca: gspca driver 01.00.20 registered
    [ 1278.284987] usb 4-1.3: USB disconnect, address 4
    [ 1279.263773] usb 4-1.3: new full speed USB device using ehci_hcd and address 5
    [ 1279.357812] usb 4-1.3: configuration #1 chosen from 1 choice
    [ 1279.357812] usb 4-1.3: New USB device found, idVendor=05a9, idProduct=8519
    [ 1279.357812] usb 4-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 1279.357812] usb 4-1.3: Product: USB Camera
    [ 1279.357812] usb 4-1.3: Manufacturer: OmniVision Technologies, Inc.

  • Shantanu Goel

    @lefty.crupps: It looks like your camera is made manufactured by OmniVision. Can you try to see ov511 driver and see if it works? (modprobe ov511)

  • lefty.crupps

    Thanks for the followup, Shantanu Goel.

    I was told to use the gspca driver but it seems this one ov511 also doesn’t work to create my /dev/video device; should I be looking elsewhere?

    [ 9893.174156] usbcore: deregistering interface driver gspca
    [ 9893.174156] gspca: driver gspca deregistered
    [ 9900.031712] usbcore: deregistering interface driver ov511
    [ 9900.031757] ov511: driver deregistered
    [ 9902.526253] usb 4-1.3: USB disconnect, address 6
    [ 9913.914054] Linux video capture interface: v2.00
    [ 9913.922193] usbcore: registered new interface driver ov511
    [ 9913.922193] ov511: v1.64 for Linux 2.5 : ov511 USB Camera Driver
    [ 9916.342359] usb 4-1.3: new full speed USB device using ehci_hcd and address 7
    [ 9916.439563] usb 4-1.3: configuration #1 chosen from 1 choice
    [ 9916.442071] usb 4-1.3: New USB device found, idVendor=05a9, idProduct=8519
    [ 9916.442105] usb 4-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 9916.442113] usb 4-1.3: Product: USB Camera
    [ 9916.442119] usb 4-1.3: Manufacturer: OmniVision Technologies, Inc.

    debian:~$ ls /dev/v*
    /dev/vboxdrv /dev/vcs /dev/vcs1 /dev/vcs2 /dev/vcs3 /dev/vcs4 /dev/vcs5 /dev/vcs6 /dev/vcs7 /dev/vcsa /dev/vcsa1 /dev/vcsa2 /dev/vcsa3 /dev/vcsa4 /dev/vcsa5 /dev/vcsa6 /dev/vcsa7

  • lefty.crupps

    still no go it seems, thanks.

  • thewebpromoter

    how about for Acre4315? how can I make it work? I installed jasper but there was no image displaying only a black screen

  • Lager Monster

    Thanks this works for the Microdia Clas Ohlson TWC-30XOP WebCam too
    but you run
    sudo modprobe -r sn9c102
    then
    blacklist sn9c102

  • Lager Monster

    Actually this may work for many other devices as well.
    This is because multiple drivers are loaded for the same function. Do this on the command prompt:
    $ lsmod | grep video

    look for
    videodev 29440 2 gspca,sn9c102

    here we see two modules loaded, gspca usually works.
    Remove a module then start your viewer app, no joy? remove the other and reload the 1st removed.

    Hope this helps.

  • floordog

    I have three questions:

    Can you do this with a network camera using Mpeg4 or Mjpeg?

    Do you know of a way to do the same thing with Windows XP?

    How can you have the detected motion of the webcam, grab the image that changed +/- a few frames and automatically send an email to a predetermined email address with attached image.

    The result would be when your camera detects motion, it would send you an image to your email or even use twitter. That way, you know if it is important or not.

  • Racso562

    Hey, I was wondering if you had the driver for that webcam? If you do, could you please send it to me?

  • abil

    pliz help me how to solve it.
    its after i wrote dmesg

    [ 13.988909] Linux video capture interface: v2.00
    [ 14.097234] ath_pci 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
    [ 14.097251] ath_pci 0000:04:00.0: setting latency timer to 64
    [ 14.592429] MadWifi: ath_attach: Switching rfkill capability off.
    [ 14.697883] wifi0: Atheros AR2425 chip found (MAC 14.2, PHY SChip 7.0, Radio 10.2)
    [ 14.748386] input: PC Speaker as /devices/platform/pcspkr/input/input7
    [ 14.810824] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
    [ 14.810920] HDA Intel 0000:00:1b.0: setting latency timer to 64
    [ 14.842903] hda_codec: Unknown model for ALC268, trying auto-probe from BIOS…
    [ 14.969122] ath_pci: wifi0: Atheros 5424/2424: mem=0×34600000, irq=17
    [ 14.977989] uvcvideo: Found UVC 1.00 device Acer Crystal Eye webcam (5986:0105)
    [ 14.978965] input: Acer Crystal Eye webcam as /devices/pci0000:00/0000:00:1a.7/usb3/3-1/3-1:1.0/input/input8
    [ 14.988302] usbcore: registered new interface driver uvcvideo
    [ 14.988319] USB Video Class driver (v0.1.0)
    [ 15.369688] input: PS/2 Mouse as /devices/platform/i8042/serio1/input/input9
    [ 15.468314] input: AlpsPS/2 ALPS GlidePoint as /devices/platform/i8042/serio1/input/input10
    [ 15.672183] ACPI: Battery Slot [BAT0] (battery present)
    [ 16.592120] lp: driver loaded but no devices found
    [ 16.743060] Adding 915664k swap on /dev/sda8. Priority:-1 extents:1 across:915664k

  • rémi

    try the uvcvideo driver, it worked for me.

  • RayArdia

    Have an Acer 5735 laptop with a built-in Crystal Eye webcam. Running Ubuntu Jaunty 9.04.
    Tried the steps at start of this thread:- no joy –
    Results were:-

    ray@xxxxxxLaptop:~$ sudo modprobe -r gspca
    [sudo] password for xxxxxx:
    WARNING: All config files need .conf: /etc/modprobe.d/alsa-base.conf.backup, it will be ignored in a future release.
    WARNING: /etc/modprobe.d/alsa-base.conf line 41: ignoring bad line starting with ‘gksudo’
    WARNING: /etc/modprobe.d/alsa-base.conf line 42: ignoring bad line starting with ‘snd-hda-intel’
    FATAL: Module gspca not found.

    I’ve no idea what all this means, what should I do to get the webcam to work?

  • Tiffany

    Thanks for sharing informations.Looking forward to more stuff.

  • Willie

    Hello: How can I get a ID 0545:8135 Xirlink, Inc. Veo Mobile/Advanced Web Camera working in Ubuntu 9.04?

    Thanks.

  • Games Accessories

    Thanks for the info. I found it really useful.

  • tom king

    Poorly written. You don’t explain *anything.* Did you think for a second who your potential audience is, who reads your blog? Anybody who knows all the answers regarding a webcam would get nothing from it, and anyone seeking answers wouldn’t find any here.

  • Lifroc

    This worked for my dynex webcam, thank you

  • apple

    [ 152.558719] NET: Registered protocol family 24
    [ 898.412047] usb 2-9: new full speed USB device using ohci_hcd and address 2
    [ 898.625290] usb 2-9: configuration #1 chosen from 1 choice
    [ 898.728539] Linux video capture interface: v2.00
    [ 898.750351] uvcvideo: Found UVC 1.00 device USB Web Camera (1c4f:3000)
    [ 898.755047] uvcvideo: UVC non compliance – GET_DEF(PROBE) not supported. Enabling workaround.
    [ 898.758311] input: USB Web Camera as /devices/pci0000:00/0000:00:02.0/usb2/2-9/2-9:1.0/input/input6
    [ 898.758427] usbcore: registered new interface driver uvcvideo
    [ 898.758435] USB Video Class driver (v0.1.0)
    [ 5487.109074] uvcvideo: Failed to query (135) UVC control 11 (unit 5) : -32 (exp. 1).
    [ 5488.769820] cheese[3217]: segfault at 0 ip 0086ee95 sp b51a8190 error 4 in libcheese-gtk.so.18.0.0[860000+15000]
    [ 5504.961038] uvcvideo: Failed to query (135) UVC control 11 (unit 5) : -32 (exp. 1).
    [ 5506.352326] cheese[3229]: segfault at 0 ip 0034ee95 sp b5296190 error 4 in libcheese-gtk.so.18.0.0[340000+15000]
    [ 5512.201074] uvcvideo: Failed to query (135) UVC control 11 (unit 5) : -32 (exp. 1).
    [ 5513.549669] cheese[3232]: segfault at 0 ip 00f4de95 sp b5263190 error 4 in libcheese-gtk.so.18.0.0[f3f000+15000]
    [ 5519.287067] uvcvideo: Failed to query (135) UVC control 11 (unit 5) : -32 (exp. 1).
    [ 5520.856854] cheese[3235]: segfault at 0 ip 00618e95 sp b5141190 error 4 in libcheese-gtk.so.18.0.0[60a000+15000]
    [ 5667.017042] uvcvideo: Failed to query (135) UVC control 11 (unit 5) : -32 (exp. 1).
    [ 5668.274148] cheese[3265]: segfault at 0 ip 00f32e95 sp b51b5190 error 4 in libcheese-gtk.so.18.0.0[f24000+15000]
    [ 5721.806045] uvcvideo: Failed to query (135) UVC control 11 (unit 5) : -32 (exp. 1).
    [ 5757.645049] uvcvideo: Failed to query (135) UVC control 11 (unit 5) : -32 (exp. 1).
    [ 5810.775053] uvcvideo: Failed to query (135) UVC control 11 (unit 5) : -32 (exp. 1).

  • 于洋

    You need to clean up your blog comments.

  • bhanusmita

    Hi,
    I have a hp notebook and I use ubuntu…my cd rom is out of order…please suggest how do I install my frontech webcam in it?

  • patadiya dharmesh

    I used following commands.

    sudo apt-get install cheese.
    This installs cheese software.

    sudo apt-get install webcam
    this installs webcam.

    You can go to applications>>sounds & videos>>cheese webcam booth. This will launch webcame of your laptop.

  • Uma dica para fazer funcionar sua webcam no Ubuntu

    [...] por Flavio C. Costa – referência [...]

  • Getting Your Webcam To Work on Ubuntu | TurboLinux Blog

    [...] Here is a good tutorial show you how to Get Your Webcam To Work on Ubuntu: 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: [...]

原创粉丝点击