Microsoft LifeCam VX-3000 and GNU/Linux

Here are some tips I have collected while trying to make my Microsoft LifeCam Vx3000 work under the latest Ubuntu. I have a 64 bits system and my aim was to make my camera work with Skype. The hardest part was to find the correct gspca module sources that worked with the latest kernels.

1. Check whether the web-cam is recognized at all

So first, I had to check if the camera was seen at all or not.

~$ lsusb
+ lsusb
Bus 002 Device 014: ID 045e:00f5 Microsoft Corp. LifeCam VX-3000.
One of the line returned by lsusb clearly indicates that my web-cam is recognized. If your web-cam does not appear, try to unload and reload ehci_hcd:

~$ sudo modprobe -r ehci_hcd
~$ sudo modprobe ehci_hcd
And then retry lsusb.

2. Make sure v4l1compat is loaded

Check whether the v4l1compat module is loaded or not by typing the following:

~$ sudo lsmod | grep v4l1_compat
If it not installed, you need to install it. If you have a 32 bits system, you need to install libv4l-0; if you have a 64 bits system like me, you need to install both libv4l-0 and lib32v4l-0:

~$ sudo apt-get install libv4l-0 lib32v4l-0

3. Install cheese

To do this first part, you will need to check progress using cheese:

~$ sudo apt-get install cheese
Startup cheese, click on Video and check whether you can see an image or just white noise. If you do see an image, you can jump to step 4. If like me you could not see anything, follow on..

4. Install GSPCA

Make sure your linux kernel sources are installed and accessible from /usr/src/linux.
Now, download and install the latest gspca module version:

  • Go to this page: http://linuxtv.org/hg/~hgoede/gspca/ (used to be http://linuxtv.org/hg/~jfrancois/gspca/ but got merged back in)
  • Click on the bz2 link on the left side and save it under /tmp
  • Open a terminal and type the following (the compilation itself can take several minutes):
    ~$ cd /tmp
    ~$ tar xfvj gspca-<version>.bz2
    ~$ cd gspca-<version>
    ~$ make
    ~$ sudo make install && reboot
Now, try to run cheese once again and see if this work. If it does not, first check that the gspca module is loaded. If not load it.

~$ sudo lsmod | grep gspca

5. Make Skype work

If Skype still does not work, you need to help it to get there.

You need to force Skype to use the v4l1 compatibility layer, it is not yet compatible with v4l2 apparently. So you have to set the LC_PRELOAD environment variable to /usr/lib/libv4l/v4l1compat.so if you are on a 32 bits system or /usr/lib32/libv4l/v4l1compat.so if you are on a 64 bits system. To just try it, open a terminal and type:

~$ LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype
Now, you should it be able to see your web-cam image in the Skype video options. If not… well then good luck continuing the search !
Finally, I made that change permanent (at least, until a future Skype upgrade):

~$ sudo mv /usr/bin/skype /usr/bin/skype_real
~$ sudo echo LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype_real > /usr/bin/skype
~$ sudo chmod +x /usr/bin/skype
You could also just create an alias in your home for this. Overall, I hope this helps you as it can seem like a never-ending frustration to use some web-cams under Linux, while many other web-cams work out of the box !

If it was useful to you or if you found something I could add, please leave a comment !

About these ads
This entry was posted in Linux and tagged , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

10 Responses to Microsoft LifeCam VX-3000 and GNU/Linux

  1. Angelof says:

    This helps a lot, and I made my cam to work perfect with skype and cheese. I have other problem. When I run Chrome or Mozilla on Ubuntu 10.04, I cant see my cam in the flash player. The solutions:
    LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so firefox &
    LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so google-chrome

    This solutions work fine and after running this in the terminal I can see my cam.
    My question is: Can you help me make this load permanent so I dont have to execute the command every time I want to stream my cam on Chrome or Firefox.

    Thx and Cheers

    • Evan says:

      This guide seems very useful, but unfortunately I can’t find the link you are referring to in http://linuxtv.org/hg/~hgoede/gspca/.. When I save the only bz2 link I see on the page it is only 7 kb in size,, Can’t extract it either.. If I left click on it then it goes into an endless loop that refers to the same page!! How have the other managed to do this?

  2. gianni says:

    first of all thanks for your guide.
    i tried to use it, but i have 2 problems:
    – those links don’t work ( http://linuxtv.org/hg/~hgoede/gspca/ & http://linuxtv.org/hg/~jfrancois/gspca/ )
    but i take from this http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gz found with google.
    – i have those errors using “make” & “sudo make install && reboot”
    i sure i make some mistakes but i don’t know which one.
    could you help me? thanks
    gianni

    gianni@gianni-desktop:~/gspcav1-20071224$ make
    make -C /lib/modules/`uname -r`/build SUBDIRS=/home/gianni/gspcav1-20071224 CC=cc modules
    make[1]: ingresso nella directory «/usr/src/linux-headers-2.6.35-22-generic»
    CC [M] /home/gianni/gspcav1-20071224/gspca_core.o
    /home/gianni/gspcav1-20071224/gspca_core.c:54: fatal error: asm/semaphore.h: Nessun file o directory
    compilation terminated.
    make[2]: *** [/home/gianni/gspcav1-20071224/gspca_core.o] Errore 1
    make[1]: *** [_module_/home/gianni/gspcav1-20071224] Errore 2
    make[1]: uscita dalla directory «/usr/src/linux-headers-2.6.35-22-generic»
    make: *** [default] Errore 2
    gianni@gianni-desktop:~/gspcav1-20071224$ sudo make install && reboot
    mkdir -p /lib/modules/`uname -r`/kernel/drivers/usb/media/
    rm -f /lib/modules/`uname -r`/kernel/drivers/usb/media/spca5xx.ko
    rm -f /lib/modules/`uname -r`/kernel/drivers/media/video/gspca.ko
    install -c -m 0644 gspca.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/
    install: impossibile fare stat di `gspca.ko': Nessun file o directory
    make: *** [install] Errore 1
    gianni@gianni-desktop:~/gspcav1-20071224$

  3. dma says:

    when I type in sudo echo LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype_real > /usr/bin/skype permission is denied. but i was able to view my web cam in skype. I just can’t make the permanent change.

    • Locks Free says:

      If you have troubles, instead of touching the /usr/bin/skype file or link, you can just create a quick script launch_skype.sh on your desktop or within your home that contains just:
      LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype

  4. Luke Stanley says:

    This worked for me except the last bit with the echoing, I just opened up a text editor with sudo and made the script manually.
    Webcam now works, thanks!

  5. morlan says:

    using the v3l preloader worked a treat, thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s