Bug 470667

Summary: Webcam Logitech QuickCam Pro 5000 (046d:08c5) does not work
Product: [Fedora] Fedora Reporter: Espen Stefansen <libbe>
Component: kernelAssignee: Hans de Goede <hdegoede>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: kernel-maint, mclasen, quintela
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-12 16:05:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
lsusb -vv
none
export LIBV4L2_LOG_FILENAME=/tmp/log
none
export LIBV4L2_LOG_FILENAME=/tmp/log for YU12:640x480 none

Description Espen Stefansen 2008-11-08 17:02:59 UTC
Created attachment 322956 [details]
lsusb -vv

Description of problem:
My webcam Logitech QuickCam Pro 5000 (046d:08c5) does not work in cheese. When selecting camera in cheese, the only choice is "UVC Camera (046d:08c5) (/dev/video0)" and the resolution is empty. So i can't choose anything.

If I use ucview I can select "UVC Camera (046d:08c5)" and lots of formats (MJPEG, YUV 4:2:2, RGB3, BGR3, YU12). But of course the only format that works is "YUV 4:2:2" with "640x480". If I choose that, the camera works. But in cheese I can't choose this.

Version-Release number of selected component (if applicable):
cheese-2.24.1-1.fc10.i386
libv4l-0.5.3-1.fc10.i386

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Hans de Goede 2008-11-08 18:51:07 UTC
Can you please from a terminal do:
export LIBV4L2_LOG_FILENAME=/tmp/log
cheese

And then quit cheese again and attach /tmp/log. Also please attach ~/.gnome2/cheese/log.txt

Comment 2 Hans de Goede 2008-11-08 19:22:31 UTC
Thinking some more about this and doing some checking with a logitech cam of my own, I believe that this is a driver bug. The problem is that cheese defaults to the highest resolution. which is 1280x960 for your cam.

If you use ucview, you will see that 320x240, 640x480 and 960x720 all work fine,
but if you choose 1280x960, that will not work and after that the cam will also no longer work art lower resolutions until unplugged and plugged in again.

Note ucview does not work well when you try to change the resolution while its running, so exit it and choose a different resolution when you start it again to test with changing the resolution.

If you can confirm that 1280x960 breaks the cam until plugged out I don't need the logs, also see this most likely related bug:
http://bugzilla.gnome.org/show_bug.cgi?id=559057


p.s.

In your report you write: 'But of course the only format that works
is "YUV 4:2:2" with "640x480".' I would expect the other formats except for MJPEG to work fine too, ucview cannot handle MJPEG (but still shows it to the user as a choice, silly program). If you could some tests with this too (the other formats working or not at 640x480) I would be very interested in the results.

Comment 3 Espen Stefansen 2008-11-08 20:23:43 UTC
This is the choices I get in ucview: 
- MJPEG, RGB3, BGR3, YU12 all show the following resolutions, but none of them work; 160x120, 176x144, 320x240, 352x288, 432x240, 480x360, 512x288, 640x360, 640x480. 
- YUV 4:2:2 (YUYV) have the following resolutions and both work; 640x360, 640x480.

When running MJPEG in 640x480 I get the following error on the console: "Message: Could not convert format: MJPG 47504a4d to RGB3 33424752".

Comment 4 Espen Stefansen 2008-11-08 20:26:09 UTC
Created attachment 322971 [details]
export LIBV4L2_LOG_FILENAME=/tmp/log

This contains both running cheese and ucview running different formats.

~/.gnome2/cheese/log.txt was empty.

