Linux.com

Feature: Desktop Hardware

Configuring your webcam to work under Linux

By Bruce Byfield on September 06, 2007 (9:00:00 AM)

Share    Print    Comments   

If you want the old-time GNU/Linux experience, try configuring a Web camera. Unlike most peripherals, webcams are generally not configured during installation. Moreover, where printers have the Common Unix Printing System (CUPS) and its interfaces, with webcams you are generally thrown back on whatever resources you can find on the Internet and your own knowledge of kernel modules and drivers. These obstacles means that configuring webcams can be a challenge -- but with determination and thoroughness, and maybe a little luck, you can get your webcam running in less than an afternoon.

The best scenario for configuring a webcam is when you buy an external one. Numerous sites exist for different manufacturers and models, and a Web search can often tell you whether GNU/Linux supports a given webcam. In most cases, you probably won't find much information on the manufacturer's site, but you will generally find community-built sites, often complete with user comments. Howard Shane's The Webcam HOTO, while showing its age in some ways, includes many useful links for consumers. For FireWire cameras, try The IEEE1394 Digital Camera List, which is maintained by Damien Douxchamps.

An especially useful site is Michel Xhaard's A Free World, whose Spca5xx drivers are starting to find their way into the repositories of major distributions, including Debian. If your driver is listed on this site and your distribution includes packages for these drivers, then your webcam may be configurable automatically when the packages are installed, with little or no effort on your part.

However, at times -- especially with a laptop -- you may be working with a built-in webcam that, chances are, was not your main consideration when you purchased, or with a distribution that doesn't include driver packages. In such cases, a Web search on your computer model may turn up information on how to set up the webcam.

More often, you will have to obtain information about the camera directly from the computer. You have several ways of doing so:

  • Test the camera using a suitable program (see below). If it works, then your camera is one of those directly supported by the kernel. This scenario is uncommon today, but you might get lucky.
  • Use the command dmesg | more to see whether the camera was detected during bootup. Should you find a reference to it, then search /lib/modules for the /usb subfolder and see if a loadable kernel module exists for it (you may have make a reasoned guess from among those listed). The exact position of this subfolder varies with the distribution; in Debian, it is /lib/modules/kernel/build/drivers/usb, while in Fedora 7 it is /lib/modules/kernel/kernel/drivers/usb.
  • These days, the most likely possibility is that you have a USB camera. Use lsusb or, if your distribution includes it, the graphical tool v4l2-tool to see a list of USB devices. Locate the camera through its name, a process of elimination, or guesswork, and record the eight-digit number with a colon in the middle in the last column of its listing. This number identifies the vendor and product ID, which you can use to find a possible driver on the Internet. If you are using v4l2-tool, then entering the IDs on the Suggest Driver tab may even give you the name of a suggested driver. Armed with this information, you can search the Internet for the driver, then download and compile it. In some cases, you may have to download dependencies first. For instance, for the Ricoh R5U870 driver, you will have to install a Dynamic Kernel Module Support (DKMS) package as well.

In the case of the Ricoh R5U870, having DKMS enabled means that the driver can be automatically installed as soon as it is successfully compiled. Conceivably, you might have to install the driver via a kernel patch, although that should be rare unless you have an older webcam. Most of the time, when you have the driver ready, you will have to use modprobe drivermodulename to load it into the kernel. When you are satisifed that it works, add the driver name to /etc/modules or the line modprobe drivermodulename to /etc/rc.d/rc.local to enable the camera at boot time.

Testing

Having come this far, you are over the worst, but some difficulties may still be waiting in ambush as you prepare to test. Depending on the distribution, you may need to use the addgroup command to add a new video group, and to add user accounts to the group in /etc/group so that everybody can use the camera. In addition, you should test the webcam with a variety of programs, such as CamStream, Ekiga, and Kopete, because one of them may not work with your particular camera or its driver. In some cases, upgrading to a newer version of a program may suddenly give you support.

If you use DKMS to install a webcam driver, you may find that another peripheral stops working (in my case, it was the wireless card enabled by Ndiswrapper). This problem may persist if you reboot, but miraculously vanish if you shut down the machine and restart. If it doesn't, uninstalling whatever has stopped working and reinstalling it may be a solution.

Conclusion

Unavoidably, this article provides only a starting point. Not only are webcams available in an overwhelming array of manufacturers and models, but many are rebrandings of other cameras sold under a different name, and individual cameras sold as the same model may differ internally.

Nor, like many hardware makers, do the manufacturers of webcams show much interest in releasing GNU/Linux drivers. That means that many of the drivers that exist are the work of community developers doing reverse engineering, many of whom seem never to have considered standardizing their work with that of others.

For these reasons, many details have to be left to the particular camera and module. However, for many users, the problem is not that webcam configuration is difficult so much as the fact that they lack an overview. Perhaps with the resources and circumstances given here, you can start the process knowing what you might be in for, and, when one alternative fails, what other approaches you can try.

Bruce Byfield is a computer journalist who writes regularly for Linux.com.

Share    Print    Comments   

Comments

on Configuring your webcam to work under Linux

Note: Comments are owned by the poster. We are not responsible for their content.

Creative NX pro webcam worked out of the box

Posted by: Anonymous [ip: 212.123.200.193] on September 06, 2007 09:38 AM
Guess I was one of the lucky ones!
I just plugged my Creative NX pro webcam into the USB slot on my IBM T20 running Ubuntu 7.04 and it worked right out of the box.

Philip

#

