Everything is Broken

Z-star Video Camera working in Ubuntu Intrepid

At last. Its a lazy Saturday after New Year, and I just got around to fixing another one of the things which broke when I upgraded to Intrepid – the video camera. Actually I don’t really use it much, hence it got dropped to the back of the queue, but its nice to get things working again.

Here’s the relevant info:

$> tail -f /var/log/messages

{insert camera}

Jan  3 14:28:13  kernel: [18540.528056] usb 5-1: new full speed USB device using uhci_hcd and address 4
Jan  3 14:28:13  kernel: [18540.741888] usb 5-1: configuration #1 chosen from 1 choice
Jan  3 14:28:13  kernel: [18540.745214] gspca: probing 0ac8:301b
Jan  3 14:28:14  kernel: [18541.048159] zc3xx: probe sensor -> 0a
Jan  3 14:28:14  kernel: [18541.048168] zc3xx: Find Sensor PB0330. Chip revision 0
Jan  3 14:28:14  kernel: [18541.055586] gspca: probe ok

$> lsusb
Bus 005 Device 004: ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 WebCam

$> lsmod | grep gspca
gspca_zc3xx            55936  0
gspca_main             29312  1 gspca_zc3xx
videodev               41344  1 gspca_main
usbcore               148848  6 gspca_zc3xx,gspca_main,usbhid,uhci_hcd,ehci_hcd

$ ls /dev/video*
/dev/video0

So everything seemed to be making the right noises, but any app I tried (camorama, skype) would just bomb out, being unable to find the camera.  I’d tried a couple of things before, such as recompiling the drivers, and adding lines to /etc/modprobe.d/blacklist and /etc/modprobe.d/options but nothing had worked, mainly I suspect, because these fixes related to the previous version of Ubuntu, 8.04. The answer was eventually very simple and was detailed here. I’m gong to reproduce it below anyway:

The core of the problem is that gspca drivers in 8.10 apparently implement V4L2, while many applications are still using V4L1 protocol. See http://hansdegoede.livejournal.com/3636.html .

Diagnostics:
install camstream
start camstream, open trace window, and start camera. Expect to see messages like:
VIDIOCSYNC(1) failed (Invalid argument)

How to workaround this (see also https://lists.linux-foundation.org/pipermail/bugme-janitors/2008-October/011912.html):

1. Download and unpack http://people.atrpms.net/~hdegoede/libv4l-0.5.0.tar.gz
2. See README, and install: sudo make install
3. Open terminal window
4. $ export LD_PRELOAD=/usr/local/lib/libv4l/v4l1compat.so
5. $ camstream
Start camera, should now work.

How to make skype work:
1. create new shell script (call it skype_wrapper), put it somehwere (e.g. /usr/local/bin/skype_wrapper). Content:
#!/bin/bash
export LD_PRELOAD=/usr/local/lib/libv4l/v4l1compat.so
skype
2. Open System/Root Menu manager, locate Skype, Edit the shortcut replacing command “skype” => “/usr/local/bin/skype_wrapper”.
3. Start skype (restart, if already running). Test video should now work.

All good. Even the skype fix worked. Now its just bluetooth to fix … mutter mutter.

This entry was posted on Saturday, January 3rd, 2009 at 2:33 pm and is filed under General IT, Linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Linux Memory Usage Summary Script
Counting files in subdirectories. »

One Response to “Z-star Video Camera working in Ubuntu Intrepid”

  1. Shahzad Says:
    July 31st, 2009 at 7:10 pm

    Thanks it works for me now.

Leave a Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image
  • Recent Posts

    • ClamAV reporting Outdated version
    • Adventures in unbricking a router
    • One Line Guitar Tuner
    • Captcha Madness
    • Ubuntu upgrade 9.04 to 9.10
  • Sing for your supper

  • Static

    • About
    • Privacy Policy
  • Tags

    apathy apple calendar chkconfig collanos cross-platform eee evolution firmware google grub hotspot id card lightning Linux Mandriva notebook partitioning pclinuxos pclinuxos 2008 Philippines power management re-install sane scanner scheduleworld script Security slow sysv-rc-conf thinkpad thunderbird trust ubuntu ultraportable usb virtualisation vmware vpn wifi wireless workspace sharing xsane yahoo zombie
  • Blogroll

    • Datalude
    • Digital Life
    • Engage the World
  • Archives

    • May 2010
    • April 2010
    • March 2010
    • November 2009
    • October 2009
    • June 2009
    • May 2009
    • April 2009
    • February 2009
    • January 2009
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • April 2008
    • March 2008
    • February 2008

Everything is Broken runs on WordPress. Theme by Bob. All content Copyright © Datalude 2008+.