Webcam spontaneous disconnections

Camera model
Generic 1080p Webcam
lsusb says "Bus 001 Device 005: ID 05a3:9331 ARC International Camera"

What is the problem?
The camera disconnects irregularly. I have no idea why it could be.

What did you already try to solve it?
Recently, I have been monitoring the connection of the webcam. Unfortunately, the data does not yet give me any information about the cause.

Since I started monitoring, the webcam has been running at the following times:

  • 2022-03-27 17:12:55 - 2022-03-30 18:40:39
  • 2022-03-30 19:00:30 - 2022-04-01 03:15:39
  • 2022-04-01 09:27:30 - 2022-04-01 09:54:39

In these times, I mainly printed or the Pi didn't do anything.
After a restart, the webcam was accessible again.

With the last entry, I stopped a print before the connection was lost.

Since I sometimes also had problems uploading data, I looked to see if the CPU or RAM were causing problems during these times, but these values are all in the normal range at the same time.

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)

webcamd.log
 i: select() timeout
 i: cleaning up resources allocated by input thread
Starting up webcamDaemon...

--- Configuration: ----------------------------
cfg_file:      /boot/octopi.txt
camera:        usb
usb options:   -r 1920x1080 -f 20
raspi options: -fps 10
http options:  -w ./www-octopi -n --listen 127.0.0.1

Explicitly USB device: 
-----------------------------------------------

Found video devices:
/dev/video0
/dev/video1
/dev/video10
/dev/video11
/dev/video12
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/video18
config file='/boot/octopi.txt':USB device was not set in options, start MJPG-streamer with the first found video device: /dev/video0
<13>Apr  1 10:30:52 root: Starting USB webcam
Checking for VL805 (Raspberry Pi 4)...
  - It seems that you don't have VL805 (Raspberry Pi 4).
    There should be no problems with USB (a.k.a. select() timeout)
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n --listen 127.0.0.1 -i input_uvc.so -r 1920x1080 -f 20 -d /dev/video0
MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 1920 x 1080
 i: Frames Per Second.: 20
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
 i: FPS coerced ......: from 20 to 30
UVCIOC_CTRL_ADD - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Mode: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Frequency: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Disable video processing: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Raw bits per pixel: Inappropriate ioctl for device (25)
 o: www-folder-path......: ./www-octopi/
 o: HTTP TCP port........: 8080
 o: HTTP Listen Address..: 127.0.0.1
 o: username:password....: disabled
 o: commands.............: disabled
Done bring up all configured video device

Goodbye...
syslog

Before each crash, the same two messages come:

Apr  1 03:15:04 octopi MJPG-streamer [480]: select() timeout
Apr  1 03:15:04 octopi MJPG-streamer [480]: cleaning up resources allocated by input thread

Additional information about your setup (OctoPrint version, OctoPi version, ...)
I use the following versions on a Pi 3B:

  • OctoPrint 1.7.3
  • Python 3.7.3
  • OctoPi 0.18.0