Configuring your webcam to work under Linux

Posted by: Anonymous [ip: 62.189.157.240] on September 06, 2007 09:50 AM
Hmmm, doesn't sound like my experience at all. I got a no brand made in china usb webcam, pugged it into my kubuntu machine, opened up kopete to do some chattage, and there it was, auto detected and projecting my ugly mug to the world. Slightly darker than on windows, but the kopete controls cleared that up.



It's not all bad people, just get a well configured distro. For several years, I used gentoo, and enjoyed digging through docs to do stuff like this, but now I have a family, and I simply don't have the time to invest, and thanks to ubuntu and the like, I don't have to invest, others have already done it for me.

#

Configuring your webcam to work under Linux

Posted by: Anonymous [ip: 62.64.83.230] on September 06, 2007 10:01 AM
Can anybody point to workable applications for VIDEO conferencing in Linux? I'd like to see my interlocutor who uses Window$. Thank you in advance.

artiomix from <a href="http://www.linuxscrew.com">Linux Screw</a>.

#

Re: Configuring your webcam to work under Linux

Posted by: Anonymous [ip: 83.105.103.10] on September 06, 2007 11:29 AM
ekiga.org

if you use ubuntu it's installed by default, if not do it

sudo apt-get install ekiga

#

VIDEO conferencing

Posted by: Richard Sullivan on September 06, 2007 12:16 PM
maybe try wengophone from http://www.openwengo.org/

It is a simple skype-like service. The client software is opensource with versions for Linux and Windows.
When I tried it out it seemed to work fine from once I opened a port or two on the firewalls (can check exact details later). You might need to sign up for an account with Wengo as a SIP provider but calls over the net are free.

The last time I checked (about 6 months ago) the software was quite a buggy beta 2.1 or something but might well be stable now. If you want more details mail me at
itexpert dot lastName(see-posting-header) at gmail dot com.

I would be happy to help you test (since I would like to help a grandmother to WengoPhone on Windows to keep in contact with a grandaughter on Linux).
Good luck,
Richard

#

Re: VIDEO conferencing

Posted by: Anonymous [ip: 203.84.180.94] on September 07, 2007 08:35 AM
thanks for sharing! at last I found the solution.
I'm from <a href="http://www.ibizaspain.info"> Ibiza </a> and I'm new to this site.

#

Working link to "how to" document

Posted by: Anonymous [ip: 129.240.235.122] on September 06, 2007 03:38 PM

Configuring your webcam to work under Linux

Posted by: Anonymous [ip: 203.189.181.135] on September 07, 2007 06:22 AM
Do microsoft webcams work in Linux?

#

Genius Look 312p worked out of box

Posted by: Anonymous [ip: 127.0.0.1] on September 07, 2007 11:17 AM
Just plug it in and select it in Ekiga preferences.

#

Configuring your webcam to work under Linux

Posted by: Anonymous [ip: 69.236.97.192] on September 07, 2007 05:26 PM
I have a intel webcam (http://www.amazon.com/Intel-IPCC4PRO-Pro-PC-Camera/dp/B00005852N) Ubuntu installed the necessary drivers and the webcam works out of the box for me.

#

NX Pro notes

Posted by: Anonymous [ip: 124.185.164.234] on September 08, 2007 04:02 AM
Creative NX Pro uses spca5xx driver on Feisty and works better with smother video than on Win2k. Also using spcagui can enhance the experience.
Stomfi

#

Creavite & SilverCrest w Skype 2.0 Beta / Ubuntu

Posted by: Anonymous [ip: 81.17.199.124] on November 11, 2007 10:30 AM
Hi!

It seems that SilverCrest camera doesn't work with Linux at all. It doesn't appear in /dev/ list. But Creative webcam seems to be working. I checked it in multimedia devices list. (Ubuntu) But for some reason it doesn't work with Skype. Because Skype video preview fails, it shows completely black screen. So this far I don't have working camera with Linux.

I hope to hear your comments. - Thanks!

If someone knows about how to get SilverCrest camera working, it would be great. And I'm really hope that Skype Video support is going to get better soon.

#

Microdia

Posted by: Anonymous [ip: 210.210.13.126] on January 09, 2008 09:42 AM
(Webcam Support group for all Microdia chipsets under Linux)

Q) Is my webcam a "microdia"?
A) Execute the following command
#lsusb
If you see any of the following numbers, you have a "microdia" webcam
0c45:608f, 0c45:60ec, 0c45:60fe, 0c45:6242, 0c45:6260, 0c45:6270, 0c45:60c0, 0c45:613b, 0c45:613c, 0c45:624f, 0c45:627b, 0c45:62c0, 0c45:8105

basically 0c45:<xxxy> above is enough to conclude you have a microdia webcam)
All of the above webcams are unsupported under Linux

please join the following google group
https://groups.google.com/group/microdia

#

Configuring your webcam to work under Linux

Posted by: Anonymous [ip: 12.169.163.241] on February 20, 2008 05:26 AM
Nice spam. Thank you for supporting spammers.

#

Configuring your webcam to work under Linux

Posted by: Anonymous [ip: 85.235.19.253] on March 03, 2008 10:57 PM
DONT BUY CREATIVE HARDWARE!!! I am never gonna by anything from Creative again - neither should you. My webcam 041e:4038 Creative Technology, Ltd is not supported in Linux, they have stolen my money by providing me some crappy hardware that only works in M$!!!! I hope this company goes to hell if tehy don't learn to provide open source drivers at a higher tempo....

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya