2. Enabling Support for Your (Webcam) Hardware in Linux

2.1. Drivers and Modules

For your webcam to work you will need support for the connection and support for the actual camera hardware. Those who are already versed in kernels and modules and how to load them should skip to Section 2.2, which addresses support of the connection type. If you know your USB, IEEE 1394 or whatever bus you will be connecting your camera to is already configured and working, you should move on to the list of specific webcam hardware listed in Section 2.3.

Webcam drivers are usually available one of three ways: within the kernel, as a compilable stand alone module, or available as a pre-compiled (packaged) binary driver from your Linux distribution.

2.1.1. Module or In-Kernel?

As a rule, often the stock kernel, or working part of the operating system, of your initial installation may already have support for what you need. Your Linux distribution vendor has likely enabled the most common options already, including the bus, or connection type, and drivers for common camera models. The driver exists either as a loadable module or within the already running kernel.

An easy way to tell if the driver is enabled is to use the dmesg command piped into less (for easy paging) to look for an acknowledgement that it was loaded when your system started up:

   $  dmesg | less

...which may yield something like the following, depending on your hardware:

   Dec 18 17:35:18 localhost kernel: hub 5-0:1.0: USB hub found
   Dec 18 17:35:18 localhost kernel: hub 5-0:1.0: 2 ports detected
   Dec 18 17:35:18 localhost kernel: Linux video capture interface: v1.00
   Dec 18 17:35:18 localhost kernel: quickcam: QuickCam USB camera found (driver version QuickCam USB $Date: 2005/01/07 13:29:53 $)
   Dec 18 17:35:18 localhost kernel: quickcam: Kernel:2.6.7 bus:1 class:FF subclass:FF vendor:046D product:0840
   Dec 18 17:35:18 localhost kernel: quickcam: Sensor HDCS-1000/1100 detected
   Dec 18 17:35:18 localhost kernel: quickcam: Registered device: /dev/video0
   Dec 18 17:35:18 localhost kernel: usbcore: registered new driver quickcam

If you don't see it, the particular driver may exist as a loadable module. If you know what that module is named, try using find; in this example we are looking for the 'ibmcam' module:

  $  find /lib/modules -name ibmcam.o

Note that up until the 2.4 series modules had the suffix .o; for 2.6+ series kernels this was replaced with .ko.

You can get a list of all modules available by typing the following at the command line:

  $  ls -R /lib/modules/`uname -r`/kernel 

Where `uname -r`, surrounded by forward tick marks, is your kernel version number. The following output is an example of what you might find in a USB webcam-ready kernel , where everything is loaded as a module (all but the relevant lines have been edited for brevity):

   ./usb: usbvideo.o usbcore.o ibmcam.o

Once you know which module your camera needs you can find out if it is already loaded by typing the following at the command line:

   #  lsmod

As shown by the prompt above, you will need to have root privileges to do this. You should get output similar to the following:

   cdrom                  29312   0  (autoclean) [sr_mod]
   usb-ohci               17888   0  (unused) 
   usbcore                56768   0  [scanner ibmcam usbvideo usb-ohci] 
   ibmcam                 39680   0

Most stock kernels are compiled with kmod, which enabling automatic loading of necessary modules when the appropriate hardware is detected. It may not always do so, however, so if you don't have the particular module you're seeking loaded and you think the module may be available, try loading it manually with modprobe, as in the following using the ibmcam module as an example:

   # modprobe -v ibmcam

Drivers for specific webcam models, or links to project pages hosting code for drivers, are outlined in Section 2.3. The drivers are usually available one of three ways: within the kernel, as a compilable stand alone module, or available as a pre-compiled binary from your Linux distribution.

If the support for your driver is not found either enabled statically within the kernel or as a module, don't despair. Drivers for numerous models are in the Linux kernel source (available directly from kernel.org source code repository), or in code offered separately from the kernel that can be configured to work with your current setup as oulined in Section 2.1.2. If your webcam driver is available in the kernel source but not enabled as a module or otherwise in your default system, you can either recompile the kernel from the source code you have or obtain a new version of the kernel source, either pre-packaged by your Linux distributor or directly from the previous link (as a so-called "vanilla" kernel). If you are unfamiliar with the prerequisites and procedure of compiling your own kernel, I direct you to the Kernel HOWTO for more information.

