📄 support.html
字号:
<html><head><title>Reporting problems</title><LINK REL="STYLESHEET" HREF="webcam.css" TYPE="text/css"></head><body><h1>Support: when and how to report a problem</h1><ul> <li><a href="#contact">Contact</a> <li><a href="#background">Background</a> <li><a href="#common">Common problems that PWC cannot do anything about</a> <li><a href="#checklist">Checklist</a> <li><a href="#kernel">Kernel messages</a> <li><a href="#oops">Kernel Oops</a> <li><a href="#panic">Kernel panics, or 'hangs'</a> <li><a href="#other">Other sources of information</a> <li><a href="#sending">Sending in a report</a> </ul><h3><a name="contact">Contact</a></h3><p>Okay, first a little nitty-gritty. The e-mail address to report problemsis at the bottom of this page, but before your scroll down immediately andclick "Send", <b>READ THIS PAGE</b>. Time after time I get e-mailswith incomplete information, and I simply want to make sure you understandwhat you have to send to me. It makes life easier for the both of us!</p><p>BTW, do not call the Philips helpdesk with problems about thiscamera under Linux. I cannot stress this enough. Their helpdesk simplydoesn't know anything about Linux; their staff is trained for the Windowsand Macintosh platforms, and Linux is out of their league. They don'tofficially support Linux (but they might be, if enough Linux users startusing their products :)).</p><h3><a name="background">A little bit of background</a></h3><p>Unfortunately, I often get mail about 'problems' with PWC that actuallyaren't related to PWC at all, but have something to do with the underlyingUSB layer(s). Appearantly it is not always clear to people what the relationis between PWC, USB and the actual webcam. So here I provide a little bit ofbackground on USB in Linux. You can skip this section, but I think thatreading it will help you track down problems a lot faster and more accurate.And save me from mail to which I can only reply: "Sorry, not myproblem."</p><p>The most important thing to know is that the PWC driver does not talkdirectly to the camera; there are several soft- and hardware layers inbetween: the usb-core, the USB controller driver, the USB controller chipand the actual cable running from your PC to your webcam. Here's a smalldataflow diagram:<pre> Application | - - - - - - - - - - - - - | Video4Linux | : | : | PWC | : | : | usb-core | (kernel) : | : | USB controller | - - - - - - - - - - - - - | [chip] || \ ====== [cable] ===== [webcam]</pre><p>At the top is the actual application that will use the webcam; could beanything from a single snapshot program to CamStream. This talks toVideo4Linux, which is a nice API for video devices in Linux; this, in turnstalks to PWC, which takes commands like "Set image size to 352x288pixels" or "Set the brightness to 150". PWC will translatethis into USB commands that the camera will understand, and gather streamingdata coming from the webcam through the underlying layers and convert thatinto actual image. So far, nothing spectacular.</p><p>The usb-core is the next layer, but this is rarely a problem either. Itmediates between device drivers like PWC and the USB controller drivers,which talk directly to the actual chip on your motherboard. And there iswhere most problems occur.</p><p>Currently, there are 3 basic designs for the USB chip on your computer'smotherboard, called UHCI, OHCI and more recently, EHCI. Each requires itsown driver. To make matters more complicated, different manufacturers havedifferent implementation of these controller chips and some are more, shallwe say, compatible than other. So that's one source of problems.</p><p>Then, there can be bugs in the actual chip; it happens, and is often asource of great frustration for driver writers and results in ugly hacks inthe code. Third, electrical problems can occur in the cables and connectorsto your webcam. Bad connectors, corrosion, bends in the cable, breaks,interference, you name it.</p><p>In all of these layers something can go wrong that will prevent youfrom getting an image, but I can do something only at the PWC layers.</p><h3><a name="common">Common problems that PWC cannot do anything about</a></h3><p>So how can you tell that the problem is with PWC or somewhere else?Here are some tell-tale signs:</p><h5>The camera works, but the image is green and/or I have triple vision.</h5><p>This is a problem with the application itself: appearantly it does notunderstand, or support, the YUV 4:2:0 planar palette that PWC uses. Do notmail me, but the author of the program.</p><h5>The camera gets detected alright, but whenever I try to use it, I can'tget an error and there is a 'timeout' error message in the kernel log.</h5><p>A typical message for this condition looks like this:<pre>Dec 5 14:16:36 tinus kernel: usb_control/bulk_msg: timeoutDec 5 14:16:36 tinus kernel: pwc Failed to set video mode SIF@15 fps; return code = -110Dec 5 14:16:37 tinus kernel: usb_control/bulk_msg: timeoutDec 5 14:16:37 tinus kernel: pwc Failed to set video mode QCIF@10 fps; return code = -110</pre>Unfortunately, this is one of the many cases PWC does not work because theunderlying USB layer fails. In this particular case, the PWC driver istrying to initialize the webcam with a resolution & framerate, but theUSB command simply does not get through (hence the timeout). There could be a million reasons why it fails, but you'd have to check with the developerof the <b>USB controller</b>.</p><h3><a name="checklist">Checklist</a></h3><p>Here's a short checklist that you should run over first:<ul> <li>Do you use a stock kernel, not the one that came with your distribution? <li>Do you have the proper PWCX module for your kernel & processor? <li>Did you turn <b>module versioning</b> off in your kernel configuration? <li>Do you see messages in your kernel log about the cam? (See <code>/var/log/messages</code>)</li> <li>Do other USB devices work on your system? <li>Do the /dev/video* entries exist? <li>Is there anything in /proc/bus/usb/devices and /proc/bus/usb/drivers? (in case /proc/bus/usb is empty: <code>mount -t usbdevfs none /proc/bus/usb</code>)</li> <li>Is there a driver attached to the webcam entries in /proc/bus/usb/devices?</li></ul><ul> <li>Have you tried the do-it-yourself package, if available/necassary?</li> <li>In case you patched your kernel, did all patches go in well? If not, you will find some .rej files.</li></ul><p>If the answer to any of the questions above is 'No' (provided it appliesto your system), then correct the problem first, and please try again.</p><h3><a name="kernel">Kernel messages</a></h3><p>Kernel messages are very important, but hardly anyone seems to read them:( They are usually logged to /var/log/messages, or /usr/adm, but I stronglysuggest you separate your kernel messages by putting the following line inyour /etc/syslog.conf:<p><pre> kern.* /var/log/Kernel</pre><p>Loading the module should give the following entries:<p><pre>linux: pwc Philips PCA645/646 + PCVC675/680/690 + PCVC730/740 webcam module version 6.01 P6 (UP) loaded.linux: pwc Also supports Askey VC010 cam.linux: usb.c: registered new driver Philips webcam</pre><p>Followed by the detection of the cam:<p><pre>linux: usb.c: USB new device connect, assigned device number 3linux: pwc Philips PCA645VC USB webcam detected.linux: pwc Registered as /dev/video1.</pre><p>Of course, you may have a different model cam and some of the numbers maychange, but these lines must be there.<h3><a name="oops">Kernel Oops</a></h3><p>Fortunately, when a problem occurs with the module, it will just triggeran 'Oops' in the kernel, so you can save the output and generate a reportwhile the module is still in memory. <p>Unfortunately the information of the 'Oops' itself is not really useful,since it only contains hexadecimal addresses. You have to run it through the<b>ksymoops</b> utility, that will translate these addresses into morecomprehensible function names. To get a good 'Oops' do the following:<p>Use the 'dmesg' utility to see the last part of the kernel log; dump itsoutput into a file. <p>In case 'dmesg' doesn't work, or after a reboot, locate the 'Oops'message in your syslog; the file is usually named /var/log/messages,/usr/adm/messages or /usr/log/messages, or, if your followed my adviceabove, in /var/log/Kernel. Copy the file and use an editor the remove thetimestap, hostname and the word "linux:". <p>A good oops looks like this:<pre>usbcore: USB disconnect on device -1kmem_free: Bad obj addr (objp=c4db6f60, name=size-64)kernel BUG at slab.c:1651!invalid operand: 0000CPU: 0EIP: 0010:[<c0126c95>]EFLAGS: 00013282eax: 0000001b ebx: c119b0e0 ecx: c5772000 edx: c156e060esi: 00003202 edi: c4db6f60 ebp: 00010001 esp: c5169f28ds: 0018 es: 0018 ss: 0018Process khubd (pid: 1193, stackpage=c5169000)Stack: 00000673 00000005 c5d434d0 00000002 c54fd140 c4db6fbc 00000001 c68c08fd c4db6f60 c558a920 00000000 00000008 c558a920 00000000 c68bf749 c558a920 c5168000 c68c0a3e c558a920 c5168000 00000000 00000000 c558a4a0 c68c46fa Call Trace: [<c68c08fd>] [<c68bf749>] [<c68c0a3e>] [<c68c46fa>] [<c68c4878>] [<c68c699c>] [<c68c6a47>] [<c68c4941>] [<c68bf050>] [<c0109fa7>] [<c68bf000>] Code: 0f 0b 83 c4 0c eb 18 57 68 45 3e 1d c0 e8 95 01 ff ff c7 05 </pre><p>(The real start of the oops is at the 'invalid operand' line, but alittle context doesn't hurt).<p>Run this file through ksymoops, save the output and send that to me.<pre> # cat oopsfile | ksymoops > oops.out</pre> </ul> <h3><a name="panic">Kernel panics, or 'hangs'</a></h3><p>The other type of problem that you might encounter is the infamous kernelpanic; your system seems to 'hang'. The problem is that you usually cannotsee what the problem is, because most webcam applications run in X, and sincethe kernel messages are printed on the text console you can't see them. <p>Also, because the system goes down hard, there are no messages written inyour system log, so you really have to be at a text console when the problemoccurs. This is a bit more tricky:<ul> <li>Load all the modules that you need. <li>Save the contents of /proc/ksyms to a file, e.g. <dir>cat /proc/ksyms > ksyms</dir> This will save the addresses of all functions in the kernel to the file. <li>Do the same for /proc/modules. <li>Type 'sync'; this will make sure these files are written to disk. <li>Switch to a text console. <li>Make your kernel crash; 'cat /dev/video0 > /dev/null' usually does the trick; if not, hit Ctrl-C to stop the process, see if that will make it go splat. <li>If only a X utility makes it crash, start the utility with a little delay: <dir>(sleep 15s; xawtv) &</dir> Quickly switch to a text console. <li>See what happens.</ul><p>If possible, write down the EIP address, and the Call Trace. Send thisinformation to me, along with:<ul> <li>the ksyms file <li>the modules file <li>your System.map (usually in /usr/src/linux)</ul><p>This will help me determine where the crash exactly occurs.<p>NB: this technique does not always works; sometimes a recursive stacktrace is printed on the screen that scrolls of your screen within amillisecond or so... There's not much you can do then.<h3><a name="other">Other sources of information</a></h3><p>There are a few other documents and sites you may want to check beforesending mail; chances are your answer is already in there:<ul> <li><a href="install.html">Installation notes</a>. <li><a href="faq.html">The FAQ</a>. <li><a href="http://www.linux-usb.org/">Linux USB website</a> <li><a href="http://www.geocrawler.com/lists/3/SourceForge/4563/0">The linux-usb-user mailing list archive</a>. <li><a href="http://www.geocrawler.com/lists/3/SourceForge/2571/0">The linux-usb-devel mailing list archive</a>.</ul><h3><a name="sending">Sending in a bugreport</a></h3><p>Now that you have finally read all the way to the bottom of this file:-) you can send e-mail to <b>webcam @ smcc.demon.nl</b>. Pleaseinclude the following in your mail:<ul> <li>Your kernel version number;</li> <li>Any patches that you have applied;</li> <li>General hardware setup (what USB controller, etc. Use 'lspci -v');</li> <li>Very important in case of an Oops: the trace run through ksymoops;</li> <li>In case of a hang: your 'address' file, and the information you wrote down;</li> <li>Other relevant pieces from your kernel log;</li> <li>Whether or not you have other USB device working on your system;</li> <li>If you have the cam working on a different machine.</li></ul><p>I usually answer within a few days. If you haven't heard from me after aweek, try resending your mail, but first check out the main page to see ifI'm not away on vacation, or something. Note: I speak both Dutch andEnglish.<p><a href="index.html">Back to main page</a><hr><h6><i>2003-12-06 - Nemosoft Unv.</i></h6></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -