Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2020 16:59:31 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        "Russell L. Carter" <rcarter@pinyon.org>, freebsd-multimedia@freebsd.org
Subject:   Re: Logitech HD Pro Webcam C920
Message-ID:  <4b25e28c-d9c8-2806-d905-926853bf3395@selasky.org>
In-Reply-To: <fb1afae4-1789-23ef-57f5-72000aa6cfe6@pinyon.org>
References:  <104d42cb-43f4-573c-9a0f-f1892ca40e2f@pinyon.org> <dcd9dd13-ff1c-71db-3221-77d60b47c313@selasky.org> <fb1afae4-1789-23ef-57f5-72000aa6cfe6@pinyon.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-03-25 16:48, Russell L. Carter wrote:
> On 2020-03-25 01:02, Hans Petter Selasky wrote:
>> On 2020-03-24 21:10, Russell L. Carter wrote:
>>> Greetings,
>>>
>>> I have a shiny new Logitech C920S USB webcam which identifies as a
>>> [-d ugen5.9] vendor-0x046d-HD-Pro-Webcam-C920 -S E0E2DC0F
>>> when running webcamd as root.  I can't get /dev/video0 created.
>>>
>>> I have put in the mandatory 4 hours or so on my own with google and
>>> the man pages as my helpers, and I think I'm close, but so far
>>> no joy.
>>>
>>> I can get it specifically matched with devd via
>>> /usr/local/etc/devd/webcamd.conf (though no actions work).
>>>
>>> So for example, if I run, as root:
>>> root@feyerabend> webcamd -d ugen5.9 -N 
>>> vendor-0x046d-HD-Pro-Webcam-C920 -S E0E2DC0F -M 0
>>> webcamd: Cannot find USB device
>>>
>>> Alternatively:
>>>
>>> root@feyerabend> /usr/local/etc/rc.d/webcamd start ugen5.9
>>> Attached to ugen5.9[0]
>>> root@feyerabend>
>>>
>>> But no /dev/video0 creation, no running webcamd, nothing in
>>> /var/log/messages etc.
>>>
>>> When I plug in the cam, I get the following in /var/log/messages:
>>> Mar 24 13:07:56 feyerabend kernel: ugen5.9: <vendor 0x046d HD Pro 
>>> Webcam C920> at usbus5 (disconnected)
>>> Mar 24 13:08:23 feyerabend kernel: usb_alloc_device: Failure 
>>> selecting configuration index 0:USB_ERR_TIMEOUT, port 4, addr 8 
>>> (ignored)
>>> Mar 24 13:08:23 feyerabend kernel: ugen5.9: <vendor 0x046d HD Pro 
>>> Webcam C920> at usbus5
>>>
>>> Not sure if that long timeout is significant.
>>>
>>> Any help is much appreciated.
>>>
>>
>> Try:
>>
>> usbconfig -d 5.9 set_config 0
> 
> Did this, and I tried a variety of combinations, eg:
> $ webcamd -d 5.11 -N vendor-0x046d-HD-Pro-Webcam-C920 -S E0E2DC0F -M 0
> webcamd: Cannot find USB device
> 
> (It's at 5.11 now)
> 
>>
>> The error message above means your webcam is not working properly. Can 
>> you also show the output from usbconfig.
> 
> root@feyerabend> usbconfig ugen5.11 dump_all_desc
> ugen5.11: <vendor 0x046d HD Pro Webcam C920> at usbus5, cfg=255 md=HOST 
> spd=HIGH (480Mbps) pwr=ON (100mA)
> 

As long as it says cfg=255, the device won't work. It should say cfg=0.

Try to search for:

   idVendor = 0x046d
   idProduct = 0x0892

On the internet. I think I recall that this specific device had some 
known problems. You can also try another USB port and/or USB HUB.

Seem to be the same like:

https://forums.freebsd.org/threads/webcam-not-working.72746/

Looking at Linux, these devices are all quirked:

https://lore.kernel.org/patchwork/patch/864784/

We don't have this quirk type yet in the kernel.

Try to play with these sysctls:

hw.usb.timings.extra_power_up_time: 20
hw.usb.timings.resume_recovery: 50
hw.usb.timings.resume_wait: 50
hw.usb.timings.resume_delay: 250
hw.usb.timings.set_address_settle: 10
hw.usb.timings.port_resume_delay: 40
hw.usb.timings.port_powerup_delay: 300
hw.usb.timings.port_reset_recovery: 250
hw.usb.timings.port_root_reset_delay: 200
hw.usb.timings.port_reset_delay: 50

sysctl hw.usb.timings.set_address_settle=1000

Then re-plug the device.

--HPS




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4b25e28c-d9c8-2806-d905-926853bf3395>