F.A.Q.:
OV518 Questions:
Q: I have an OV518 camera. Is it supported?
A: Yes,
if it has the OV6630 sensor. You need the latest 1.xx or 2.xx driver.
If it has an OV6620 then driver version 2.22 or later is required. With
the 1.xx driver, you must load ov518_decomp. Version 2.16 and later
don't require you to load ov518_decomp.
Q: I have an OV518+ camera. Is it supported?
A: Partially.
Driver version 2.18 supports it but the image is noisy, like a badly
tuned TV station. Some people report that theirs works perfectly though, so maybe my camera is just defective.
Q: Why is there no color?
A: Color should
work with the 2.16 or 1.65 driver (or newer). If color doesn't work, try the
force_palette=15 module parameter. If you get a corrupted green or
purple image with at least 2.16 or 1.65, please report it to me.
Q: The image is too dark with 2.16 and 1.65 (or later) drivers.
A: These drivers increased the default frame rate to 30fps. That
will reduce the exposure time in most cases, hence a "darker" image.
Try the "backlight=1" module parameter.
Q: I tried using my OV518/OV518+ camera, but I only get colorful garbage in
the top 1/8 of the window.
A: Make sure you aren't using the "dumppix=1" parameter (that is
only needed for the "d518" program).
Q: I cannot find the ov518_decomp.o module.
A: It is only included with driver version 1.54 or newer.
It cannot be used with 1.52 or earlier, either.
Q: My OV518 camera doesn't give me any images no matter what I do.
A: This is due to a change that OmniVision made in their latest version
of the OV518 chip. Upgrade to version 1.62, version 2.05, or later.
Q: Does the OV518/OV518+ support capturing uncompressed images?
A: No. The images are always compressed, so that the camera
can be built with less RAM. This is why OV518 cameras are so inexpensive.
Q: My camera says it can do 352x288, but I only get 320x240. Other
resolutions don't work either.
Q: The images are too dark, too light, or "blocky".
Q: Sometimes I get blank or "cut off" images.
A: These are due to a bug in the 1.56 or older driver. Upgrade
to driver version 1.57 or later.
OV519 Questions:
Q: Why doesn't your driver work with my Video4Linux application (Xawtv, for example)?
A: The problem is that Video4Linux currently has no way to describe data
as being in JPEG format (there might be an ID for MJPEG, but that is
different). As a result no applications support JPEG input yet. Since
there is no generally accepted library for handling Video4Linux format
conversions, every application will need to be modified to support
JPEG. The alternative (decompressing JPEG in the kernel) would never be
accepted by the kernel maintainers, and it would cause quality loss if
the app wanted to recompress to JPEG. Fortunately, JPEG is pretty easy to implement in an application by using the libjpeg
library. If I get some free time, I will try to do this with Xawtv and
maybe Gnomemeeting.
Q: So, what good is the driver then?
A: You can grab single images using the getjpeg program that comes in the driver package. From the directory where you built the driver:
-
cd test
-
make
-
./getjpeg -d /dev/video0 -s 640x480 -o whatever.jpg
Q: What other applications are supported?
A:
Q: Can I load ov511 and ov51x at the same time?
A: No. Make sure you
move/delete all ov511-related files out of your /lib/modules directory
before installing ov51x there. ov51x should support all of the cameras
that ov511-1.65 supported. If not, please let me know.
Q: Why is there a separate driver for OV519 cameras?
A: Since existing OV519 cameras
required support for a new bridge (OV519) and new sensors (OV764x,
OV86x0), the most expedient thing to do was to fork the code, so that I
wouldn't have to worry constantly about breaking support for the older
chips when improving the new code. Once the driver is mostly complete
and stable, I will to port its features to the existing ov511 1.xx and
2.xx driver frameworks (while cleaning up the hacks I made in the
process :-) ). The OV519 code will probably go into a separate ov519
driver.
General Support Questions:
Q: Does your driver support my camera?
A:
- Short answer: If the vendor ID is 05a9, then yes. The vendor ID should be displayed if you plug the camera in and type "dmesg".
- Longer answer: There are
two vendor/product IDs besides the 05a9/???? ones that work. One is the
Intel Play Me2Cam, 0813/0002, which is supported by ov511. The other is
0b62/0059, which is supported by the ovfx2 driver.
Q: I have a parallel port camera. Does your driver support it?
A: No. The OV511 chip supports the USB bus only.
The CPiA chip is used in many parallel cameras, notably some
revisions of the Creative Labs WebCam3 Parallel, and in some
USB cameras. You can find drivers for the CPiA
here . Surprisingly, the USB version of the WebCam3
uses the OV511, not the CPiA, probably since the OV511 supports
higher resolutions and is therefore (arguably) a better chip.
Q: I am using a Video4Linux 2 application. Will it work with ov511?
A: Yes. You can use the videodevX module
for backwards compatibility with V4L1 drivers like ov511. See
this page
for more information (Note: that version of V4L2 is outdated; the real
version is in kernel 2.5). Note that this will not give you any
more ov511 features than you would normally get. Full V4L2 support will
be coming soon.
Q: Will ov511 work on my multiprocessor (SMP) system?
A:
It should. Be sure you are using the latest available 2.4 kernel and the
latest driver. If you experience crashes with SMP but not with UP, please
let me know.
Installation Questions:
Q: I tried to rebuild my kernel with your driver and I get many errors
related to header (.h) files.
A: If you installed the official tar.gz kernel
sources in a recent linux distribution (RedHat 7.0+ and maybe
some others) that previously had a kernel or kernel headers RPM installed,
your kernel include files are probably not matched to your kernel.
If /usr/include/asm or /usr/include/linux
are directories rather than symlinks, do the following:
- Check that the /usr/src/linux
symlink points to the directory of the kernel that you are building
- cd /usr/include
- mv asm asm-orig
- ln -s /usr/src/linux/include/asm
asm
- mv linux linux-orig
- ln -s /usr/src/linux/include/linux
linux
Q: The driver won't compile under RedHat 9.
A: RedHat changed one of the functions (remap_page_range) in their
RH9 kernel. Drivers 1.66 and 2.24 (or later) should handle this. For RH9 errata kernels, you will need driver 2.27. Older
drivers will work if you find the KERNEL_VERSION(2, 5, 3) check in ov511.c that's right before the call to remap_page_range, and change it to KERNEL_VERSION(2, 4, 20). Note that this only works for (and is only needed for) RedHat's 2.4.20 kernels, not the standard 2.4.20.
Q: I don't see an "OV511" option in the kernel
configuration.
A: You must have USB support and Video4Linux
support enabled before it will show up.
Q: I still can't make my camera work! Help!
A: There are a few things you should check:
- Are the permissions on your /dev/video0
(or whatever your device node is) correct? You need both read
and write permission for it to work. If all else fails, try running
the program as the superuser (root).
- Make sure you have Enforce Bandwidth
Allocation turned off in the USB kernel
configuration.
Q: I get many "unresolved symbol" errors when
I boot or run "depmod -a" .
A: This usually will only happen if you
have the "Loadable Module Support -> Set version information
on all module symbols" kernel option enabled. First, make sure that
you have at least driver version 1.43. If it still doesn't work, you
should disable that option and recompile the kernel.
Q: There are no files in /proc/bus/usb.
A: Make sure that there is an entry for it in your
/etc/fstab, and that it doesn't have the "noauto" option. Here
is what the entry should look like:
none /proc/bus/usb usbdevfs defaults 0 0
Q: I get "Function not implemented" errors when I run my program, and the kernel complains about "No decompressor available".
A:
- With 1.xx drivers: you need to load the ov511_decomp or ov518_decomp
module.
- With 2.xx drivers: make sure that a different driver isn't also
loaded (such as ov51x, ov511-1.xx, or the driver that comes with the kernel).
Q: When I plug in the device my kernel log says
"Unknown product ID 0x800"
A: This
is a compiler-related error:
- If you compiled the driver with GCC 3.0 or
later, make sure your kernel is compiled with that same compiler.
- If
so, make sure that the flags passed to GCC during the kernel compile
match the CFLAGS in the ov511 Makefile. Differences in memory alignment
compiler options can cause this problem.
- Make sure that the kernel sources pointed to by
/lib/modules/`uname -r`/build match the kernel that you are running.
For my drivers to compile properly, the configs must match,
include/linux/version.h must be correct, and the kernel must have been
compiled at some point (some header files are created at compile time).
For 2.6 kernels, you must have write access to the kernel sources as
well.
Quality/Features Questions:
Q: Why does the picture have noise and look grainy?
A: This is a problem at low light levels,
and may be also due to subtle bugs in the code. The cause is most
likely the OV7610 settings we are currently using. I am looking
into this problem. Some of this is caused by the older technologies
and manufacturing processes used in the OV7610 and OV7620AE. The OV7620
is much better about this.
Q: Why does everything look blurry or out-of-focus?
A:
- Unless your camera is cheap junk, it will have a focus
ring around the lens. Try turning it (don't turn too hard, or you might
break the lens assembly).
- Also, make sure the lens is clean. Use compressed air
to remove dust, and a damp cloth for fingerprints. Be careful not to
scratch it!
Q: Why is there corruption when I capture small images (e.g. 176x144)?
A: This is a bug in the driver. For now, try the "remove_zeros=1"
module parameter. Note that this parameter can cause corruption
in larger images.
Q: The color/saturation, brightness, hue, white balance, and/or
contrast controls do not work.
A:
- Try loading the ov511.o driver with
the "autoadjust=0" parameter. This
puts the camera in manual control mode.
- Some controls are not supported on
some cameras yet (especially ones that use the OV7620). See
this page for more information.
- White balance control is not supported
with any OV511 camera yet.
Q: Why is the field-of-view at 352x288 less than
it is at 640x480?
A: This is because the cameras don't implement hardware
scaling. The sensor produces images at base resolutions of 640x480
or 320x240 (352x288 and 176x144 for the OV6xxx sensors). At these resolutions,
you will see the full field-of-view. Other resolutions are obtained
by programming the sensor to crop the sides off of the image. The driver
does not do any scaling because it is CPU-intensive, and the kernel is
not the place for such code. If you want a full field-of-view, capture
at one of the base resolutions, and use a good scaling algorithm in your
application. Of course, this will decrease your frame rate since the
full unscaled image has to go over USB (another reason why the driver
doesn't do it).
Q: I'm using a camera with an OV6620 sensor, and the
image is very bad.
A: There are still some known problems with this camera.
However, it is possible to get a good image from it. Try the following:
- Upgrade to the latest driver. The one in most 2.4
kernels (1.28) has incomplete OV6620 support.
- Turn the color (saturation) control all the way
down. Most apps (xawtv, gqcam, etc...) let you do this.
- Wait a while after starting the app for the image
to reach full brightness. This usually takes about 20 frames worth of
time. Since apps like vidcat only capture a single frame, they might
not work at all (even if you run them over and over; they reset the camera
every time they are run).
Q: I'm using the camera at 160x120 (e.g.: with Gnomemeeting,
set to "small" resolution), and the image has corruption.
A: This is a known bug. I don't have a good solution for
it yet, but upgrading to the latest driver and using the remove_zeros=1
parameter should help.
Q: Why does the image become red when I point the camera at an area that is brightly lit by daylight or incandescent light?
A: Your camera probably lacks
an infrared-blocking filter. This may be intentional (so that the
camera can see in the "dark", under infrared illumination), or it might
be that the manufacturer is too cheap or too incompetent to do so. You can use an
infrared filter from a camera store, though you should be sure that
it's not an infrared-pass
filter (you can obviously tell based on whether it passes visible
light). Welding mask glass might work as well. There are probably
common household items that will work (e.g. certain metallized
plastics), but I don't know of any offhand.
USB Questions:
Q: My camera is detected properly, but I get errors about "endpoint
stall", "babble", "error -75", or "error -110" when I try to use it.
A: Do you have a VIA chipset? VIA USB controllers seem
to have problems under Linux. You should report such problems to the
usb-uhci or uhci driver maintainers. Also, make sure USB is enabled in your BIOS.
Q: My camera works OK but I get "ov511.c: ERROR: urb->status=-84: CRC/Timeout" in my system log.
A: I get this too, on a board with an Intel PIIX3 chipset (UHCI). I'm
not sure what's causing it yet. I've noticed that this happens much more often
on certain hub ports, so perhaps it is due to a dirty or bad connector. UPDATE
(2002 Oct 29): One user reported that plugging the camera straight
into the controller and not through an external hub fixed this. (The hub is Vendor=03eb ProdID=3301 Rev= 3.00)
Q: I am using the usb-ohci host controller driver under kernel
2.4.3 - 2.4.5 and I can only get colorful garbage images.
A: This is a bug in usb-ohci itself. Upgrade to
2.4.6 or later, or install
this kernel patch and rebuild your kernel.
Q: I have two OV511 cameras connected to the same host controller,
but when I try to use both at once, I get I/O, etc... errors.
A: By default, the driver is only configured
for one camera and will use all of the USB bus bandwidth for
it. A second camera will either stall the first one or stall itself
if you try to stream from both at once. To fix this, you can reduce
the bandwidth each cam takes by setting the "cams" module parameter
to the number of cameras you intend to use simultaneously. For example,
"insmod ov511.o cams=2". You may have to increase this parameter if
you have other USB devices on the same bus. The max for this parameter
is 4 for OV511 and 32 for OV511+, though I have not personally tested
more than 3 cameras at once. NOTE: There are
timing problems in some cameras that may result in minor image corruption,
or possibly no image, when cams > 2.
Q: I plugged my camera into a hub, but the hub's lights turned
off and the camera would not work, or,
Q: I get "device not accepting address" and/or
"error -110" in my system log (usually /var/log/messages
) when I plug the camera in, or,
Q: I get many "interrupt status=3" messages in
my system log.
A: Some cameras (most notably, ones from
D-Link) have these problems. Here are some possible solutions:
- Make sure that the hub (if you have one) is connected
to an external power source (like an AC adaptor). If your hub has
no external power, do not use it with any OV511 camera or you risk
damaging your hardware.
- If you have a hub, try disconnecting the external
power, waiting for the hub to reinitialize, and plugging the external
power back in. This usually fixes it.
- If you have a hub, try disconnecting and then reconnecting
the hub's upstream USB cable from your computer.
- If that doesn't work, try reloading
your host controller driver ("rmmod xxx ; modprobe xxx", where xxx
is either usb-uhci, uhci, or usb-ohci. "lsmod" will tell you which
one you have.)
- If you have a UHCI controller, try
using the other UHCI driver (2.2/2.4 kernels only).
- Try a different port.
- Try disconnecting all other USB devices
(including hubs). Plug the camera directly into the computer.
- If you have an "Assign IRQ to USB" option in your BIOS, change it.
- Change your BIOS "USB legacy support" setting
- Enable or disable ACPI in your BIOS and/or kernel config
- If you are using an SMP system (even
with one processor), try:
- Booting with the "noapic" option
- Setting your SMP specification
from MPS 1.4 to MPS 1.1 in your BIOS setup
- 2.4.19 and later kernels (and some 2.4.18 vendor kernels) fix many instances of this problem.
- If you still can't get it to work, ask for help
on the
Linux-USB mailing list(s). This is a general USB problem, and they
will be much better able to help you with it than I.
- Some
mainboards simply have defective USB support, so buy an add-in USB
card. Any USB 1.1 or 2.0 PCI or CardBus card should work with Linux.
Q: My video app dies within seconds of starting.
A: There are many reasons why this can happen.
One reason is that buggy systems (especially IBM Thinkpads) can
cause conflicts between APM (Advanced Power Management) and USB. If
you run into this, try the following things:
- Enable "Allow interrupts during APM
BIOS calls" in the general setup section of the kernel config
- Disable APM entirely, and use ACPI
instead
- Disable all power management and use
software suspend instead
Q: My app dies or the system crashes after a while.
A: Crashes can be the result of a number of different
causes:
- Make sure that you don't have a cron job or
script that removes idle modules ("rmmod -a"). The usb
host controller drivers are always marked as idle, and removing
them when ov511 is in use can crash the system. Make sure when you
run lsmod that none of the USB drivers is marked "autoclean"
- If you are capturing frames less often than
once every four seconds, try increasing the "buf_timeout" ov511
parameter.
- Check for IRQ conflicts. Another driver (SCSI,
network, etc...) may be conflicting with the USB controller. Yes,
this still happens, even with PCI.
- There are some very unlikely (but still reasonably
possible) SMP race conditions in ov511. These should be fixed in
ov511 v. 1.53.
- One
user reports that the KDE and Gnome sound servers were causing random USB
bus resets when using the camera. Try disabling them, and let me know if
this fixes it.
Q: Why doesn't my camera work with an SL811HS host controller?
A: This controller has an effective limit of 240 bytes per USB frame. Check
your camera's descriptors for the largest MxPS that is still <= 240, and
select it with the ov511 driver's "packetsize" module parameter. If the
camera doesn't have an alternate setting with an MxPS <= 240, it won't
work. Period. OV511 and OV519 won't work, but OV511+, OV518, and OV518+
should.
Q: When I run an application it says "No space left on device".
A: This is Linux's cryptic way
of telling you that there isn't enough free USB bandwidth to start
capture. I think this only happens under 2.6 kernels, or 2.2/2.4
kernels that have "Enforce Bandwidth Allocation" enabled in the
.config. Try connecting the camera to a different controller (if you
have one). You can also try loading the driver with "cams=2", but that
will cut the framerate in half.
Xawtv
Questions:
Q: I get lots of errors when I start xawtv.
A: This is "normal". Xawtv was originally
written for the BTTV TV input card's driver, and makes a lot of
assumptions that are not correct for ov511. You can safely ignore
these errors as long as xawtv seems to be working.
Q: Xawtv doesn't display anything.
A: Try the following:
- Xawtv normally starts without displaying
anything. You have to right-click in its window to get to the
control panel, click on "capture", and then select "grabdisplay".
- Let it capture for at least ten seconds.
Some cameras need a lot of time to adjust to the lighting conditions.
- Make sure you have at least driver version
1.43. It fixed support for the scaler hardware on some video cards.
- Try running xawtv with the -remote and/or -noxv option.
- Upgrade to a newer version of xawtv.
Some older versions don't work for some people.
- Try vidcat instead of xawtv to make
sure that your camera is working at all. If it isn't, look through
this FAQ for a possible solution, and double-check that you installed
and connected everything properly. Email me if it still won't work.
Q: Xawtv gives me an "oops: got sigalarm" error after grabbing
a few frames.
A: If Xawtv has to wait for more than one
second to get a frame, it will time out and give up. This happens
a lot when using ov511's compression. To increase the timeout, change
SYNC_TIMEOUT in /<path to xawtv source>/src/grab-v4l.c
and recompile it.
Q: The window is just a solid color (besides black, usually green),
or has many colored lines running through it.
A: Your hardware scaling isn't working; XFree86
is probably to blame. You must be using ov511 version 1.43 or
greater for hardware scaling to work. If it still doesn't work, start
xawtv with the option -remote. If your xawtv doesn't have that option,
upgrade it.
Q: I only get a black-and-white image, or black and white garbage, with the 2.xx drivers.
A: This is a bug in old Xawtv versions that only causes problems with the
2.xx drivers. Upgrade to the latest Xawtv (3.76 works). If that doesn't work, load ov511
with "force_palette=15".
Q: The image is 352x288 but the resolution looks like much less.
A: This is a bug in Xawtv, or possibly your video drivers. Running Xawtv with the -noxv option fixes it for me.
This document is always under construction. Send me your questions,
or anything that you learn from your ov511 experiences that may
be useful to others.