2.1.2. Patching, Source-Only or Precompiled Binary?

You may find that your webcam is supported by only a kernel patch, by a source-only driver not requiring a kernel recompile, or you may even be lucky enough to have a distribution that makes a pre-compiled and packaged binary driver available for your computer's architecture. The procedure involved in the former is largely beyond the scope of this document and is probably best outlined in the documentation available on the web page of your particular model's driver found in Section 2.3. Some further more general documentation on these processes are, however, addressed in Section 5

2.2. Supporting the Connection Type

2.2.1. USB Webcams

If you have a USB webcam, it is likely a Linux driver has been written for your device. There are two ways of supporting USB devices in Linux. One is the more traditional kernel support, and the other is through libusb. For at least one webcam category, the STV0680-based models, working libusb support is recommended, at least according to the Sourceforge page on the subject.

Unless you know your driver requires libusb support, you should probably stick with the more conventional in-kernel support for USB devices beginning in Section 2.2.1.2.

2.2.1.1. Libusb

Libusb is a library that allows access to the USB functions in Linux through userspace and without the need to enable kernel support and insert modules. Most distributions, at this point, are offering libusb in their stable branches (and some install it by default), so if you don't already have kernel support for USB devices, then you may only have to install the libusb package in order to access your device. You must have USB device filesystem support enabled in your kernel, which most distributions do. To find out for sure, issue the following at the command line:

   $  cat /proc/filesystems

You should see (among others):

   nodev    usbdevfs 
   nodev    usbfs

You may need to mount usbdevfs to enable it and see the device files, which you can do at the command line with mount -t usbdevfs none /proc/bus/usb. Don't try to use libusb while your particular kernel webcam support is enabled either statically or the module loaded; you can only use one at at time.

You can obtain the libusb package in .rpm, .tgz or .deb format from your Linux distribution.

2.2.1.2. Linux Kernel USB Support

Kernel support is required for USB webcam support if not using libusb (outlined above).

For 2.2 and 2.4 series kernels, your USB webcam may require the module usbvideo to function. This is not required in the 2.6+ series.

For generic USB bus support in Linux, you will need USB subsystem support in your kernel, whether usb-ohci, usb-ehci, or whatever flavor of USB driver your system prefers. USB subsystem support has been present in the Linux kernel since the late 2.2 series. For a more in-depth discussion of USB support in general, I direct you to the Linux-usb project site. If you want to find out which modules are loaded, at the command line or in an xterm, type the following:

   #  lsmod

As shown by the prompt above, you will need to have root privileges to do this. You should get output similar to the following:

   cdrom	       29312   0  (autoclean) [sr_mod]
   usb-ohci	       17888   0  (unused) 
   usbcore             56768   0  [scanner ibmcam usbvideo usb-ohci] 
   ibmcam              39680   0

If you don't have the particular module you're seeking loaded and you think the module may be available, try loading it directly (using the usb ibmcam module as an example):

   #  modprobe -v ibmcam

...at which point you should see something like the following:

   Using /lib/modules/2.4.20/kernel/drivers/usb/ibmcam.o

By placing the entry ibmcam (for example) in /etc/modules (note that this varies by distribution), you can have the module load at boot-time automatically. You can then confirm the module was loaded by checking the syslog or in the boot-time record with dmesg | less), where you should see an entry such as the following:

   Oct 18 12:43:12 K7 kernel: hub.c: new USB device 00:02.3-2, assigned address 3 
   Oct 18 12:43:12 K7 kernel: ibmcam.c: IBM PC Camera USB camera found (model 2, rev. 0x030a) 
   Oct 18 12:43:12 K7 kernel: usbvideo.c: ibmcam on /dev/video1: canvas=352x240 videosize=352x240

2.2.2. IEEE 1394 (Firewire™, i.Link™)

IEEE 1394 webcams require an IEEE 1394 PCI card or an IEEE 1394 bus port on your mainboard. The IEEE interface has been supported in Linux since the early 2.4-series kernel. If you are lucky enough to own such a device, generic information on support of the IEEE 1394 bus in Linux can be found at www.linux1394.org. If you have a kernel older than 2.4.2, you will need to patch your kernel with one of the patches found on this page matched to your kernel version. In addition, you will require libraw1394. The previously referenced linux1394.org site has a great installation guide.

The IEEE1394 Digital Camera List, by Damien Douxchamps, offers an outstanding summary of the capabilities of IEEE 1394 cameras as well as the current status of support for individual models.

2.2.3. Generic Parallel Port Support for Parport Webcams

For 2.2 and 2.4 kernel systems, parallel-port support must be enabled statically or as a module (stock kernels usually have this enabled by default). You may want to read more generic info about parallel-port device support under the Linux kernel before starting this process. To find out for sure if the module parport is loaded, you can check the dmesg file or use lsmod as outlined above. Using dmesg | less, you should see (among many other lines) the following:

   Mar  3 08:00:25 K7 kernel: parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE] 
   Mar  3 08:00:25 K7 kernel: parport0: irq 7 detected

If you are compiling your own kernel, enable 'Parallel Port support'. You should enable 'IEEE 1284 transfer modes', and if you have x86 type architecture, you should also enable 'PC-style hardware'.

If modprobe returns an error when you attempt to load the module, note that you may need to determine and supply the hardware address when invoking modprobe. The most common address is 0x378 for an x86 system; 0x278 and 0x3BC are other possibilities for integrated or ISA parallel ports. Add-in PCI parallel ports may have unusual base addresses. You can also arrange multiple devices with either the parport_pc or parport_arc modules, though that topic is beyond the scope of this document.

Warning

WARNING: Be sure you have the correct address before entering this information at the command line or else your machine may become unstable, crash or otherwise implode.

Your parallel port should be set to preferably "EPP" mode, or alternatively ECP/EPP. "Bidirectional" (also known as "BPP" or "PS/2") may work, albeit much more slowly. "Unidirectional" mode is unsuitable for scanning. The above setting can usually be accessed through your BIOS menu, at least on x86 systems.

2.3. Specific Webcam Models

Note that this information is frequently changing. The Linux-USB Device Overview site is a great place to look if you have a USB webcam. Also, you will want to check for your model's homepage at http://www.exploits.org/v4l/. The information compiled below on specific webcam models is from the same source, so you may find more up-to-date information through the previous link. If you can't find an entry for your particular hardware, you can find links to resources on how to write your own driver!

Important

It is important to note that if your camera isn't listed, the easiest way to find out if your camera is supported is to find out what chipset is used in its manufacture.

This information is usually present in the specifications published in your webcam's manual or on the manufacturer's website.

If you can't find your camera model listed and aren't sure what chipset your camera is made with, you should consider searching and/or subscribing to the video4linux-list mailing list hosted by Redhat.

2.3.1. 3com HomeConnect PC Digital Webcam

This driver is supported with the kernel patch located at the homeconnectusb project web page. It may require a kernel recompile after patching depending on your kernel version.

2.3.2. CPiA based Webcams

Please see the project home page for up-to-date information. This chipset has been used in the manufacture of both USB and parallel port webcams including the following:

  • Aiptek HyperVcam Fun USB (non-OV511 based)

  • Creative Video Blaster WebCam II USB and parallel-port

  • CVideo-Mail Express parallel-port

  • Digicom Galileo USB and Digicom Galileo Plus

  • Dynalink Digital Camera

  • Ezonics EZCam (not Pro or Plus)

  • I-View NetView NV200M

  • Microtek EyeStar USB

  • Pace Color Video Camera USB

  • SuperCam WonderEye

  • TCE Netcam 310 USB

  • Terracam USB (non-OV511 based or Terracam Pro)

  • Trust SpaceC@m Lite USB and SpaceC@m 100

  • Utopia USB Camera

  • ZoomCam USB and parallel-port

