You are not logged in.

#1 2025-04-21 15:47:29

paradigmshifter
Member
Registered: 2025-04-21
Posts: 2

Webcam randomly fails to initialize on boot

Hello everyone! I’m running Arch Linux on a Lenovo and my laptop cannot consistently initialize camera module upon boot. Ever since I bought this laptop every time my webcam being in a state of working seemed more like a fluke rather than something I can rely on

Every now and then I need to use camera, and it would be fantastic if it would've worked regardless of whether the stars align. So far, I've tried the following:

  • Disabling / enabling webcam in BIOS

  • Disabling completely tlp, apparmor

  • Tried zen, lts, hardened kernels to no avail

  • Played around with kernel params

    btusb.enable_autosuspend=n usbcore.autosuspend=-1
Current Behavior

dmesg when camera is unavailable

[   32.727485] usb 1-3: Device not responding to setup address.
[   32.930734] usb 1-3: Device not responding to setup address.
[   33.134003] usb 1-3: device not accepting address 37, error -71
[   33.136862] usb usb1-port3: unable to enumerate USB device
[   33.374017] usb 1-3: new high-speed USB device number 38 using xhci_hcd
[   34.250719] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
[   34.370691] usb 1-3: new high-speed USB device number 39 using xhci_hcd
[   35.247382] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
[   35.250063] usb usb1-port3: attempt power cycle
[   36.190723] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
[   36.310653] usb 1-3: new high-speed USB device number 41 using xhci_hcd
[   36.310810] usb 1-3: Device not responding to setup address.
[   36.514108] usb 1-3: Device not responding to setup address.
[   36.717343] usb 1-3: device not accepting address 41, error -71
[   36.720028] usb usb1-port3: unable to enumerate USB device
[   36.957364] usb 1-3: new high-speed USB device number 42 using xhci_hcd
[   37.834064] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
[   93.123494] videodev: Linux video capture interface: v2.00
[   93.158337] usb 1-3: Found UVC 1.00 device Integrated Camera (5986:212b)
[   93.257678] usbcore: registered new interface driver uvcvideo

When it fails to initialize, /dev/video* devices simply nonexistent in the filesystem and v4l2-ctl --list-devices errors with “Cannot open device /dev/video0, exiting."

When camera module initialized successfully v4l2 shows

Integrated Camera: Integrated C (usb-0000:05:00.3-3):
        /dev/video0
        /dev/video1
        /dev/media0

More often than not lsusb won't see camera at all, here's the device in question. I was able to capture during a "successful" boot

Bus 001 Device 032: ID 5986:212b Bison Electronics Inc. Integrated Camera
...

Often I observe complete flood of messages on a tty login screen when entering luks password like this which severely obstruct entering of password:

Cannot enable. Maybe the USB cable is bad?

On "successful" boot I can use webcam without any problems, suggesting pipewire layer is functional and tlp is not an issue as well. I don't have any udev rules that would affect camera module, so currently I'm at a loss. Seems to be a hardware issue that can't be helped.

Thanks in advance for any help! I would greatly appreciate any pointers or hints to resolve this issue

Last edited by paradigmshifter (2025-04-28 06:21:08)

Offline

#2 2025-04-21 16:32:31

mmy8x
Member
Registered: 2025-03-02
Posts: 97

Re: Webcam randomly fails to initialize on boot

paradigmshifter wrote:

dmesg when camera is unavailable

[   87.176751] usb 1-3: new high-speed USB device number 98 using xhci_hcd
[   88.053432] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
[   88.170046] usb 1-3: new high-speed USB device number 99 using xhci_hcd
[   89.046715] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
[   89.046884] usb usb1-port3: attempt power cycle
[   89.989826] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
[   90.106562] usb 1-3: new high-speed USB device number 101 using xhci_hcd
[   90.106649] usb 1-3: Device not responding to setup address.
[   90.309924] usb 1-3: Device not responding to setup address.
[   90.513103] usb 1-3: device not accepting address 101, error -71
[   90.513278] usb usb1-port3: unable to enumerate USB device
[   90.753337] usb 1-3: new high-speed USB device number 102 using xhci_hcd
[   91.629808] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
[   91.746382] usb 1-3: new high-speed USB device number 103 using xhci_hcd
[   92.608749] usb usb1-port3: Cannot enable. Maybe the USB cable is bad?
[   92.608919] usb usb1-port3: attempt power cycle
[   92.965677] usb 1-3: new full-speed USB device number 104 using xhci_hcd
[   93.002572] usb 1-3: not running at top speed; connect to a high speed hub
[   93.017338] usb 1-3: config 1 interface 1 altsetting 7 endpoint 0x81 has invalid maxpacket 2688, setting to 1023
[   93.017355] usb 1-3: config 1 interface 1 altsetting 8 endpoint 0x81 has invalid maxpacket 2848, setting to 1023
[   93.017364] usb 1-3: config 1 interface 1 altsetting 9 endpoint 0x81 has invalid maxpacket 3040, setting to 1023
[   93.017371] usb 1-3: config 1 interface 1 altsetting 10 endpoint 0x81 has invalid maxpacket 5056, setting to 1023
[   93.017379] usb 1-3: config 1 interface 1 altsetting 11 endpoint 0x81 has invalid maxpacket 5116, setting to 1023
[   93.032562] usb 1-3: New USB device found, idVendor=5986, idProduct=212b, bcdDevice=56.15
[   93.032580] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   93.032587] usb 1-3: Product: Integrated Camera
[   93.032594] usb 1-3: Manufacturer: SunplusIT Inc
[   93.105391] mc: Linux media interface: v0.10
[   93.123494] videodev: Linux video capture interface: v2.00
[   93.158337] usb 1-3: Found UVC 1.00 device Integrated Camera (5986:212b)
[   93.257678] usbcore: registered new interface driver uvcvideo

This looks weird, the device repeatedly fails to complete enumeration and at some point (randomly?) downgrades to full speed (i.e. 12Mbps). Then it enumerates, but it doesn't expect to run at full speed so it presents high speed descriptors, which the kernel attempts to sanitize. Not sure why it doesn't show up as a video device, but that doesn't matter much because things are quite broken at this point anyway.

Could it be a hardware problem, as suggested by the kernel? Do you have Windows on this laptop?

Offline

#3 2025-04-21 18:12:34

paradigmshifter
Member
Registered: 2025-04-21
Posts: 2

Re: Webcam randomly fails to initialize on boot

mmy8x wrote:

Could it be a hardware problem, as suggested by the kernel? Do you have Windows on this laptop?

That's my best guess as well. No, I don't, I'm thinking about booting some other OS live iso and trying out webcam. But even if it works consistently I don't even know what I have to be looking for in order to resolve problem on my daily driver in the first place. What would you look out for?

Offline

#4 2025-04-24 06:39:02

mmy8x
Member
Registered: 2025-03-02
Posts: 97

Re: Webcam randomly fails to initialize on boot

The only software thing coming to my mind is the kernel somehow configuring the xHCI USB controller wrong, or perhaps some missing initialization (a magic ACPI call to enable something that the camera needs, though not sure what that could be - for example, it does appear to have at least some power supply, or it wouldn't be doing anything at all).

Maybe you could try booting the oldest kernel you can find in the package archive.

Offline

Board footer

Powered by FluxBB