Webcam has recently started stopping midway. Previously worked perfectly on 10+ hour prints

Camera model
Generic Webcam and reproduced with a Logitech C270

What is the problem?
The video stops working mid print, after a few minutes of the print starting.
This has previously worked flawlessly for 10+ hour prints. No hardware changes have been made between the perfect operation and this new issue.

What did you already try to solve it?

The print does not stop when the webcam cuts out, and the webcam can be restarted with sudo service webcamd restart but it again stops working after a few minutes.

Checked my power, but I'm consistently able to source 5A, and my voltage never drops below 5.05V - so that isn't a problem.

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

No logs present in cd /var/log/

Additional information about your setup (OctoPrint version, OctoPi version, ...)

  • OctoPrint: 1.5.2
  • Python: 2.7.16
  • OctoPi: 0.17.0
  • RPi: Raspberry Pi 4 Model B Rev 1.1
  • Installed Plugins:
  • Bed Visualizer
  • BLTouch Plugin
  • Cancel Objects
  • DisplayZ
  • Floating Navbar
  • Fullscreen Plugin
  • Gcodebar Plugin
  • GcodeEditor
  • M73 Progress Plugin
  • Navbar Temperature Plugin
  • Octolapse
  • PolarCloud
  • PrintTimeGenius Plugin
  • Resource Monitor
  • Simple Filament Change Buttons
  • Themeify
  • UI Customizer
  • WebcamTab

I guess it's a power related issue but you ruled that out.
I would disconnect every other usb device (including the printer) and try it with the virtual printer.

Thanks @PrintedWeezl!

The behavior is identical with the virtual printer option for both cameras (generic webcam + C270).

I also upgraded my python to python3, and still the same behavior on both cameras.

Here's my journalctl -u webcamd output:

pi@octopi:~ $ journalctl -u webcamd
-- Logs begin at Tue 2020-12-29 19:36:10 GMT, end at Tue 2020-12-29 19:37:46 GMT. --
Dec 29 19:36:13 octopi systemd[1]: Starting the OctoPi webcam daemon with the user specified config...
Dec 29 19:36:13 octopi webcamd[319]: Starting up webcamDaemon...
Dec 29 19:36:13 octopi webcamd[319]: --- Configuration: ----------------------------
Dec 29 19:36:13 octopi webcamd[319]: cfg_file: /boot/octopi.txt
Dec 29 19:36:13 octopi webcamd[319]: camera: auto
Dec 29 19:36:13 octopi webcamd[319]: usb options: -r 1920x1080 -f 10
Dec 29 19:36:13 octopi webcamd[319]: raspi options: -fps 10
Dec 29 19:36:13 octopi webcamd[319]: http options: -w ./www-octopi -n
Dec 29 19:36:13 octopi webcamd[319]: Explicitly USB device:
Dec 29 19:36:13 octopi webcamd[319]: -----------------------------------------------
Dec 29 19:36:14 octopi webcamd[319]: Found video devices:
Dec 29 19:36:14 octopi webcamd[319]: /dev/video0
Dec 29 19:36:14 octopi webcamd[319]: /dev/video1
Dec 29 19:36:14 octopi webcamd[319]: /dev/video10
Dec 29 19:36:14 octopi webcamd[319]: /dev/video11
Dec 29 19:36:14 octopi webcamd[319]: /dev/video12
Dec 29 19:36:14 octopi webcamd[319]: /dev/video13
Dec 29 19:36:14 octopi webcamd[319]: /dev/video14
Dec 29 19:36:14 octopi webcamd[319]: /dev/video15
Dec 29 19:36:14 octopi webcamd[319]: /dev/video16
Dec 29 19:36:14 octopi webcamd[319]: config file='/boot/octopi.txt':USB device was not set in options, start MJPG-streamer with the first found video device:
Dec 29 19:36:14 octopi root[431]: Starting USB webcam
Dec 29 19:36:14 octopi webcamd[319]: <13>Dec 29 19:36:14 root: Starting USB webcam
Dec 29 19:36:14 octopi webcamd[319]: Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 1920x1080 -f 10 -d /dev/video0
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: starting application
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: MJPG Streamer Version: git rev: 501f6362c5afddcfb41055f97ae484252c85c912
Dec 29 19:36:14 octopi webcamd[319]: MJPG Streamer Version: git rev: 501f6362c5afddcfb41055f97ae484252c85c912
Dec 29 19:36:14 octopi webcamd[319]: i: Using V4L2 device.: /dev/video0
Dec 29 19:36:14 octopi webcamd[319]: i: Desired Resolution: 1920 x 1080
Dec 29 19:36:14 octopi webcamd[319]: i: Frames Per Second.: 10
Dec 29 19:36:14 octopi webcamd[319]: i: Format............: JPEG
Dec 29 19:36:14 octopi webcamd[319]: i: TV-Norm...........: DEFAULT
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: Using V4L2 device.: /dev/video0
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: Desired Resolution: 1920 x 1080
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: Frames Per Second.: 10
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: Format............: JPEG
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: TV-Norm...........: DEFAULT
Dec 29 19:36:14 octopi webcamd[319]: i: FPS coerced ......: from 10 to 30
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: FPS coerced ......: from 10 to 30
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_ADD - Error at Pan (relative): Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_ADD - Error at Tilt (relative): Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_ADD - Error at Pan Reset: Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_ADD - Error at Tilt Reset: Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_ADD - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_MAP - Error at Pan (relative): Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_MAP - Error at Tilt (relative): Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_MAP - Error at Pan Reset: Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_MAP - Error at Tilt Reset: Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_MAP - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_MAP - Error at Focus (absolute): Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_MAP - Error at LED1 Mode: Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_MAP - Error at LED1 Frequency: Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_MAP - Error at Disable video processing: Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: UVCIOC_CTRL_MAP - Error at Raw bits per pixel: Inappropriate ioctl for device (25)
Dec 29 19:36:14 octopi webcamd[319]: o: www-folder-path......: ./www-octopi/
Dec 29 19:36:14 octopi webcamd[319]: o: HTTP TCP port........: 8080
Dec 29 19:36:14 octopi webcamd[319]: o: HTTP Listen Address..: (null)
Dec 29 19:36:14 octopi webcamd[319]: o: username:password....: disabled
Dec 29 19:36:14 octopi webcamd[319]: o: commands.............: disabled
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: www-folder-path......: ./www-octopi/
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: HTTP TCP port........: 8080
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: HTTP Listen Address..: (null)
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: username:password....: disabled
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: commands.............: disabled
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: starting input plugin input_uvc.so
Dec 29 19:36:14 octopi mjpg_streamer[443]: MJPG-streamer [443]: starting output plugin: output_http.so (ID: 00)
Dec 29 19:36:15 octopi webcamd[319]: Done bring up all configured video device
Dec 29 19:36:15 octopi webcamd[319]: Goodbye...
Dec 29 19:36:15 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Dec 29 19:37:46 octopi webcamd[319]: Unable to dequeue buffer: No such device
Dec 29 19:37:46 octopi webcamd[319]: i: Error grabbing frames
Dec 29 19:37:46 octopi webcamd[319]: i: cleaning up resources allocated by input thread
Dec 29 19:37:46 octopi webcamd[319]: Unable to stop capture: No such device
Dec 29 19:37:46 octopi mjpg_streamer[443]: MJPG-streamer [443]: Error grabbing frames
Dec 29 19:37:46 octopi mjpg_streamer[443]: MJPG-streamer [443]: cleaning up resources allocated by input thread