You are not logged in.

#1 Yesterday 00:46:28

Bepis
Member
Registered: 2023-10-05
Posts: 12

Built-in webcam disconnects when I try to use it

Hi all, hope you're doing great!

So I'm running into this issue where my laptop's built-in webcam will disconnect itself, then reconnect over and over when I try to use it, making it pretty much unusable.
I could not find a solution online even after looking at the issue myself for some time now so I am turning to the community for some help!

Let's say I am on a Discord call and want to turn on my webcam. As soon as I do, it loads for a few seconds before saying my camera is unavailable, and then the option comes back on. Rinse and repeat.

I tried to gather as much information as I could, so here is the dmesg output when it disconnects:

[  763.084161] usb 1-13: USB disconnect, device number 18
[  763.364705] usb 1-13: new high-speed USB device number 19 using xhci_hcd
[  763.511372] usb 1-13: New USB device found, idVendor=04f2, idProduct=b641, bcdDevice=52.10
[  763.511378] usb 1-13: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[  763.511380] usb 1-13: Product: HD Webcam
[  763.511382] usb 1-13: Manufacturer: Sonix Technology Co., Ltd.
[  763.513620] usb 1-13: Found UVC 1.00 device HD Webcam (04f2:b641)

I also tried looking for changes with the udevadm monitor command:

KERNEL[763.079903] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/video4linux/video6 (video4linux)
KERNEL[763.080388] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/video4linux/video7 (video4linux)
KERNEL[763.080482] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/media0 (media)
KERNEL[763.080551] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0 (usb)
KERNEL[763.080620] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0 (usb)
KERNEL[763.080680] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.1 (usb)
KERNEL[763.080747] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.1 (usb)
KERNEL[763.081328] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-13 (usb)
KERNEL[763.081430] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13 (usb)
UDEV  [763.092238] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/video4linux/video6 (video4linux)
UDEV  [763.092575] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/media0 (media)
UDEV  [763.093168] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/video4linux/video7 (video4linux)
KERNEL[763.506826] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13 (usb)
KERNEL[763.508279] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0 (usb)
KERNEL[763.517556] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/video4linux/video5 (video4linux)
KERNEL[763.517578] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/video4linux/video7 (video4linux)
KERNEL[763.517625] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/media0 (media)
KERNEL[763.517648] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0 (usb)
KERNEL[763.517754] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.1 (usb)
KERNEL[763.517773] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.1 (usb)
KERNEL[763.517799] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-13 (usb)
UDEV  [763.518217] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0 (usb)
UDEV  [763.518244] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.1 (usb)
UDEV  [763.520057] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0 (usb)
UDEV  [763.520105] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.1 (usb)
UDEV  [763.522218] unbind   /devices/pci0000:00/0000:00:14.0/usb1/1-13 (usb)
UDEV  [763.523789] remove   /devices/pci0000:00/0000:00:14.0/usb1/1-13 (usb)
KERNEL[763.669710] change   /devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight (backlight)
UDEV  [763.671173] change   /devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight (backlight)
UDEV  [764.208262] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13 (usb)
KERNEL[764.363317] change   /devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight (backlight)
UDEV  [764.364843] change   /devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight (backlight)
UDEV  [764.709191] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.1 (usb)
UDEV  [764.711647] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.1 (usb)
KERNEL[764.823498] change   /devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight (backlight)
UDEV  [764.825580] change   /devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight (backlight)
UDEV  [765.172607] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0 (usb)
UDEV  [765.176466] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/media0 (media)
UDEV  [765.179614] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/video4linux/video7 (video4linux)
UDEV  [765.180548] add      /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/video4linux/video5 (video4linux)
UDEV  [765.183054] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0 (usb)
UDEV  [765.187851] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-13 (usb)

I could not find anything that could cause this in my udev rules, and I even tried stopping laptop-mode.service which did not fix the issue either.

I don't know where to look from there and I might need to use my webcam in the following weeks for Teams meetings. Any help will be greatly appreciated!

Some more information:
Laptop: CyberPowerPC TRACER IV GK7MR0R Standard
Kernel: 6.12.10-arch1-1
WM: I3wm
Webcam: Chicony Electronics Co., Ltd HD Webcam


vim

Offline

#2 Yesterday 09:07:18

seth
Member
Registered: 2012-09-03
Posts: 60,756

Re: Built-in webcam disconnects when I try to use it

https://wiki.archlinux.org/title/Power_ … utosuspend ?
Otherwise we'll need to see the system journal for eg. kernel errors/warnings etc. - udev will show "that", but certainly not "why"