Comment 5 Hans de Goede 2008-11-08 20:42:32 UTC
(In reply to comment #4)
> Created an attachment (id=322971) [details]
> export LIBV4L2_LOG_FILENAME=/tmp/log
> 
> This contains both running cheese and ucview running different formats.
> 

Unfortunately LIBV4L2_LOG_FILENAME does not work that way, it truncates the file each time you start a new program, so this only contains the ucview run. But thats not important ...

(In reply to comment #3)
> This is the choices I get in ucview: 
> - MJPEG, RGB3, BGR3, YU12 all show the following resolutions, but none of them
> work; 160x120, 176x144, 320x240, 352x288, 432x240, 480x360, 512x288, 640x360,
> 640x480. 
> - YUV 4:2:2 (YUYV) have the following resolutions and both work; 640x360,
> 640x480.
> 

Hmm, so RGB3 BGR3 and YU12 do not work, I know enough then. These 3 formats are not natively supported by your cam, only MJPEG and YUYV are natively supported by your cam. These 3 formats are "emulated" in software by libv4l for cams which only have formats which ucview does not understand like cams with only MJPG.

For the resolutions where your cam also can deliver data in raw YUYV format, libv4l will prefer MJPG data as source wgen emulating these formats, as this allows for higher framerates with usb-1.1, so it looks to me like the issue is that MJPG formats are not working with your cam in combination with the current driver. So this is a driver issue.

> When running MJPEG in 640x480 I get the following error on the console:
> "Message: Could not convert format: MJPG 47504a4d to RGB3 33424752".

That is normal, ucview does not know how to handle MJPG, which is exactly the reason why libv4l was written.

Comment 6 Hans de Goede 2008-11-08 20:43:35 UTC
Changing component to kernel, re-assigning to me.

Comment 7 Hans de Goede 2008-11-08 20:49:16 UTC
question can you please attach a "export LIBV4L2_LOG_FILENAME=/tmp/log" generated logfile from choosing a non working video format in ucview, for example RGB3 640x480. Also please unplug and replug your cam before doing this so we start with a clean slate.

Note I'm sending a private mail to the uvcvideo driver maintainer about this, I'll put you in the CC (using your bugzilla email address).

Comment 8 Espen Stefansen 2008-11-08 21:54:21 UTC
Created attachment 322972 [details]
export LIBV4L2_LOG_FILENAME=/tmp/log for YU12:640x480

It seems that I didn't do a very good job while testing the video formats earlier. I unplugged and replugged the camera and tested RGB3:640x480 and it worked. Then I tried GBR3:640x480 but it didn't work. I unplugged and replugged the camera and tested GBR3:640x480 again, and this time it worked.

Trying with YU12:640x480 didn't work no matter what. And in the console it also said:
** Message: Could not convert format: YU12 32315559 to RGB3 33424752

When I replugged the camera, I got this in /var/log/messages:
kernel: uvcvideo: Found UVC 1.00 device <unnamed> (046d:08c5)
kernel: input: UVC Camera (046d:08c5) as /devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.3/1-3.3:1.0/input/input12
kernel: usb 1-3.3: New USB device found, idVendor=046d, idProduct=08c5
kernel: usb 1-3.3: New USB device strings: Mfr=0, Product=0, SerialNumber=2
kernel: usb 1-3.3: SerialNumber: xxxxxxx
pulseaudio[27954]: alsa-util.c: Device hw:1 doesn't support 44100 Hz, changed to 16000 Hz.
pulseaudio[27954]: alsa-util.c: Device hw:1 doesn't support 2 channels, changed to 1.
pulseaudio[27954]: module-alsa-source.c: Your kernel driver is broken: it reports a volume range from 18,00 dB to 18,00 dB which makes no sense.

Comment 9 Hans de Goede 2008-11-09 09:11:58 UTC
(In reply to comment #8)
> Created an attachment (id=322972) [details]
> export LIBV4L2_LOG_FILENAME=/tmp/log for YU12:640x480
> 
> It seems that I didn't do a very good job while testing the video formats
> earlier. I unplugged and replugged the camera and tested RGB3:640x480 and it
> worked. Then I tried GBR3:640x480 but it didn't work. I unplugged and replugged
> the camera and tested GBR3:640x480 again, and this time it worked.
> 

Ok, so your cam + uvc is definitely bugged, not sure if this can be fixed though, as that cam is known to not be 100% UVC compliant and lock up in certain cases, see:
http://linux-uvc.berlios.de/

And then esp footnote 1 and 2 of the supported device table, which as you can see in the table apply to your cam. These footnotes point to:
http://www.quickcamteam.net/documentation/faq/logitech-webcam-linux-usb-incompatibilities
http://openfacts.berlios.de/index-en.phtml?title=Linux_UVC


> Trying with YU12:640x480 didn't work no matter what. And in the console it also
> said:
> ** Message: Could not convert format: YU12 32315559 to RGB3 33424752
> 

Ah, sorry my bad that just means ucview does not support that format, I thought it would.

I'm pretty sure you are being hit by the logitech firmware bug described at the links above, in which case there is not much which can be done. You could send an angry mail to Logitech, but they will most likely just respond that they do not support Linux.

Comment 10 Hans de Goede 2008-11-12 16:05:18 UTC
Espen,

Upstream has just fixed a possible related bug, and as said I really believe this is a driver bug, so please contact upstream directly: Laurent Pinchart <laurent.pinchart>. 

I'm my experience he is very helpful.

Thanks,

Hans

Comment 11 Hans de Goede 2008-11-19 13:24:26 UTC
This bug is a dup of 472217, please read that bug for more info.

*** This bug has been marked as a duplicate of bug 472217 ***