USB Webcam stops working randomly after a few hours

Camera model

What is the problem?

The Problem is that when I start octoprint the camera just works fine. Sometimes for 10-15 min sometimes a few hours but then the stream suddenly stops and I get the loading stream message.

What did you already try to solve it?
I tried:
-reboot
-safe mode
-reinstalling octopi
-Use of powerd usb hub

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)
webcamd.log (10.7 KB)
syslog.log (1.1 MB)
dmesg.log (22.5 KB)

Additional information about your setup (OctoPrint version, OctoPi version, ...)
I am running:

octopi: 0.18.0
octoprint 1.7.3

on a Rpi 3b+

Edit:
After lowering the resoulution and letting it run again I now get different errors when I am running dmesg. For me it seams that it has problems with the USB ports or the driver.
dmesg2.log (33.9 KB)

I digged a little bit deeper and found out that /dev/video0 is no longer there. Instead, the camera seams to stream to /dev/video1 when I now change my mjpeg-streamer configuration to listen on /dev/video1 and restarting the webcamd service the cam is working again.

After a few hours, I get the same problem again. The USB device gets disconnected somehow and then /dev/video1 is not available, but now /dev/video0 is back again. Another side effect of this behavior is that it interrupts the print and the serial connection gets lost which is bad. Long prints are not possible with webcam feed.

Hi!

I had a similar problem which I solved by lowering the webcam resolution from 1080p to 720p. This, of course, is not really a solution but rather a workaround.

An alternate solution was to run

sudo service webcamd restart

Which brought the cam back for a while

Hello,
I have also tried to restart webcamd service, but with no success. it seams that the cam is only coming back when I restart the system.

I will try lowering the resoulution and see if it is better.

1 Like