2.3.3. SE401, SE402 and EP800 based USB webcams

This project is a work in progress. The drivers and other useful information are available at the project homepage located here. As of writing this, it is necessary to patch and recompile your kernel in order to obtain support for these models. The driver supports the following:

SE401 chipset via the 'se401' driver:

  • Aox SE401 camera

  • Philips PCVC665 USB VGA webcam 'Vesta Fun'

  • Kensington VideoCAM PC Camera (Models 67014-67017)

SE402 and EP 800 chipsets via the 'epcam' driver

  • Spypen Actor

  • Rimax Slim Multicam

  • Concord Eye-Q Easy

  • Creative PD1001

  • Chicony DC-100

  • Endpoints SE402 and EP800

2.3.4. OmniVision based Webcams

This category includes a multitude of webcam and video-capture devices manufactured by Omnivision, including the OV511(+), OV518(+), OV6620, OV6630, OV7610, and OV7620AE. The project homepage is here. Supported models include:

  • Aiptek HyperVcam Home and Mobile

  • Amitech AWK-300

  • I-view NetView NV300M

  • TEVion MD9308

  • Intel Me2Cam

  • Dlink DSB C100, C300

  • Hawking Tech. UC-110, UC-300 and UC-310

  • Puretek PT-6007

  • Alpha Vision Tech AlphaCam SE model AC-520

  • Creative Labs WebCam model PD1001 with OV518 chipset

  • Creative Labs WebCam 3, WebCam Go, Webcam Go Plus

  • Elecom UCAM-C1C20

  • Elta WEBCam 8211 PCC

  • Ezonics EZPhone Cam

  • Philips ToUCam XS (old version with OV518)

  • LG Electronics LPC-UM10

  • Lifeview various USB Life TV models

  • Genius VideoCam Express

  • AverMedia Intercam Elite

  • Maxxtro Cam22U

  • MediaForte MV300, PC Vision 300

  • Terratec TerraCam PRO and some TerraCam models

  • OmniVision (except those with OV519)

  • TRENDNet TV-PC301

  • Trust Sp@ceC@m USB

  • Lifetec LT9388

  • BestBuy EasyCam U

  • Maxell Maxcam

  • TCE NetCam 310u

  • Medion MD9388

  • Webeye 2000B

  • Suma eON

  • Prochips PCA-3100

  • Ezonics EZ USB Cam II (the OV511+ models)

  • Waytech I-Pac VIC-30

  • Zoom Telephonics ZoomCam III USB (model 1598)

2.3.5. Logitech (formerly Connectix) Quickcam Support

The QuickCam VC USB and parallel port model webcams are supported by the driver offered here. A kernel patch and recompile are necessary for support of this model.

The Quickcam driver is represented by two different projects that offer two different flavors of driver for certain Quickcam models, both of which are stand-alone drivers that do not require a kernel patch or recompile. The qce-ga and qc-usb drivers support the following models:

  • Logitech (earlier models of) Quickcam Express

  • Quickcam Web

  • Legocam

  • Dexxa Webcam

  • Labtec Webcam

The qc-usb driver is more experimental but reportedly works better on some models such as the Quickcam Web. Also, I have recieved correspondence that newer versions of the Logitech Quickcam Express no longer work with the above drivers; instead this page offers an experimental driver that claims to support the newer model.

Note to Redhat users: The qce-ga driver doesn't compile properly using the modified kernel source provided in Redhat 9, but a fix is available here.

Some Logitech camera models are supported by the Philips driver in Section 2.3.8.

2.3.6. ICM532 Based Webcams