Offline

#3 Yesterday 20:37:22

Bepis
Member
Registered: 2023-10-05
Posts: 12

Re: Built-in webcam disconnects when I try to use it

Hi Seth, I have double-checked my udev rules. My '50-usb_power_save.rules' file was all commented out, so I tried actively blacklisting my camera for autosuspend and it did not seem to. Here is the contents of this file now:

# blacklist for usb autosuspend
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="04f2", ATTR{idProduct}=="b641", GOTO="power_usb_rules_end"

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
LABEL="power_usb_rules_end"

And here is the output of 'journalctl -xe' as requested:

Jan 29 15:30:05 Bepis-Laptop kernel: usb 1-13: USB disconnect, device number 14
Jan 29 15:30:05 Bepis-Laptop kernel: uvcvideo 1-13:1.1: Failed to resubmit video URB (-19).
Jan 29 15:30:06 Bepis-Laptop kernel: usb 1-13: new high-speed USB device number 15 using xhci_hcd
Jan 29 15:30:06 Bepis-Laptop kernel: usb 1-13: New USB device found, idVendor=04f2, idProduct=b641, bcdDevice=52.10
Jan 29 15:30:06 Bepis-Laptop kernel: usb 1-13: New USB device strings: Mfr=2, Product=1, SerialNumber=0
Jan 29 15:30:06 Bepis-Laptop kernel: usb 1-13: Product: HD Webcam
Jan 29 15:30:06 Bepis-Laptop kernel: usb 1-13: Manufacturer: Sonix Technology Co., Ltd.
Jan 29 15:30:06 Bepis-Laptop kernel: usb 1-13: Found UVC 1.00 device HD Webcam (04f2:b641)
Jan 29 15:30:06 Bepis-Laptop mtp-probe[38238]: checking bus 1, device 15: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-13"
Jan 29 15:30:06 Bepis-Laptop mtp-probe[38238]: bus: 1, device: 15 was not an MTP device
Jan 29 15:30:06 Bepis-Laptop laptop-mode[38280]: enabled, not active
Jan 29 15:30:06 Bepis-Laptop laptop-mode[38555]: LCD Brightness Command succeeded.
Jan 29 15:30:06 Bepis-Laptop laptop-mode[38887]: enabled, not active
Jan 29 15:30:07 Bepis-Laptop laptop-mode[39164]: LCD Brightness Command succeeded.
Jan 29 15:30:07 Bepis-Laptop laptop-mode[39498]: enabled, not active
Jan 29 15:30:07 Bepis-Laptop laptop-mode[39773]: LCD Brightness Command succeeded.
Jan 29 15:30:07 Bepis-Laptop mtp-probe[40042]: checking bus 1, device 15: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-13"
Jan 29 15:30:07 Bepis-Laptop mtp-probe[40042]: bus: 1, device: 15 was not an MTP device

There is indeed an error message regarding uvcvideo in here, which I will try to explore on my side as well.


vim

Offline

#4 Yesterday 22:50:04

seth
Member
Registered: 2012-09-03
Posts: 60,756

Re: Built-in webcam disconnects when I try to use it

Please never use -x (or -r) w/ journalctl and also don't copy/paste it from the pager (-e just scrolls to the end)
Post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

The uvcvideo error is "ENODEV 19 No such device" (man errno) because the usb device is gone.
The cause for that isn't in that snippet.

If you don't use stuff like TLP, adding "usbcore.autosuspend=-1" will globally disable usb autosuspend, otherwise these tools can and will change all of this (incl the udev rules) during runtime.

Offline

#5 Today 03:15:53

Bepis
Member
Registered: 2023-10-05
Posts: 12

Re: Built-in webcam disconnects when I try to use it

My bad, I use journalctl this way out of habit. Here is the output of 'journalctl -b':

http://0x0.st/882o.txt

This is right after rebooting, loading uvcvideo and replicating the issue.
At this point I will try completely disabling USB autosuspend and see if it fixes my issue. Thanks for your help so far!


vim

Offline

#6 Today 03:27:09

Bepis
Member
Registered: 2023-10-05
Posts: 12

Re: Built-in webcam disconnects when I try to use it

I just tried disabling autosuspend globally as you suggested but unfortunately the issue persists.

I also forgot to mention that I am not using TLP, but I am using laptop-mode-tools, which I think could be related? I tried stopping its service but that did nothing, and it should have no control over USB autosuspend as per my configuration.
Should I just try removing it completely?


vim

Offline

#7 Today 08:17:44

seth
Member
Registered: 2012-09-03
Posts: 60,756

