mainsail-crew / crowsnest

Webcam Service for multiple Cams
GNU General Public License v3.0
302 stars 71 forks source link

No signal for USB webcam on system startup, recognized after replugging it (Failed to set UVC probe control : -71 (exp. 26)) #265

Closed HitLuca closed 1 month ago

HitLuca commented 1 month ago

What happened

I have a logitech C270 webcam which has always behaved weirdly when used on my klipper machine: at first boot the Mainsail interface shows no signal, and restarting klipper doesn't help. The video feed comes back only after I unplug and replug the webcam into my Raspberry Pi. Crowsnest logs don't seem to show issues, but dmesg is full of the same error: Failed to set UVC probe control : -71 (exp. 26).

dmesg output after the unplug-replug step becomes

[64923.135088] uvcvideo 1-1.2:1.1: Failed to set UVC probe control : -71 (exp. 26).
[...]
[64922.133135] uvcvideo 1-1.2:1.1: Failed to set UVC probe control : -71 (exp. 26).
[64924.136821] uvcvideo 1-1.2:1.1: Failed to set UVC probe control : -71 (exp. 26).
[64924.741494] usb 1-1.2: USB disconnect, device number 4
[64924.999006] usb 1-1.2: new high-speed USB device number 7 using dwc_otg
[64925.315032] usb 1-1.2: New USB device found, idVendor=046d, idProduct=0825, bcdDevice= 0.12
[64925.315065] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=2
[64925.315079] usb 1-1.2: SerialNumber: AEEF80A0
[64925.315932] usb 1-1.2: Found UVC 1.00 device <unnamed> (046d:0825)
[64925.428107] input: UVC Camera (046d:0825) as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input1
[64926.009120] usb 1-1.2: 3:1: cannot get freq at ep 0x86
[64926.012388] usb 1-1.2: 3:2: cannot set freq 24000 to ep 0x86
[64926.015059] usb 1-1.2: 3:3: cannot set freq 32000 to ep 0x86
[64926.018402] usb 1-1.2: 3:4: cannot set freq 48000 to ep 0x86
[64926.039864] usb 1-1.2: 5:2: cannot get min/max values for control 2 (id 5)
[64926.042633] usb 1-1.2: USB disconnect, device number 7
[64928.807019] usb 1-1.2: new high-speed USB device number 8 using dwc_otg
[64929.123052] usb 1-1.2: New USB device found, idVendor=046d, idProduct=0825, bcdDevice= 0.12
[64929.123090] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=2
[64929.123107] usb 1-1.2: SerialNumber: AEEF80A0
[64929.124179] usb 1-1.2: Found UVC 1.00 device <unnamed> (046d:0825)
[64929.236726] input: UVC Camera (046d:0825) as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input2
[64930.604136] usb 1-1.2: set resolution quirk: cval->res = 384

What did you expect to happen

USB webcam should show a video feed

How to reproduce

Boot the raspberry pi, open mainsail and note the No Signal error. Unplug, the webcam and replug it, the feed starts as normal

Additional information

crowsnest.conf

[crowsnest]
log_path: /home/pi/printer_data/logs/crowsnest.log
log_level: verbose                      # Valid Options are quiet/verbose/debug
delete_log: false                       # Deletes log on every restart, if set to true
no_proxy: false

[cam 1]
mode: ustreamer                        # ustreamer - Provides mjpg and snapshots. (All devices)
                                        # camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)
enable_rtsp: false                      # If camera-streamer is used, this enables also usage of an rtsp server
rtsp_port: 8554                         # Set different ports for each device!
port: 8080                              # HTTP/MJPG Stream/Snapshot Port
device: /dev/v4l/by-id/usb-046d_0825_AEEF80A0-video-index0                   # See Log for available ...
resolution: 640x480 #1280x960 #640x480                     # widthxheight format
max_fps: 15                             # If Hardware Supports this it will be forced, otherwise ignored/coerced.
#custom_flags:                          # You can run the Stream Services with custom flags.
#v4l2ctl:                               # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of.
github-actions[bot] commented 1 month ago

Ahoi!

It looks like this ticket is a request for help (or similar). Many helpful people will not see your message here and you are unlikely to get a useful response.

We use the Github Issue-Tracker only for development related topics, like feature requests, bug reports etc. To get help, please join our Discord-Server or ask in Github Discussions:

This ticket will be automatically closed.

Fair wind and a following sea! ~ Your friendly MainsailGithubBot

PS: I'm just an automated script, not a real sailor.