One driver for this chipset, homepage here, is now merged into the 2.6 kernel source; the other is (per the developer's own description) experimental and available here. Either or both claim to support the following models:

  • IC-Media Corp Pencam

  • Newer versions of the Logitech Quickcam Express

  • Newer versions of the Labtec Webcam

  • Biolux 654 microscope

  • Ezonics EZCam USB II (uvt8532)

  • Ezonics EZCam USB III

  • TerraCam USB

  • Stick Webcam

  • Mini WebCam

  • Tucan PenCam

  • Che-ez! Webbie

  • SNAKE EYE SI-8480/8481

  • PC CAM CP03

  • WEB Camera PBC0006

  • Clipcam

2.3.7. NW802 Based Webcams

This chipset, manufactured by DIVIO, is supported by the driver found here. The models supported include the following:

  • BTC SurfCam CMOS300k

  • Mustek WCam 300

  • Logitech QuickCam Pro USB (the earlier "dark focus ring" model)

2.3.8. Philips USB Webcams

Because of the expiration of the Non-Disclosure-Agreement between Philips Corporation and the former maintainer of the pwc driver, the previous kernel support for Philips PWC-chip-based webcams has been removed. Luckily a new, still experimental driver that does not require a proprietary module is under development. The old site, with a discussion of the change, can be seen at http://www.smcc.demon.nl/webcam/; the new driver is maintained at saillard.org with more information at the PWC Documentation Project.

Philips models supported by the above include the following.

  • PCA645VC

  • PCA646VC

  • PCVC675K Vesta, Vesta Pro and Vesta Scan

  • PCVC720K/40 ToUCam XS, ToUCam Fun, ToUCam Pro and ToUCam Scan

  • Askey VC010

  • Creative Labs Webcam 5, Pro Ex

  • Logitech 3000 and 4000 Pro, Notebook Pro, and Zoom

  • Samsung MPC-C10 and MPC-C30

  • Sotec Afina Eye

  • Visionite VCS UM100 and UC300

2.3.9. SPCA50X USB Camera Linux Driver

Information regarding this chipset can be found here, and is under heavy development and includes partial or complete support for the following models:

  • Kodak DVC-325 and EZ200

  • Creative PC-CAM 300, 600, 750

  • Genius VideoCAM Express V2

  • Micro Innovation IC 200/IC 150

  • Logitech ClickSmart 310, 420, 510, 820 and Cordless models

  • Logitech Pocket750

  • Benq DC 1016, 1300, 1500, 3410

  • Flexcam 100

  • Aiptek MegaCam, [1.3 Megapixel] Mini PenCam and PocketCam 1.3M Smart

  • Finet Technology Palmpix DC-85

  • Pure DigitalDakota

  • 3Com Home Connect lite

  • Megapix V4

  • Mustek gSmart: Mini, Mini2, Mini3, LCD 2, LCD 3

  • Digital Dream Enigma 1.3, Epsilon 1.3

  • Maxwell Compact Pc PM3

  • Jenoptik models

  • Minton S-Cam F5

  • D-Link DSC-350

  • Trust FamilyC@m 300 Movie

  • Aiptek Pocket DV, PocketDVII, DV3100+, mini PenCam 2, PocketCam 3M, Pencam SD 2, Pocket DV3500

  • Hama Sightcam 100

  • Micro Innovations IC50C, IC400c

  • FlyCam USB100

  • Arowana USB Camera 300 K

  • Intel Easy PC Camera, CS120 (Easy PC Share), PC Camera Pro (CS431), Pocket PC Camera (CS630)

  • Grandtec V.cap

  • Sigma-Apo Petcam

2.3.10. STV0680 based Models

The USB version of webcams made with this chipset are supported by the 2.4.18 and above kernel with the stv680.o module. Alternatively, you can obtain the source from the project homepage. This driver supports models including the Aiptek Pencam and the Nisis Quickpix 2.

If you have a serial version, the main one of which is the Scan e-Studio, you should go here.

2.3.11. Winbond w9966cf

This is a driver for the parallel-port interface that supports the Philips SAA7111 CCD-control chip as found on the Lifeview Flycam SUPRA webcam. It is included in the late 2.4 kernel series and later under the heading 'video4linux' support. The homepage for this project is here.

2.3.12. Xirlink C-it™ HDCS-1000 based Webcams

This driver is for the USB webcams manufactured by Xirlink, IBM (PC Camera) and Veo Stingray model webcams. Support has been in the Linux kernel USB section since 2.2.12. The homepage is at http://www.linux-usb.org/ibmcam.