Solved /dev/video device is not created for integrated webcam

Hi all!

I'm running FreeBSD 15-STABLE on ThinkPad X220. This laptop has an integrated webcam and it used to work fine and I used to set webcamd(8) for it. But suddenly (today) it stopped working. /dev/video0 device is not created, therefore webcamd(8) can not start. I did not change anything in configuration files in weeks and I did not pull changes from 15-STABLE for more than a month actually. I looked into dmesg(8) and I can't locate any errors that I would think are related to the problem.

My /etc/rc.conf file does include
Code:
webcamd_enable="YES"
line.

I have all needed kernel modules for this loaded (as I said, it literraly worked yesterday, since when I did not change anything on system-level). Could you please give me some clues what can potentially be the problem? Unfortunately, I suspect that the issue may be on hardware level (means, my webcam is physically broken), but laptop was not subjected to any motion, I did not close the lid with the high pressure or something, so maybe it just died... Maybe there is some button or switch that I accidentally pressed, but as far as I know, X220 does not have one for webcam.

Here's my dmesg -a.

Thank you.

P.S. webcamd(8) works fine with external USB webcam.
 

Attachments

The problem with webcamd is that when you add another USB device the addresses can change.

Code:
Nov 12 17:57:05 rio webcamd[1748]: webcamd: Cannot find USB device
Nov 12 17:57:16 rio webcamd[1749]: webcamd: Cannot find USB device
Nov 12 17:57:18 rio webcamd[1750]: webcamd: Cannot find USB device
Nov 12 17:57:22 rio webcamd[1751]: webcamd: Cannot find USB device

So take a look at straight up webcamd command line output.
Make sure the ugen number is the same as your rc.conf settings.
Infact my strategy now is to use the NAME only for device, not ugen.

Here is my output for example.
Code:
Available device(s):
webcamd [-d ugen1.1] -N Intel-XHCI-root-HUB -S unknown -M 0
webcamd [-d ugen0.1] -N Intel-XHCI-root-HUB -S unknown -M 1
webcamd [-d ugen0.2] -N vendor-0x0cf3-product-0xe006 -S unknown -M 0
webcamd [-d ugen0.3] -N CN0FFMHC8LG0001EB0RKA01-IntegratedWebcamHD -S 200901010001 -M 0

So I use the -N NAME for rc.conf.
It is rather long but now I can plug in USB devices at will. Without worrying about which USB Jack takes president in USB addresses.

Code:
#webcamd_enable="YES"
#webcamd_0_flags="-N CN0FFMHC8LG0001EB0RKA01-IntegratedWebcamHD"
 
So take a look at straight up webcamd command line output.
Thank you for the suggestion! However, as I can see, my webcamd output doesn't contain integrated webcam :(

Code:
Available device(s):
webcamd [-d ugen1.1] -N Intel-EHCI-root-HUB -S unknown -M 0
webcamd [-d ugen0.1] -N Intel-EHCI-root-HUB -S unknown -M 1
webcamd [-d ugen1.2] -N vendor-0x8087-product-0x0024 -S unknown -M 0
webcamd [-d ugen0.2] -N vendor-0x8087-product-0x0024 -S unknown -M 1
webcamd [-d ugen0.3] -N Logitech-USB-Optical-Mouse -S unknown -M 0
Show webcamd usage:
webcamd -h

Nevertheless, I tried to run all suggested -N options, but all of the give pretty much the same result:
Code:
webcamd 2836 - - webcamd: Cannot find USB device
 
What about usbconfig?
Code:
ugen1.1: <EHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)

ugen0.1: <EHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <Integrated Rate Matching Hub Intel Corp.> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <Integrated Rate Matching Hub Intel Corp.> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.3: <Mouse Logitech, Inc.> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
What happens when you hot plug devive from command prompt?

Is system recognizing device?
Well, I can't plug the webcam, because it is integrated.
But I must say that I probably do miss something and this cam is indeed connected via USB somehow internally?..
Or if you're asking about plugging an external USB webcam, it is recognized and works perfectly fine.
 
I see this line in my dmesg:
Code:
vgapci0: Boot video device

After that there are no more messages about 'video device'. Can it tell us something?
 
Since it doesn't show up in usbconfig, it may be disabled in BIOS. Check the settings for peripherals.
Well, I didn't find any webcam-related settings in the BIOS. I booted and was already going to reply that it looks that problem is not there, but I decided to check usbconfig again. And I finally saw it!:
Code:
ugen0.4: <Lenovo Integrated Camera (0.3MP) Chicony Electronics Co., Ltd> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (200mA)

And now webcamd sees it and the webcam itself is working (checked it with pwcview(1)).

Tieks I don't know, I didn't change any BIOS setting, but after I entered it and then booted, the problem is gone. Thank you for directing me to the BIOS 😁
 
Back
Top