Re: Built-in webcam disconnects when I try to use it

I am using laptop-mode-tools, which I think could be related?

Yes is, but disabling usb autosuspend there would be expected to suffice.

Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.1: new high-speed USB device number 6 using xhci_hcd
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.1: New USB device found, idVendor=1532, idProduct=0503, bcdDevice= 1.07
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.1: Product: Razer Seiren
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.1: Manufacturer: Razer Inc.
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.1: SerialNumber: UC1709127402041
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.2: new full-speed USB device number 8 using xhci_hcd
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.2: New USB device found, idVendor=1532, idProduct=0527, bcdDevice=50.02
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.2: Product: Razer Kraken Ultimate
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.2: Manufacturer: Razer
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.2: SerialNumber: 00000000
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.3: new full-speed USB device number 10 using xhci_hcd
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.3: New USB device found, idVendor=1017, idProduct=8021, bcdDevice= 2.10
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.3: Product: USB Gaming Mouse
Jan 29 22:08:31 Bepis-Laptop kernel: usb 1-9.3: Manufacturer: SOAI
Jan 29 22:08:33 Bepis-Laptop kernel: usb 1-9.2: 2:1: cannot get freq at ep 0x1
Jan 29 22:08:39 Bepis-Laptop kernel: usb 1-9.2: 2:1: cannot get freq at ep 0x1
Jan 29 22:08:39 Bepis-Laptop kernel: usb 1-9.2: 1:1: cannot get freq at ep 0x81
Jan 29 22:09:31 Bepis-Laptop kernel: usb 1-9.3: reset full-speed USB device number 10 using xhci_hcd
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: device descriptor read/64, error -32
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: device descriptor read/64, error -32
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: reset full-speed USB device number 10 using xhci_hcd
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: device descriptor read/64, error -32
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: device descriptor read/64, error -32
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: reset full-speed USB device number 10 using xhci_hcd
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: Device not responding to setup address.
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: Device not responding to setup address.
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: device not accepting address 10, error -71
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: WARN: invalid context state for evaluate context command.
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: reset full-speed USB device number 10 using xhci_hcd
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: Device not responding to setup address.
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: Device not responding to setup address.
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: device not accepting address 10, error -71
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: USB disconnect, device number 10
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: new full-speed USB device number 11 using xhci_hcd
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: device descriptor read/64, error -32
Jan 29 22:09:33 Bepis-Laptop kernel: usb 1-9.3: device descriptor read/64, error -32
Jan 29 22:09:34 Bepis-Laptop kernel: usb 1-9.3: new full-speed USB device number 12 using xhci_hcd
Jan 29 22:09:34 Bepis-Laptop kernel: usb 1-9.3: device descriptor read/64, error -32
Jan 29 22:09:34 Bepis-Laptop kernel: usb 1-9.3: device descriptor read/64, error -32
Jan 29 22:09:34 Bepis-Laptop kernel: usb 1-9-port3: attempt power cycle
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9.3: new full-speed USB device number 13 using xhci_hcd
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9.3: Device not responding to setup address.
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9.3: Device not responding to setup address.
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9.3: device not accepting address 13, error -71
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9.3: WARN: invalid context state for evaluate context command.
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9.3: new full-speed USB device number 14 using xhci_hcd
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9.3: Device not responding to setup address.
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9.3: Device not responding to setup address.
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9.3: device not accepting address 14, error -71
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9.3: WARN: invalid context state for evaluate context command.
Jan 29 22:09:35 Bepis-Laptop kernel: usb 1-9-port3: unable to enumerate USB device
Jan 29 22:09:39 Bepis-Laptop kernel: usb 1-9.3: new full-speed USB device number 15 using xhci_hcd
Jan 29 22:09:40 Bepis-Laptop kernel: usb 1-9.3: New USB device found, idVendor=1017, idProduct=8021, bcdDevice= 2.10
Jan 29 22:09:40 Bepis-Laptop kernel: usb 1-9.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 29 22:09:40 Bepis-Laptop kernel: usb 1-9.3: Product: USB Gaming Mouse
Jan 29 22:09:40 Bepis-Laptop kernel: usb 1-9.3: Manufacturer: SOAI

There's some noise on the bus from those devices (Razer Seiren/Kraken and a SOI "Gaming Mouse") - detach those and see whether the issue w/ the webcam remains.
On top of that there seems a related bogus udev script, /etc/udev/scripts/togTouchpad.sh - disable that as well.

And right before the webcam is a "Microsoft® Nano Transceiver", is that a dongle or built-in?
For a dongle: unplug that as well.

Offline

Board footer

Powered by FluxBB