Somewhere between OrangePi, Debian, Mainsail/Crowsnest I have a repeatable hiccup. If I power down my Pi, restart it, Mainsail/Crowsnest no longer sees my Logitech USB camera. The camera shows connected in Debian (ls -l /dev/vid*). I must open the Mainsail web page, then unplug the camera, wait a couple seconds, plug it back in and all is fine. Any idea on where I should look?
#USB camera and Orange Pi
25 messages · Page 1 of 1 (latest)
First of all send a crowsnest.log please. Maybe something inside there that will give us some more information.
Also look at v4l2-ctl --list-devices instead of ls -l /dev/vid*. Maybe it's connected but not correctly registered by the system
details to follow!
it says:
orangepi@orangepi4-lts:~$ v4l2-ctl --list-devices
UVC Camera (046d:0809) (usb-xhci-hcd.1.auto-1):
/dev/video0
/dev/video1
/dev/media0
screen shot
Can you please set
log_level: debug
delete_log: true
```and then replicate the issue and fix it once?
I changed the settings then paid closer attention to the steps. The first time, power on, wait for boot to complete, unplug camera, wait count of five, plug back in. Did this several times, no luck. Opened Mainsail in Chrome, back out, unplug, plug several times varying the time unplugged. No luck still. Second attempt, power on, wait for boot. Open Mainsail in Chrome first, unplug, wait count of three plug and success! Here is the log of the "success":
PS, thank you so much for taking the time to investigate this for me. This problem is a pain in the butt having to tilt the Voron over to reach the USB port on the Pi.
Another tid bit, a "firmware restart" does not initiate the problem. Camera will still be there after the restart
A normal firmware restart, just restarts klipper, moonraker and mainsail ig. It won't restart crowsnest or reset the drivers
I see a familiar issue here
INFO [60.920 stream] -- Capturing ...
ERROR [62.923 stream] -- Mainloop select() error: Inappropriate ioctl for device
INFO [62.923 stream] -- Destroying workers pool JPEG ...
INFO [62.928 stream] -- Capturing stopped
I have to look for the other post, to see what we did there
What Logitech cam are you using exactly? I think there were problems with other devices in the past too.
It doesn't seem like the Mainloop select() error: Inappropriate ioctl for device is the real problem here. It seems like ERROR [66.036 stream] -- Can't set device format: Input/output error is the culprit.
Can you send the output of dmesg?
Logitech QuickCam Pro 9000
Can you send the output of dmesg with the bug occuring once?
Did you run apt full-upgrade or something like that by any chance?
**********************************************************
** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **
** **
** trace_printk() being used. Allocating extra memory. **
** **
** This means that this is a DEBUG kernel and it is **
** unsafe for production use. **
** **
** If you see this message and you are not debugging **
** the kernel, report this immediately to your vendor! **
** **
** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **
**********************************************************
Or is this something normal for OrangePi?
@grand shoal I guess it's someone for you again.
Logitech QuickCam Pro 9000 that needs replug after every reboot. Replied to the debug log that got the bug reproduced and that looks a bit weird tbh.
Also attached the dmesg of another reboot as txt file. It's mainly spamming uvcvideo: Failed to set UVC probe control : -110 (exp. 26).
Any ideas?
Well, I never seen that before but obviously there where a Bug in 5.x leading to that. Unfortunatly there is nothing we can do about. This is kernel/userspace dependend
So, understanding the conversation. I just have to hope the Debian system gets an upgrade or repair that fixes this. Is that correct? Also thank you for taking the time to investigate 
In your case, its a bit more complicated. You need to hope for a upgraded kernel from OrangePi, since OrangePi doesnt contribute to upstream, no matter if its ubuntu or Debian based image, they use their own patched version of the linux kernel (to get wifi to work).