Summary: | www/chromium: chromium-80.0.3987.163_1 webcam works with fast green flicker | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Marcin Cieślak <saper> | ||||
Component: | Individual Port(s) | Assignee: | freebsd-chromium (Nobody) <chromium> | ||||
Status: | Closed Overcome By Events | ||||||
Severity: | Affects Only Me | CC: | arrowd, cem, ekathird, emaste, hselasky | ||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(chromium) |
||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Marcin Cieślak
2020-04-10 15:00:32 UTC
Thanks. Any chance you were running chromium with '--enable-logging=stderr --v=1'? There might be additional logging information available (caution: I'd redirect it to a file, or else the browser will be quite slow). Caveat: I know nothing about v4l, webcamd, etc. Created attachment 213264 [details] chrome --enable-logging=stderr --v=1 'https://meet.jit.si/ChromiumTestForBSD' >/tmp/chrome.log 2>&1 Logfile - result from running chrome attached chrome --enable-logging=stderr --v=1 'https://meet.jit.si/ChromiumTestForBSD' >/tmp/chrome.log 2>&1 Comment on attachment 213264 [details] chrome --enable-logging=stderr --v=1 'https://meet.jit.si/ChromiumTestForBSD' >/tmp/chrome.log 2>&1 Hi, You need to track down this one: [71549:101731:0410/231129.452139:WARNING:alsa_input.cc(176)] PcmAvailUpdate(): Broken pipe Do you have a valid playback and recording device? Just tested https://meet.jit.si/ChromiumTestForBSD and the camera doesn't flicker here! Hi, 1) There is a new version of webcamd in ports. Compile webcamd with debugging support and run it in the foreground. I will show more details for the bug. 2) There is a new version of lib V4L and friends. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245501 Chrome should use libv4l to get the picture! CPU usage? Ktrace? --HPS I will note that hangouts is sometimes using a too-small audio buffer causing choppy audio. I'm not sure exactly where the problem is. WARNING pid 54996 (chrome): ioctl sign-extension ioctl ffffffffc0405602 WARNING pid 54996 (chrome): ioctl sign-extension ioctl ffffffffc0405602 WARNING pid 54996 (chrome): ioctl sign-extension ioctl ffffffffc0405602 WARNING pid 54996 (chrome): ioctl sign-extension ioctl ffffffffc02c564a WARNING pid 54996 (chrome): ioctl sign-extension ioctl ffffffffc034564b These look like V4L2 ioctls. This should be fixed! Does chrome use own videodev2.h header file, or does it use the system one? --HPS I have found out that other webcam: ugen6.2: <vendor 0x046d product 0x08dd> at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) (Logitech Quickcam for Notebooks) works without green flicker even when connected to the FULL (12Mbps) port (the built-in Ricoh one is on spd=HIGH (480Mbps). They use different webcamd drivers (Ricoh is UVC), any chance to figure out what Chrome is doing? Requesting webcam data too fast? Yes, I run webcamd compiled like this ===> The following configuration options are available for webcamd-5.3.7.1_1: COMPAT32=on: Enable 32-bit compatibility support DEBUG=on: Build with debugging support DVB=on: Build with USB DVB support (DVB-X, analog TV, ...) HAL=on: Build with HAL and DBUS support INPUT=on: Build with USB input support (tablet, joystick, HID, IR, ...) KEYBOARD=off: Build with USB keyboard support MOUSE=off: Build with USB mouse support RADIO=on: Build with USB radio support VT_CLIENT=off: Build with vTuner client support VT_SERVER=off: Build with vTuner server support WEBCAM=on: Build with USB webcam support (UVC, gspca, ...) ===> Use 'make config' to modify these settings and I always run it in foreground with "webcamd -d ..." and the output is in this bug report. Haven't tried ktrace yet. Chrome bundles the headers but this might a bug in the chromium code that uses the ioctls. They have some fancy macros for this. Try to get some info from webcamd compiled with debug enabled. It all boils down to the V4L2 ioctls. work/chromium-81.0.4044.92/third_party/ffmpeg/doc/indevs.texi:@code{--enable-libv4l2} configure option), it is possible to use it with the work/chromium-81.0.4044.92/third_party/ffmpeg/doc/indevs.texi:@code{-use_libv4l2} input device option. work/chromium-81.0.4044.92/third_party/ffmpeg/doc/indevs.texi:@item use_libv4l2 work/chromium-81.0.4044.92/third_party/ffmpeg/doc/indevs.texi:Use libv4l2 (v4l-utils) conversion functions. Default is 0. work/chromium-81.0.4044.92/third_party/ffmpeg/Changelog:- libv4l2 support (--enable-libv4l2) --HPS (In reply to Hans Petter Selasky from comment #7) The kernel will truncate the command argument, so its fine: if (uap->com > 0xffffffff) { printf( "WARNING pid %d (%s): ioctl sign-extension ioctl %lx\n", td->td_proc->p_pid, td->td_name, uap->com); uap->com &= 0xffffffff; } com = uap->com; But the printf() is annoying. --HPS Do these errors also happen using the latest 5.7.1.0 version of webcamd: uvcvideo: Failed to resubmit video URB (-6). uvcvideo: Failed to resubmit video URB (-6). uvcvideo: Failed to resubmit video URB (-6). uvcvideo: Failed to resubmit video URB (-6). --HPS To sum up the troubleshooting we did with Hans Petter (thanks!) webcamd has been updated to the newest 5.7.0.1 (same symptoms) USB protocol dump produced with chromium (with flicker) https://gist.github.com/saper/cadb3d423e86e840dde0ef452cd8b636 USB protocol dump produced with vlc v4l2:///dev/video0 (without flicker) https://gist.github.com/saper/8ad8988d4ec6a8903bc9477c9b524658 I'll have a look at raw video data returned from the webcam Full config descriptor: ugen3.2: <Ricoh co. Ltd. product 0x18b0> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA) Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x015d bNumInterfaces = 0x0002 bConfigurationValue = 0x0001 iConfiguration = 0x0000 <no string> bmAttributes = 0x0080 bMaxPower = 0x0032 Additional Descriptor bLength = 0x08 bDescriptorType = 0x0b bDescriptorSubType = 0x00 RAW dump: 0x00 | 0x08, 0x0b, 0x00, 0x02, 0x0e, 0x03, 0x00, 0x02 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x000e <Video device> bInterfaceSubClass = 0x0001 bInterfaceProtocol = 0x0000 iInterface = 0x0002 <Sony Visual Communication Camera> Additional Descriptor bLength = 0x0d bDescriptorType = 0x24 bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x0d, 0x24, 0x01, 0x00, 0x01, 0x4d, 0x00, 0x00, 0x08 | 0x36, 0x6e, 0x01, 0x01, 0x01 Additional Descriptor bLength = 0x12 bDescriptorType = 0x24 bDescriptorSubType = 0x02 RAW dump: 0x00 | 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x03, 0x00, 0x08 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x10 | 0x00, 0x00 Additional Descriptor bLength = 0x0b bDescriptorType = 0x24 bDescriptorSubType = 0x05 RAW dump: 0x00 | 0x0b, 0x24, 0x05, 0x02, 0x01, 0x00, 0x00, 0x02, 0x08 | 0x7f, 0x15, 0x00 Additional Descriptor bLength = 0x1a bDescriptorType = 0x24 bDescriptorSubType = 0x06 RAW dump: 0x00 | 0x1a, 0x24, 0x06, 0x04, 0x10, 0x62, 0x41, 0x44, 0x08 | 0x89, 0x89, 0x46, 0x43, 0xaf, 0xb3, 0x20, 0xf3, 0x10 | 0x75, 0x90, 0x30, 0x4e, 0x01, 0x01, 0x02, 0x01, 0x18 | 0x01, 0x00 Additional Descriptor bLength = 0x09 bDescriptorType = 0x24 bDescriptorSubType = 0x03 RAW dump: 0x00 | 0x09, 0x24, 0x03, 0x03, 0x01, 0x01, 0x01, 0x04, 0x08 | 0x00 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 <IN> bmAttributes = 0x0003 <INTERRUPT> wMaxPacketSize = 0x0040 bInterval = 0x0010 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x05 bDescriptorType = 0x25 bDescriptorSubType = 0x03 RAW dump: 0x00 | 0x05, 0x25, 0x03, 0x10, 0x00 Interface 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0000 bNumEndpoints = 0x0000 bInterfaceClass = 0x000e <Video device> bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0000 iInterface = 0x0000 <no string> Additional Descriptor bLength = 0x0e bDescriptorType = 0x24 bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x0e, 0x24, 0x01, 0x01, 0xa1, 0x00, 0x82, 0x01, 0x08 | 0x03, 0x01, 0x00, 0x00, 0x01, 0x00 Additional Descriptor bLength = 0x1b bDescriptorType = 0x24 bDescriptorSubType = 0x04 RAW dump: 0x00 | 0x1b, 0x24, 0x04, 0x01, 0x04, 0x59, 0x55, 0x59, 0x08 | 0x32, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x10 | 0xaa, 0x00, 0x38, 0x9b, 0x71, 0x10, 0x01, 0x00, 0x18 | 0x00, 0x02, 0x00 Additional Descriptor bLength = 0x1e bDescriptorType = 0x24 bDescriptorSubType = 0x05 RAW dump: 0x00 | 0x1e, 0x24, 0x05, 0x01, 0x01, 0x80, 0x02, 0xe0, 0x08 | 0x01, 0x00, 0x00, 0xca, 0x08, 0x00, 0x00, 0xca, 0x10 | 0x08, 0x00, 0x60, 0x09, 0x00, 0x2a, 0x2c, 0x0a, 0x18 | 0x00, 0x01, 0x2a, 0x2c, 0x0a, 0x00 Additional Descriptor bLength = 0x1e bDescriptorType = 0x24 bDescriptorSubType = 0x05 RAW dump: 0x00 | 0x1e, 0x24, 0x05, 0x02, 0x01, 0x40, 0x01, 0xf0, 0x08 | 0x00, 0x00, 0x80, 0x32, 0x02, 0x00, 0x80, 0x32, 0x10 | 0x02, 0x00, 0x58, 0x02, 0x00, 0x15, 0x16, 0x05, 0x18 | 0x00, 0x01, 0x15, 0x16, 0x05, 0x00 Additional Descriptor bLength = 0x1e bDescriptorType = 0x24 bDescriptorSubType = 0x05 RAW dump: 0x00 | 0x1e, 0x24, 0x05, 0x03, 0x01, 0xb0, 0x00, 0x90, 0x08 | 0x00, 0x00, 0xa0, 0xb9, 0x00, 0x00, 0xa0, 0xb9, 0x10 | 0x00, 0x00, 0xc6, 0x00, 0x00, 0x15, 0x16, 0x05, 0x18 | 0x00, 0x01, 0x15, 0x16, 0x05, 0x00 Additional Descriptor bLength = 0x1e bDescriptorType = 0x24 bDescriptorSubType = 0x05 RAW dump: 0x00 | 0x1e, 0x24, 0x05, 0x04, 0x01, 0xa0, 0x00, 0x78, 0x08 | 0x00, 0x00, 0xa0, 0x8c, 0x00, 0x00, 0xa0, 0x8c, 0x10 | 0x00, 0x00, 0x96, 0x00, 0x00, 0x15, 0x16, 0x05, 0x18 | 0x00, 0x01, 0x15, 0x16, 0x05, 0x00 Interface 1 Alt 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0001 bNumEndpoints = 0x0001 bInterfaceClass = 0x000e <Video device> bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0000 iInterface = 0x0000 <no string> Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0082 <IN> bmAttributes = 0x0005 <ASYNC-ISOCHRONOUS> wMaxPacketSize = 0x13d4 bInterval = 0x0001 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 1 Alt 2 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0002 bNumEndpoints = 0x0001 bInterfaceClass = 0x000e <Video device> bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0000 iInterface = 0x0000 <no string> Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0082 <IN> bmAttributes = 0x0005 <ASYNC-ISOCHRONOUS> wMaxPacketSize = 0x03c8 bInterval = 0x0001 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 1 Alt 3 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0003 bNumEndpoints = 0x0001 bInterfaceClass = 0x000e <Video device> bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0000 iInterface = 0x0000 <no string> Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0082 <IN> bmAttributes = 0x0005 <ASYNC-ISOCHRONOUS> wMaxPacketSize = 0x0278 bInterval = 0x0001 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 1 Alt 4 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0004 bNumEndpoints = 0x0001 bInterfaceClass = 0x000e <Video device> bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0000 iInterface = 0x0000 <no string> Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0082 <IN> bmAttributes = 0x0005 <ASYNC-ISOCHRONOUS> wMaxPacketSize = 0x0320 bInterval = 0x0001 bRefresh = 0x0000 bSynchAddress = 0x0000 I did dump the incoming stream for both vlc and chrome using $ sudo usbdump -i usbus3 -s 0 -f 2.130 -v -b chrome.dump vlc stream starts like this: 00000000 0c 8c db 99 0e 1c ce d4 59 1c 41 04 32 71 33 90 |........Y.A.2q3.| 00000010 33 6b 32 8f 34 6a 33 8d 33 6a 33 8d 35 6d 36 8d |3k2.4j3.3j3.5m6.| 00000020 35 75 36 8d 36 75 36 8d 37 75 37 8b 36 75 37 8a |5u6.6u6.7u7.6u7.| 00000030 38 77 39 88 3d 79 3d 88 3e 7b 3e 88 3e 7a 41 88 |8w9.=y=.>{>.>zA.| 00000040 43 73 44 88 46 73 42 88 3f 75 3f 8d 3c 77 38 8d |CsD.FsB.?u?.<w8.| 00000050 43 75 44 89 46 70 45 86 46 70 46 86 48 6f 47 87 |CuD.FpE.FpF.HoG.| chrome stream starts like this: 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 0000fca0 00 00 00 00 00 00 00 00 0c 8d 5b bc 39 25 7c 6b |..........[.9%|k| 0000fcb0 c8 25 9a 03 31 7f 31 84 32 7b 32 84 33 7d 34 84 |.%..1.1.2{2.3}4.| 0000fcc0 36 7d 39 80 3a 7e 3a 7c 39 80 39 7c 3a 7e 34 7e |6}9.:~:|9.9|:~4~| 0000fcd0 3a 7b 39 7f 3a 7a 3c 81 3b 79 3c 82 3d 73 3c 83 |:{9.:z<.;y<.=s<.| 0000fce0 3c 73 3d 82 3f 73 40 81 42 78 43 80 43 7e 42 81 |<s=.?s@.BxC.C~B.| 0000fcf0 45 7e 47 81 47 7a 45 81 45 79 46 80 45 82 3c 82 |E~G.GzE.EyF.E.<.| 0000fd00 4c 82 47 83 48 78 48 82 4a 78 4a 81 4b 81 4d 81 |L.G.HxH.JxJ.K.M.| 0000fd10 4c 82 4c 81 4c 81 4b 82 47 81 48 83 49 7d 49 82 |L.L.L.K.G.H.I}I.| 0000fd20 4a 7c 49 81 49 78 48 81 47 76 46 82 41 74 40 7d |J|I.IxH.GvF.At@}| 0000fd30 3f 77 3e 7d 3f 77 3f 7d 40 83 40 7d 40 86 41 7c |?w>}?w?}@.@}@.A|| 0000fd40 3f 86 3f 7e 3e 83 3d 83 3e 78 3e 84 3f 77 3e 80 |?.?~>.=.>x>.?w>.| I think both look like uncompressed streams, probably "YUY2" if I decode the interface description correctly... (In reply to Hans Petter Selasky from comment #7) I too am using webcamd and see these messages from chromium filling my log: ... +WARNING pid 73668 (chrome): ioctl sign-extension ioctl ffffffffc034564b +WARNING pid 73668 (chrome): ioctl sign-extension ioctl ffffffffc034564b +WARNING pid 73668 (chrome): ioctl sign-extension ioctl ffffffffc034564b +WARNING pid 73668 (chrome): ioctl sign-extension ioctl ffffffffc02c564a +WARNING pid 73668 (chrome): ioctl sign-extension ioctl ffffffffc0405602 ... [FreeBSD ealexander@ealex ~]$ freebsd-version -kru 11.3-RELEASE-p3 11.3-RELEASE-p3 11.3-RELEASE-p3 Yes, I will be upgrading to 11.4-RELEASE soon. Is this fixed there? Thanks! Gene This seems to work OK now. |