Re: [Linux-uvc-devel] again Logitech QuickCam Pro for Notebooks 046d:0991
On Sunday 25 October 2009 13:17:11 Hans de Goede wrote: Hi, On 10/22/2009 09:40 AM, Alexey Fisher wrote: Hi Laurent, thank you for the answer, i thought - no body care. :) Am Donnerstag, den 22.10.2009, 01:55 +0200 schrieb Laurent Pinchart: Hi Alexey, On Thursday 15 October 2009 21:00:59 Alexey Fisher wrote: I did some simple dirty hack, it prevent webcam from being killed by cheese. On other site it make cheese work too. Like Paulo said, the camera is slow and it need more time to make thirst start, some time it need 8 seconds on second start it need about 2 seconds. If we call STREAMOFF before we get EOF, the camera will die. Which EOF are you talking about here ? The UVC bit in the video packets header ? How have you tested that ? I used uvcvideo trace=255 and cheese. I talking about uvc_v4l2_ioctl(VIDIOC_STREAMON), Frame complete (EOF found) and uvc_v4l2_ioctl(VIDIOC_STREAMOFF). IMHO, the driver should decide if camera ready or not. The easiest way is, to add SLOWSTART quirk. Correct way probobly will be to check if camera ready or not. Any ideas how to make it? Or any other ideas? I know, cheese use some bruteforce way to get settings, but the bug in cheese make the bug in uvcvideo easy to reproduce. It's not a bug in uvcvideo but a bug in the camera. Have you been to isolate exactly which sequence of ioctls issued by Cheese make the camera crash ? I'd like more information about that. I made dmesg of two situations, webcam work and don't work. cheese celling two times uvc_v4l2_ioctl(VIDIOC_STREAMON), thirst one to get the settings and second time to start the record. Between thirst and second pass the time out seems to be too short (even it is 10 seconds). This is not an issue with the camera, nor with the driver, but an issue with cheese. In order to not wait for ever when probing devices which for some reason won't stream, cheese wait a maximum of 3 seconds before the stream to start, so if the camera is this slow to start, then cheese will most likely have given up before the cam has started. If the camera crashes when it receives valid requests in some sequence it's a camera bug. And that means I'll have to find a software workaround :-S -- Regards, Laurent Pinchart ___ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
Re: [Linux-uvc-devel] again Logitech QuickCam Pro for Notebooks 046d:0991
Hi Alexey, On Thursday 22 October 2009 09:40:27 Alexey Fisher wrote: Hi Laurent, thank you for the answer, i thought - no body care. :) Am Donnerstag, den 22.10.2009, 01:55 +0200 schrieb Laurent Pinchart: Hi Alexey, On Thursday 15 October 2009 21:00:59 Alexey Fisher wrote: I did some simple dirty hack, it prevent webcam from being killed by cheese. On other site it make cheese work too. Like Paulo said, the camera is slow and it need more time to make thirst start, some time it need 8 seconds on second start it need about 2 seconds. If we call STREAMOFF before we get EOF, the camera will die. Which EOF are you talking about here ? The UVC bit in the video packets header ? How have you tested that ? I used uvcvideo trace=255 and cheese. I talking about uvc_v4l2_ioctl(VIDIOC_STREAMON), Frame complete (EOF found) and uvc_v4l2_ioctl(VIDIOC_STREAMOFF). IMHO, the driver should decide if camera ready or not. The easiest way is, to add SLOWSTART quirk. Correct way probobly will be to check if camera ready or not. Any ideas how to make it? Or any other ideas? I know, cheese use some bruteforce way to get settings, but the bug in cheese make the bug in uvcvideo easy to reproduce. It's not a bug in uvcvideo but a bug in the camera. Have you been to isolate exactly which sequence of ioctls issued by Cheese make the camera crash ? I'd like more information about that. I made dmesg of two situations, webcam work and don't work. cheese celling two times uvc_v4l2_ioctl(VIDIOC_STREAMON), thirst one to get the settings and second time to start the record. Between thirst and second pass the time out seems to be too short (even it is 10 seconds). This is working example: [ 2715.842503] uvcvideo: uvc_v4l2_ioctl(VIDIOC_STREAMON) [ 2715.852318] uvcvideo: uvc_v4l2_poll [ 2724.689677] uvcvideo: Frame complete (EOF found). [ 2724.689698] uvcvideo: uvc_v4l2_poll [ 2724.689708] uvcvideo: uvc_v4l2_ioctl(VIDIOC_DQBUF) [ 2724.689713] uvcvideo: Dequeuing buffer 0 (3, 384 bytes). [ 2724.693157] uvcvideo: uvc_v4l2_ioctl(VIDIOC_QBUF) [ 2724.693164] uvcvideo: Queuing buffer 0. [ 2724.693551] uvcvideo: uvc_v4l2_poll [ 2724.694064] uvcvideo: uvc_v4l2_poll [ 2724.744145] uvcvideo: uvc_v4l2_ioctl(VIDIOC_STREAMOFF) This is broken: [ 2874.576741] uvcvideo: uvc_v4l2_ioctl(VIDIOC_STREAMON) [ 2874.586236] uvcvideo: uvc_v4l2_poll [ 2884.601319] uvcvideo: uvc_v4l2_poll [ 2884.601412] uvcvideo: uvc_v4l2_ioctl(VIDIOC_STREAMOFF) I think, if you call VIDIOC_STREAMOFF befor you get Frame complete (EOF found) on this camera it will kill it. here is this hack: diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index f960e8e..fdc7007 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c @@ -794,7 +794,7 @@ static void uvc_uninit_video(struct uvc_streaming *stream, int free_buffers) { struct urb *urb; unsigned int i; - + msleep(5000); for (i = 0; i UVC_URBS; ++i) { urb = stream-urb[i]; if (urb == NULL) @@ -985,7 +985,7 @@ static int uvc_init_video(struct uvc_streaming *stream, gfp_t gfp_flags) return ret; } } - + msleep(5000); return 0; } I hate random sleeps. Really. I'll need more information about the bug, as well as a simple userspace test application, before making any such change to the driver. I made this suggestion to show how to reproduce this bug and how i workaround it. I hope it help. I can't make any program to reproduce it. Thanks a lot for taking time to investigate the issue. I'll report this to Logitech and try to create a workaround in the uvcvideo driver. -- Regards, Laurent Pinchart ___ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
Re: [Linux-uvc-devel] again Logitech QuickCam Pro for Notebooks 046d:0991
Hi, On 10/22/2009 09:40 AM, Alexey Fisher wrote: Hi Laurent, thank you for the answer, i thought - no body care. :) Am Donnerstag, den 22.10.2009, 01:55 +0200 schrieb Laurent Pinchart: Hi Alexey, On Thursday 15 October 2009 21:00:59 Alexey Fisher wrote: I did some simple dirty hack, it prevent webcam from being killed by cheese. On other site it make cheese work too. Like Paulo said, the camera is slow and it need more time to make thirst start, some time it need 8 seconds on second start it need about 2 seconds. If we call STREAMOFF before we get EOF, the camera will die. Which EOF are you talking about here ? The UVC bit in the video packets header ? How have you tested that ? I used uvcvideo trace=255 and cheese. I talking about uvc_v4l2_ioctl(VIDIOC_STREAMON), Frame complete (EOF found) and uvc_v4l2_ioctl(VIDIOC_STREAMOFF). IMHO, the driver should decide if camera ready or not. The easiest way is, to add SLOWSTART quirk. Correct way probobly will be to check if camera ready or not. Any ideas how to make it? Or any other ideas? I know, cheese use some bruteforce way to get settings, but the bug in cheese make the bug in uvcvideo easy to reproduce. It's not a bug in uvcvideo but a bug in the camera. Have you been to isolate exactly which sequence of ioctls issued by Cheese make the camera crash ? I'd like more information about that. I made dmesg of two situations, webcam work and don't work. cheese celling two times uvc_v4l2_ioctl(VIDIOC_STREAMON), thirst one to get the settings and second time to start the record. Between thirst and second pass the time out seems to be too short (even it is 10 seconds). This is not an issue with the camera, nor with the driver, but an issue with cheese. In order to not wait for ever when probing devices which for some reason won't stream, cheese wait a maximum of 3 seconds before the stream to start, so if the camera is this slow to start, then cheese will most likely have given up before the cam has started. Regards, Hans ___ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
Re: [Linux-uvc-devel] again Logitech QuickCam Pro for Notebooks 046d:0991
Hi Alexey, On Thursday 15 October 2009 21:00:59 Alexey Fisher wrote: I did some simple dirty hack, it prevent webcam from being killed by cheese. On other site it make cheese work too. Like Paulo said, the camera is slow and it need more time to make thirst start, some time it need 8 seconds on second start it need about 2 seconds. If we call STREAMOFF before we get EOF, the camera will die. Which EOF are you talking about here ? The UVC bit in the video packets header ? How have you tested that ? IMHO, the driver should decide if camera ready or not. The easiest way is, to add SLOWSTART quirk. Correct way probobly will be to check if camera ready or not. Any ideas how to make it? Or any other ideas? I know, cheese use some bruteforce way to get settings, but the bug in cheese make the bug in uvcvideo easy to reproduce. It's not a bug in uvcvideo but a bug in the camera. Have you been to isolate exactly which sequence of ioctls issued by Cheese make the camera crash ? I'd like more information about that. here is this hack: diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index f960e8e..fdc7007 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c @@ -794,7 +794,7 @@ static void uvc_uninit_video(struct uvc_streaming *stream, int free_buffers) { struct urb *urb; unsigned int i; - + msleep(5000); for (i = 0; i UVC_URBS; ++i) { urb = stream-urb[i]; if (urb == NULL) @@ -985,7 +985,7 @@ static int uvc_init_video(struct uvc_streaming *stream, gfp_t gfp_flags) return ret; } } - + msleep(5000); return 0; } I hate random sleeps. Really. I'll need more information about the bug, as well as a simple userspace test application, before making any such change to the driver. -- Regards, Laurent Pinchart ___ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
Re: [Linux-uvc-devel] again Logitech QuickCam Pro for Notebooks 046d:0991
I did some simple dirty hack, it prevent webcam from being killed by cheese. On other site it make cheese work too. Like Paulo said, the camera is slow and it need more time to make thirst start, some time it need 8 seconds on second start it need about 2 seconds. If we call STREAMOFF before we get EOF, the camera will die. IMHO, the driver should decide if camera ready or not. The easiest way is, to add SLOWSTART quirk. Correct way probobly will be to check if camera ready or not. Any ideas how to make it? Or any other ideas? I know, cheese use some bruteforce way to get settings, but the bug in cheese make the bug in uvcvideo easy to reproduce. here is this hack: diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index f960e8e..fdc7007 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c @@ -794,7 +794,7 @@ static void uvc_uninit_video(struct uvc_streaming *stream, int free_buffers) { struct urb *urb; unsigned int i; - + msleep(5000); for (i = 0; i UVC_URBS; ++i) { urb = stream-urb[i]; if (urb == NULL) @@ -985,7 +985,7 @@ static int uvc_init_video(struct uvc_streaming *stream, gfp_t gfp_flags) return ret; } } - + msleep(5000); return 0; } Alexey, Am Mittwoch, den 14.10.2009, 16:37 +0100 schrieb Paulo Assis: Alexey, I believe it has something to do with the camera initialization, both the sphere and the pro9000 are based on the same chip and it takes it several seconds to initialize, unlike other cameras. Not sure how cheese handles this, although I guess very badly :D. If I start some other software first, like guvcview, then cheese, it will work OK since the camera initialization already happen, but if I start cheese first, it can crash/lock the camera. The latest cheese version from upcoming ubuntu karmic exhibits the same problems (even worst than intrepid). In fact the last time I experience this, the crash was so bad that alsa/pulse was also affected, it wouldn't start the camera mic, making the entire system very slow. Other cameras with fast initialization times work without problems. Best regards, Paulo 2009/10/14 Alexey Fisher bug-tr...@fisher-privat.net: Actually i don't really care about chees or empathy do not work, but more. Haw they make camera freeze so hard that only plugoff will help? What control was used to do it? Alexey. Am Mittwoch, den 14.10.2009, 09:53 -0400 schrieb Andres Cimmarusti: I have the same problem with cheese and the same camera. I don't get any problems using lucview nor skype. Cheese version 2.22 was actually working fairly well for me (using Debian stable), but I couldn't record videos so I uninstalled it. I'll wait for a more polished bug-free cheese which will be available with squeeze. Andres On Wed, Oct 14, 2009 at 7:29 AM, Paulo Assis pj.as...@gmail.com wrote: Alexey, Since this only manifests itself after using cheese I would say it's a cheese problem. I also have the same problem with a sphereAF and cheese, sometimes it works fine, others the camera just crashes and I need to unplug it so that it will work again. Other apps work just fine with the camera. Best regards, Paulo 2009/10/14 Alexey Fisher bug-tr...@fisher-privat.net: Hallo, I found in this list message Logitech QuickCam Pro for Notebooks 046d:0991 not working from Mon Jul 28 10:18:08 CEST 2008. So now i will ask about same problem. It seems some bugs was fixed, some new probably made. I have some random problem with this camera. Thirst of all cheese, some time it's work, some time i gat only black screen, after this camera do not work, so i need to replug it. With mplayer it working mostly normal but after cheese it will not work too. The video chat with empathy has same problem like cheese to. cheese and epmaty depend on gstreamer but this seems to work fine if i use: gst-launch v4l2src ! queue ! videorate ! video/x-raw-yuv,framerate=15/1 ! videoscale ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! videoscale ! ximagesink After cheese i get this demsg: [ 1296.135911] usbcore: registered new interface driver snd-usb-audio [ 1296.147366] uvcvideo: Found UVC 1.00 device unnamed (046d:0991) [ 1296.170101] input: UVC Camera (046d:0991) as /devices/pci:00/:00:1a.7/usb1/1-6/1-6:1.0/input/input15 [ 1296.170139] usbcore: registered new interface driver uvcvideo [ 1296.170142] USB Video Class driver (v0.1.0)
Re: [Linux-uvc-devel] again Logitech QuickCam Pro for Notebooks 046d:0991
Actually i don't really care about chees or empathy do not work, but more. Haw they make camera freeze so hard that only plugoff will help? What control was used to do it? Alexey. Am Mittwoch, den 14.10.2009, 09:53 -0400 schrieb Andres Cimmarusti: I have the same problem with cheese and the same camera. I don't get any problems using lucview nor skype. Cheese version 2.22 was actually working fairly well for me (using Debian stable), but I couldn't record videos so I uninstalled it. I'll wait for a more polished bug-free cheese which will be available with squeeze. Andres On Wed, Oct 14, 2009 at 7:29 AM, Paulo Assis pj.as...@gmail.com wrote: Alexey, Since this only manifests itself after using cheese I would say it's a cheese problem. I also have the same problem with a sphereAF and cheese, sometimes it works fine, others the camera just crashes and I need to unplug it so that it will work again. Other apps work just fine with the camera. Best regards, Paulo 2009/10/14 Alexey Fisher bug-tr...@fisher-privat.net: Hallo, I found in this list message Logitech QuickCam Pro for Notebooks 046d:0991 not working from Mon Jul 28 10:18:08 CEST 2008. So now i will ask about same problem. It seems some bugs was fixed, some new probably made. I have some random problem with this camera. Thirst of all cheese, some time it's work, some time i gat only black screen, after this camera do not work, so i need to replug it. With mplayer it working mostly normal but after cheese it will not work too. The video chat with empathy has same problem like cheese to. cheese and epmaty depend on gstreamer but this seems to work fine if i use: gst-launch v4l2src ! queue ! videorate ! video/x-raw-yuv,framerate=15/1 ! videoscale ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! videoscale ! ximagesink After cheese i get this demsg: [ 1296.135911] usbcore: registered new interface driver snd-usb-audio [ 1296.147366] uvcvideo: Found UVC 1.00 device unnamed (046d:0991) [ 1296.170101] input: UVC Camera (046d:0991) as /devices/pci:00/:00:1a.7/usb1/1-6/1-6:1.0/input/input15 [ 1296.170139] usbcore: registered new interface driver uvcvideo [ 1296.170142] USB Video Class driver (v0.1.0) [ 2235.420181] uvcvideo: Failed to query (135) UVC control 2 (unit 2) : -110 (exp. 2). [ 2235.721428] uvcvideo: Failed to query (135) UVC control 2 (unit 2) : -110 (exp. 2). [ 2242.560187] uvcvideo: Failed to query (135) UVC control 2 (unit 2) : -110 (exp. 2). [ 2242.860179] uvcvideo: Failed to query (135) UVC control 2 (unit 2) : -110 (exp. 2). [ 2266.230184] uvcvideo: Failed to set UVC probe control : -110 (exp. 26). [ 2271.350744] uvcvideo: Failed to set UVC probe control : -110 (exp. 26). [ 2289.660019] usb 1-6: USB disconnect, address 6 [ 2293.430078] usb 1-6: new high speed USB device using ehci_hcd and address 7 [ 2293.708270] usb 1-6: configuration #1 chosen from 1 choice The guestion is, is it kernel, gstreamer or empathy and cheese bug? ___ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel ___ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel ___ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
Re: [Linux-uvc-devel] again Logitech QuickCam Pro for Notebooks 046d:0991
Alexey, I believe it has something to do with the camera initialization, both the sphere and the pro9000 are based on the same chip and it takes it several seconds to initialize, unlike other cameras. Not sure how cheese handles this, although I guess very badly :D. If I start some other software first, like guvcview, then cheese, it will work OK since the camera initialization already happen, but if I start cheese first, it can crash/lock the camera. The latest cheese version from upcoming ubuntu karmic exhibits the same problems (even worst than intrepid). In fact the last time I experience this, the crash was so bad that alsa/pulse was also affected, it wouldn't start the camera mic, making the entire system very slow. Other cameras with fast initialization times work without problems. Best regards, Paulo 2009/10/14 Alexey Fisher bug-tr...@fisher-privat.net: Actually i don't really care about chees or empathy do not work, but more. Haw they make camera freeze so hard that only plugoff will help? What control was used to do it? Alexey. Am Mittwoch, den 14.10.2009, 09:53 -0400 schrieb Andres Cimmarusti: I have the same problem with cheese and the same camera. I don't get any problems using lucview nor skype. Cheese version 2.22 was actually working fairly well for me (using Debian stable), but I couldn't record videos so I uninstalled it. I'll wait for a more polished bug-free cheese which will be available with squeeze. Andres On Wed, Oct 14, 2009 at 7:29 AM, Paulo Assis pj.as...@gmail.com wrote: Alexey, Since this only manifests itself after using cheese I would say it's a cheese problem. I also have the same problem with a sphereAF and cheese, sometimes it works fine, others the camera just crashes and I need to unplug it so that it will work again. Other apps work just fine with the camera. Best regards, Paulo 2009/10/14 Alexey Fisher bug-tr...@fisher-privat.net: Hallo, I found in this list message Logitech QuickCam Pro for Notebooks 046d:0991 not working from Mon Jul 28 10:18:08 CEST 2008. So now i will ask about same problem. It seems some bugs was fixed, some new probably made. I have some random problem with this camera. Thirst of all cheese, some time it's work, some time i gat only black screen, after this camera do not work, so i need to replug it. With mplayer it working mostly normal but after cheese it will not work too. The video chat with empathy has same problem like cheese to. cheese and epmaty depend on gstreamer but this seems to work fine if i use: gst-launch v4l2src ! queue ! videorate ! video/x-raw-yuv,framerate=15/1 ! videoscale ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! videoscale ! ximagesink After cheese i get this demsg: [ 1296.135911] usbcore: registered new interface driver snd-usb-audio [ 1296.147366] uvcvideo: Found UVC 1.00 device unnamed (046d:0991) [ 1296.170101] input: UVC Camera (046d:0991) as /devices/pci:00/:00:1a.7/usb1/1-6/1-6:1.0/input/input15 [ 1296.170139] usbcore: registered new interface driver uvcvideo [ 1296.170142] USB Video Class driver (v0.1.0) [ 2235.420181] uvcvideo: Failed to query (135) UVC control 2 (unit 2) : -110 (exp. 2). [ 2235.721428] uvcvideo: Failed to query (135) UVC control 2 (unit 2) : -110 (exp. 2). [ 2242.560187] uvcvideo: Failed to query (135) UVC control 2 (unit 2) : -110 (exp. 2). [ 2242.860179] uvcvideo: Failed to query (135) UVC control 2 (unit 2) : -110 (exp. 2). [ 2266.230184] uvcvideo: Failed to set UVC probe control : -110 (exp. 26). [ 2271.350744] uvcvideo: Failed to set UVC probe control : -110 (exp. 26). [ 2289.660019] usb 1-6: USB disconnect, address 6 [ 2293.430078] usb 1-6: new high speed USB device using ehci_hcd and address 7 [ 2293.708270] usb 1-6: configuration #1 chosen from 1 choice The guestion is, is it kernel, gstreamer or empathy and cheese bug? ___ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel ___ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de