5. Troubleshooting

5.1. Help, I have a USB webcam and don't know exactly what model it is and/or who the manufacturer is. What do I do?

Use lsusb; it can give you an idea of what other USB devices are available on your system, too:

   $  lsusb
   Bus 007 Device 001: ID 0000:0000
   Bus 006 Device 001: ID 0000:0000
   Bus 005 Device 001: ID 0000:0000
   Bus 004 Device 001: ID 0000:0000
   Bus 003 Device 003: ID 0545:8080 Xirlink, Inc. IBM C-It WebCam
   Bus 003 Device 002: ID 046d:0840 Logitech, Inc. QuickCam Express
   Bus 003 Device 001: ID 0000:0000
   Bus 002 Device 003: ID 051d:0002 American Power Conversion Back-UPS Pro 500/1000/1500
   Bus 002 Device 001: ID 0000:0000
   Bus 001 Device 001: ID 0000:0000

The numbers after 'ID' are the Vendor and Product numbers, respectively. They can then be looked up in the Linux USB ID catalog.

If lsusb is not available to you, and you have support for /proc filesystem support and USB-filesystem support, issue the following at the command line:

   $  cat /proc/bus/usb/devices

You should receive output including (but not necessarily limited to) the following:

   T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=3 Spd=12 MxCh=0 
   D:  Ver= 1.01 Cls=ff(vend.) Sub=ff Prot=ff MxPS=8 #Cfgs=1 
   P:  Vendor=0545 ProdID=8080 Rev= 3.0a 

The line beginning "T:" is the USB bus the device is attached to. The "P:" indicates (obviously) the vendor and product ID, which are catalogued at the linux USB Project homepage.

5.2. Help, I can't find the camera device in /dev!

Assuming your connection type is supported, and your camera is working, see Section 3.1.

5.3. Help, I can see the camera device (both in person and as a device node in /dev), but I can't access it!

See Section 3.2.

5.4. Help, my camera has a driver that is source-only, i.e., has to be built by me! Where do I start?

First, check if your Linux distribution offers a pre-compiled binary of the driver. You can then load it as you normally would for a module. If that is not the case, be sure you have kernel sources installed. You will also need at a minimum GNU make, gcc, binutils and perhaps other programs installed depending on your distribution. (Debian users should see the next section for instructions specific to that distribution.)

Download the driver source (in this example named src.tar.gz) and uncompress/untar it:

   $  tar -xvzf src.tar.gz

Then, change to the directory of your kernel source:

   #  cd /usr/src/linux

Make the necessary source files:

   #  make oldconfig # make dep

Now, change to the directory where you unpacked the driver source and read the README and/or INSTALL files for instructions on how to make the driver. Usually this involves some combination of "make" "make all" and/or "make install." Assuming it compiles correctly, you can simply load the new module with modprobe. If you have any problems, see Section 5.7.

5.5. I am using Debian GNU/Linux. Is there an easier way to go through all this kernel compiling stuff and building of source modules?

It is far simpler, in your author's humble opinion, to use the automated kernel-package utility. First, install it and the dependencies using apt-get. Next, install the kernel source that you want (e.g., apt-get install kernel-source-2.X.X). Untar the bzip2'd kernel source with tar -xvjf and then make a symbolic link called linux that points to the new source:

   #  ln -s /usr/src/kernel-source-2.X.X /usr/src/linux

Then cd /usr/src/linux and clean: make-kpkg clean, followed by make menuconfig or make xconfig as you would if compiling a new kernel. Next, you can use make-kpkg kernel_image and then install your new kernel package that has been deposited in /usr/src with dpkg -i ../kernel-image-2.X.X. Next, you can get the pre-packaged source driver using apt. So, in the case of the Quickcam Express, the package is qc-usb-source:

   #  apt-get install qc-usb-source

...and untar the archive:

   #  tar -xvzf qc-usb-modules.tar.gz

This will uncompress the source into the /usr/src/modules directory. The final step, while still in /usr/src/linux is to make the modules with kernel-package:

   #  make-kpkg modules_image

Install the new package, in /usr/src/, called qc-usb-modules-[arch].deb using dpkg -i. Finally, load the module:

   #  modprobe quickcam

Check the documentation in /usr/share/doc/kernel-package for any problems.

5.6. Help, my camera is supported by a driver that has to be patched into my kernel! What do I do?

See the section on patching of the Kernel-HOWTO at The Linux Documentation Project.

The short and unguaranteed version of patching, by your humble author, goes as follows: Be sure you have the same prerequisites outlined in Section 5.4 installed. First, on the command line or in an xterm change to the source directory of the kernel version you are (or will be) running with the camera patch (in this example named patch.diff).

   #  cd /usr/src/linux 
   #  patch -p1 -E patch.diff

You should see a confirmation that the 'hunks' were successfully applied. At this point, you can make menuconfig or whatever program you use to recompile, enabling the appropriate support. If any of the hunks failed, or you run into any problems in addition to the link referenced above you, should consult man patch and Section 5.7.

5.7. Help--as in, where can I get more of it?

See the video4linux mailing list headquarters at https://listman.redhat.com/mailman/listinfo/video4linux-list.

5.8. Help, I want to contribute to Video4Linux support in Linux! Who do I get in touch with?

See this page.

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:58:37